Texas Instruments Codec Engine Server Server User Manual


 
Creating a Codec Server
2-10
For example, these statements from the video_copy.cfg file have
been modified (bold text) to reference the speech encoder/decoder.
/* get various codec modules; i.e. codec implementations */
var SPHDEC_COPY = xdc.useModule('codecs.sphdec_copy.SPHDEC_COPY');
var SPHENC_COPY = xdc.useModule('codecs.sphenc_copy.SPHENC_COPY');
5) Modify the attributes of the threadAttrs structure as desired. See
CE_INSTALL_DIR/xdoc/index.html for details about these attributes.
Server.threadAttrs.stackSize = 2048;
Server.threadAttrs.priority = Server.MINPRI;
These settings configure the Server thread, which is used to create
and delete codecs as well as to support requests for dynamic
resource usage. We recommend that you use Server.MINPRI so you
don’t preempt real-time threads.
6) Specify the algorithms to be available in this Codec Server by
modifying the Server.algs array. For example, statements from the
video_copy.cfg file have been added and modified (bold text) to
reference the speech encoder/decoder and to give audio processing
a higher priority than video processing.
Server.algs = [
{name: "viddec_copy", mod: VIDDEC_COPY, threadAttrs: {
stackSize: 4096, stackMemId: 0, priority: Server.MINPRI + 1}
},
{name: "videnc_copy", mod: VIDENC_COPY, threadAttrs: {
stackSize: 4096, stackMemId: 0, priority: Server.MINPRI + 1}
},
{name: "sphdec_copy", mod: SPHDEC_COPY, threadAttrs: {
stackSize: 4096, stackMemId: 0, priority: Server.MINPRI + 2}
},
{name: "sphenc_copy", mod: SPHENC_COPY, threadAttrs: {
stackSize: 4096, stackMemId: 0, priority: Server.MINPRI + 2}
},
];
7) The example *.cfg files also configure the ti.sdo.fc.dskt2.DSKT2 and
ti.sdo.fc.dman3.DMAN3 modules, which are part of Framework
Components. DSKT2 is the xDAIS algorithm memory allocation
manager, and DMAN3 is the DMA manager. See the Framework
Components documentation in CE_INSTALL_DIR/xdoc/index.html
for details on configuring these modules.