protected class

WriterBase.WriterCallback

extends EncoderBase.Callback

 java.lang.Object

androidx.heifwriter.EncoderBase.Callback

↳androidx.heifwriter.WriterBase.WriterCallback

Overview

Callback from the encoder.

Summary

Constructors
protectedWriterCallback()

Methods
public abstract voidonComplete(EncoderBase encoder)

Called when encoding reached the end of stream without error.

public voidonDrainOutputBuffer(EncoderBase encoder, java.nio.ByteBuffer byteBuffer)

Upon receiving an output buffer from the encoder (which is one image when grid is not used, or one tile if grid is used), add that sample to the muxer.

public abstract voidonError(EncoderBase encoder, CodecException e)

Called when encoding hits an error.

public voidonOutputFormatChanged(EncoderBase encoder, MediaFormat format)

Upon receiving output format from the encoder, add the requested number of image tracks to the muxer and start the muxer.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

protected WriterCallback()

Methods

public void onOutputFormatChanged(EncoderBase encoder, MediaFormat format)

Upon receiving output format from the encoder, add the requested number of image tracks to the muxer and start the muxer.

public void onDrainOutputBuffer(EncoderBase encoder, java.nio.ByteBuffer byteBuffer)

Upon receiving an output buffer from the encoder (which is one image when grid is not used, or one tile if grid is used), add that sample to the muxer.

public abstract void onComplete(EncoderBase encoder)

Called when encoding reached the end of stream without error.

Parameters:

encoder: The EncoderBase object.

public abstract void onError(EncoderBase encoder, CodecException e)

Called when encoding hits an error.

Parameters:

encoder: The EncoderBase object.
e: The exception that the codec reported.