for callback invoke when resolution is changed
[platform/adaptation/ap_samsung/libomxil-e3250-v4l2.git] / openmax / component / video / enc / h264 / Exynos_OMX_H264enc.c
old mode 100644 (file)
new mode 100755 (executable)
index b9f10da..9a223b5
@@ -285,7 +285,7 @@ static void Set_H264Enc_Param(EXYNOS_OMX_BASECOMPONENT *pExynosComponent)
     pH264Param->NumberBFrames = 0;    /* 0 ~ 2 */
     pH264Param->NumberReferenceFrames = 1;
     pH264Param->NumberRefForPframes   = 1;
-#ifdef SLP_PLATFORM /* for B2 camera */
+#ifdef TIZEN_FEATURE_E3250 /* for B2 camera */
     pH264Param->LoopFilterDisable     = 0;    /* 1: Loop Filter Disable, 0: Filter Enable */
 #else
     pH264Param->LoopFilterDisable     = 1;    /* 1: Loop Filter Disable, 0: Filter Enable */
@@ -778,7 +778,7 @@ OMX_ERRORTYPE H264CodecSrcInit(OMX_COMPONENTTYPE *pOMXComponent)
             /*************/
             /* Does not require any actions. */
         } else {
-#ifndef SLP_PLATFORM /* slp platform can go into here */
+#ifndef TIZEN_FEATURE_E3250 /* slp platform can go into here */
             Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to get input buffer info");
             ret = OMX_ErrorNotImplemented;
             goto EXIT;
@@ -1168,7 +1168,7 @@ OMX_ERRORTYPE Exynos_H264Enc_GetParameter(
         Exynos_OSAL_Memcpy(pDstAVCComponent, pSrcAVCComponent, sizeof(OMX_VIDEO_PARAM_AVCTYPE));
     }
         break;
-               
+
     case  OMX_IndexParamVideoSliceFMO:
     {
         OMX_VIDEO_PARAM_AVCSLICEFMO *pDstSliceFmo = (OMX_VIDEO_PARAM_AVCSLICEFMO *)pComponentParameterStructure;
@@ -1428,7 +1428,7 @@ OMX_ERRORTYPE Exynos_H264Enc_SetParameter(
     }
         break;
 #endif
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
     case OMX_IndexParamSharedOutputFD:
     {
         EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
@@ -1621,7 +1621,7 @@ OMX_ERRORTYPE Exynos_H264Enc_GetExtensionIndex(
     if (Exynos_OSAL_Strcmp(cParameterName, EXYNOS_INDEX_CONFIG_VIDEO_INTRAPERIOD) == 0) {
         *pIndexType = OMX_IndexConfigVideoIntraPeriod;
         ret = OMX_ErrorNone;
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
     } else if (Exynos_OSAL_Strcmp(cParameterName, EXYNOS_INDEX_PARAM_ENC_SHARED_OUTPUT_FD) == 0) {
         *pIndexType = (OMX_INDEXTYPE) OMX_IndexParamSharedOutputFD;
         goto EXIT;
@@ -1696,7 +1696,7 @@ OMX_ERRORTYPE Exynos_H264Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
 
     eColorFormat = pExynosInputPort->portDefinition.format.video.eColorFormat;
     if (pExynosInputPort->bStoreMetaData == OMX_TRUE) {
-#ifndef SLP_PLATFORM /* we do not use OMX_COLOR_FormatAndroidOpaque */
+#ifndef TIZEN_FEATURE_E3250 /* we do not use OMX_COLOR_FormatAndroidOpaque */
         if (eColorFormat == OMX_COLOR_FormatAndroidOpaque) {
             pExynosInputPort->bufferProcessType = BUFFER_COPY;
         } else {
@@ -1712,7 +1712,7 @@ OMX_ERRORTYPE Exynos_H264Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
         }
     }
 
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
     if (pVideoEnc->bSharedOutputFD == OMX_TRUE) {
         pExynosOutputPort->bufferProcessType = BUFFER_SHARE;
     } else {
@@ -1851,7 +1851,7 @@ OMX_ERRORTYPE Exynos_H264Enc_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
     if (pExynosOutputPort->bufferProcessType & BUFFER_COPY) {
         for (i = 0; i < MFC_OUTPUT_BUFFER_NUM_MAX; i++) {
             if (pVideoEnc->pMFCEncOutputBuffer[i] != NULL) {
-#ifndef SLP_PLATFORM /* do not use ion */
+#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
                 if (pVideoEnc->pMFCEncOutputBuffer[i]->pVirAddr[0] != NULL)
                     Exynos_OSAL_SharedMemory_Free(pVideoEnc->hSharedMemory, pVideoEnc->pMFCEncOutputBuffer[i]->pVirAddr[0]);
 #endif
@@ -1873,7 +1873,7 @@ OMX_ERRORTYPE Exynos_H264Enc_Terminate(OMX_COMPONENTTYPE *pOMXComponent)
         if (pH264Enc->hMFCH264Handle.bShareableBuf == OMX_TRUE) {
             for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) {
                 if (pVideoEnc->pMFCEncInputBuffer[i] != NULL) {
-#ifndef SLP_PLATFORM /* do not use ion */
+#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
                     for (plane = 0; plane < MFC_INPUT_BUFFER_PLANE; plane++) {
                         if (pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[plane] != NULL)
                             Exynos_OSAL_SharedMemory_Free(pVideoEnc->hSharedMemory, pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[plane]);
@@ -2460,7 +2460,7 @@ OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(
     pExynosPort->portDefinition.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
     Exynos_OSAL_Memset(pExynosPort->portDefinition.format.video.cMIMEType, 0, MAX_OMX_MIMETYPE_SIZE);
     Exynos_OSAL_Strcpy(pExynosPort->portDefinition.format.video.cMIMEType, "raw/video");
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
     pExynosPort->portDefinition.format.video.eColorFormat = OMX_SEC_COLOR_FormatNV12L_DmaBuf_Fd;
 #else
     pExynosPort->portDefinition.format.video.eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar;
@@ -2517,7 +2517,7 @@ OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(
     pVideoEnc->exynos_codec_getCodecInputPrivateData  = &GetCodecInputPrivateData;
     pVideoEnc->exynos_codec_getCodecOutputPrivateData = &GetCodecOutputPrivateData;
 
-#ifndef SLP_PLATFORM /* do not use ion */
+#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
     pVideoEnc->hSharedMemory = Exynos_OSAL_SharedMemory_Open();
     if (pVideoEnc->hSharedMemory == NULL) {
         Exynos_OSAL_Free(pH264Enc);
@@ -2554,7 +2554,7 @@ OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent)
     pOMXComponent = (OMX_COMPONENTTYPE *)hComponent;
     pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
     pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
-#ifndef SLP_PLATFORM /* do not use ion */
+#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
     Exynos_OSAL_SharedMemory_Close(pVideoEnc->hSharedMemory);
 #endif
     Exynos_OSAL_Free(pExynosComponent->componentName);