]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add 30ms G729 codec in mod_dahdi_codec
authorMoises Silva <moy@sangoma.com>
Wed, 20 May 2009 21:28:17 +0000 (21:28 +0000)
committerMoises Silva <moy@sangoma.com>
Wed, 20 May 2009 21:28:17 +0000 (21:28 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13404 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c

index 495e00e0148f3a58b9cd9ff1a94ae4fec424d254..8b8ff8e233d84965c6fc5d7a370488bc467e4286 100644 (file)
@@ -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;