History

add timestamp in decoder

dong zhang committed 11 years ago

Commit 2e5243e1 parent f48b2e510 files · +78 −8Browse files

Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 10 files). Show all

Unified · Split

codec/decoder/core/src/decoder_core.cpp+4−1
@@ -90,6 +90,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 89 unmodified lines
9090
9191 if (!pCtx->bParseOnly) {
9292 //////output:::normal path
93+ pDstInfo->uiOutYuvTimeStamp = pPic->uiTimeStamp;
9394 ppDst[0] = pPic->pData[0];
9495 ppDst[1] = pPic->pData[1];
9596 ppDst[2] = pPic->pData[2];
@@ -1742,7 +1743,7 @@ int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferI · 1646 unmodified lines
17421743 int32_t iIdx = pCurAu->uiStartPos;
17431744 int32_t iEndIdx = pCurAu->uiEndPos;
17441745 uint8_t* pNalBs = NULL;
1745−
1746+ pParser->uiOutBsTimeStamp = (pCurAu->pNalUnitsList [iIdx]) ? pCurAu->pNalUnitsList [iIdx]->uiTimeStamp : 0;
17461747 pParser->iNalNum = 0;
17471748 pParser->iSpsWidthInPixel = (pCtx->pSps->iMbWidth << 4);
17481749 pParser->iSpsHeightInPixel = (pCtx->pSps->iMbHeight << 4);
@@ -1774,6 +1775,7 @@ int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferI · 25 unmodified lines
17741775 pDstBuf += iNalLen;
17751776 }
17761777 } else { //error
1778+ pCtx->pParserBsInfo->uiOutBsTimeStamp = 0;
17771779 pCtx->pParserBsInfo->iNalNum = 0;
17781780 pCtx->pParserBsInfo->iSpsWidthInPixel = 0;
17791781 pCtx->pParserBsInfo->iSpsHeightInPixel = 0;
@@ -1935,6 +1937,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 155 unmodified lines
19351937 return ERR_INFO_REF_COUNT_OVERFLOW;
19361938 }
19371939 }
1940+ pCtx->pDec->uiTimeStamp = pNalCur->uiTimeStamp;
19381941
19391942 if (pCtx->iTotalNumMbRec == 0) { //Picture start to decode
19401943 for (int32_t i = 0; i < LAYER_NUM_EXCHANGEABLE; ++ i)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t