exynos_omx: Add BOARD_USE_KHRONOS_OMX_HEADER flag.
authorYunji Kim <yunji.kim@samsung.com>
Sat, 27 Oct 2012 01:10:59 +0000 (10:10 +0900)
committerHuisung Kang <hs1218.kang@samsung.com>
Mon, 29 Oct 2012 04:45:13 +0000 (13:45 +0900)
BOARD_USE_KHRONOS_OMX_HEADER flag is needed to include proper openMAX
spec header file.

If BOARD_USE_KHRONOS_OMX_HEADER is true, use khronos's original omx
header files.
    - $(EXYNOS_OMX_TOP)/include/khronos/
else, use android's omx header files.
    - frameworks/native/include/media/openmax

Google extends OMX header files of Khronos.
    - OMX_COLOR_FormatAndroidOpaque was added in OMX_COLOR_FORMATTYPE.
    - OMX_VIDEO_CodingVPX was added in OMX_VIDEO_CODINGTYPE.
    - FLAC type for audio was added.
    - etc..

So this BOARD_USE_KHRONOS_OMX_HEADER flag is needed to avoid conflict
error about OMX_COLOR_FormatAndroidOpaque, etc.

Change-Id: Ib03ad0ea83669e58125da32d590368ac11d36677
Signed-off-by: Yunji Kim <yunji.kim@samsung.com>
Signed-off-by: Huisung Kang <hs1218.kang@samsung.com>
14 files changed:
Android.mk
component/audio/dec/Android.mk
component/audio/dec/mp3/Android.mk
component/common/Android.mk
component/video/dec/Android.mk
component/video/dec/h264/Android.mk
component/video/dec/mpeg4/Android.mk
component/video/dec/vp8/Android.mk
component/video/enc/Android.mk
component/video/enc/h264/Android.mk
component/video/enc/mpeg4/Android.mk
core/Android.mk
include/exynos/Exynos_OMX_Def.h
osal/Android.mk

index 3a2778f231038901b18dfabb6510109d41501302..31c068fc6e69d393e929190e0b490a7d95b57fa9 100644 (file)
@@ -6,6 +6,13 @@ include device/samsung/$(TARGET_DEVICE)/BoardConfig.mk
 
 BOARD_USE_ANB := true
 
+# Set to false to use Android's OMX header files
+BOARD_USE_KHRONOS_OMX_HEADER := false
+
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), false)
+ANDROID_MEDIA_INC := $(TOP)/frameworks/native/include/media
+endif
+
 EXYNOS_OMX_TOP := $(LOCAL_PATH)
 
 EXYNOS_OMX_INC := $(EXYNOS_OMX_TOP)/include
index 7b9992fb6869304b3d86379375bed77c69f0f0bd..ed03cdd99aba96cbdf037274f31f222f27d7a160 100644 (file)
@@ -10,7 +10,7 @@ LOCAL_MODULE_TAGS := optional
 
 LOCAL_STATIC_LIBRARIES := libsrpapi
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal \
        $(EXYNOS_OMX_TOP)/core \
@@ -18,4 +18,11 @@ LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
        $(EXYNOS_OMX_COMPONENT)/audio/dec \
        $(EXYNOS_AUDIO_CODEC)/alp/include
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
 include $(BUILD_STATIC_LIBRARY)
index 6b636c5980ab89d651e27fb1da148eecdec2bb80..31d94ca31c9e5928465e876e86c4d99af82161e1 100644 (file)
@@ -20,7 +20,7 @@ LOCAL_STATIC_LIBRARIES := libExynosOMX_Adec libExynosOMX_OSAL libExynosOMX_Basec
 LOCAL_SHARED_LIBRARIES := libc libdl libcutils libutils libui \
        libExynosOMX_Resourcemanager
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal \
        $(EXYNOS_OMX_TOP)/core \
@@ -28,4 +28,11 @@ LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
        $(EXYNOS_OMX_COMPONENT)/audio/dec \
        $(EXYNOS_AUDIO_CODEC)/alp/include
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
 include $(BUILD_SHARED_LIBRARY)
index c1e61240cba3eca90a7310bb32a79560a8b373bd..05c8d30ec235850fc7d2c41b6f1b80017dbd339c 100644 (file)
@@ -14,10 +14,17 @@ LOCAL_CFLAGS :=
 LOCAL_STATIC_LIBRARIES := libExynosOMX_OSAL
 LOCAL_SHARED_LIBRARIES := libcutils libutils
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
 include $(BUILD_STATIC_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -35,8 +42,15 @@ LOCAL_CFLAGS :=
 LOCAL_STATIC_LIBRARIES := libExynosOMX_OSAL
 LOCAL_SHARED_LIBRARIES := libcutils libutils
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
 include $(BUILD_SHARED_LIBRARY)
index 642159dbf1485bc295931f5b3a2d747b2bd646db..9a718a6afb0bc0651b933d7ddae6faaf81ebb403 100644 (file)
@@ -9,7 +9,7 @@ LOCAL_MODULE := libExynosOMX_Vdec
 LOCAL_ARM_MODE := arm
 LOCAL_MODULE_TAGS := optional
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal \
        $(EXYNOS_OMX_TOP)/core \
@@ -22,6 +22,13 @@ LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
 
 LOCAL_STATIC_LIBRARIES := libExynosVideoApi
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
 ifeq ($(BOARD_USE_ANB), true)
 LOCAL_STATIC_LIBRARIES += libExynosOMX_OSAL libcsc_helper
 LOCAL_CFLAGS += -DUSE_ANB
index 3c7c6ba58154ec20bd9a4e434408e1745314ff6e..a3eba98cd6afc3a3bee42399cc2c7e2a616a2b0b 100644 (file)
@@ -28,7 +28,7 @@ LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libExynosOMX_OSAL libExynosOMX_Basec
 LOCAL_SHARED_LIBRARIES := libc libdl libcutils libutils libui \
        libExynosOMX_Resourcemanager libcsc libexynosv4l2 libion_exynos libexynosgscaler
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal \
        $(EXYNOS_OMX_TOP)/core \
@@ -39,4 +39,11 @@ LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
        $(TOP)/hardware/samsung_slsi/exynos/libcsc \
        $(TOP)/hardware/samsung_slsi/$(TARGET_BOARD_PLATFORM)/include
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
 include $(BUILD_SHARED_LIBRARY)
index a41c613f79e24e466df4a74599577ce3132e2fa0..cd7f657ac79f32fad9b48a0bb1c715cc2bb18449 100644 (file)
@@ -24,7 +24,7 @@ LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libExynosOMX_OSAL libExynosOMX_Basec
 LOCAL_SHARED_LIBRARIES := libc libdl libcutils libutils libui \
        libExynosOMX_Resourcemanager libcsc libexynosv4l2 libion_exynos libexynosgscaler
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal \
        $(EXYNOS_OMX_TOP)/core \
@@ -35,4 +35,11 @@ LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
        $(TOP)/hardware/samsung_slsi/exynos/libcsc \
        $(TOP)/hardware/samsung_slsi/$(TARGET_BOARD_PLATFORM)/include
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
 include $(BUILD_SHARED_LIBRARY)
index 29cc8832c2ba718c1061d10e34c063e3964ed1fd..b16fdb8eb2450dd09897fc17d96d9067674b7e26 100644 (file)
@@ -24,7 +24,7 @@ LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libExynosOMX_OSAL libExynosOMX_Basec
 LOCAL_SHARED_LIBRARIES := libc libdl libcutils libutils libui \
        libExynosOMX_Resourcemanager libcsc libexynosv4l2 libion_exynos libexynosgscaler
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal \
        $(EXYNOS_OMX_TOP)/core \
@@ -35,6 +35,11 @@ LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
        $(TOP)/hardware/samsung_slsi/exynos/libcsc \
        $(TOP)/hardware/samsung_slsi/$(TARGET_BOARD_PLATFORM)/include
 
-
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
 
 include $(BUILD_SHARED_LIBRARY)
index 22cee815aeb079e5e3d607c529d87dd64ed0cc16..4950e70bd9b4aed69c21564c835d6b7b40028c75 100644 (file)
@@ -9,7 +9,7 @@ LOCAL_MODULE := libExynosOMX_Venc
 LOCAL_ARM_MODE := arm
 LOCAL_MODULE_TAGS := optional
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal \
        $(EXYNOS_OMX_TOP)/core \
@@ -20,6 +20,17 @@ LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
        $(TOP)/hardware/samsung_slsi/exynos/libcsc \
        $(TOP)/hardware/samsung_slsi/$(TARGET_BOARD_PLATFORM)/include
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
+ifeq ($(BOARD_USE_ANB), true)
+LOCAL_CFLAGS += -DUSE_ANB
+endif
+
 ifeq ($(BOARD_USE_METADATABUFFERTYPE), true)
 LOCAL_CFLAGS += -DUSE_METADATABUFFERTYPE
 endif
index ea894d16b9f7e4dfca7f7cad181e4d66d9bbdfb5..d94c4d60c2aa4c03f47357475d765c7157212ba7 100644 (file)
@@ -25,7 +25,7 @@ LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libExynosOMX_OSAL libExynosOMX_Basec
 LOCAL_SHARED_LIBRARIES := libc libdl libcutils libutils libui \
        libExynosOMX_Resourcemanager libcsc libexynosv4l2 libion_exynos
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal \
        $(EXYNOS_OMX_TOP)/core \
@@ -36,4 +36,11 @@ LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
        $(TOP)/hardware/samsung_slsi/exynos/libcsc \
        $(TOP)/hardware/samsung_slsi/$(TARGET_BOARD_PLATFORM)/include
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
 include $(BUILD_SHARED_LIBRARY)
index 739f770304b269a8fc0e82da414c6b293359fe30..9671be8a62b5c5504c86ffbadd2dc3d705aa5aa1 100644 (file)
@@ -24,7 +24,7 @@ LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libExynosOMX_OSAL libExynosOMX_Basec
 LOCAL_SHARED_LIBRARIES := libc libdl libcutils libutils libui \
        libExynosOMX_Resourcemanager libcsc libexynosv4l2 libion_exynos
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal \
        $(EXYNOS_OMX_TOP)/core \
@@ -35,4 +35,11 @@ LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
        $(TOP)/hardware/samsung_slsi/exynos/libcsc \
        $(TOP)/hardware/samsung_slsi/$(TARGET_BOARD_PLATFORM)/include
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
 include $(BUILD_SHARED_LIBRARY)
index 0e0bcb673d7f5a9977ab0efb5ea7f0cee4844ce4..4b66d26b0f242f198517caba2f0a2231a344dc6f 100644 (file)
@@ -18,10 +18,17 @@ LOCAL_STATIC_LIBRARIES := libExynosOMX_OSAL libExynosOMX_Basecomponent
 LOCAL_SHARED_LIBRARIES := libc libdl libcutils libutils \
        libExynosOMX_Resourcemanager
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal \
        $(EXYNOS_OMX_TOP)/component/common
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
 include $(BUILD_SHARED_LIBRARY)
 
index 94461ef5dbc9dc4931b119c6e9e82907193dd533..91ca2bad73745a11f7ed81a010fd294589b1360b 100644 (file)
@@ -127,8 +127,10 @@ typedef enum _EXYNOS_OMX_COLOR_FORMATTYPE {
 
     /* to copy a encoded data for drm component using gsc or fimc */
     OMX_SEC_COLOR_FormatEncodedData                 = OMX_COLOR_FormatYCbYCr,
+#ifdef USE_KHRONOS_OMX_HEADER
     /* for Android SurfaceMediaSource*/
     OMX_COLOR_FormatAndroidOpaque                   = 0x7F000789
+#endif
 }EXYNOS_OMX_COLOR_FORMATTYPE;
 
 typedef enum _EXYNOS_OMX_SUPPORTFORMAT_TYPE
@@ -158,7 +160,9 @@ typedef struct _EXYNOS_OMX_VIDEO_PROFILELEVEL
     OMX_S32  level;
 } EXYNOS_OMX_VIDEO_PROFILELEVEL;
 
+#ifdef USE_KHRONOS_OMX_HEADER
 #define OMX_VIDEO_CodingVPX     0x09    /**< Google VPX, formerly known as On2 VP8 */
+#endif
 
 #ifndef __OMX_EXPORTS
 #define __OMX_EXPORTS
index ef21a6dfe97cb129d53b94d50ba72e48c6637a48..2dd4b928f9086650ea9a86acb8c5d860093e95c7 100644 (file)
@@ -27,7 +27,7 @@ endif
 
 LOCAL_STATIC_LIBRARIES := liblog libcutils libExynosVideoApi
 
-LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
+LOCAL_C_INCLUDES := \
        $(EXYNOS_OMX_INC)/exynos \
        $(EXYNOS_OMX_TOP)/osal \
        $(EXYNOS_OMX_COMPONENT)/common \
@@ -35,9 +35,15 @@ LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \
        $(EXYNOS_OMX_COMPONENT)/video/enc \
        $(EXYNOS_VIDEO_CODEC)/v4l2/include \
        $(TOP)/hardware/samsung_slsi/exynos/include \
-       frameworks/native/include/media/hardware \
-       frameworks/native/include/media/openmax \
        $(TOP)/hardware/samsung_slsi/$(TARGET_BOARD_PLATFORM)/include \
        $(TOP)/hardware/samsung_slsi/$(TARGET_SOC)/include
 
+ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
+LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
+LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
+else
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/hardware
+LOCAL_C_INCLUDES += $(ANDROID_MEDIA_INC)/openmax
+endif
+
 include $(BUILD_STATIC_LIBRARY)