diff options
author | Andreas Huber <andih@google.com> | 2009-12-04 11:37:51 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2009-12-04 11:37:51 -0800 |
commit | 17e995d39771569792c528f3dea559c83f0fc238 (patch) | |
tree | 8238e25d8815435c7e08ef483aa0491bac1923d4 /omx | |
parent | 3000a016292019e74a9afbd65aa95c669c1c4b94 (diff) | |
download | omap3-17e995d39771569792c528f3dea559c83f0fc238.tar.gz |
Make it possible to build the TI device without opencore, fix a few abuses of dlerror()
Diffstat (limited to 'omx')
-rw-r--r-- | omx/core_plugin/omx_core_plugin/Android.mk | 3 | ||||
-rw-r--r-- | omx/system/src/openmax_il/omx_core/src/Android.mk | 8 | ||||
-rwxr-xr-x | omx/system/src/openmax_il/omx_core/src/OMX_Core.c | 7 | ||||
-rw-r--r-- | omx/ti_omx_config_parser/Android.mk | 4 | ||||
-rw-r--r-- | omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c | 10 |
5 files changed, 23 insertions, 9 deletions
diff --git a/omx/core_plugin/omx_core_plugin/Android.mk b/omx/core_plugin/omx_core_plugin/Android.mk index ffdff71..222f0cb 100644 --- a/omx/core_plugin/omx_core_plugin/Android.mk +++ b/omx/core_plugin/omx_core_plugin/Android.mk @@ -1,3 +1,5 @@ +ifneq ($(BUILD_WITHOUT_PV),true) + LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_PRELINK_MODULE := false @@ -41,3 +43,4 @@ LOCAL_SHARED_LIBRARIES := libOMX_Core include $(BUILD_SHARED_LIBRARY) +endif diff --git a/omx/system/src/openmax_il/omx_core/src/Android.mk b/omx/system/src/openmax_il/omx_core/src/Android.mk index 9c162b4..f0c6acf 100644 --- a/omx/system/src/openmax_il/omx_core/src/Android.mk +++ b/omx/system/src/openmax_il/omx_core/src/Android.mk @@ -13,11 +13,17 @@ LOCAL_C_INCLUDES += \ LOCAL_SHARED_LIBRARIES := \ libdl \ - libVendor_ti_omx_config_parser \ liblog LOCAL_CFLAGS := $(TI_OMX_CFLAGS) +ifneq ($(BUILD_WITHOUT_PV),true) +LOCAL_SHARED_LIBRARIES += \ + libVendor_ti_omx_config_parser +else +LOCAL_CFLAGS += -DNO_OPENCORE +endif + LOCAL_MODULE:= libOMX_Core include $(BUILD_SHARED_LIBRARY) diff --git a/omx/system/src/openmax_il/omx_core/src/OMX_Core.c b/omx/system/src/openmax_il/omx_core/src/OMX_Core.c index f6176e9..19dca20 100755 --- a/omx/system/src/openmax_il/omx_core/src/OMX_Core.c +++ b/omx/system/src/openmax_il/omx_core/src/OMX_Core.c @@ -20,8 +20,10 @@ #include "OMX_Core.h" #include "OMX_ComponentRegistry.h" +#ifndef NO_OPENCORE /** determine capabilities of a component before acually using it */ #include "ti_omx_config_parser.h" +#endif /** size for the array of allocated components. Sets the maximum * number of components that can be allocated at once */ @@ -167,7 +169,6 @@ OMX_ERRORTYPE TIOMX_GetHandle( OMX_HANDLETYPE* pHandle, OMX_STRING cComponentNam OMX_ERRORTYPE (*pComponentInit)(OMX_HANDLETYPE*); OMX_ERRORTYPE err = OMX_ErrorNone; OMX_COMPONENTTYPE *componentType; - const char* pErr = dlerror(); if(pthread_mutex_lock(&mutex) != 0) { @@ -246,7 +247,7 @@ OMX_ERRORTYPE TIOMX_GetHandle( OMX_HANDLETYPE* pHandle, OMX_STRING cComponentNam /* Get a function pointer to the "OMX_ComponentInit" function. If * there is an error, we can't go on, so set the error code and exit */ pComponentInit = dlsym(pModules[i], "OMX_ComponentInit"); - if( (pErr != NULL) || (pComponentInit == NULL) ) { + if( pComponentInit == NULL ) { LOGE("%d:: dlsym failed for module %p\n", __LINE__, pModules[i]); err = OMX_ErrorInvalidComponent; goto CLEAN_UP; @@ -757,6 +758,8 @@ OMX_BOOL TIOMXConfigParserRedirect( { OMX_BOOL Status = OMX_FALSE; +#ifndef NO_OPENCORE Status = TIOMXConfigParser(aInputParameters, aOutputParameters); +#endif return Status; } diff --git a/omx/ti_omx_config_parser/Android.mk b/omx/ti_omx_config_parser/Android.mk index 5c8ace8..c6a0021 100644 --- a/omx/ti_omx_config_parser/Android.mk +++ b/omx/ti_omx_config_parser/Android.mk @@ -1,3 +1,5 @@ +ifneq ($(BUILD_WITHOUT_PV),true) + LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) $(call add-prebuilt-files, ETC) @@ -54,3 +56,5 @@ LOCAL_C_INCLUDES := \ LOCAL_SHARED_LIBRARIES += libopencore_common include $(BUILD_SHARED_LIBRARY) + +endif diff --git a/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c b/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c index 5e339e0..1dfd91e 100644 --- a/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c +++ b/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c @@ -2326,7 +2326,6 @@ OMX_ERRORTYPE VIDDEC_HandleCommand (OMX_HANDLETYPE phandle, OMX_U32 nParam1) #else void* pMyLCML; VIDDEC_fpo fpGetHandle; - char* error; #endif OMX_PRINT1(pComponentPrivate->dbg, "+++ENTERING\n"); @@ -2424,9 +2423,9 @@ OMX_ERRORTYPE VIDDEC_HandleCommand (OMX_HANDLETYPE phandle, OMX_U32 nParam1) goto EXIT; } fpGetHandle = dlsym(pMyLCML, "GetHandle"); - if ((error = dlerror()) != NULL) { + if (!fpGetHandle) { OMX_PRDSP4(pComponentPrivate->dbg, "OMX_ErrorBadParameter\n"); - fputs(error, stderr); + fputs(dlerror(), stderr); dlclose(pMyLCML); pMyLCML = NULL; eError = OMX_ErrorBadParameter; @@ -8352,7 +8351,6 @@ OMX_ERRORTYPE VIDDEC_LoadCodec(VIDDEC_COMPONENT_PRIVATE* pComponentPrivate) LPFNDLLFUNC1 fpGetHandle1; #else VIDDEC_fpo fpGetHandle; - char* error; #endif #ifndef UNDER_CE @@ -8364,9 +8362,9 @@ OMX_ERRORTYPE VIDDEC_LoadCodec(VIDDEC_COMPONENT_PRIVATE* pComponentPrivate) goto EXIT; } fpGetHandle = dlsym(pComponentPrivate->pModLCML, "GetHandle"); - if ((error = dlerror()) != NULL) { + if (!fpGetHandle) { OMX_PRDSP4(pComponentPrivate->dbg, "OMX_ErrorBadParameter\n"); - fputs(error, stderr); + fputs(dlerror(), stderr); dlclose(pComponentPrivate->pModLCML); pComponentPrivate->pModLCML = NULL; eError = OMX_ErrorBadParameter; |