public abstract static class MediaCodec.Callback extends Object
Constructor and Description |
---|
Callback() |
Modifier and Type | Method and Description |
---|---|
abstract void |
onError(MediaCodec codec,
MediaCodec.CodecException e)
Called when the MediaCodec encountered an error
|
abstract void |
onInputBufferAvailable(MediaCodec codec,
int index)
Called when an input buffer becomes available.
|
abstract void |
onOutputBufferAvailable(MediaCodec codec,
int index,
MediaCodec.BufferInfo info)
Called when an output buffer becomes available.
|
abstract void |
onOutputFormatChanged(MediaCodec codec,
MediaFormat format)
Called when the output format has changed
|
public abstract void onInputBufferAvailable(MediaCodec codec, int index)
codec
- The MediaCodec object.index
- The index of the available input buffer.public abstract void onOutputBufferAvailable(MediaCodec codec, int index, MediaCodec.BufferInfo info)
codec
- The MediaCodec object.index
- The index of the available output buffer.info
- Info regarding the available output buffer MediaCodec.BufferInfo
.public abstract void onError(MediaCodec codec, MediaCodec.CodecException e)
codec
- The MediaCodec object.e
- The MediaCodec.CodecException
object describing the error.public abstract void onOutputFormatChanged(MediaCodec codec, MediaFormat format)
codec
- The MediaCodec object.format
- The new output format.