move iana codes to the implementations.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1666 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-06-23 20:14:29 +00:00
parent ce2a9d2636
commit 3ba26db705
13 changed files with 167 additions and 88 deletions

View File

@@ -190,6 +190,8 @@ static switch_status_t switch_g711a_destroy(switch_codec_t *codec)
#if 0
static const switch_codec_implementation_t g711u_8k_60ms_implementation = {
/*.ianacode */ 0,
/*.iananame */ "PCMU",
/*.samples_per_second */ 8000,
/*.bits_per_second */ 19200,
/*.microseconds_per_frame */ 60000,
@@ -207,6 +209,8 @@ static const switch_codec_implementation_t g711u_8k_60ms_implementation = {
static const switch_codec_implementation_t g711u_8k_30ms_implementation = {
/*.ianacode */ 0,
/*.iananame */ "PCMU",
/*.samples_per_second */ 8000,
/*.bits_per_second */ 96000,
/*.microseconds_per_frame */ 30000,
@@ -225,6 +229,8 @@ static const switch_codec_implementation_t g711u_8k_30ms_implementation = {
#endif
static const switch_codec_implementation_t g711u_16k_implementation = {
/*.ianacode */ 0,
/*.iananame */ "PCMU",
/*.samples_per_second */ 16000,
/*.bits_per_second */ 128000,
/*.microseconds_per_frame */ 20000,
@@ -241,6 +247,8 @@ static const switch_codec_implementation_t g711u_16k_implementation = {
};
static const switch_codec_implementation_t g711u_8k_implementation = {
/*.ianacode */ 0,
/*.iananame */ "PCMU",
/*.samples_per_second */ 8000,
/*.bits_per_second */ 64000,
/*.microseconds_per_frame */ 20000,
@@ -259,6 +267,8 @@ static const switch_codec_implementation_t g711u_8k_implementation = {
static const switch_codec_implementation_t g711a_8k_implementation = {
/*.ianacode */ 8,
/*.iananame */ "PCMA",
/*.samples_per_second */ 8000,
/*.bits_per_second */ 64000,
/*.microseconds_per_frame */ 20000,
@@ -278,16 +288,12 @@ static const switch_codec_implementation_t g711a_8k_implementation = {
static const switch_codec_interface_t g711a_codec_interface = {
/*.interface_name */ "g711 alaw",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 8,
/*.iananame */ "PCMA",
/*.implementations */ &g711a_8k_implementation
};
static const switch_codec_interface_t g711u_codec_interface = {
/*.interface_name */ "g711 ulaw",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
/*.iananame */ "PCMU",
/*.implementations */ &g711u_8k_implementation,
/*.next */ &g711a_codec_interface
};

View File

@@ -219,6 +219,8 @@ static switch_status_t switch_g729_decode(switch_codec_t *codec,
/* Registration */
static const switch_codec_implementation_t g729_10ms_8k_implementation = {
/*.ianacode */ 18,
/*.iananame */ "G729",
/*.samples_per_second */ 8000,
/*.bits_per_second */ 32000,
/*.microseconds_per_frame */ 10000,
@@ -235,6 +237,8 @@ static const switch_codec_implementation_t g729_10ms_8k_implementation = {
};
static const switch_codec_implementation_t g729_8k_implementation = {
/*.ianacode */ 18,
/*.iananame */ "G729",
/*.samples_per_second */ 8000,
/*.bits_per_second */ 64000,
/*.microseconds_per_frame */ 20000,
@@ -255,8 +259,6 @@ static const switch_codec_implementation_t g729_8k_implementation = {
static const switch_codec_interface_t g729_codec_interface = {
/*.interface_name */ "g729",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 18,
/*.iananame */ "G729",
/*.implementations */ &g729_8k_implementation,
};

View File

@@ -133,6 +133,8 @@ static switch_status_t switch_gsm_decode(switch_codec_t *codec, switch_codec_t *
/* Registration */
static const switch_codec_implementation_t gsm_8k_implementation = {
/*.ianacode */ 3,
/*.iananame */ "gsm",
/*.samples_per_second */ 8000,
/*.bits_per_second */ 13200,
/*.microseconds_per_frame */ 20000,
@@ -150,8 +152,6 @@ static const switch_codec_implementation_t gsm_8k_implementation = {
static const switch_codec_interface_t gsm_codec_interface = {
/*.interface_name */ "gsm",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 3,
/*.iananame */ "gsm",
/*.implementations */ &gsm_8k_implementation,
};
static switch_loadable_module_interface_t gsm_module_interface = {

View File

@@ -186,6 +186,8 @@ static switch_status_t switch_ilbc_decode(switch_codec_t *codec,
/* Registration */
static const switch_codec_implementation_t ilbc_8k_30ms_implementation = {
/*.ianacode */ 97,
/*.iananame */ "iLBC",
/*.samples_per_second */ 8000,
/*.bits_per_second */ NO_OF_BYTES_30MS*8*8000/BLOCKL_30MS,
/*.microseconds_per_frame */ 30000,
@@ -202,6 +204,8 @@ static const switch_codec_implementation_t ilbc_8k_30ms_implementation = {
};
static const switch_codec_implementation_t ilbc_8k_20ms_implementation = {
/*.ianacode */ 97,
/*.iananame */ "iLBC",
/*.samples_per_second */ 8000,
/*.bits_per_second */ NO_OF_BYTES_20MS*8*8000/BLOCKL_20MS,
/*.microseconds_per_frame */ 20000,
@@ -219,7 +223,48 @@ static const switch_codec_implementation_t ilbc_8k_20ms_implementation = {
};
static const switch_codec_implementation_t ilbc_102_8k_30ms_implementation = {
/*.ianacode */ 97,
/*.iananame */ "iLBC",
/*.samples_per_second */ 8000,
/*.bits_per_second */ NO_OF_BYTES_30MS*8*8000/BLOCKL_30MS,
/*.microseconds_per_frame */ 30000,
/*.samples_per_frame */ 240,
/*.bytes_per_frame */ 480,
/*.encoded_bytes_per_frame */ NO_OF_BYTES_30MS,
/*.number_of_channels */ 1,
/*.pref_frames_per_packet */ 1,
/*.max_frames_per_packet */ 1,
/*.init */ switch_ilbc_init,
/*.encode */ switch_ilbc_encode,
/*.decode */ switch_ilbc_decode,
/*.destroy */ switch_ilbc_destroy
};
static const switch_codec_implementation_t ilbc_102_8k_20ms_implementation = {
/*.ianacode */ 102,
/*.iananame */ "iLBC102",
/*.samples_per_second */ 8000,
/*.bits_per_second */ NO_OF_BYTES_20MS*8*8000/BLOCKL_20MS,
/*.microseconds_per_frame */ 20000,
/*.samples_per_frame */ 160,
/*.bytes_per_frame */ 320,
/*.encoded_bytes_per_frame */ NO_OF_BYTES_20MS,
/*.number_of_channels */ 1,
/*.pref_frames_per_packet */ 1,
/*.max_frames_per_packet */ 1,
/*.init */ switch_ilbc_init,
/*.encode */ switch_ilbc_encode,
/*.decode */ switch_ilbc_decode,
/*.destroy */ switch_ilbc_destroy,
/*.next */ &ilbc_102_8k_30ms_implementation
};
static const switch_codec_implementation_t ilbc_8k_20ms_nonext_implementation = {
/*.ianacode */ 97,
/*.iananame */ "iLBC20ms",
/*.samples_per_second */ 8000,
/*.bits_per_second */ NO_OF_BYTES_20MS*8*8000/BLOCKL_20MS,
/*.microseconds_per_frame */ 20000,
@@ -239,25 +284,19 @@ static const switch_codec_implementation_t ilbc_8k_20ms_nonext_implementation =
static const switch_codec_interface_t ilbc_20ms_codec_interface = {
/*.interface_name */ "ilbc",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 97,
/*.iananame */ "iLBC20ms",
/*.implementations */ &ilbc_8k_20ms_nonext_implementation
};
static const switch_codec_interface_t ilbc_102_codec_interface = {
/*.interface_name */ "ilbc",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 102,
/*.iananame */ "iLBC102",
/*.implementations */ &ilbc_8k_20ms_implementation,
/*.implementations */ &ilbc_102_8k_20ms_implementation,
/*.next*/ &ilbc_20ms_codec_interface
};
static const switch_codec_interface_t ilbc_codec_interface = {
/*.interface_name */ "ilbc",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 97,
/*.iananame */ "iLBC",
/*.implementations */ &ilbc_8k_20ms_implementation,
/*.next*/ &ilbc_102_codec_interface
};

View File

@@ -91,6 +91,8 @@ static switch_status_t switch_raw_destroy(switch_codec_t *codec)
}
static const switch_codec_implementation_t raw_32k_implementation = {
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second = */ 32000,
/*.bits_per_second = */ 512000,
/*.microseconds_per_frame = */ 20000,
@@ -107,6 +109,8 @@ static const switch_codec_implementation_t raw_32k_implementation = {
};
static const switch_codec_implementation_t raw_22k_implementation = {
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second = */ 22050,
/*.bits_per_second = */ 352800,
/*.microseconds_per_frame = */ 20000,
@@ -124,6 +128,8 @@ static const switch_codec_implementation_t raw_22k_implementation = {
};
static const switch_codec_implementation_t raw_16k_implementation = {
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second = */ 16000,
/*.bits_per_second = */ 256000,
/*.microseconds_per_frame = */ 20000,
@@ -141,6 +147,8 @@ static const switch_codec_implementation_t raw_16k_implementation = {
};
static const switch_codec_implementation_t raw_8k_implementation = {
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second = */ 8000,
/*.bits_per_second = */ 128000,
/*.microseconds_per_frame = */ 20000,
@@ -159,6 +167,8 @@ static const switch_codec_implementation_t raw_8k_implementation = {
static const switch_codec_implementation_t raw_8k_30ms_implementation = {
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.samples_per_second */ 8000,
/*.bits_per_second */ 128000,
/*.microseconds_per_frame */ 30000,
@@ -179,8 +189,6 @@ static const switch_codec_implementation_t raw_8k_30ms_implementation = {
static const switch_codec_interface_t raw_codec_interface = {
/*.interface_name */ "raw signed linear (16 bit)",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 10,
/*.iananame */ "L16",
/*.implementations */ &raw_8k_30ms_implementation
};

View File

@@ -268,6 +268,8 @@ static switch_status_t switch_speex_destroy(switch_codec_t *codec)
/* Registration */
static const switch_codec_implementation_t speex_32k_implementation = {
/*.ianacode */ 98,
/*.iananame */ "speex",
/*.samples_per_second */ 32000,
/*.bits_per_second */ 512000,
/*.nanoseconds_per_frame */ 20000,
@@ -284,6 +286,8 @@ static const switch_codec_implementation_t speex_32k_implementation = {
};
static const switch_codec_implementation_t speex_16k_implementation = {
/*.ianacode */ 98,
/*.iananame */ "speex",
/*.samples_per_second */ 16000,
/*.bits_per_second */ 256000,
/*.nanoseconds_per_frame */ 20000,
@@ -301,6 +305,8 @@ static const switch_codec_implementation_t speex_16k_implementation = {
};
static const switch_codec_implementation_t speex_8k_implementation = {
/*.ianacode */ 98,
/*.iananame */ "speex",
/*.samples_per_second */ 8000,
/*.bits_per_second */ 128000,
/*.nanoseconds_per_frame */ 20000,
@@ -320,8 +326,6 @@ static const switch_codec_implementation_t speex_8k_implementation = {
static const switch_codec_interface_t speex_codec_interface = {
/*.interface_name */ "speex",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 98,
/*.iananame */ "speex",
/*.implementations */ &speex_8k_implementation
};