use the actual_sps not the effective on codec load strings

This commit is contained in:
Anthony Minessale 2013-10-23 16:39:20 -05:00
parent 73a3d59d56
commit 3482cd5b80
1 changed files with 14 additions and 6 deletions

View File

@ -186,10 +186,18 @@ static switch_status_t switch_loadable_module_process(char *key, switch_loadable
} }
if (load_interface) { if (load_interface) {
for (impl = ptr->implementations; impl; impl = impl->next) { for (impl = ptr->implementations; impl; impl = impl->next) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, if (impl->bits_per_second) {
"Adding Codec %s %d %s %dhz %dms %dbps\n", switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,
impl->iananame, impl->ianacode, "Adding Codec %s %d %s %dhz %dms %dbps\n",
ptr->interface_name, impl->actual_samples_per_second, impl->microseconds_per_packet / 1000, impl->bits_per_second); impl->iananame, impl->ianacode,
ptr->interface_name, impl->actual_samples_per_second,
impl->microseconds_per_packet / 1000, impl->bits_per_second);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,
"Adding Codec %s %d %s %dhz %dms (VBR)\n",
impl->iananame, impl->ianacode,
ptr->interface_name, impl->actual_samples_per_second, impl->microseconds_per_packet / 1000);
}
if (!switch_core_hash_find(loadable_modules.codec_hash, impl->iananame)) { if (!switch_core_hash_find(loadable_modules.codec_hash, impl->iananame)) {
switch_core_hash_insert(loadable_modules.codec_hash, impl->iananame, (const void *) ptr); switch_core_hash_insert(loadable_modules.codec_hash, impl->iananame, (const void *) ptr);
} }
@ -2249,7 +2257,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
continue; continue;
} }
if (((!rate && (uint32_t) imp->samples_per_second != default_rate) || (rate && (uint32_t) imp->samples_per_second != rate))) { if (((!rate && (uint32_t) imp->actual_samples_per_second != default_rate) || (rate && (uint32_t) imp->actual_samples_per_second != rate))) {
continue; continue;
} }
@ -2273,7 +2281,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
continue; continue;
} }
if (rate && (uint32_t) imp->samples_per_second != rate) { if (rate && (uint32_t) imp->actual_samples_per_second != rate) {
continue; continue;
} }