I'm writting warppers around g729 codec, I have known how to write IALG function table and extend data structure.But I don't know how to write process and control fucntion for g729 cocec wrapper around.
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.
I'm writting warppers around g729 codec, I have known how to write IALG function table and extend data structure.But I don't know how to write process and control fucntion for g729 cocec wrapper around.
Examples for each XDM interface are provided in the XDAIS product - look in examples/ti/xdais/dm/examples/*.
Also, you might find features in these wizards valuable:
Chris
Chris,
I also have read codec in codec engine examples, it's the same with examples in ti/xdais/dm/examples. It's define process and control function, but my purpose is to call process and control function exposed by algorithm, The key is I don't know how to call process and control function exposed by algorithm, it's the same with IALG function table ?
If you're using Codec Engine you use the APIs appropriate for the XDM class. For example, if your codec implements ISPHENC1, you'll use Codec Engine's SPHENC1 APIs.
If you're not using Codec Engine but rather just invoking the codec directly, you'll have to call the fxns through the exposed ISPHENC1_Fxns table.
For example, the sphenc1_copy example codec's ISPHENC1_Fxns symbol is SPHENC1COPY_TI_ISPHENC1COPY. To call this example codec without Codec Engine, your app code might do something like this:
ISPHENC1_Fxns *pSpeechEncoderFxns = SPHENC1COPY_TI_ISPHENC1COPY;
pSpeechEncoderFxns->process(hAlg, inBuf, outBuf, inArgs, outArgs);
And don't forget, if your codec implements algActivate/algDeactivate, you should call those before/after the process() call.
Chris
Chris,
Thanks, the calling function exposed by algrithm mode of writting warppers around codec is similar with app calling codec directly without codec engine.