Skip to content
huashi edited this page Nov 18, 2014 · 8 revisions

This file describes the interface of ISVCEncoder

Class:ISVCEncoder

Initialize the encoder.

Return:
CM_RETURN: 0 - success; otherwise - failed;

Name Type Descritpion
pParam const SEncParamBase * basic encoder parameter

Initilaize encoder by using extension parameters.

Return:
CM_RETURN: 0 - success; otherwise - failed;

Name Type Descritpion
pParam const SEncParamExt * extension parameter for encoder

Get the default extension parameters. If you want to change some parameters of encoder, firstly you need to get the default encoding parameters, after that you can change part of parameters you want to.

Return:
CM_RETURN: 0 - success; otherwise - failed;

Name Type Descritpion
pParam SEncParamExt * extension parameter for encoder

uninitialize the encoder

Encode one frame.

Return:
0 - success; otherwise -failed;

Name Type Descritpion
kpSrcPic const SSourcePicture * the pointer to the source luminance plane chrominance data: CbData = kpSrc + m_iMaxPicWidth * m_iMaxPicHeight; CrData = CbData + (m_iMaxPicWidth * m_iMaxPicHeight)/4; the application calling this interface needs to ensure the data validation between the location
pBsInfo SFrameBSInfo * output bit stream

Encode the parameters from output bit stream.

Return:
0 - success; otherwise - failed;

Name Type Descritpion
pBsInfo SFrameBSInfo * output bit stream

Force encoder to encoder frame as IDR if bIDR set as true.

Return:
0 - success; otherwise - failed;

Name Type Descritpion
bIDR bool true: force encoder to encode frame as IDR frame;false, return 1 and nothing to do

Set option for encoder, detail option type, please refer to enumurate ENCODER_OPTION.

Return:
CM_RETURN: 0 - success; otherwise - failed;

Name Type Descritpion
eOptionId ENCODER_OPTION  
pOption void * option for encoder such as InDataFormat, IDRInterval, SVC Encode Param, Frame Rate, Bitrate,...

Set option for encoder, detail option type, please refer to enumurate ENCODER_OPTION.

Return:
CM_RETURN: 0 - success; otherwise - failed;

Name Type Descritpion
eOptionId ENCODER_OPTION  
pOption void * option for encoder such as InDataFormat, IDRInterval, SVC Encode Param, Frame Rate, Bitrate,...

Create encoder.

Return:
0 - success; otherwise - failed;

Name Type Descritpion
ppEncoder ISVCEncoder ** encoder

Destroy encoder.

Return:
void

Name Type Descritpion
pEncoder ISVCEncoder * encoder