From: Ethan Chen Date: Tue, 27 Aug 2013 22:06:27 +0000 (-0700) Subject: osal: properly ifdef for USE_DMA_BUF X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f439c1b1fdc2d9276addcb37a299da9abbb8eb9d;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_openmax.git osal: properly ifdef for USE_DMA_BUF --- diff --git a/osal/Exynos_OSAL_Android.cpp b/osal/Exynos_OSAL_Android.cpp index 4ee57aa..9a71881 100644 --- a/osal/Exynos_OSAL_Android.cpp +++ b/osal/Exynos_OSAL_Android.cpp @@ -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();