This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Creating an application that uses both QT and OpenMax

Has anyone been able to create a linux app that uses both the QT and OpenMax (omx) libraries. I have had no problems building and running all the demo applications. However, as soon as one wants to create an app that uses more than one TI library it seems that the provided make files can no longer be used. I have tried to do this by creating a QT .pro  file for my application and adding in the OMX libraries as external dependencies. Here is the .pro file ...

omx_PATH = ${EZSDK}/omx_05_01_01_80
osal_PATH = ${EZSDK}/osal_1_21_00_05_eng
fc_PATH =  ${EZSDK}/framework-components_3_21_00_17_eng
syslink_PATH = ${EZSDK}/syslink_02_00_00_68_beta1
linuxutils_PATH = ${EZSDK}/linuxutils_3_21_00_02_eng

TEMPLATE = app
TARGET =
DEPENDPATH += . include
INCLUDEPATH += . include /usr/local/boost_1_xx ${EZSDK}/omx_05_01_01_80/packages/ti/omx/interfaces/openMaxv11
QT = core network
CONFIG += debug

LIBS += $${omx_PATH}/lib/omxcore.av5T
LIBS += $${omx_PATH}/lib/domx.av5T
LIBS += $${omx_PATH}/lib/memcfg.av5T
LIBS += $${omx_PATH}/lib/timmosal.av5T
LIBS += $${omx_PATH}/lib/domx_delegates_shmem.av5T
LIBS += $${osal_PATH}/packages/ti/sdo/xdcruntime/linux/lib/debug/osal_linux_470.av5T
LIBS += $${osal_PATH}/packages/linuxdist/build/lib/osal.a

LIBS += $${osal_PATH}/packages/linuxdist/cstubs/lib/cstubs.a

LIBS += $${fc_PATH}/packages/ti/sdo/rcm/lib/debug/rcm_syslink.av5T

LIBS += $${fc_PATH}/packages/ti/sdo/fc/memutils/lib/release/memutils.av5T

LIBS += $${osal_PATH}/packages/ti/sdo/xdcruntime/linux/lib/debug/osal_linux_470.av5T

LIBS += $${fc_PATH}/packages/ti/sdo/fc/global/lib/debug/fcsettings.av5T

LIBS += $${syslink_PATH}/ti/syslink/lib/syslink.a_debug

LIBS += $${linuxutils_PATH}/packages/ti/sdo/linuxutils/cmem/lib/cmem.a470MV

# Input
HEADERS += include/app_types.h \
           include/rtcp_receive.h \
           include/rtcp_transmit.h \
           include/rtp_transmit.h \
           include/rtsp_connection.h \
           include/video_server.h
SOURCES += main.cpp \
           rtcp_receive.cpp \
           rtcp_transmit.cpp \
           rtp_transmit.cpp \
           rtsp_connection.cpp \
           video_server.cpp

All source files compile correctly however the link stage fails citing multiple undefined references. Here is a snippet of the linker output ...

/home/steveb/ti-ezsdk_dm816x-evm_5_01_01_80/omx_05_01_01_80/lib/omxcore.av5T(omx_core.ov5T): In function `OMX_GetHandle':
/swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-linux-gnueabi/ti-omx-libs-05_01_01_80-r1/omx_05_01_01_80/packages/ti/omx/omxcore/src/omx_core.c:325: undefined reference to `OMXComponentList'
/home/steveb/ti-ezsdk_dm816x-evm_5_01_01_80/omx_05_01_01_80/lib/omxcore.av5T(omx_core.ov5T): In function `OMX_ComponentNameEnum':
/swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-linux-gnueabi/ti-omx-libs-05_01_01_80-r1/omx_05_01_01_80/packages/ti/omx/omxcore/src/omx_core.c:507: undefined reference to `OMXComponentList'
/home/steveb/ti-ezsdk_dm816x-evm_5_01_01_80/omx_05_01_01_80/lib/omxcore.av5T(omx_core.ov5T): In function `OMX_GetRolesOfComponent':
/swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-linux-gnueabi/ti-omx-libs-05_01_01_80-r1/omx_05_01_01_80/packages/ti/omx/omxcore/src/omx_core.c:594: undefined reference to `OMXComponentList'
/home/steveb/ti-ezsdk_dm816x-evm_5_01_01_80/omx_05_01_01_80/lib/omxcore.av5T(omx_core.ov5T): In function `OMX_GetComponentsOfRole':
/swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-linux-gnueabi/ti-omx-libs-05_01_01_80-r1/omx_05_01_01_80/packages/ti/omx/omxcore/src/omx_core.c:666: undefined reference to `OMXComponentList'
/home/steveb/ti-ezsdk_dm816x-evm_5_01_01_80/omx_05_01_01_80/lib/domx.av5T(DomxTunnelMgr.ov5T): In function `domxtmgr_map_component_name2info':
/swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-linux-gnueabi/ti-omx-libs-05_01_01_80-r1/omx_05_01_01_80/packages/ti/omx/domx/DomxTunnelMgr.c:119: undefined reference to `DomxCore_componentCoreInfoTbl'

Any help would be greatly appreciated.

  • Steve,

    It seems, it is missing omxcfg.av5T . Please see the decode_display example make file, It includes this as well. This could be issue you are seeing.

    Regards

    Vimal

  • I have a error similar ro the above but I get the following:

    My includes

    "${EZSDK}/component-sources/xdctools_3_22_01_21/packages/gnu/targets/arm/rtsv5T/lib/gnu.targets.arm.rtsv5T.av5T"
    "${EZSDK}/linux-devkit/arm-none-linux-gnueabi/usr/lib/libpthread-stubs.so"
    "${EZSDK}/component-sources/omx_05_02_00_15/lib/ti/omx/omxcore/lib/a8host/debug/omxcore.av5T"
    "${EZSDK}/component-sources/omx_05_02_00_15/lib/ti/omx/domx/lib/a8host/debug/domx.av5T"
    "${EZSDK}/component-sources/omx_05_02_00_15/lib/ti/omx/memcfg/lib/a8host/debug/memcfg.av5T"
    "${EZSDK}/component-sources/omx_05_02_00_15/lib/domx_delegates_shmem.av5T"
    "${EZSDK}/component-sources/omx_05_02_00_15/lib/ti/timmosal/lib/a8host/debug/timmosal.av5T"
    "${EZSDK}/component-sources/osal_1_21_01_08/packages/linuxdist/build/lib/osal.a"
    "${EZSDK}/component-sources/osal_1_21_01_08/packages/linuxdist/cstubs/lib/cstubs.a"
    "${EZSDK}/component-sources/framework_components_3_21_01_26/packages/ti/sdo/rcm/lib/debug/rcm_syslink.av5T"
    "${EZSDK}/component-sources/framework_components_3_21_01_26/packages/ti/sdo/fc/memutils/lib/release/memutils.av5T"
    "${EZSDK}/component-sources/osal_1_21_01_08/packages/ti/sdo/xdcruntime/linux/lib/debug/osal_linux_470.av5T"
    "${EZSDK}/component-sources/framework_components_3_21_01_26/packages/ti/sdo/fc/global/lib/debug/fcsettings.av5T"
    "${EZSDK}/component-sources/syslink_2_00_02_80/packages/ti/syslink/lib/syslink.a_debug"
    "${EZSDK}/component-sources/linuxutils_3_21_00_04/packages/ti/sdo/linuxutils/cmem/lib/cmem.a470MV"
    "${EZSDK}/component-sources/uia_1_00_01_17/packages/ti/uia/linux/lib/servicemgr.a"
    "${EZSDK}/component-sources/omx_05_02_00_15/lib/omxcfg.av5T"

    Can you point me to the path I'm missing?

    /home/raproskie/ti-ezsdk_dm816x-evm_5_02_01_59/component-sources/omx_05_02_00_15/lib/omxcfg.av5T(domx_cfg.ov5T):(.data.rel.ro+0x2c): undefined reference to `OmxRpc_rcmIfCbEventHandler' Finished building: ../main.c

     /home/raproskie/ti-ezsdk_dm816x-evm_5_02_01_59/component-sources/omx_05_02_00_15/lib/omxcfg.av5T(domx_cfg.ov5T):(.data.rel.ro+0x40): undefined reference to `OmxRpc_rcmIfCbEmptyFillBufferDone'

    /home/raproskie/ti-ezsdk_dm816x-evm_5_02_01_59/component-sources/omx_05_02_00_15/lib/omxcfg.av5T(domx_cfg.ov5T):(.data.rel.ro+0x54): undefined reference to `OmxRpc_rcmIfCbEmptyFillBufferDone'

    thanks

    Robin

     

  • Robin,

    These symbols are supposed to be in domx.av5t. Are you building these or using prebuilt binaries ?

    Regards

    Vimal

  • Hi Vimal

    We are using prebuilt binaries, Also we are compiling from CodeBench and also using the latest CodeSourcery in C project in eclipse,

    Robin

  • Here is the makefile (renamed to makefile.txt so that it could be inserted in this post)

    # Path declarations
    COMP_SOURCE = $(EZSDK)/component-sources
    AACLCDEC_PATH = $(COMP_SOURCE)/c674x-aaclcdec_01_41_00_00_elf
    BIOS_PATH = $(COMP_SOURCE)/bios_6_32_01_38
    CE_PATH = $(COMP_SOURCE)/codec_engine_3_21_00_19
    FC_PATH = $(COMP_SOURCE)/framework_components_3_21_01_26
    IPC_PATH = $(COMP_SOURCE)/ipc_1_23_03_31
    OMX_PATH = $(COMP_SOURCE)/omx_05_02_00_15
    SLOG_PATH = $(COMP_SOURCE)/slog_04_00_00_02
    SYSLINK_PATH = $(COMP_SOURCE)/syslink_2_00_02_80
    UIA_PATH = $(COMP_SOURCE)/uia_1_00_01_17
    XDAIS_PATH = $(COMP_SOURCE)/xdais_7_21_00_02
    XDC_PATH = $(COMP_SOURCE)/xdctools_3_22_01_21
    LINUXUTILS_PATH = $(COMP_SOURCE)/linuxutils_3_21_00_04
    OSAL_PATH = $(COMP_SOURCE)/osal_1_21_01_08
    CODEGEN_PATH_A8 = /home/steveb/CodeSourcery/Sourcery_G++_Lite
    KERNEL_PATH = $(EZSDK)/board-support/linux-2.6.37-psp04.00.00.12
    LINUXDEVKIT_PATH = $(EZSDK)/linux-devkit/arm-none-linux-gnueabi/usr
    TARGET_FS = $(HOME)/targetfs
    
    # C++ compiler path
    CC = $(CODEGEN_PATH_A8)/bin/arm-none-linux-gnueabi-g++
    
    # defines
    CFLAGS = \
    	-c \
    	-Wunused \
    	-Wall \
    	-g \
    	-fPIC \
    	-fno-strict-aliasing \
    	-MD \
    	-march=armv5t \
    	-Dfar= \
    	-D_DEBUG_=1 \
    	-DMULTICHANNEL_OPT=1 \
    	-Dxdc_target_name__=GCArmv5T \
    	-Dxdc_target_types__=gnu/targets/arm/std.h \
    	-Dxdc_bld__profile_debug \
    	-Dxdc_bld__vers_1_0_4_3_3 \
    	-DGlobal_appTerminate=0 \
    	-D_VIDEO_M3_DYNAMIC_CONFIG \
    	-DGlobal_GrpxDssMsgHeapId=6 \
    	-DGlobal_TilerHeapId=7 \
    	-D_LOCAL_CORE_a8host_ \
    	-D_REMOTE_omxbase_ \
    	-D_REMOTE_venc_ \
    	-D_REMOTE_server_ \
    	-D_REMOTE_scheduler_ \
    	-D_REMOTE_domx_ \
    	-D_REMOTE_domx_delegates_shmem_ \
    	-D_REMOTE_omxcore_ \
    	-D_REMOTE_vfcc_ \
    	-D_REMOTE_vfpc_ \
    	-D_REMOTE_vfdc_ \
    	-D_REMOTE_ctrl_ \
    	-D_BUILD_omxbase_ \
    	-D_BUILD_venc_ \
    	-D_BUILD_server_ \
    	-D_BUILD_scheduler_ \
    	-D_BUILD_domx_ \
    	-D_BUILD_domx_delegates_shmem_ \
    	-D_BUILD_omxcore_ \
    	-D_BUILD_vfcc_ \
    	-D_BUILD_vfpc_ \
    	-D_BUILD_vfdc_ \
    	-D_BUILD_ctrl_ \
    	-DMAX_RESOLUTION_HD \
    	-DDOMX_CORE_REMOTEDUCATIHOST \
    	-DVC_APPS \
    	-DCODEC_H264ENC \
    	-DTI_816X_BUILD \
    	-DPLATFORM_EVM_SI \
    	-DADD_FBDEV_SUPPORT
    
    # include files
    
    INCLUDES = \
    	-I. \
    	-Iinc \
    	-I../common \
    	-I$(CODEGEN_PATH_A8) \
    	-I$(BIOS_PATH)/packages \
    	-I$(XDC_PATH)/packages \
    	-I$(OMX_PATH)/packages \
    	-I$(OMX_PATH)/packages/ti/omx/interfaces/openMaxv11 \
    	-I$(OMX_PATH)/packages/ti/omx/comp/omxbase \
    	-I$(OMX_PATH)/packages/ti/omx/comp/omxbase/omx_base_comp/inc \
    	-I$(OMX_PATH)/packages/ti/omx/omxcore \
    	-I$(OMX_PATH)/packages/ti/omx/memcfg \
    	-I$(OMX_PATH)/packages/ti/omx/omxutils \
    	-I$(OMX_PATH)/packages/ti/omx/omxutils/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vfdc \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vfdc/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vfpc \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vfpc/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vfcc \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vfcc/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vsrc \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vsrc/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vsnk \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vsnk/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/venc \
    	-I$(OMX_PATH)/packages/ti/omx/comp/venc/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vdec \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vdec/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/scheduler \
    	-I$(OMX_PATH)/packages/ti/omx/comp/ctrl \
    	-I$(OMX_PATH)/packages/ti/omx/domx \
    	-I$(OMX_PATH)/packages/ti/omx/domx/interfaces \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vlpb \
    	-I$(OMX_PATH)/packages/ti/omx/comp/vlpb/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/adec \
    	-I$(OMX_PATH)/packages/ti/omx/comp/adec/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/server \
    	-I$(OMX_PATH)/packages/ti/omx/comp/cmux \
    	-I$(OMX_PATH)/packages/ti/omx/comp/cmux/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/dmux \
    	-I$(OMX_PATH)/packages/ti/omx/comp/dmux/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/rtptx \
    	-I$(OMX_PATH)/packages/ti/omx/comp/rtptx/src \
    	-I$(OMX_PATH)/packages/ti/omx/comp/rtprx \
    	-I$(OMX_PATH)/packages/ti/omx/comp/rtprx/src \
    	-I$(OMX_PATH)/packages/ti/timmosal \
    	-I$(IPC_PATH)/packages \
    	-I$(FC_PATH)/packages \
    	-I$(XDAIS_PATH)/packages \
    	-I$(OSAL_PATH)/packages \
    	-I$(SYSLINK_PATH)/packages \
    	-I$(CE_PATH)/packages \
    	-I$(EZSDK)/component-sources/ivahd_h264enc_01_00_01_03_production/packages \
    	-I$(UIA_PATH)/packages \
    	-I$(SLOG_PATH) \
    	-I$(KERNEL_PATH)/include \
    	-I$(KERNEL_PATH)/arch/arm/include \
    	-I$(CODEGEN_PATH_A8)/arm-none-linux-gnueabi/libc/usr/include
    
    #libraries
    LIBS = \
    	$(OMX_PATH)/lib/omxcore.av5T \
    	$(OMX_PATH)/lib/memcfg.av5T \
    	$(OMX_PATH)/lib/domx.av5T \
    	$(OMX_PATH)/lib/domx_delegates_shmem.av5T \
    	$(OMX_PATH)/lib/timmosal.av5T \
    	$(OMX_PATH)/lib/omxcfg.av5T \
    	$(OSAL_PATH)/packages/linuxdist/build/lib/osal.a \
    	$(OSAL_PATH)/packages/linuxdist/cstubs/lib/cstubs.a \
    	$(FC_PATH)/packages/ti/sdo/rcm/lib/debug/rcm_syslink.av5T \
    	$(FC_PATH)/packages/ti/sdo/fc/memutils/lib/release/memutils.av5T \
    	$(OSAL_PATH)/packages/ti/sdo/xdcruntime/linux/lib/debug/osal_linux_470.av5T \
    	$(FC_PATH)/packages/ti/sdo/fc/global/lib/debug/fcsettings.av5T \
    	$(SYSLINK_PATH)/packages/ti/syslink/lib/syslink.a_debug \
    	$(LINUXUTILS_PATH)/packages/ti/sdo/linuxutils/cmem/lib/cmem.a470MV \
    	$(UIA_PATH)/packages/ti/uia/linux/lib/servicemgr.a
    
    TARGET = video_display
    
    SOURCES = \
    	main.cpp \
    	live.cpp \
    	ilclient.cpp \
    	ilclient_utils.cpp \
    	semp.cpp
    
    OBJECTS = $(SOURCES:.cpp=.o)
    
    all: $(TARGET)
    
    $(TARGET): $(OBJECTS)
    	mkdir -p bin
    	$(CC) -Xlinker --start-group $(addprefix obj/,$(OBJECTS)) $(LIBS) -lpthread -lrt -L$CODEGEN_PATH_A8/arm-none-linux-gnueabi/lib -Xlinker --end-group -o bin/$(TARGET)
    
    $(OBJECTS) : %.o: %.cpp
    	mkdir -p obj
    	$(CC) $(CFLAGS) $(INCLUDES) $< -o obj/$@
    
    clean:
    	rm -rfv obj
    	rm -rfv bin
    
    install:
    	cp bin/$(TARGET) $(TARGET_FS)/home/root
    	
    
    
    that I use for building applications that use OpenMax. Hopefully this helps.

    I have a follow up question related to using Qt and OpenMax.

    We would like to run a Qt application with its display using the HDMI output. This application needs to display video on the Composite output. I was hoping that we could use OpenMax to display the video on the composite. Is this possible and would OpenMax be the best choice?

    Thanks, Steve

  • You've probably already resolved this issue but just so the answer is here for other people, the "undefined reference" were caused by circular library dependencies. The solution this problem is to specify the -Xlinker --start-group and -Xlinker --end-group  after before and after the list of libraries.

     

    $>arm-none-linux-gnueabi-gcc -Xlinker --start-group  <list of libraries> -Xlinker --end-group -o <output file>