Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Making the demos/DVTB work with custom combos

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

Problem Statement : let's say you only need a video codecs combo i.e. you don't care about audio, speech or imaging. You'd like to validate your combo with the DVEVM demos or DVTB. You've built your combo and updated your GPP cfg file to point to the new combo as follows: -

var engine = Engine.createFromServer(
    "decode",
    "./mpeg4dec_unitserver_evm3530.x64P",
    "ti.sdo.servers.mpeg4dec_unitserver_evm3530"
    );

You can tell from the name that this is a "unit server" i.e. MPEG4 decode only in the combo/server.

Now you try to build the demos. Suddenly you hit something like this!

Linking decode from audio.o ctrl.o display.o loader.o main.o video.o ../keypad.o ../uibuttons.o ../ui.o decode_config/linker.cmd..
/opt/dmsw/dvsdk_3_00_00_13/dmai_1_20_00_00/packages/ti/sdo/dmai/lib/dmai_linux_omap3530.a470MV(Adec1.o3530.o470MV): In function `cleanup':
/db/rtree/niclas/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/ce/Adec1.c:52: undefined reference to `AUDDEC1_delete'

What now?

Linking in the right libraries

The DVSDK demos for most platforms support audio+video or speech+audio+video. In this case the error message indicates that a call to the VISA API AUDDEC1_delete is being done, but the library that supplies it is not linked in.

Typically this is resolved by the combo having audio + video, in which case a reference to the underlying audio & video libraries gets linked in. For example in the build you'll see: -

will link with ti.sdo.ce.video2:lib/viddec2.a470MV

Without an audio codec in the combo, the demos / DVTB build fails.

Solution

To resolve this, simply add the following in the demos/DVTB cfg file: -

/* link in VISA classes */
xdc.loadPackage("ti.sdo.ce.audio1");

The loadPackage method will unconditionally link in the right library content for the ti.sdo.ce.audio1 package. In this case it results in a linkage of: -

will link with ti.sdo.ce.audio1:lib/auddec1.a470MV;lib/audenc1.a470MV

Naturally if you see errors with undefined references to e.g. SPHDEC1_delete, you can apply the same principle and load in the ti.sdo.ce.speech1 package.

See Also