一:创建编码器,初始化设置:
说明:不是所有参数都是要设置,可以通过 int EXTAPI GetDefaultParams (SEncParamExt* pParam) = 0;获取默认参数,然后修改几个主要初始化编码参数;
1.1: 常用初始化参数设置:
typedef struct TagEncParamBase {
EUsageType
iUsageType; ///< application type; please refer to the definition of EUsageType
int iPicWidth; ///< width of picture in luminance samples (the maximum of all layers if multiple spatial layers presents)
int iPicHeight; ///< height of picture in luminance samples((the maximum of all layers if multiple spatial layers presents)
int iTargetBitrate; ///< target bitrate desired, in unit of bps
RC_MODES iRCMode; ///< rate control mode
float fMaxFrameRate; ///< maximal input frame rate
} SEncParamBase
1.2:扩展初始化参数设置:
typedef struct TagEncParam