]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add more l16 implementations and fix a typo
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 3 Jul 2006 19:46:32 +0000 (19:46 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 3 Jul 2006 19:46:32 +0000 (19:46 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1738 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/codecs/mod_l16/mod_l16.c
src/switch_core.c

index 3c033c0b5918746725bd423718ca5c80903e51c9..ca544e4a393287dcc025aa8208cf0d366871a6f6 100644 (file)
@@ -185,10 +185,49 @@ static const switch_codec_implementation_t raw_8k_30ms_implementation = {
 };
 
 
+static const switch_codec_implementation_t raw_8k_60ms_implementation = {
+       /*.ianacode */ 10,
+       /*.iananame */ "L16",
+       /*.samples_per_second */ 8000,
+       /*.bits_per_second */ 256000,
+       /*.microseconds_per_frame */ 60000,
+       /*.samples_per_frame */ 480,
+       /*.bytes_per_frame */ 960,
+       /*.encoded_bytes_per_frame */ 960,
+       /*.number_of_channels */ 1,
+       /*.pref_frames_per_packet */ 1,
+       /*.max_frames_per_packet */ 1,
+       /*.init */ switch_raw_init,
+       /*.encode */ switch_raw_encode,
+       /*.decode */ switch_raw_decode,
+       /*.destroy */ switch_raw_destroy,
+       /*.next */ &raw_8k_30ms_implementation
+};
+
+static const switch_codec_implementation_t raw_8k_120ms_implementation = {
+       /*.ianacode */ 10,
+       /*.iananame */ "L16",
+       /*.samples_per_second */ 8000,
+       /*.bits_per_second */ 512000,
+       /*.microseconds_per_frame */ 120000,
+       /*.samples_per_frame */ 960,
+       /*.bytes_per_frame */ 1920,
+       /*.encoded_bytes_per_frame */ 1920,
+       /*.number_of_channels */ 1,
+       /*.pref_frames_per_packet */ 1,
+       /*.max_frames_per_packet */ 1,
+       /*.init */ switch_raw_init,
+       /*.encode */ switch_raw_encode,
+       /*.decode */ switch_raw_decode,
+       /*.destroy */ switch_raw_destroy,
+       /*.next */ &raw_8k_60ms_implementation
+};
+
+
 static const switch_codec_interface_t raw_codec_interface = {
        /*.interface_name */ "raw signed linear (16 bit)",
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
-       /*.implementations */ &raw_8k_30ms_implementation
+       /*.implementations */ &raw_8k_120ms_implementation
 };
 
 static switch_loadable_module_interface_t raw_module_interface = {
index 795b15fce6d9666999e18bcceba79dfcf1483c93..4fce2527477d156f7b2a6c3f96586f04bbc67fab 100644 (file)
@@ -370,7 +370,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, ch
 
                return SWITCH_STATUS_SUCCESS;
        } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Codec %s Exists but not then desired implementation.\n",
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Codec %s Exists but not at the desired implementation.\n",
                                                          codec_name);
        }