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

CreateDecoder

Function Usage

Creates a decoder.

Restrictions

N/A

Prototype

DecoderRetCode CreateDecoder(MediaStreamFormat decType)

Parameter Description

Parameter

Input/Output

Type

Description

decType

Input

MediaStreamFormat

To-be-decoded stream type.

Enumeration of MediaStreamFormat:

// Decoding input formats
enum MediaStreamFormat : uint32_t {
    STREAM_FORMAT_AVC,
    STREAM_FORMAT_HEVC,
    STREAM_FORMAT_NONE
};

Return Value Description

Data type: DecoderRetCode

The value can be any of the following:

  • VIDEO_DECODER_SUCCESS: The decoder is successfully created.
  • VIDEO_DECODER_CREATE_FAIL: Failed to create a decoder.