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:
Andrey Volk 2020-01-22 23:14:34 +04:00 committed by GitHub
commit 5657965039
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 12 deletions

View File

@ -655,11 +655,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_amr_load)
20000, /* number of microseconds per frame */
160, /* number of samples per frame */
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 */
#endif
1, /* number of channels represented */
1, /* number of frames per network packet */
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 */
160, /* number of samples per frame */
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 */
#endif
1, /* number of channels represented */
1, /* number of frames per network packet */
switch_amr_init, /* function to initialize a codec handle using this implementation */

View File

@ -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 off");
#else
#define SWITCH_AMRWB_OUT_MAX_SIZE 0
#endif
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_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);
#ifndef AMRWB_PASSTHROUGH
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_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);
#ifndef AMRWB_PASSTHROUGH
codec_interface->implementations->codec_control = switch_amrwb_control;