openmax: Support EOSBehavior.
authorSeungBeom Kim <sbcrux.kim@samsung.com>
Wed, 27 Feb 2013 01:10:02 +0000 (10:10 +0900)
committerTaehwan Kim <t_h.kim@samsung.com>
Wed, 27 Feb 2013 12:06:51 +0000 (12:06 +0000)
Google has updated CTS test.
Support EOSBehavior for testEOSBehaviorH263 & testEOSBehaviorH264.
In case of "EOS Flag with Data",
This Patch is support for normal processing.

Depends On
 - Change I781712a5: libcodec: Support EOSBehavior.

Change-Id: I560434c55dd4932f018f973e0093453f493409cb
Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
12 files changed:
component/common/Exynos_OMX_Basecomponent.h
component/video/dec/Exynos_OMX_Vdec.c
component/video/dec/Exynos_OMX_VdecControl.c
component/video/dec/h264/Exynos_OMX_H264dec.c
component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c
component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c
component/video/dec/vc1/Exynos_OMX_Wmvdec.c
component/video/dec/vp8/Exynos_OMX_Vp8dec.c
component/video/enc/Exynos_OMX_Venc.c
component/video/enc/Exynos_OMX_VencControl.c
component/video/enc/h264/Exynos_OMX_H264enc.c
component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c

index 9f9ed3d216df1af32475687c34708d841e8e51d5..269044506746483023585f1ad57abd21c7bb1dbb 100644 (file)
@@ -95,7 +95,8 @@ typedef struct _EXYNOS_OMX_BASECOMPONENT
     OMX_BOOL                    reInputData;
 
     OMX_BOOL bUseFlagEOF;
-    OMX_BOOL bSaveFlagEOS;
+    OMX_BOOL bSaveFlagEOS;    /* bSaveFlagEOS is OMX_TRUE, if EOS flag is incoming. */
+    OMX_BOOL bBehaviorEOS;    /* bBehaviorEOS is OMX_TRUE, if EOS flag with Data are incoming. */
 
     /* Check for Old & New OMX Process type switch */
     OMX_BOOL bMultiThreadProcess;
index fefdd0ae8522116a254af7ab6b39fa6d894dbda2..7b7dcb4cee247310c04efa85c51aa8c5805dc0b5 100644 (file)
@@ -214,6 +214,47 @@ OMX_BOOL Exynos_Check_BufferProcess_State(EXYNOS_OMX_BASECOMPONENT *pExynosCompo
     return ret;
 }
 
+OMX_ERRORTYPE Exynos_ResetAllPortConfig(OMX_COMPONENTTYPE *pOMXComponent)
+{
+    OMX_ERRORTYPE                  ret               = OMX_ErrorNone;
+    EXYNOS_OMX_BASECOMPONENT      *pExynosComponent  = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
+    EXYNOS_OMX_BASEPORT           *pInputPort        = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
+    EXYNOS_OMX_BASEPORT           *pOutputPort       = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
+
+    /* Input port */
+    pInputPort->portDefinition.format.video.nFrameWidth             = DEFAULT_FRAME_WIDTH;
+    pInputPort->portDefinition.format.video.nFrameHeight            = DEFAULT_FRAME_HEIGHT;
+    pInputPort->portDefinition.format.video.nStride                 = 0; /*DEFAULT_FRAME_WIDTH;*/
+    pInputPort->portDefinition.format.video.nSliceHeight            = 0;
+    pInputPort->portDefinition.format.video.pNativeRender           = 0;
+    pInputPort->portDefinition.format.video.bFlagErrorConcealment   = OMX_FALSE;
+    pInputPort->portDefinition.format.video.eColorFormat            = OMX_COLOR_FormatUnused;
+
+    pInputPort->portDefinition.nBufferSize  = DEFAULT_VIDEO_INPUT_BUFFER_SIZE;
+    pInputPort->portDefinition.bEnabled     = OMX_TRUE;
+
+    pInputPort->bufferProcessType   = BUFFER_SHARE;
+    pInputPort->portWayType         = WAY2_PORT;
+
+    /* Output port */
+    pOutputPort->portDefinition.format.video.nFrameWidth            = DEFAULT_FRAME_WIDTH;
+    pOutputPort->portDefinition.format.video.nFrameHeight           = DEFAULT_FRAME_HEIGHT;
+    pOutputPort->portDefinition.format.video.nStride                = 0; /*DEFAULT_FRAME_WIDTH;*/
+    pOutputPort->portDefinition.format.video.nSliceHeight           = 0;
+    pOutputPort->portDefinition.format.video.pNativeRender          = 0;
+    pOutputPort->portDefinition.format.video.bFlagErrorConcealment  = OMX_FALSE;
+    pOutputPort->portDefinition.format.video.eColorFormat           = OMX_COLOR_FormatYUV420Planar;
+
+    pOutputPort->portDefinition.nBufferSize  = DEFAULT_VIDEO_OUTPUT_BUFFER_SIZE;
+    pOutputPort->portDefinition.bEnabled     = OMX_TRUE;
+
+    pOutputPort->bufferProcessType  = BUFFER_COPY | BUFFER_ANBSHARE;
+    pOutputPort->bIsANBEnabled      = OMX_FALSE;
+    pOutputPort->portWayType        = WAY2_PORT;
+
+    return ret;
+}
+
 OMX_ERRORTYPE Exynos_Input_CodecBufferToData(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_PTR codecBuffer, EXYNOS_OMX_DATA *pData)
 {
     OMX_ERRORTYPE                  ret = OMX_ErrorNone;
@@ -495,9 +536,9 @@ OMX_BOOL Exynos_Preprocessor_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_
 
         if ((srcInputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) {
             Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "bSaveFlagEOS : OMX_TRUE");
-            srcInputData->dataLen = 0;
-            srcInputData->remainDataLen = 0;
             pExynosComponent->bSaveFlagEOS = OMX_TRUE;
+            if (srcInputData->dataLen != 0)
+                pExynosComponent->bBehaviorEOS = OMX_TRUE;
         }
 
         if (pExynosComponent->checkTimeStamp.needSetStartTimeStamp == OMX_TRUE) {
@@ -1128,6 +1169,9 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Terminate(OMX_HANDLETYPE hComponent)
     Exynos_OSAL_ThreadTerminate(pVideoDec->hDstOutputThread);
     pVideoDec->hDstOutputThread = NULL;
 
+    pExynosComponent->checkTimeStamp.needSetStartTimeStamp      = OMX_FALSE;
+    pExynosComponent->checkTimeStamp.needCheckStartTimeStamp    = OMX_FALSE;
+
 EXIT:
     FunctionOut();
 
@@ -1185,6 +1229,7 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeComponentInit(OMX_IN OMX_HANDLETYPE hCompone
     pExynosComponent->hComponentHandle = (OMX_HANDLETYPE)pVideoDec;
 
     pExynosComponent->bSaveFlagEOS = OMX_FALSE;
+    pExynosComponent->bBehaviorEOS = OMX_FALSE;
     pExynosComponent->bMultiThreadProcess = OMX_TRUE;
 
     /* Input port */
index 252b29ee5294249c7d58016d2997f6f119d98ff4..e5539884b7e13b0a5e1919f642f3347eadb8c7e7 100644 (file)
@@ -577,6 +577,7 @@ OMX_ERRORTYPE Exynos_OMX_BufferFlush(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 n
             Exynos_OSAL_Memset(pExynosComponent->nFlags, 0, sizeof(OMX_U32) * MAX_FLAGS);
             pExynosComponent->getAllDelayBuffer = OMX_FALSE;
             pExynosComponent->bSaveFlagEOS = OMX_FALSE;
+            pExynosComponent->bBehaviorEOS = OMX_FALSE;
             pExynosComponent->reInputData = OMX_FALSE;
         }
 
@@ -728,7 +729,6 @@ OMX_ERRORTYPE Exynos_OutputBufferReturn(
         }
 
         if ((pBufferHdr->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) {
-            pBufferHdr->nFilledLen = 0;
             Exynos_OSAL_Log(EXYNOS_LOG_TRACE,"event OMX_BUFFERFLAG_EOS!!!");
             pExynosComponent->pCallbacks->EventHandler(pOMXComponent,
                             pExynosComponent->callbackData,
@@ -1022,28 +1022,44 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeGetParameter(
             pExynosPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
             portDefinition = &pExynosPort->portDefinition;
 
-            switch (index) {
-            case supportFormat_0:
-                portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused;
-                portFormat->eColorFormat       = OMX_COLOR_FormatYUV420Planar;
-                portFormat->xFramerate         = portDefinition->format.video.xFramerate;
-                break;
-            case supportFormat_1:
-                portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused;
-                portFormat->eColorFormat       = OMX_COLOR_FormatYUV420SemiPlanar;
-                portFormat->xFramerate         = portDefinition->format.video.xFramerate;
-                break;
-            case supportFormat_2:
-                portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused;
-                portFormat->eColorFormat       = OMX_SEC_COLOR_FormatNV12Tiled;
-                portFormat->xFramerate         = portDefinition->format.video.xFramerate;
-                break;
-            default:
-                if (index > supportFormat_0) {
-                    ret = OMX_ErrorNoMore;
-                    goto EXIT;
+            if (pExynosPort->bIsANBEnabled == OMX_FALSE) {
+                switch (index) {
+                case supportFormat_0:
+                    portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused;
+                    portFormat->eColorFormat       = OMX_COLOR_FormatYUV420Planar;
+                    portFormat->xFramerate         = portDefinition->format.video.xFramerate;
+                    break;
+                case supportFormat_1:
+                    portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused;
+                    portFormat->eColorFormat       = OMX_COLOR_FormatYUV420SemiPlanar;
+                    portFormat->xFramerate         = portDefinition->format.video.xFramerate;
+                    break;
+                case supportFormat_2:
+                    portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused;
+                    portFormat->eColorFormat       = OMX_SEC_COLOR_FormatNV12Tiled;
+                    portFormat->xFramerate         = portDefinition->format.video.xFramerate;
+                    break;
+                default:
+                    if (index > supportFormat_0) {
+                        ret = OMX_ErrorNoMore;
+                        goto EXIT;
+                    }
+                    break;
+                }
+            } else {
+                switch (index) {
+                case supportFormat_0:
+                    portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused;
+                    portFormat->eColorFormat       = OMX_SEC_COLOR_FormatNV12Tiled;
+                    portFormat->xFramerate         = portDefinition->format.video.xFramerate;
+                    break;
+                default:
+                    if (index > supportFormat_0) {
+                        ret = OMX_ErrorNoMore;
+                        goto EXIT;
+                    }
+                    break;
                 }
-                break;
             }
         }
         ret = OMX_ErrorNone;
index fb4737cc801efb31a828d9d396753314b685e830..4d7e1f3f975e9574bb9c14f2b9a8e45b6733d1dc 100644 (file)
@@ -1657,6 +1657,7 @@ OMX_ERRORTYPE Exynos_H264Dec_Init(OMX_COMPONENTTYPE *pOMXComponent)
     pH264Dec->hMFCH264Handle.bConfiguredMFCDst = OMX_FALSE;
     pExynosComponent->bUseFlagEOF = OMX_TRUE;
     pExynosComponent->bSaveFlagEOS = OMX_FALSE;
+    pExynosComponent->bBehaviorEOS = OMX_FALSE;
 
     /* H.264 Codec Open */
     ret = H264CodecOpen(pH264Dec);
@@ -1785,6 +1786,8 @@ OMX_ERRORTYPE Exynos_H264Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
     }
     H264CodecClose(pH264Dec);
 
+    Exynos_ResetAllPortConfig(pOMXComponent);
+
 EXIT:
     FunctionOut();
 
@@ -2128,6 +2131,12 @@ OMX_ERRORTYPE Exynos_H264Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
         ((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
         Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "displayStatus:%d, nFlags0x%x", displayStatus, pDstOutputData->nFlags);
         pDstOutputData->remainDataLen = 0;
+
+        if (((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) &&
+            (pExynosComponent->bBehaviorEOS == OMX_TRUE)) {
+            pDstOutputData->remainDataLen = bufferGeometry->nFrameWidth * bufferGeometry->nFrameHeight * 3 / 2;
+            pExynosComponent->bBehaviorEOS = OMX_FALSE;
+        }
     } else {
         pDstOutputData->remainDataLen = bufferGeometry->nFrameWidth * bufferGeometry->nFrameHeight * 3 / 2;
     }
index b29dda5669a8be9d9edf9f53d083f80aa9161ec5..32747ac12a9655e09096fcb05607edcd7768342c 100644 (file)
@@ -1288,6 +1288,7 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_Init(OMX_COMPONENTTYPE *pOMXComponent)
     pMpeg2Dec->hMFCMpeg2Handle.bConfiguredMFCDst = OMX_FALSE;
     pExynosComponent->bUseFlagEOF = OMX_TRUE;
     pExynosComponent->bSaveFlagEOS = OMX_FALSE;
+    pExynosComponent->bBehaviorEOS = OMX_FALSE;
 
     /* Mpeg2 Codec Open */
     ret = Mpeg2CodecOpen(pMpeg2Dec);
@@ -1408,6 +1409,8 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
     }
     Mpeg2CodecClose(pMpeg2Dec);
 
+    Exynos_ResetAllPortConfig(pOMXComponent);
+
 EXIT:
     FunctionOut();
 
@@ -1718,6 +1721,12 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM
         ((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
         Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "displayStatus:%d, nFlags0x%x", displayStatus, pDstOutputData->nFlags);
         pDstOutputData->remainDataLen = 0;
+
+        if (((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) &&
+            (pExynosComponent->bBehaviorEOS == OMX_TRUE)) {
+            pDstOutputData->remainDataLen = bufferGeometry->nFrameWidth * bufferGeometry->nFrameHeight * 3 / 2;
+            pExynosComponent->bBehaviorEOS = OMX_FALSE;
+        }
     } else {
         pDstOutputData->remainDataLen = bufferGeometry->nFrameWidth * bufferGeometry->nFrameHeight * 3 / 2;
     }
index 7d91d848734266ed0e79111099f375a415c7cdb0..ce2c21731e93e769ee6e14c4a8efb85fb89d6f71 100644 (file)
@@ -1641,6 +1641,7 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_Init(OMX_COMPONENTTYPE *pOMXComponent)
     pMpeg4Dec->hMFCMpeg4Handle.bConfiguredMFCDst = OMX_FALSE;
     pExynosComponent->bUseFlagEOF = OMX_TRUE;
     pExynosComponent->bSaveFlagEOS = OMX_FALSE;
+    pExynosComponent->bBehaviorEOS = OMX_FALSE;
 
     /* Mpeg4 Codec Open */
     ret = Mpeg4CodecOpen(pMpeg4Dec);
@@ -1761,6 +1762,8 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
     }
     Mpeg4CodecClose(pMpeg4Dec);
 
+    Exynos_ResetAllPortConfig(pOMXComponent);
+
 EXIT:
     FunctionOut();
 
@@ -2071,6 +2074,12 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM
         ((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
         Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "displayStatus:%d, nFlags0x%x", displayStatus, pDstOutputData->nFlags);
         pDstOutputData->remainDataLen = 0;
+
+        if (((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) &&
+            (pExynosComponent->bBehaviorEOS == OMX_TRUE)) {
+            pDstOutputData->remainDataLen = bufferGeometry->nFrameWidth * bufferGeometry->nFrameHeight * 3 / 2;
+            pExynosComponent->bBehaviorEOS = OMX_FALSE;
+        }
     } else {
         pDstOutputData->remainDataLen = bufferGeometry->nFrameWidth * bufferGeometry->nFrameHeight * 3 / 2;
     }
index 59c01f84f07f16cf6c7dffaa891bbde3c54cfc2b..de10d892ebfd70244e10b6e7bde7818bcd6d0100 100644 (file)
@@ -1507,6 +1507,7 @@ OMX_ERRORTYPE Exynos_WmvDec_Init(OMX_COMPONENTTYPE *pOMXComponent)
     pWmvDec->hMFCWmvHandle.bConfiguredMFCDst = OMX_FALSE;
     pExynosComponent->bUseFlagEOF = OMX_TRUE;
     pExynosComponent->bSaveFlagEOS = OMX_FALSE;
+    pExynosComponent->bBehaviorEOS = OMX_FALSE;
 
     /* WMV Codec Open */
     ret = WmvCodecOpen(pWmvDec);
@@ -1629,6 +1630,8 @@ OMX_ERRORTYPE Exynos_WmvDec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
     }
     WmvCodecClose(pWmvDec);
 
+    Exynos_ResetAllPortConfig(pOMXComponent);
+
 EXIT:
     FunctionOut();
 
@@ -1953,6 +1956,12 @@ OMX_ERRORTYPE Exynos_WmvDec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_
         ((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
         Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "displayStatus:%d, nFlags0x%x", displayStatus, pDstOutputData->nFlags);
         pDstOutputData->remainDataLen = 0;
+
+        if (((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) &&
+            (pExynosComponent->bBehaviorEOS == OMX_TRUE)) {
+            pDstOutputData->remainDataLen = bufferGeometry->nFrameWidth * bufferGeometry->nFrameHeight * 3 / 2;
+            pExynosComponent->bBehaviorEOS = OMX_FALSE;
+        }
     } else {
         pDstOutputData->remainDataLen = bufferGeometry->nFrameWidth * bufferGeometry->nFrameHeight * 3 / 2;
     }
index d51cfaf6fa9a2d5e6bea5eeb0cbd59073fadccd8..c8329f918dd996d02a2e098f87891f2f95fd18bb 100644 (file)
@@ -1232,6 +1232,7 @@ OMX_ERRORTYPE Exynos_VP8Dec_Init(OMX_COMPONENTTYPE *pOMXComponent)
     pVp8Dec->hMFCVp8Handle.bConfiguredMFCDst = OMX_FALSE;
     pExynosComponent->bUseFlagEOF = OMX_TRUE;
     pExynosComponent->bSaveFlagEOS = OMX_FALSE;
+    pExynosComponent->bBehaviorEOS = OMX_FALSE;
 
     /* VP8 Codec Open */
     ret = VP8CodecOpen(pVp8Dec);
@@ -1352,6 +1353,8 @@ OMX_ERRORTYPE Exynos_VP8Dec_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
     }
     VP8CodecClose(pVp8Dec);
 
+    Exynos_ResetAllPortConfig(pOMXComponent);
+
 EXIT:
     FunctionOut();
 
@@ -1662,6 +1665,12 @@ OMX_ERRORTYPE Exynos_VP8Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_
         ((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
         Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "displayStatus:%d, nFlags0x%x", displayStatus, pDstOutputData->nFlags);
         pDstOutputData->remainDataLen = 0;
+
+        if (((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) &&
+            (pExynosComponent->bBehaviorEOS == OMX_TRUE)) {
+            pDstOutputData->remainDataLen = bufferGeometry->nFrameWidth * bufferGeometry->nFrameHeight * 3 / 2;
+            pExynosComponent->bBehaviorEOS = OMX_FALSE;
+        }
     } else {
         pDstOutputData->remainDataLen = bufferGeometry->nFrameWidth * bufferGeometry->nFrameHeight * 3 / 2;
     }
index d50d3ec7b426c2e17f5f835bc590401cba133993..01ecccf1ffe76715a8d4b0ce80726feb39121cf8 100644 (file)
@@ -582,9 +582,9 @@ OMX_BOOL Exynos_Preprocessor_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_
 
         if ((srcInputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) {
             Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "bSaveFlagEOS : OMX_TRUE");
-            srcInputData->dataLen = 0;
-            srcInputData->remainDataLen = 0;
             pExynosComponent->bSaveFlagEOS = OMX_TRUE;
+            if (srcInputData->dataLen != 0)
+                pExynosComponent->bBehaviorEOS = OMX_TRUE;
         }
 
         if (pExynosComponent->checkTimeStamp.needSetStartTimeStamp == OMX_TRUE) {
@@ -1211,6 +1211,9 @@ OMX_ERRORTYPE Exynos_OMX_BufferProcess_Terminate(OMX_HANDLETYPE hComponent)
     Exynos_OSAL_ThreadTerminate(pVideoEnc->hDstOutputThread);
     pVideoEnc->hDstOutputThread = NULL;
 
+    pExynosComponent->checkTimeStamp.needSetStartTimeStamp      = OMX_FALSE;
+    pExynosComponent->checkTimeStamp.needCheckStartTimeStamp    = OMX_FALSE;
+
 EXIT:
     FunctionOut();
 
@@ -1265,6 +1268,7 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeComponentInit(OMX_IN OMX_HANDLETYPE hCompone
     pExynosComponent->hComponentHandle = (OMX_HANDLETYPE)pVideoEnc;
 
     pExynosComponent->bSaveFlagEOS = OMX_FALSE;
+    pExynosComponent->bBehaviorEOS = OMX_FALSE;
 
     pVideoEnc->bFirstInput  = OMX_FALSE;
     pVideoEnc->bFirstOutput = OMX_FALSE;
index 2fcc0f9b44a8cb8f835734f3e7368a49ac6107d9..db5d7fc62f080326bf747f94334b94fb61af46e4 100644 (file)
@@ -656,6 +656,7 @@ OMX_ERRORTYPE Exynos_OMX_BufferFlush(
             Exynos_OSAL_Memset(pExynosComponent->nFlags, 0, sizeof(OMX_U32) * MAX_FLAGS);
             pExynosComponent->getAllDelayBuffer = OMX_FALSE;
             pExynosComponent->bSaveFlagEOS = OMX_FALSE;
+            pExynosComponent->bBehaviorEOS = OMX_FALSE;
             pExynosComponent->reInputData = OMX_FALSE;
         }
 
@@ -844,7 +845,6 @@ OMX_ERRORTYPE Exynos_OutputBufferReturn(
         }
 
         if ((pBufferHdr->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) {
-            pBufferHdr->nFilledLen = 0;
             Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "event OMX_BUFFERFLAG_EOS!!!");
             pExynosComponent->pCallbacks->EventHandler(pOMXComponent,
                             pExynosComponent->callbackData,
index 856d2894311c2a6cab70c07b6ea0df247997cabe..fe43839d32badc6b464e774aa95ee0f688539104 100644 (file)
@@ -1566,6 +1566,7 @@ OMX_ERRORTYPE Exynos_H264Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
     pVideoEnc->bFirstOutput = OMX_FALSE;
     pExynosComponent->bUseFlagEOF = OMX_TRUE;
     pExynosComponent->bSaveFlagEOS = OMX_FALSE;
+    pExynosComponent->bBehaviorEOS = OMX_FALSE;
 
     eColorFormat = pExynosInputPort->portDefinition.format.video.eColorFormat;
     if (pExynosInputPort->bStoreMetaData == OMX_TRUE) {
@@ -2027,11 +2028,16 @@ OMX_ERRORTYPE Exynos_H264Enc_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX
     }
 
     if ((displayStatus == VIDEO_FRAME_STATUS_CHANGE_RESOL) ||
-        ((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
+        (((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) &&
+         (pExynosComponent->bBehaviorEOS == OMX_FALSE))) {
         Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "%x displayStatus:%d, nFlags0x%x", pExynosComponent, displayStatus, pDstOutputData->nFlags);
         pDstOutputData->remainDataLen = 0;
     }
 
+    if (((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) &&
+        (pExynosComponent->bBehaviorEOS == OMX_TRUE))
+        pExynosComponent->bBehaviorEOS = OMX_FALSE;
+
     ret = OMX_ErrorNone;
 
 EXIT:
index cf0e10a471fb8e0a9970e98c9e7aa2b3864f89d3..962002c10a8b0ec6ff826cce703d73cac731212e 100644 (file)
@@ -1757,6 +1757,7 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
     pVideoEnc->bFirstOutput = OMX_FALSE;
     pExynosComponent->bUseFlagEOF = OMX_TRUE;
     pExynosComponent->bSaveFlagEOS = OMX_FALSE;
+    pExynosComponent->bBehaviorEOS = OMX_FALSE;
 
     eColorFormat = pExynosInputPort->portDefinition.format.video.eColorFormat;
     if (pExynosInputPort->bStoreMetaData == OMX_TRUE) {
@@ -2198,11 +2199,16 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM
     }
 
     if ((displayStatus == VIDEO_FRAME_STATUS_CHANGE_RESOL) ||
-        ((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
+        (((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) &&
+         (pExynosComponent->bBehaviorEOS == OMX_FALSE))) {
         Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "%x displayStatus:%d, nFlags0x%x", pExynosComponent, displayStatus, pDstOutputData->nFlags);
         pDstOutputData->remainDataLen = 0;
     }
 
+    if (((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) &&
+        (pExynosComponent->bBehaviorEOS == OMX_TRUE))
+        pExynosComponent->bBehaviorEOS = OMX_FALSE;
+
     ret = OMX_ErrorNone;
 
 EXIT: