codec tweaks (do a make sure)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4077 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2007-01-29 15:43:41 +00:00
1 parent fcb152104f
commit db70ef2a37
5 files changed
+332 -59

No files matched your search

+94 -32
View File
@@ -188,7 +188,6 @@ static switch_status_t switch_g711a_destroy(switch_codec_t *codec)
/* Registration */
static const switch_codec_implementation_t g711u_8k_60ms_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
@@ -209,7 +208,6 @@ static const switch_codec_implementation_t g711u_8k_60ms_implementation = {
/*.destroy */ switch_g711u_destroy
};
#if 0
static const switch_codec_implementation_t g711u_8k_30ms_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
@@ -228,32 +226,10 @@ static const switch_codec_implementation_t g711u_8k_30ms_implementation = {
/*.encode */ switch_g711u_encode,
/*.decode */ switch_g711u_decode,
/*.destroy */ switch_g711u_destroy,
/*.next */ NULL
/*.next*/ &g711u_8k_60ms_implementation
};
static const switch_codec_implementation_t g711u_16k_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
/*.iananame */ "PCMU",
/*.fmtp */ NULL,
/*.samples_per_second */ 16000,
/*.bits_per_second */ 128000,
/*.microseconds_per_frame */ 20000,
/*.samples_per_frame */ 320,
/*.bytes_per_frame */ 640,
/*.encoded_bytes_per_frame */ 320,
/*.number_of_channels */ 1,
/*.pref_frames_per_packet */ 1,
/*.max_frames_per_packet */ 1,
/*.init */ switch_g711u_init,
/*.encode */ switch_g711u_encode,
/*.decode */ switch_g711u_decode,
/*.destroy */ switch_g711u_destroy,
/*.next */ &g711u_8k_30ms_implementation
};
#endif
static const switch_codec_implementation_t g711u_8k_implementation = {
static const switch_codec_implementation_t g711u_8k_20ms_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
/*.iananame */ "PCMU",
@@ -271,12 +247,75 @@ static const switch_codec_implementation_t g711u_8k_implementation = {
/*.encode */ switch_g711u_encode,
/*.decode */ switch_g711u_decode,
/*.destroy */ switch_g711u_destroy,
///*.next */ &g711u_16k_implementation
&g711u_8k_60ms_implementation
/*.next*/ &g711u_8k_30ms_implementation
};
static const switch_codec_implementation_t g711u_8k_10ms_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
/*.iananame */ "PCMU",
/*.fmtp */ NULL,
/*.samples_per_second */ 8000,
/*.bits_per_second */ 64000,
/*.microseconds_per_frame */ 10000,
/*.samples_per_frame */ 80,
/*.bytes_per_frame */ 160,
/*.encoded_bytes_per_frame */ 80,
/*.number_of_channels */ 1,
/*.pref_frames_per_packet */ 1,
/*.max_frames_per_packet */ 1,
/*.init */ switch_g711u_init,
/*.encode */ switch_g711u_encode,
/*.decode */ switch_g711u_decode,
/*.destroy */ switch_g711u_destroy,
/*.next*/ &g711u_8k_20ms_implementation
};
static const switch_codec_implementation_t g711a_8k_implementation = {
static const switch_codec_implementation_t g711a_8k_60ms_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 8,
/*.iananame */ "PCMA",
/*.fmtp */ NULL,
/*.samples_per_second */ 8000,
/*.bits_per_second */ 19200,
/*.microseconds_per_frame */ 60000,
/*.samples_per_frame */ 480,
/*.bytes_per_frame */ 960,
/*.encoded_bytes_per_frame */ 480,
/*.number_of_channels */ 1,
/*.pref_frames_per_packet */ 1,
/*.max_frames_per_packet */ 1,
/*.init */ switch_g711u_init,
/*.encode */ switch_g711u_encode,
/*.decode */ switch_g711u_decode,
/*.destroy */ switch_g711u_destroy,
};
static const switch_codec_implementation_t g711a_8k_30ms_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 8,
/*.iananame */ "PCMA",
/*.fmtp */ NULL,
/*.samples_per_second */ 8000,
/*.bits_per_second */ 96000,
/*.microseconds_per_frame */ 30000,
/*.samples_per_frame */ 240,
/*.bytes_per_frame */ 480,
/*.encoded_bytes_per_frame */ 240,
/*.number_of_channels */ 1,
/*.pref_frames_per_packet */ 1,
/*.max_frames_per_packet */ 1,
/*.init */ switch_g711u_init,
/*.encode */ switch_g711u_encode,
/*.decode */ switch_g711u_decode,
/*.destroy */ switch_g711u_destroy,
/*.next*/ &g711a_8k_60ms_implementation
};
static const switch_codec_implementation_t g711a_8k_20ms_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 8,
/*.iananame */ "PCMA",
@@ -293,18 +332,41 @@ static const switch_codec_implementation_t g711a_8k_implementation = {
/*.init */ switch_g711a_init,
/*.encode */ switch_g711a_encode,
/*.decode */ switch_g711a_decode,
/*.destroy */ switch_g711a_destroy
/*.destroy */ switch_g711a_destroy,
/*.next*/ &g711a_8k_30ms_implementation
};
static const switch_codec_implementation_t g711a_8k_10ms_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 8,
/*.iananame */ "PCMA",
/*.fmtp */ NULL,
/*.samples_per_second */ 8000,
/*.bits_per_second */ 64000,
/*.microseconds_per_frame */ 10000,
/*.samples_per_frame */ 80,
/*.bytes_per_frame */ 160,
/*.encoded_bytes_per_frame */ 80,
/*.number_of_channels */ 1,
/*.pref_frames_per_packet */ 1,
/*.max_frames_per_packet */ 1,
/*.init */ switch_g711u_init,
/*.encode */ switch_g711u_encode,
/*.decode */ switch_g711u_decode,
/*.destroy */ switch_g711u_destroy,
/*.next*/ &g711a_8k_20ms_implementation
};
static const switch_codec_interface_t g711a_codec_interface = {
/*.interface_name */ "g711 alaw",
/*.implementations */ &g711a_8k_implementation
/*.implementations */ &g711a_8k_10ms_implementation
};
static const switch_codec_interface_t g711u_codec_interface = {
/*.interface_name */ "g711 ulaw",
/*.implementations */ &g711u_8k_implementation,
/*.implementations */ &g711u_8k_10ms_implementation,
/*.next */ &g711a_codec_interface
};