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

SetParams

Function Usage

Sets the encoding parameters of the encoder.

Restrictions

This parameter passes through the parameters listed in Configuration Parameters to VmiEncoderParams. The restrictions on these parameters are still valid.

Prototype

EncoderRetCode SetParams(const VmiEncoderParams& params)

Parameter Description

Parameter

Input/Output

Type

Description

params

Input

struct VmiEncoderParams

Encoding parameters to be set.

The struct declaration of VmiEncoderParams is as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
struct VmiEncoderParams {
    uint32_t bitRate = 3000000;
    uint32_t gopSize = 30;
    uint32_t profile = 1;
    uint32_t keyFrame = 0;
    uint32_t rcMode = 2;                        // Rate control mode
    uint32_t crf = 34;                          // CRF bit rate control level
    uint32_t maxCrfRate = 20000000;             // Maximum CRF bit rate
    int32_t vbvBufferSize = 1000;               // Size of the CRF bit rate buffer
};

Return Value Description

Data type: EncoderRetCode

The value can be any of the following:

VIDEO_ENCODER_SUCCESS: The encoder is successfully set.