Merge pull request #394 from ruil2/encoder_update

add timestamp in encoder interface --- review request#138
This commit is contained in:
volvet 2014-03-03 17:31:48 +08:00
commit c7d98a8fa3
2 changed files with 3 additions and 1 deletions

View File

@ -287,6 +287,7 @@ typedef struct {
SLayerBSInfo sLayerInfo[MAX_LAYER_NUM_OF_FRAME];
int eOutputFrameType;
long long uiTimeStamp;
} SFrameBSInfo, *PFrameBSInfo;
typedef struct Source_Picture_s {
@ -295,6 +296,7 @@ typedef struct Source_Picture_s {
unsigned char* pData[4]; // plane pData
int iPicWidth; // luma picture width in x coordinate
int iPicHeight; // luma picture height in y coordinate
long long uiTimeStamp;
} SSourcePicture;

View File

@ -2998,7 +2998,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo * pFbi, const SSou
pCtx->iEncoderError = ENC_RETURN_SUCCESS;
pFbi->iLayerNum = 0; // for initialization
pFbi->uiTimeStamp = pSrcPic->uiTimeStamp;
// perform csc/denoise/downsample/padding, generate spatial layers
iSpatialNum = pCtx->pVpp->BuildSpatialPicList (pCtx, &pSrcPic, 1);
if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate)