From cf53f7f71b606887b938be0e7658689873b3f326 Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Wed, 20 May 2009 21:28:17 +0000 Subject: [PATCH] add 30ms G729 codec in mod_dahdi_codec git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13404 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../codecs/mod_dahdi_codec/mod_dahdi_codec.c | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c b/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c index 495e00e014..8b8ff8e233 100644 --- a/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c +++ b/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c @@ -532,6 +532,31 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dahdi_codec_load) switch_dahdi_decode, /* function to decode encoded data into raw data */ switch_dahdi_destroy); /* deinitalize a codec handle using this implementation */ + mpf = 30000; + spf = 240; + bpfd = 480; + bpfc = 30; + fpnp = 30; + switch_core_codec_add_implementation(pool, + codec_interface, + SWITCH_CODEC_TYPE_AUDIO, /* enumeration defining the type of the codec */ + 18, /* the IANA code number */ + "G729", /* the IANA code name */ + NULL, /* default fmtp to send (can be overridden by the init function) */ + 8000, /* samples transferred per second */ + 8000, /* actual samples transferred per second */ + 8000, /* bits transferred per second */ + mpf, /* number of microseconds per frame */ + spf, /* number of samples per frame */ + bpfd, /* number of bytes per frame decompressed */ + bpfc, /* number of bytes per frame compressed */ + 1, /* number of channels represented */ + fpnp, /* number of frames per network packet */ + switch_dahdi_init, /* function to initialize a codec handle using this implementation */ + switch_dahdi_encode, /* function to encode raw data into encoded data */ + switch_dahdi_decode, /* function to decode encoded data into raw data */ + switch_dahdi_destroy); /* deinitalize a codec handle using this implementation */ + SWITCH_ADD_CODEC(codec_interface, "DAHDI G.723.1 5.3k"); /* 5.3kbit */ mpf = 30000; /* Algorithmic delay of 37.5ms with 7.5ms of look-ahead delay */ spf = 240;