From d68a7e2490251c4f7ca276256b8adc0279305b23 Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Mon, 4 Sep 2017 10:25:39 -0400 Subject: [PATCH] FS-10642: [mod_amr], [mod_amrwb]: mark AMR and AMRWB as VBR (don't let mod_native_file load them for playback/recording) --- src/mod/codecs/mod_amr/mod_amr.c | 8 -------- src/mod/codecs/mod_amrwb/mod_amrwb.c | 6 ++---- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/mod/codecs/mod_amr/mod_amr.c b/src/mod/codecs/mod_amr/mod_amr.c index 5f18feab7c..b36b4c9aa3 100644 --- a/src/mod/codecs/mod_amr/mod_amr.c +++ b/src/mod/codecs/mod_amr/mod_amr.c @@ -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 */ diff --git a/src/mod/codecs/mod_amrwb/mod_amrwb.c b/src/mod/codecs/mod_amrwb/mod_amrwb.c index 19cde02adf..a2f8a2f604 100644 --- a/src/mod/codecs/mod_amrwb/mod_amrwb.c +++ b/src/mod/codecs/mod_amrwb/mod_amrwb.c @@ -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;