diff options
author | SeungBeom Kim <sbcrux.kim@samsung.com> | 2011-06-21 09:48:41 +0900 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-06-21 12:22:58 -0700 |
commit | 12fd7053f2ab370a5db2de48fd9381c8f2d9d5ba (patch) | |
tree | 21d843cec46baff464a3093c83ae08cd51941bdf /sec_mm | |
parent | ee461fb117dec3de0f714f393922c05554958608 (diff) | |
download | device_samsung_crespo-12fd7053f2ab370a5db2de48fd9381c8f2d9d5ba.zip device_samsung_crespo-12fd7053f2ab370a5db2de48fd9381c8f2d9d5ba.tar.gz device_samsung_crespo-12fd7053f2ab370a5db2de48fd9381c8f2d9d5ba.tar.bz2 |
Fix for encode timestamp issue.
Change-Id: Id9ac27f9510ef6017ad2132a31382a66449d9b9e
Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
related-to-bug: 4724339
Diffstat (limited to 'sec_mm')
3 files changed, 19 insertions, 19 deletions
diff --git a/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Baseport.c b/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Baseport.c index 0e0f7ea..f42745d 100644 --- a/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Baseport.c +++ b/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Baseport.c @@ -941,7 +941,7 @@ OMX_ERRORTYPE SEC_OMX_Port_Constructor(OMX_HANDLETYPE hComponent) pSECOutputPort->markType.hMarkTargetComponent = NULL; pSECOutputPort->markType.pMarkData = NULL; - pSECComponent->checkTimeStamp.needSetStartTimeStamp = OMX_TRUE; + pSECComponent->checkTimeStamp.needSetStartTimeStamp = OMX_FALSE; pSECComponent->checkTimeStamp.needCheckStartTimeStamp = OMX_FALSE; pSECComponent->checkTimeStamp.startTimeStamp = 0; pSECComponent->checkTimeStamp.nStartFlags = 0x0; diff --git a/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/SEC_OMX_H264enc.c b/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/SEC_OMX_H264enc.c index 239649e..2e34406 100644 --- a/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/SEC_OMX_H264enc.c +++ b/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/SEC_OMX_H264enc.c @@ -725,13 +725,13 @@ OMX_ERRORTYPE SEC_MFC_H264_Encode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DATA pOutputData->dataBuffer = outputInfo.StrmVirAddr; pOutputData->allocSize = outputInfo.headerSize; pOutputData->dataLen = outputInfo.headerSize; - pOutputData->timeStamp = pInputData->timeStamp; + pOutputData->timeStamp = 0; pOutputData->nFlags |= OMX_BUFFERFLAG_CODECCONFIG; pOutputData->nFlags |= OMX_BUFFERFLAG_ENDOFFRAME; pH264Enc->hMFCH264Handle.bConfiguredMFC = OMX_TRUE; - ret = OMX_ErrorNone; + ret = OMX_ErrorInputDataEncodeYet; goto EXIT; } @@ -847,17 +847,22 @@ OMX_ERRORTYPE SEC_MFC_H264Enc_bufferProcess(OMX_COMPONENTTYPE *pOMXComponent, SE ret = SEC_MFC_H264_Encode(pOMXComponent, pInputData, pOutputData); if (ret != OMX_ErrorNone) { - pSECComponent->pCallbacks->EventHandler((OMX_HANDLETYPE)pOMXComponent, - pSECComponent->callbackData, - OMX_EventError, ret, 0, NULL); + if (ret == OMX_ErrorInputDataEncodeYet) { + pOutputData->usedDataLen = 0; + pOutputData->remainDataLen = pOutputData->dataLen; + } else { + pSECComponent->pCallbacks->EventHandler((OMX_HANDLETYPE)pOMXComponent, + pSECComponent->callbackData, + OMX_EventError, ret, 0, NULL); + } } else { pInputData->usedDataLen += pInputData->dataLen; pInputData->remainDataLen = pInputData->dataLen - pInputData->usedDataLen; pInputData->dataLen -= pInputData->usedDataLen; pInputData->usedDataLen = 0; - /* pOutputData->usedDataLen = 0; */ - pOutputData->remainDataLen = pOutputData->dataLen - pOutputData->usedDataLen; + pOutputData->usedDataLen = 0; + pOutputData->remainDataLen = pOutputData->dataLen; } EXIT: diff --git a/sec_mm/sec_omx/sec_omx_component/video/enc/mpeg4enc/SEC_OMX_Mpeg4enc.c b/sec_mm/sec_omx/sec_omx_component/video/enc/mpeg4enc/SEC_OMX_Mpeg4enc.c index 0596c25..c829970 100644 --- a/sec_mm/sec_omx/sec_omx_component/video/enc/mpeg4enc/SEC_OMX_Mpeg4enc.c +++ b/sec_mm/sec_omx/sec_omx_component/video/enc/mpeg4enc/SEC_OMX_Mpeg4enc.c @@ -851,19 +851,14 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4_Encode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DAT pOutputData->dataBuffer = outputInfo.StrmVirAddr; pOutputData->allocSize = outputInfo.headerSize; pOutputData->dataLen = outputInfo.headerSize; - pOutputData->timeStamp = pInputData->timeStamp; + pOutputData->timeStamp = 0; pOutputData->nFlags |= OMX_BUFFERFLAG_CODECCONFIG; pOutputData->nFlags |= OMX_BUFFERFLAG_ENDOFFRAME; pMpeg4Enc->hMFCMpeg4Handle.bConfiguredMFC = OMX_TRUE; - if (pOutputData->dataLen > 0) { - ret = OMX_ErrorNone; - goto EXIT; - } else { - ret = OMX_ErrorInputDataEncodeYet; - goto EXIT; - } + ret = OMX_ErrorInputDataEncodeYet; + goto EXIT; } if ((pInputData->nFlags & OMX_BUFFERFLAG_ENDOFFRAME) && @@ -976,9 +971,9 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4Enc_bufferProcess(OMX_COMPONENTTYPE *pOMXComponent, S pOutputData->usedDataLen = 0; pOutputData->remainDataLen = pOutputData->dataLen; } else { - pSECComponent->pCallbacks->EventHandler((OMX_HANDLETYPE)pOMXComponent, - pSECComponent->callbackData, - OMX_EventError, ret, 0, NULL); + pSECComponent->pCallbacks->EventHandler((OMX_HANDLETYPE)pOMXComponent, + pSECComponent->callbackData, + OMX_EventError, ret, 0, NULL); } } else { pInputData->usedDataLen += pInputData->dataLen; |