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.

Codec modules inherits Icodec interface

I want to change codec inherits interface, when I built server, there was a message interface wrong. If the module interface path intergrated into codec library? 

  • Hi Benlu,

    Sorry I am not sure I fully understood your question. Are you using a TI codec and TI server? If so there should not be any build issues out-of-box, unless you have made changes to the files. Can you give more details about what you did and show us the build log with the error message? Please also specify the versions of codec engine, codecs and DVSDK (if any) you are using.

    For what it's worth, the codec interface inheritance is defined in the file ti/sdo/codecs/h264enc/ce/H264ENC.xdc file for the h264 encoder for example. For your own codec you should find it under a similar path. The 'inherited interface' specifies what category the actual codec library belongs to, whether its an IVIDENC1 (video encoder), IAUDDEC1 (audio decoder), IUNIVERSAL (generic algorithm) etc. So it needs to match the interface that has been implemented by the codec library.

    Best regards,

    Vincent

  • Vincent,

    I'm using Ezsdk version 5_02_02 and TI lastest g729ab codec, I don't make any changes to g729ab codec files. The G729ABENC.xdc or G729ABDEC.xdc file defined the interface inherits from speech1 interface, which inherits from Icodec.

    I have changed speech1 interface source codec in ti.sdo.ce.speech1, and want to port the speech1to example extensions path without effectting any other speeh1 using in codec engine. I have changed the file .xdc inheritance to extensions path, but it's still using ti.sdo.ce.speech1 interface.   

  • Hi benlu,

    If you are interested in developing your own interface extension, make sure you have read the Codec Engine Application Developers' Guide: http://www.ti.com/lit/pdf/SPRUED6, as it contains valuable information on how to create one from scratch. Extending an interface is useful if you feel the need to change the SPHENC1 and SPHDEC1 interfaces defined by XDM, so that they match your new codecs (I presume you are trying to write your own speech codec, correct?). Most users are fine with the predefined interfaces, so they can simply write their codec libraries to conform to those interfaces without having to create an extension package. But maybe your codec/algorithm is different enough to justify doing so.

    After creating your extension package, you should rebuild it using the xdc command, as described in the Guide. In addition, you need to rebuild your codec package against the extension package after modifying its inheritance in its .xdc file.

    An alternative to creating an extension package that some people find simpler is to modify their codec to implement the IUNIVERSAL interface. This is a generic interface for algorithms that have significantly different semantics from the average codecs, and thus require exchanging different parameters between the application and the algorithm. If you are interested you can read up on it here: http://processors.wiki.ti.com/index.php/Getting_started_with_IUNIVERSAL

    Best regards,

    Vincent

  • Vincent,

    I'm sorry, I don't state the problem clearly. I have changed the source code from ti.sdo.ce.speech1 interface, which inherits by g729. Certainly, I re-built the speech1 interface, and it's been called by app successfully.

    I changed the g729 codec package path which defined in package.xdc and server's cfg file also been changed, it's also can be apply in applications. But when I modified the G729ENC.xdc or G729DEC.xdc file and re-built the g729 codec package to change the ti.sdo.ce speech1 interface to ti.sdo.ce.examples.extensions.speech1, app can't open codec G729enc and G729 dec... why?

  • Hi Benlu,

    You need to do the following when creating your extension package based on ISPHENC1/ISPHDEC1 and then changing the codec package to use it:

    0. Copy the speech1 folder into examples\ti\sdo\ce\examples\extensions, and make the desired modifications.

    1. In examples\ti\sdo\ce\examples\extensions\makefile, make sure you are building the extension copied over:
        $(MAKE) -C speech1 $@

    2. In examples\ti\sdo\ce\examples\extensions\speech1\package.xdc, declare the right package name:

        package ti.sdo.ce.examples.extensions.speech1 [1, 0, 2] {

    3. Copy makefile from examples\ti\sdo\ce\examples\extensions\scale to examples\ti\sdo\ce\examples\extensions\speech1

    4. In sphenc1.c/sphdec1.c, change the VISA_create call to call it with the right interface:
        visa = VISA_create(engine, name, (IALG_Params *)params,
            sizeof (_SPHENC1_Msg), "ti.sdo.ce.examples.extensions.speech1.ISPHENC1");

    5. Run gmake clean; gmake from examples\ti\sdo\ce\examples\extensions

    6. In the codec package, change the inheritance in G729ENC.xdc/G729DEC.xdc to inherit from ti.sdo.ce.examples.extensions.speech1.ISPHENC1 and ti.sdo.ce.examples.extensions.speech1.ISPHDEC1

    7. Rebuild codec, server and app.

    I suspect you are missing step #4, as it is easy to overlook when you copy the extension package around.

    Finally, not sure how much of the speech1 interfaces you have ended up changing, but just want to point out another potentially interesting read: http://processors.wiki.ti.com/index.php/Overriding_stubs_and_skeletons. This is useful if all you are looking for is to tweak the stubs and skeletons for a given interface. It saves the trouble of having to create a brand new extension package.

    Best regards,

    Vincent