]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
we'll have to use this when ptime works correctly
authorBrian West <brian@freeswitch.org>
Wed, 30 Aug 2006 05:32:35 +0000 (05:32 +0000)
committerBrian West <brian@freeswitch.org>
Wed, 30 Aug 2006 05:32:35 +0000 (05:32 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2446 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/codecs/mod_g723/mod_g723.c

index a44c5c4951e8bcb60194a8ded46fa3cf8c5da779..ef5a6fd5b24dad97383401181e7f593fe48f4e0a 100644 (file)
@@ -157,7 +157,7 @@ static switch_status_t switch_g723_decode(switch_codec_t *codec,
 
 /* Registration */ 
 
-static const switch_codec_implementation_t g723_implementation = { 
+static const switch_codec_implementation_t g723_1_30ms_implementation = { 
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO, 
        /*.ianacode */ 4, 
        /*.iananame */ "G723", 
@@ -168,6 +168,25 @@ static const switch_codec_implementation_t g723_implementation = {
        /*.bytes_per_frame */ 480, 
        /*.encoded_bytes_per_frame */ 24, 
        /*.number_of_channels */ 1, 
+       /*.pref_frames_per_packet */ 1, 
+       /*.max_frames_per_packet */ 2, 
+       /*.init */ switch_g723_init, 
+       /*.encode */ switch_g723_encode, 
+       /*.decode */ switch_g723_decode, 
+       /*.destroy */ switch_g723_destroy, 
+};
+#if 0
+static const switch_codec_implementation_t g723_1_60ms_implementation = { 
+       /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO, 
+       /*.ianacode */ 4, 
+       /*.iananame */ "G723", 
+       /*.samples_per_second */ 8000, 
+       /*.bits_per_second */ 6300, 
+       /*.microseconds_per_frame */ 60000, 
+       /*.samples_per_frame */ 240, 
+       /*.bytes_per_frame */ 480, 
+       /*.encoded_bytes_per_frame */ 24, 
+       /*.number_of_channels */ 1, 
        /*.pref_frames_per_packet */ 2, 
        /*.max_frames_per_packet */ 2, 
        /*.init */ switch_g723_init, 
@@ -175,18 +194,24 @@ static const switch_codec_implementation_t g723_implementation = {
        /*.decode */ switch_g723_decode, 
        /*.destroy */ switch_g723_destroy, 
 };
-
-static const switch_codec_interface_t g723_codec_interface = { 
+#endif
+static const switch_codec_interface_t g723_1_30ms_codec_interface = { 
        /*.interface_name */ "g723 6.3k", 
-       /*.implementations */ &g723_implementation, 
+       /*.implementations */ &g723_1_30ms_implementation, 
 };
-
+#if 0
+static const switch_codec_interface_t g723_1_60ms_codec_interface = { 
+       /*.interface_name */ "g723 6.3k", 
+       /*.implementations */ &g723_1_60ms_implementation, 
+       /*.next */ &g723_1_30ms_codec_interface
+};
+#endif
 static switch_loadable_module_interface_t g723_module_interface = { 
        /*.module_name */ modname, 
        /*.endpoint_interface */ NULL, 
        /*.timer_interface */ NULL, 
        /*.dialplan_interface */ NULL, 
-       /*.codec_interface */ &g723_codec_interface, 
+       /*.codec_interface */ &g723_1_30ms_codec_interface, 
        /*.application_interface */ NULL 
 };