mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
more g722 fun
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5987 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -296,6 +296,7 @@ static switch_codec_implementation_t amr_implementation = {
|
||||
/*.iananame */ "AMR",
|
||||
/*.fmtp */ "octet-align=0",
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 0,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
|
||||
@@ -188,6 +188,7 @@ static switch_codec_implementation_t g711u_8k_120ms_implementation = {
|
||||
/*.iananame */ "PCMU",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 64000,
|
||||
/*.microseconds_per_frame */ 120000,
|
||||
/*.samples_per_frame */ 960,
|
||||
@@ -208,6 +209,7 @@ static switch_codec_implementation_t g711u_8k_60ms_implementation = {
|
||||
/*.iananame */ "PCMU",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 19200,
|
||||
/*.microseconds_per_frame */ 60000,
|
||||
/*.samples_per_frame */ 480,
|
||||
@@ -229,6 +231,7 @@ static switch_codec_implementation_t g711u_8k_30ms_implementation = {
|
||||
/*.iananame */ "PCMU",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 96000,
|
||||
/*.microseconds_per_frame */ 30000,
|
||||
/*.samples_per_frame */ 240,
|
||||
@@ -250,6 +253,7 @@ static switch_codec_implementation_t g711u_8k_20ms_implementation = {
|
||||
/*.iananame */ "PCMU",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 64000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -271,6 +275,7 @@ static switch_codec_implementation_t g711u_8k_10ms_implementation = {
|
||||
/*.iananame */ "PCMU",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 64000,
|
||||
/*.microseconds_per_frame */ 10000,
|
||||
/*.samples_per_frame */ 80,
|
||||
@@ -294,6 +299,7 @@ static switch_codec_implementation_t g711a_8k_120ms_implementation = {
|
||||
/*.iananame */ "PCMA",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 64000,
|
||||
/*.microseconds_per_frame */ 120000,
|
||||
/*.samples_per_frame */ 960,
|
||||
@@ -314,6 +320,7 @@ static switch_codec_implementation_t g711a_8k_60ms_implementation = {
|
||||
/*.iananame */ "PCMA",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 19200,
|
||||
/*.microseconds_per_frame */ 60000,
|
||||
/*.samples_per_frame */ 480,
|
||||
@@ -335,6 +342,7 @@ static switch_codec_implementation_t g711a_8k_30ms_implementation = {
|
||||
/*.iananame */ "PCMA",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 96000,
|
||||
/*.microseconds_per_frame */ 30000,
|
||||
/*.samples_per_frame */ 240,
|
||||
@@ -356,6 +364,7 @@ static switch_codec_implementation_t g711a_8k_20ms_implementation = {
|
||||
/*.iananame */ "PCMA",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 64000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -377,6 +386,7 @@ static switch_codec_implementation_t g711a_8k_10ms_implementation = {
|
||||
/*.iananame */ "PCMA",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 64000,
|
||||
/*.microseconds_per_frame */ 10000,
|
||||
/*.samples_per_frame */ 80,
|
||||
|
||||
@@ -54,14 +54,14 @@ static switch_status_t switch_g722_init(switch_codec_t *codec, switch_codec_flag
|
||||
return SWITCH_STATUS_FALSE;
|
||||
} else {
|
||||
if (encoding) {
|
||||
if (codec->implementation->samples_per_second == 16000) {
|
||||
if (codec->implementation->actual_samples_per_second == 16000) {
|
||||
g722_encode_init(&context->encoder_object, 64000, G722_PACKED);
|
||||
} else {
|
||||
g722_encode_init(&context->encoder_object, 64000, G722_SAMPLE_RATE_8000);
|
||||
}
|
||||
}
|
||||
if (decoding) {
|
||||
if (codec->implementation->samples_per_second == 16000) {
|
||||
if (codec->implementation->actual_samples_per_second == 16000) {
|
||||
g722_decode_init(&context->decoder_object, 64000, G722_PACKED);
|
||||
} else {
|
||||
g722_decode_init(&context->decoder_object, 64000, G722_SAMPLE_RATE_8000);
|
||||
@@ -124,6 +124,7 @@ static switch_codec_implementation_t g722_8k_implementation = {
|
||||
/*.iananame */ "G722_8",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 64000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -143,7 +144,8 @@ static switch_codec_implementation_t g722_16k_implementation = {
|
||||
/*.ianacode */ 9,
|
||||
/*.iananame */ "G722",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 16000,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 16000,
|
||||
/*.bits_per_second */ 64000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -156,7 +158,7 @@ static switch_codec_implementation_t g722_16k_implementation = {
|
||||
/*.encode */ switch_g722_encode,
|
||||
/*.decode */ switch_g722_decode,
|
||||
/*.destroy */ switch_g722_destroy,
|
||||
/*.next */ &g722_8k_implementation
|
||||
/*.next */
|
||||
};
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_g722_load)
|
||||
@@ -164,7 +166,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_g722_load)
|
||||
switch_codec_interface_t *codec_interface;
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
||||
SWITCH_ADD_CODEC(codec_interface, "g722", &g722_16k_implementation);
|
||||
SWITCH_ADD_CODEC(codec_interface, "G722", &g722_16k_implementation);
|
||||
SWITCH_ADD_CODEC(codec_interface, "G722_8", &g722_8k_implementation);
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
@@ -175,6 +175,7 @@ static switch_codec_implementation_t g723_1_implementation = {
|
||||
/*.iananame */ "G723",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 6300,
|
||||
/*.microseconds_per_frame */ 30000,
|
||||
/*.samples_per_frame */ 240,
|
||||
|
||||
@@ -94,7 +94,7 @@ static switch_status_t switch_g726_init(switch_codec_t *codec, switch_codec_flag
|
||||
|
||||
g726_init_state(&handle->context);
|
||||
codec->private_info = handle;
|
||||
handle->bits_per_frame = (switch_byte_t) (codec->implementation->bits_per_second / (codec->implementation->samples_per_second));
|
||||
handle->bits_per_frame = (switch_byte_t) (codec->implementation->bits_per_second / (codec->implementation->actual_samples_per_second));
|
||||
handle->mode = (flags & SWITCH_CODEC_FLAG_AAL2 || strstr(codec->implementation->iananame, "AAL2"))
|
||||
? SWITCH_BITPACK_MODE_AAL2 : SWITCH_BITPACK_MODE_RFC3551;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
@@ -210,6 +210,7 @@ static switch_codec_implementation_t g726_16k_implementation = {
|
||||
/*.iananame */ "G726-16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 16000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -231,6 +232,7 @@ static switch_codec_implementation_t g726_24k_implementation = {
|
||||
/*.iananame */ "G726-24",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 24000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -251,6 +253,7 @@ static switch_codec_implementation_t g726_32k_implementation = {
|
||||
/*.iananame */ "G726-32",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 32000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -271,6 +274,7 @@ static switch_codec_implementation_t g726_40k_implementation = {
|
||||
/*.iananame */ "G726-40",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 40000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -293,6 +297,7 @@ static switch_codec_implementation_t aal2_g726_16k_implementation = {
|
||||
/*.iananame */ "AAL2-G726-16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 16000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -314,6 +319,7 @@ static switch_codec_implementation_t aal2_g726_24k_implementation = {
|
||||
/*.iananame */ "AAL2-G726-24",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 24000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -334,6 +340,7 @@ static switch_codec_implementation_t aal2_g726_32k_implementation = {
|
||||
/*.iananame */ "AAL2-G726-32",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 32000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -354,6 +361,7 @@ static switch_codec_implementation_t aal2_g726_40k_implementation = {
|
||||
/*.iananame */ "AAL2-G726-40",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 40000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
|
||||
@@ -218,6 +218,7 @@ static switch_codec_implementation_t g729_40ms_8k_implementation = {
|
||||
/*.iananame */ "G729",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 128000,
|
||||
/*.microseconds_per_frame */ 40000,
|
||||
/*.samples_per_frame */ 320,
|
||||
@@ -238,6 +239,7 @@ static switch_codec_implementation_t g729_30ms_8k_implementation = {
|
||||
/*.iananame */ "G729",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 96000,
|
||||
/*.microseconds_per_frame */ 30000,
|
||||
/*.samples_per_frame */ 240,
|
||||
@@ -259,6 +261,7 @@ static switch_codec_implementation_t g729_10ms_8k_implementation = {
|
||||
/*.iananame */ "G729",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 32000,
|
||||
/*.microseconds_per_frame */ 10000,
|
||||
/*.samples_per_frame */ 80,
|
||||
@@ -280,6 +283,7 @@ static switch_codec_implementation_t g729_8k_implementation = {
|
||||
/*.iananame */ "G729",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 64000,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
|
||||
@@ -140,6 +140,7 @@ static switch_codec_implementation_t gsm_8k_implementation = {
|
||||
/*.iananame */ "GSM",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 13200,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
|
||||
@@ -81,6 +81,7 @@ static switch_codec_implementation_t h264_90000_implementation = {
|
||||
/*.iananame */ "H264",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 90000,
|
||||
/*.actual_samples_per_second = */ 90000,
|
||||
/*.bits_per_second = */ 0,
|
||||
/*.microseconds_per_frame = */ 0,
|
||||
/*.samples_per_frame = */ 0,
|
||||
@@ -102,6 +103,7 @@ static switch_codec_implementation_t h263_90000_implementation = {
|
||||
/*.iananame */ "H263",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 90000,
|
||||
/*.actual_samples_per_second = */ 90000,
|
||||
/*.bits_per_second = */ 0,
|
||||
/*.microseconds_per_frame = */ 0,
|
||||
/*.samples_per_frame = */ 0,
|
||||
@@ -123,6 +125,7 @@ static switch_codec_implementation_t h261_90000_implementation = {
|
||||
/*.iananame */ "H261",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 90000,
|
||||
/*.actual_samples_per_second = */ 90000,
|
||||
/*.bits_per_second = */ 0,
|
||||
/*.microseconds_per_frame = */ 0,
|
||||
/*.samples_per_frame = */ 0,
|
||||
|
||||
@@ -188,6 +188,7 @@ static switch_codec_implementation_t ilbc_8k_30ms_implementation = {
|
||||
/*.iananame */ "iLBC",
|
||||
/*.fmtp */ "mode=30",
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ NO_OF_BYTES_30MS * 8 * 8000 / BLOCKL_30MS,
|
||||
/*.microseconds_per_frame */ 30000,
|
||||
/*.samples_per_frame */ 240,
|
||||
@@ -208,6 +209,7 @@ static switch_codec_implementation_t ilbc_8k_20ms_implementation = {
|
||||
/*.iananame */ "iLBC",
|
||||
/*.fmtp */ "mode=20",
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ NO_OF_BYTES_20MS * 8 * 8000 / BLOCKL_20MS,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -231,6 +233,7 @@ static switch_codec_implementation_t ilbc_102_8k_30ms_implementation = {
|
||||
/*.iananame */ "iLBC",
|
||||
/*.fmtp */ "mode=30",
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ NO_OF_BYTES_30MS * 8 * 8000 / BLOCKL_30MS,
|
||||
/*.microseconds_per_frame */ 30000,
|
||||
/*.samples_per_frame */ 240,
|
||||
@@ -251,6 +254,7 @@ static switch_codec_implementation_t ilbc_102_8k_20ms_implementation = {
|
||||
/*.iananame */ "iLBC102",
|
||||
/*.fmtp */ "mode=20",
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ NO_OF_BYTES_20MS * 8 * 8000 / BLOCKL_20MS,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
@@ -273,6 +277,7 @@ static switch_codec_implementation_t ilbc_8k_20ms_nonext_implementation = {
|
||||
/*.iananame */ "iLBC20ms",
|
||||
/*.fmtp */ "mode=20",
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ NO_OF_BYTES_20MS * 8 * 8000 / BLOCKL_20MS,
|
||||
/*.microseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
|
||||
@@ -57,7 +57,7 @@ static switch_status_t switch_raw_encode(switch_codec_t *codec,
|
||||
{
|
||||
|
||||
/* NOOP indicates that the audio in is already the same as the audio out, so no conversion was necessary. */
|
||||
if (codec && other_codec && codec->implementation && other_codec->implementation && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
if (codec && other_codec && codec->implementation && other_codec->implementation && codec->implementation->actual_samples_per_second != other_codec->implementation->actual_samples_per_second) {
|
||||
memcpy(encoded_data, decoded_data, decoded_data_len);
|
||||
*encoded_data_len = decoded_data_len;
|
||||
return SWITCH_STATUS_RESAMPLE;
|
||||
@@ -72,7 +72,7 @@ static switch_status_t switch_raw_decode(switch_codec_t *codec,
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
if (codec && other_codec && codec->implementation && other_codec->implementation && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
if (codec && other_codec && codec->implementation && other_codec->implementation && codec->implementation->actual_samples_per_second != other_codec->implementation->actual_samples_per_second) {
|
||||
memcpy(decoded_data, encoded_data, encoded_data_len);
|
||||
*decoded_data_len = encoded_data_len;
|
||||
return SWITCH_STATUS_RESAMPLE;
|
||||
@@ -93,6 +93,7 @@ static switch_codec_implementation_t raw_32k_60ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 32000,
|
||||
/*.actual_samples_per_second = */ 32000,
|
||||
/*.bits_per_second = */ 512000,
|
||||
/*.microseconds_per_frame = */ 60000,
|
||||
/*.samples_per_frame = */ 1920,
|
||||
@@ -114,6 +115,7 @@ static switch_codec_implementation_t raw_32k_30ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 32000,
|
||||
/*.actual_samples_per_second = */ 32000,
|
||||
/*.bits_per_second = */ 512000,
|
||||
/*.microseconds_per_frame = */ 30000,
|
||||
/*.samples_per_frame = */ 960,
|
||||
@@ -135,6 +137,7 @@ static switch_codec_implementation_t raw_32k_20ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 32000,
|
||||
/*.actual_samples_per_second = */ 32000,
|
||||
/*.bits_per_second = */ 512000,
|
||||
/*.microseconds_per_frame = */ 20000,
|
||||
/*.samples_per_frame = */ 640,
|
||||
@@ -156,6 +159,7 @@ static switch_codec_implementation_t raw_32k_10ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 32000,
|
||||
/*.actual_samples_per_second = */ 32000,
|
||||
/*.bits_per_second = */ 512000,
|
||||
/*.microseconds_per_frame = */ 10000,
|
||||
/*.samples_per_frame = */ 320,
|
||||
@@ -177,6 +181,7 @@ static switch_codec_implementation_t raw_22k_20ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 22050,
|
||||
/*.actual_samples_per_second = */ 22050,
|
||||
/*.bits_per_second = */ 352800,
|
||||
/*.microseconds_per_frame = */ 20000,
|
||||
/*.samples_per_frame = */ 441,
|
||||
@@ -198,6 +203,7 @@ static switch_codec_implementation_t raw_16k_120ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 16000,
|
||||
/*.actual_samples_per_second */ 16000,
|
||||
/*.bits_per_second */ 256000,
|
||||
/*.microseconds_per_frame */ 120000,
|
||||
/*.samples_per_frame */ 1920,
|
||||
@@ -219,6 +225,7 @@ static switch_codec_implementation_t raw_16k_60ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 16000,
|
||||
/*.actual_samples_per_second */ 16000,
|
||||
/*.bits_per_second */ 256000,
|
||||
/*.microseconds_per_frame */ 60000,
|
||||
/*.samples_per_frame */ 960,
|
||||
@@ -240,6 +247,7 @@ static switch_codec_implementation_t raw_16k_30ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 16000,
|
||||
/*.actual_samples_per_second */ 16000,
|
||||
/*.bits_per_second */ 256000,
|
||||
/*.microseconds_per_frame */ 30000,
|
||||
/*.samples_per_frame */ 480,
|
||||
@@ -261,6 +269,7 @@ static switch_codec_implementation_t raw_16k_20ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 16000,
|
||||
/*.actual_samples_per_second = */ 16000,
|
||||
/*.bits_per_second = */ 256000,
|
||||
/*.microseconds_per_frame = */ 20000,
|
||||
/*.samples_per_frame = */ 320,
|
||||
@@ -282,6 +291,7 @@ static switch_codec_implementation_t raw_16k_10ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 16000,
|
||||
/*.actual_samples_per_second = */ 16000,
|
||||
/*.bits_per_second = */ 256000,
|
||||
/*.microseconds_per_frame = */ 10000,
|
||||
/*.samples_per_frame = */ 160,
|
||||
@@ -306,6 +316,7 @@ static switch_codec_implementation_t raw_8k_120ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 512000,
|
||||
/*.microseconds_per_frame */ 120000,
|
||||
/*.samples_per_frame */ 960,
|
||||
@@ -328,6 +339,7 @@ static switch_codec_implementation_t raw_8k_60ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 256000,
|
||||
/*.microseconds_per_frame */ 60000,
|
||||
/*.samples_per_frame */ 480,
|
||||
@@ -349,6 +361,7 @@ static switch_codec_implementation_t raw_8k_30ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 128000,
|
||||
/*.microseconds_per_frame */ 30000,
|
||||
/*.samples_per_frame */ 240,
|
||||
@@ -369,6 +382,7 @@ static switch_codec_implementation_t raw_8k_20ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 8000,
|
||||
/*.actual_samples_per_second = */ 8000,
|
||||
/*.bits_per_second = */ 128000,
|
||||
/*.microseconds_per_frame = */ 20000,
|
||||
/*.samples_per_frame = */ 160,
|
||||
@@ -392,6 +406,7 @@ static switch_codec_implementation_t raw_8k_10ms_implementation = {
|
||||
/*.iananame */ "L16",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second = */ 8000,
|
||||
/*.actual_samples_per_second = */ 8000,
|
||||
/*.bits_per_second = */ 128000,
|
||||
/*.microseconds_per_frame = */ 10000,
|
||||
/*.samples_per_frame = */ 80,
|
||||
|
||||
@@ -162,6 +162,7 @@ static switch_codec_implementation_t lpc10_implementation = {
|
||||
/*.iananame */ "LPC",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 240,
|
||||
/*.microseconds_per_frame */ 22500,
|
||||
/*.samples_per_frame */ 180,
|
||||
|
||||
@@ -268,6 +268,7 @@ static switch_codec_implementation_t speex_32k_implementation = {
|
||||
/*.iananame */ "speex",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 32000,
|
||||
/*.actual_samples_per_second */ 32000,
|
||||
/*.bits_per_second */ 256000,
|
||||
/*.nanoseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 640,
|
||||
@@ -288,6 +289,7 @@ static switch_codec_implementation_t speex_16k_implementation = {
|
||||
/*.iananame */ "speex",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 16000,
|
||||
/*.actual_samples_per_second */ 16000,
|
||||
/*.bits_per_second */ 22000,
|
||||
/*.nanoseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 320,
|
||||
@@ -310,6 +312,7 @@ static switch_codec_implementation_t speex_8k_60ms_implementation = {
|
||||
/*.iananame */ "speex",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 3300,
|
||||
/*.nanoseconds_per_frame */ 60000,
|
||||
/*.samples_per_frame */ 480,
|
||||
@@ -331,6 +334,7 @@ static switch_codec_implementation_t speex_8k_40ms_implementation = {
|
||||
/*.iananame */ "speex",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 22000,
|
||||
/*.nanoseconds_per_frame */ 40000,
|
||||
/*.samples_per_frame */ 240,
|
||||
@@ -354,6 +358,7 @@ static switch_codec_implementation_t speex_8k_30ms_implementation = {
|
||||
/*.iananame */ "speex",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 1650,
|
||||
/*.nanoseconds_per_frame */ 30000,
|
||||
/*.samples_per_frame */ 240,
|
||||
@@ -375,6 +380,7 @@ static switch_codec_implementation_t speex_8k_20ms_implementation = {
|
||||
/*.iananame */ "speex",
|
||||
/*.fmtp */ NULL,
|
||||
/*.samples_per_second */ 8000,
|
||||
/*.actual_samples_per_second */ 8000,
|
||||
/*.bits_per_second */ 11000,
|
||||
/*.nanoseconds_per_frame */ 20000,
|
||||
/*.samples_per_frame */ 160,
|
||||
|
||||
Reference in New Issue
Block a user