<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Asterisk Codecs Extension</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Pedro,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Simply look at any codec code in asterisk/codecs/.
I suggest codec_ulaw.c or codec_alaw.c. The bulk of both of these is the
necessary interfacing code to make whatever-generic-codec work with asterisk,
and the actual conversions from xlaw to PCM and back are simple 2-liner loops.
Once you understand the basic structure of an * codec, look at codec_g723_1.c
for an example on how to handle a whatever-generic-codec that is an opaque
library.</FONT></DIV>
<DIV><FONT face=Arial size=2>Model your new * codec on those, as I think
those provide the best examples of an adaptation/abstraction layer.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cheers!</FONT></DIV>
<DIV><FONT face=Arial size=2>Alex.</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=est-p-bgoncalves@ptinovacao.pt
href="mailto:est-p-bgoncalves@ptinovacao.pt">Pedro Bessa Goncalves</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=asterisk-dev@lists.digium.com
href="mailto:Asterisk-Dev@Lists. Digium. Com (asterisk-dev@lists.digium.com)">Asterisk-Dev@Lists.
Digium. Com (asterisk-dev@lists.digium.com)</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, April 13, 2004 7:35
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Asterisk-Dev] Asterisk Codecs
Extension</DIV>
<DIV><BR></DIV>
<P><FONT size=2>Hi, does anyone know the required function headers for
extending Asterisk codecs?</FONT> <BR><FONT size=2>Is there another way to
import 3rd party codecs?</FONT> </P>
<P><FONT size=2>Thank you,</FONT> <BR><FONT size=2>Pedro Goncalves</FONT>
</P></BLOCKQUOTE></BODY></HTML>