FS-9106 followup and tweaks on this patch after some testing
This commit is contained in:
parent
e26dbafa6a
commit
0151b8eddd
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue