[asterisk-dev] How to create a slinear silent frame? SOLVED

Holger Wirtz wirtz at dfn.de
Tue May 19 08:38:07 CDT 2009


Hi Kevin,

Kevin P. Fleming wrote:
> Holger Wirtz wrote:
> 
>> thanks for your help! I fixed the problem with not using "offset" but
>> can anyone tell me when offset is beeing used?
> 
> 'offset' represents the number of bytes of space available 'in front' of
> the data buffer that the frame points to. This is used by channel
> drivers that send frames over network connections so they can place
> network packet headers (RTP, for example) in front of the data without
> having to copy it into another buffer first. Most Asterisk modules that
> produce frames allocate the number of bytes needed for the data *plus*
> AST_FRIENDLY_OFFSET, then store the actual data in the first byte of the
> buffer *after* AST_FRIENDLY_OFFSET and set 'offset' to that value.

thnaks a lot! I an offset necessary if I create slinear packets and
convert them to the channel drivers codec (let's say speex)? becuase the
data for the frame has to be calculated from scratch the translator will
be doing everything right with the offset?

> 
>> Another question: Is there a documentation outside the sources where I
>> can get some more information about channels and frames?
> 
> Nope.
> 

Ok... learning by doing, reading the source and asking the dev-lists...

Thanks again, Holger
-- 
#####  #### ##  ##   Holger Wirtz         Phone : (+49 30) 884299-40
##  ## ##   ### ##   DFN-Verein           Fax   : (+49 30) 884299-70
##  ## #### ######   Alexanderplatz 1     E-Mail: wirtz at dfn.de
##  ## ##   ## ###   10178 Berlin
#####  ##   ##  ##   GERMANY              WWW   : http://www.dfn.de
GPG-Fingerprint: ABFA 1F51 DD8D 503C 85DC  0C51 E961 79E2 6685 9BCF



More information about the asterisk-dev mailing list