提交 a3752718 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-8293 make sanity level based on 1080p

上级 03a9c7e1
...@@ -848,7 +848,7 @@ static switch_status_t open_encoder(h264_codec_context_t *context, uint32_t widt ...@@ -848,7 +848,7 @@ static switch_status_t open_encoder(h264_codec_context_t *context, uint32_t widt
context->bandwidth = switch_calc_bitrate(context->codec_settings.video.width, context->codec_settings.video.height, 0, 0) * 8; context->bandwidth = switch_calc_bitrate(context->codec_settings.video.width, context->codec_settings.video.height, 0, 0) * 8;
} }
sane = switch_calc_bitrate(context->codec_settings.video.width, context->codec_settings.video.height, 1, 30); sane = switch_calc_bitrate(1920, 1080, 1, 30);
if (context->bandwidth > sane) { if (context->bandwidth > sane) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "BITRATE TRUNCATED TO %d\n", sane); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "BITRATE TRUNCATED TO %d\n", sane);
......
...@@ -321,7 +321,7 @@ static switch_status_t init_encoder(switch_codec_t *codec) ...@@ -321,7 +321,7 @@ static switch_status_t init_encoder(switch_codec_t *codec)
} }
sane = switch_calc_bitrate(context->codec_settings.video.width, context->codec_settings.video.height, 1, 30); sane = switch_calc_bitrate(1920, 1080, 1, 30);
if (context->bandwidth > sane) { if (context->bandwidth > sane) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(codec->session), SWITCH_LOG_WARNING, "BITRATE TRUNCATED FROM %d TO %d\n", context->bandwidth, sane); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(codec->session), SWITCH_LOG_WARNING, "BITRATE TRUNCATED FROM %d TO %d\n", context->bandwidth, sane);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论