FS-8293 make sanity level based on quality 2 and also in conference

This commit is contained in:
Anthony Minessale 2015-11-25 15:42:51 -06:00
parent a3752718c6
commit 060641f220
4 changed files with 4 additions and 4 deletions

View File

@ -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;
}
sane = switch_calc_bitrate(1920, 1080, 1, 30);
sane = switch_calc_bitrate(1920, 1080, 2, 30);
if (context->bandwidth > sane) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "BITRATE TRUNCATED TO %d\n", sane);

View File

@ -1923,7 +1923,7 @@ void conference_video_check_auto_bitrate(conference_member_t *member, mcu_layer_
int max = 0;
if (layer) {
kps = switch_calc_bitrate(w, h, 1, (int)(member->conference->video_fps.fps));
kps = switch_calc_bitrate(w, h, 2, (int)(member->conference->video_fps.fps));
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "%s auto-setting bitrate to %dkps to accomodate %dx%d resolution\n",
switch_channel_get_name(member->channel), kps, layer->screen_w, layer->screen_h);
}

View File

@ -2864,7 +2864,7 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
if (video_codec_bandwidth) {
if (!strcasecmp(video_codec_bandwidth, "auto")) {
conference->video_codec_settings.video.bandwidth = switch_calc_bitrate(canvas_w, canvas_h, 1, (int)conference->video_fps.fps);
conference->video_codec_settings.video.bandwidth = switch_calc_bitrate(canvas_w, canvas_h, 2, (int)conference->video_fps.fps);
} else {
conference->video_codec_settings.video.bandwidth = switch_parse_bandwidth_string(video_codec_bandwidth);
}

View File

@ -321,7 +321,7 @@ static switch_status_t init_encoder(switch_codec_t *codec)
}
sane = switch_calc_bitrate(1920, 1080, 1, 30);
sane = switch_calc_bitrate(1920, 1080, 2, 30);
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);