我要评分
获取效率
正确性
完整性
易理解

API Description

The video decoding module provides external video decoding APIs required for the normal running of the video stream engine server. These APIs are implemented by secondary developers and provided as a DLL. The name of the DLL is libVideoDecoder.so.

Developers can inherit the VideoDecoder class and implement the APIs according to the description in this section. In addition, CreateVideoDecoder and DestroyVideoDecoder are provided for creating specific instances of this implementation class.

The return codes are defined as follows:
enum DecoderRetCode : uint32_t {
    VIDEO_DECODER_SUCCESS,                // Success.
    VIDEO_DECODER_CREATE_FAIL,            // Failed to create a decoder.
    VIDEO_DECODER_INIT_FAIL,              // Failed to initialize the decoder.
    VIDEO_DECODER_START_FAIL,             // Failed to start the decoder.
    VIDEO_DECODER_DECODE_FAIL,            // Decoding failure.
    VIDEO_DECODER_STOP_FAIL,              // Failed to stop the decoder.
    VIDEO_DECODER_DESTROY_FAIL,           // Failed to destroy the decoder.
    VIDEO_DECODER_RESET_FAIL,             // Failed to reset the decoder.
    VIDEO_DECODER_GET_DECODE_PARAMS_FAIL, // Failed to obtain decoding parameters.
    VIDEO_DECODER_SET_DECODE_PARAMS_FAIL, // Failed to set decoding parameters.
    VIDEO_DECODER_SET_FUNC_FAIL,          // Failed to set the callback.
    VIDEO_DECODER_WRITE_OVERFLOW,         // Write overflow.
    VIDEO_DECODER_READ_UNDERFLOW,         // Read underflow.
    VIDEO_DECODER_BAD_PIC_SIZE,           // The resolution after decoding is inconsistent with the configured resolution.
    VIDEO_DECODER_EOS
};