Rate This Document
Findability
Accuracy
Completeness
Readability

EncodeOneFrame

Function Usage

Encodes data of one frame.

Prototype

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

Parameter Description

Parameter

Input/Output

Type

Description

fd

Input

int32_t

Encoder descriptor.

inputData

Input

const uint8_t *

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

inputSize

Input

uint32_t

Length of the data to be encoded, in bytes.

outputData

Output

uint8_t **

Output data.

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.