Merge pull request #254 from dragos-oancea/amr_no_native_file
[mod_amr], [mod_amrwb]: mark AMR and AMRWB as VBR, don't let mod_native_file load them for playback/recording)
This commit is contained in:
commit
5657965039
|
@ -655,11 +655,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_amr_load)
|
||||||
20000, /* number of microseconds per frame */
|
20000, /* number of microseconds per frame */
|
||||||
160, /* number of samples per frame */
|
160, /* number of samples per frame */
|
||||||
320, /* number of bytes per frame decompressed */
|
320, /* number of bytes per frame decompressed */
|
||||||
#ifndef AMR_PASSTHROUGH
|
|
||||||
SWITCH_AMR_OUT_MAX_SIZE, /* number of bytes per frame compressed */
|
|
||||||
#else
|
|
||||||
0, /* number of bytes per frame compressed */
|
0, /* number of bytes per frame compressed */
|
||||||
#endif
|
|
||||||
1, /* number of channels represented */
|
1, /* number of channels represented */
|
||||||
1, /* number of frames per network packet */
|
1, /* number of frames per network packet */
|
||||||
switch_amr_init, /* function to initialize a codec handle using this implementation */
|
switch_amr_init, /* function to initialize a codec handle using this implementation */
|
||||||
|
@ -680,11 +676,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_amr_load)
|
||||||
20000, /* number of microseconds per frame */
|
20000, /* number of microseconds per frame */
|
||||||
160, /* number of samples per frame */
|
160, /* number of samples per frame */
|
||||||
320, /* number of bytes per frame decompressed */
|
320, /* number of bytes per frame decompressed */
|
||||||
#ifndef AMR_PASSTHROUGH
|
|
||||||
SWITCH_AMR_OUT_MAX_SIZE, /* number of bytes per frame compressed */
|
|
||||||
#else
|
|
||||||
0, /* number of bytes per frame compressed */
|
0, /* number of bytes per frame compressed */
|
||||||
#endif
|
|
||||||
1, /* number of channels represented */
|
1, /* number of channels represented */
|
||||||
1, /* number of frames per network packet */
|
1, /* number of frames per network packet */
|
||||||
switch_amr_init, /* function to initialize a codec handle using this implementation */
|
switch_amr_init, /* function to initialize a codec handle using this implementation */
|
||||||
|
|
|
@ -561,8 +561,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_amrwb_load)
|
||||||
|
|
||||||
switch_console_set_complete("add amrwb_debug on");
|
switch_console_set_complete("add amrwb_debug on");
|
||||||
switch_console_set_complete("add amrwb_debug off");
|
switch_console_set_complete("add amrwb_debug off");
|
||||||
#else
|
|
||||||
#define SWITCH_AMRWB_OUT_MAX_SIZE 0
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SWITCH_ADD_CODEC(codec_interface, "AMR-WB / Octet Aligned");
|
SWITCH_ADD_CODEC(codec_interface, "AMR-WB / Octet Aligned");
|
||||||
|
@ -571,7 +569,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_amrwb_load)
|
||||||
|
|
||||||
switch_core_codec_add_implementation(pool, codec_interface,
|
switch_core_codec_add_implementation(pool, codec_interface,
|
||||||
SWITCH_CODEC_TYPE_AUDIO, 100, "AMR-WB", default_fmtp_oa,
|
SWITCH_CODEC_TYPE_AUDIO, 100, "AMR-WB", default_fmtp_oa,
|
||||||
16000, 16000, 23850, 20000, 320, 640, SWITCH_AMRWB_OUT_MAX_SIZE, 1, 1,
|
16000, 16000, 23850, 20000, 320, 640, 0, 1, 1,
|
||||||
switch_amrwb_init, switch_amrwb_encode, switch_amrwb_decode, switch_amrwb_destroy);
|
switch_amrwb_init, switch_amrwb_encode, switch_amrwb_decode, switch_amrwb_destroy);
|
||||||
#ifndef AMRWB_PASSTHROUGH
|
#ifndef AMRWB_PASSTHROUGH
|
||||||
codec_interface->implementations->codec_control = switch_amrwb_control;
|
codec_interface->implementations->codec_control = switch_amrwb_control;
|
||||||
|
@ -583,7 +581,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_amrwb_load)
|
||||||
|
|
||||||
switch_core_codec_add_implementation(pool, codec_interface,
|
switch_core_codec_add_implementation(pool, codec_interface,
|
||||||
SWITCH_CODEC_TYPE_AUDIO, 110, "AMR-WB", default_fmtp_be,
|
SWITCH_CODEC_TYPE_AUDIO, 110, "AMR-WB", default_fmtp_be,
|
||||||
16000, 16000, 23850, 20000, 320, 640, SWITCH_AMRWB_OUT_MAX_SIZE, 1, 1,
|
16000, 16000, 23850, 20000, 320, 640, 0, 1, 1,
|
||||||
switch_amrwb_init, switch_amrwb_encode, switch_amrwb_decode, switch_amrwb_destroy);
|
switch_amrwb_init, switch_amrwb_encode, switch_amrwb_decode, switch_amrwb_destroy);
|
||||||
#ifndef AMRWB_PASSTHROUGH
|
#ifndef AMRWB_PASSTHROUGH
|
||||||
codec_interface->implementations->codec_control = switch_amrwb_control;
|
codec_interface->implementations->codec_control = switch_amrwb_control;
|
||||||
|
|
Loading…
Reference in New Issue