osal: properly ifdef for USE_DMA_BUF
authorEthan Chen <intervigil@gmail.com>
Tue, 27 Aug 2013 22:06:27 +0000 (15:06 -0700)
committerEthan Chen <intervigil@gmail.com>
Tue, 27 Aug 2013 22:06:27 +0000 (15:06 -0700)
osal/Exynos_OSAL_Android.cpp

index 4ee57aa026164f4956f7d5cd374c5149c75b4dd8..9a718814c19161ad53c686cc5d35111034c9ee83 100644 (file)
@@ -95,11 +95,13 @@ OMX_ERRORTYPE Exynos_OSAL_LockANBHandle(
     case OMX_COLOR_FormatAndroidOpaque:
     {
         OMX_COLOR_FORMATTYPE formatType;
+#ifdef USE_DMA_BUF
         formatType = Exynos_OSAL_GetANBColorFormat((OMX_U32)priv_hnd);
         if ((formatType == OMX_COLOR_FormatYUV420SemiPlanar) ||
             (formatType == OMX_SEC_COLOR_FormatNV12Tiled))
             usage = GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN;
         else
+#endif
             usage = GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN | GRALLOC_USAGE_HW_VIDEO_ENCODER;
     }
         break;
@@ -167,10 +169,12 @@ OMX_COLOR_FORMATTYPE Exynos_OSAL_GetANBColorFormat(OMX_IN OMX_U32 handle)
     FunctionIn();
 
     OMX_COLOR_FORMATTYPE ret = OMX_COLOR_FormatUnused;
+#ifdef USE_DMA_BUF
     private_handle_t *priv_hnd = (private_handle_t *) handle;
 
     ret = Exynos_OSAL_Hal2OMXPixelFormat(priv_hnd->format);
     Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "ColorFormat: 0x%x", ret);
+#endif
 
 EXIT:
     FunctionOut();