public static interface Codec.ICodecListener
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
onError(int errorCode,
int act,
int trackId) |
Reports an error that occurs during encoding or decoding.
|
void |
onReadBuffer(ByteBuffer outputBuffer,
BufferInfo info,
int trackId) |
Reports encoded or decoded data.
|
void onReadBuffer(ByteBuffer outputBuffer, BufferInfo info, int trackId)
Codec.writeBuffer(java.nio.ByteBuffer, ohos.media.common.BufferInfo), the codec calls
this method to asynchronously notify the application of the encoded or decoded data.outputBuffer - Contains encoded or decoded data.info - Indicates the outputBuffer parameter.trackId - Indicates the ID of the track where the data is located in pipeline mode. This parameter is
invalid in normal mode.void onError(int errorCode,
int act,
int trackId)
errorCode - Indicates the error type, such as resource insufficiency or reclaimed resources.act - Indicates the scenario in which the error occurs.trackId - Indicates the ID of the track where the data is located in pipeline mode. This parameter is
invalid in normal mode.