[Asterisk-Dev] Help with integrating EVRC codec into Asterisk

Steve Kann stevek at stevek.com
Tue Mar 29 14:13:24 MST 2005


Kevin P. Fleming wrote:

> gourij at qualcomm.com wrote:
>
>> We have been playing around with asterisk code to integrate EVRC 
>> codec into Asterisk.  Since EVRC encoding of current frame dependents 
>> on previous frames, it is necessary to pass some call-id kind of 
>> information into the codec.  From a quick look, it seems like the 
>> call-id info is not sent outside of chan_sip.  How does it work for 
>> other non-frame-independent codecs in Asterisk?
>
>
> I don't think there are any codecs like that supported in Asterisk 
> right now, except for video, and those codecs deal with this problem 
> themselves (and Asterisk does not support video transcoding, so it 
> doesn't have to deal with this problem).
>
> I would think the best way to deal with this will be to allocate a 
> "handle" to a codec instance when transcoding EVRC is needed, so the 
> codec itself can maintain a buffer of previous frames for that stream.


(I thought kevin would know this).

All the codecs in asterisk, except for the companders (xLaw), have 
state, and depend on previous frames (iLBC kinda falls into this 
category, but not exactly).

So, just take a look at any of the codecs;  the simplest example would 
be codec_gsm.c, since the GSM-specific interface is pretty simple.  
(speex and iLBC both have float-conversion in them, and speex also has 
bitstream parsing to do, in codec_speex).



-SteveK




More information about the asterisk-dev mailing list