VencEncodeOneFrame
Function Usage
The video encoder encodes a frame of data.
Restrictions
N/A
Prototype
EncoderRetCode VencEncodeOneFrame(uint32_t encHandle, const uint8_t *inputData, uint32_t inputSize, uint8_t **outputData, uint32_t *outputSize)
Parameters
Parameter |
Input/Output |
Type |
Description |
|---|---|---|---|
encHandle |
Input |
uint32_t |
Handle to an encoder object, which uniquely identifies an encoder instance. |
inputData |
Input |
const uint8_t * |
Address of the input data to be encoded. |
inputSize |
Input |
uint32_t |
Size of the input data to be encoded. |
outputData |
Output |
uint8_t ** |
Address of the encoded output data. The memory lifecycle is managed by the encoder. |
outputSize |
Output |
uint32_t * |
Size of the encoded output data. |
Returns
The returns of EncoderRetCode are as follows:
- VIDEO_ENCODER_SUCCESS: A frame of data is successfully encoded.
- VIDEO_ENCODER_ENCODE_FAIL: The encoder handle does not exist.
- VIDEO_ENCODER_INIT_FAIL: The encoder fails to be initialized.