shithub: openh264

Download patch

ref: e0e7107ff14b3472e9e917efb2ce6340c5740a45
parent: b55294445391d816e89c9c8c4571635ad1d5f2a7
author: unknown <[email protected]>
date: Mon Mar 3 12:05:06 EST 2014

add timestamp in encoder interface

--- a/codec/api/svc/codec_app_def.h
+++ b/codec/api/svc/codec_app_def.h
@@ -287,6 +287,7 @@
   SLayerBSInfo	sLayerInfo[MAX_LAYER_NUM_OF_FRAME];
 
   int eOutputFrameType;
+  long long uiTimeStamp;
 } SFrameBSInfo, *PFrameBSInfo;
 
 typedef struct Source_Picture_s {
@@ -295,6 +296,7 @@
   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;
 
 
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -2998,7 +2998,7 @@
 
   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)