Config
Function Usage
Inputs the initial configuration of the encoder. This API needs to be called before InitEncoder.
Restrictions
N/A
Prototype
EncoderRetCode Config(const VmiEncoderConfig &config)
Parameter Description
Parameter |
Input/Output |
Type |
Description |
|---|---|---|---|
config |
Input |
struct VmiEncoderConfig |
Encoder configuration. |
Struct declarations of VmiEncoderConfig and VmiEncoderParams are as follows:
struct VmiEncoderParams {
uint32_t bitRate = 3000000;
uint32_t gopSize = 30;
uint32_t profile = 1;
uint32_t keyFrame = 0;
};
struct VmiEncoderConfig {
uint32_t width = 720;
uint32_t height = 1280;
uint32_t frameRate = 30;
VmiEncoderParams encodeParams;
};
Return Value Description
Data type: EncoderRetCode
The value can be any of the following:
- VIDEO_ENCODER_SUCCESS: The encoder is successfully configured.
Parent topic: Encoding APIs (C and C++)