提交 0151b8ed authored 作者: Anthony Minessale's avatar Anthony Minessale 提交者: Brian West

FS-9106 followup and tweaks on this patch after some testing

上级 e26dbafa
......@@ -1480,7 +1480,7 @@ void conference_video_launch_muxing_write_thread(conference_member_t *member)
switch_mutex_lock(conference_globals.hash_mutex);
if (!member->video_muxing_write_thread) {
switch_threadattr_create(&thd_attr, member->pool);
switch_threadattr_priority_set(thd_attr, SWITCH_PRI_REALTIME);
//switch_threadattr_priority_set(thd_attr, SWITCH_PRI_REALTIME);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
switch_thread_create(&member->video_muxing_write_thread, thd_attr, conference_video_muxing_write_thread_run, member, member->pool);
}
......@@ -1493,7 +1493,7 @@ void conference_video_launch_muxing_thread(conference_obj_t *conference, mcu_can
switch_mutex_lock(conference_globals.hash_mutex);
if (!canvas->video_muxing_thread) {
switch_threadattr_create(&thd_attr, conference->pool);
switch_threadattr_priority_set(thd_attr, SWITCH_PRI_REALTIME);
//switch_threadattr_priority_set(thd_attr, SWITCH_PRI_REALTIME);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
conference_utils_set_flag(conference, CFLAG_VIDEO_MUXING);
switch_thread_create(&canvas->video_muxing_thread, thd_attr,
......
......@@ -360,7 +360,7 @@ static switch_status_t init_encoder(switch_codec_t *codec)
vpx_codec_enc_cfg_t *config = &context->config;
int token_parts = 1;
int cpus = switch_core_cpu_count();
int sane;
int sane, threads = 1;
if (!context->codec_settings.video.width) {
context->codec_settings.video.width = 1280;
......@@ -404,7 +404,9 @@ static switch_status_t init_encoder(switch_codec_t *codec)
config->rc_target_bitrate = context->bandwidth;
config->g_lag_in_frames = 0;
config->kf_max_dist = 360;//2000;
config->g_threads = cpus - 1;//(cpus > 1) ? 2 : 1;
threads = cpus / 4;
if (threads < 0) threads = 1;
config->g_threads = threads;
if (context->is_vp9) {
//config->rc_dropframe_thresh = 2;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论