Rate This Document
Findability
Accuracy
Completeness
Readability

EncodeOneFrame

Function Usage

Encodes the data of one frame.

Restrictions

N/A

Prototype

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

Parameters

src: uint8_t pointer type, which points to the address of the data to be encoded. The field of this parameter is 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. The field of this parameter is 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 type, which indicates the encoded data. The field of this parameter is as follows:

Field Name

Input/Output

Field Type

Description

outputData

Output

uint8_t **

Encoded data

outputSize: uint32_t pointer, which indicates the length of the encoded data. The field of this parameter is as follows:

Field Name

Input/Output

Field Type

Description

outputSize

Output

uint32_t *

Length of the encoded data, in bytes

Returns

Data type: EncoderRetCode

The value can be:

  • VIDEO_ENCODER_SUCCESS: The data of one frame is successfully encoded.
  • VIDEO_ENCODER_ENCODE_FAIL: The data of one frame fails to be encoded.