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

EncodeOneFrame

Function Usage

Encodes data of one frame.

Restrictions

N/A

Prototype

EncoderRetCode EncodeOneFrame(const uint8_t *inputData, uint32_t inputSize, uint8_t **outputData, uint32_t *outputSize)

Parameter Description

inputData: uint8_t pointer, which points to the address of the data to be encoded. This field is described as follows.

Field Name

Input/Output

Field Type

Description

inputData

Input

const uint8_t *

Start address of the buffer for storing data to be encoded. The data format is YUV420p.

inputSize: uint32_t type, which indicates the length of the data to be encoded. This field is described as follows.

Field Name

Input/Output

Field Type

Description

inputSize

Input

uint32_t

Length of the data to be encoded, in bytes.

outputData: uint8_t two-dimensional pointer, which points to the output data. This field is described as follows.

Field Name

Input/Output

Field Type

Description

outputData

Output

uint8_t **

Output data.

outputSize: uint32_t type, which indicates the length of the output data. This field is described as follows.

Field Name

Input/Output

Field Type

Description

outputSize

Output

uint32_t *

Length of the output data, in bytes.

Return Value Description

Data type: EncoderRetCode

The value can be any of the following:

  • VIDEO_ENCODER_SUCCESS: Data of one frame is successfully encoded.
  • VIDEO_ENCODER_ENCODE_FAIL: Failed to encode data of one frame.