FS-10754: [mod_conference] Conference Improvements #resolve

This commit is contained in:
Anthony Minessale 2017-10-24 14:00:35 -05:00
parent 9108c64c9e
commit bf98422ce6
2 changed files with 3 additions and 8 deletions

View File

@ -2081,11 +2081,8 @@ void *SWITCH_THREAD_FUNC conference_video_layer_thread_run(switch_thread_t *thre
mcu_layer_t *layer = NULL;
mcu_canvas_t *canvas = NULL;
if (!member->layer_thread_wake_up) {
switch_thread_cond_wait(member->layer_cond, member->layer_cond_mutex);
}
member->layer_thread_wake_up = 0;
switch_thread_cond_wait(member->layer_cond, member->layer_cond_mutex);
if (!conference_utils_member_test_flag(member, MFLAG_RUNNING)) {
break;
@ -2117,10 +2114,9 @@ void *SWITCH_THREAD_FUNC conference_video_layer_thread_run(switch_thread_t *thre
void conference_video_wake_layer_thread(conference_member_t *member)
{
if (member->layer_cond) {
if (!member->layer_thread_wake_up && switch_mutex_trylock(member->layer_cond_mutex) == SWITCH_STATUS_SUCCESS) {
if (switch_mutex_trylock(member->layer_cond_mutex) == SWITCH_STATUS_SUCCESS) {
switch_thread_cond_signal(member->layer_cond);
switch_mutex_unlock(member->layer_cond_mutex);
member->layer_thread_wake_up = 1;
}
}
@ -3807,7 +3803,7 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
}
if (layer->cur_img) {
if (layer->member && switch_core_cpu_count() > 200) {
if (layer->member && switch_core_cpu_count() > 2) {
layer->need_patch = 1;
conference_video_wake_layer_thread(layer->member);
} else {

View File

@ -847,7 +847,6 @@ struct conference_member {
switch_thread_t *input_thread;
switch_thread_cond_t *layer_cond;
switch_mutex_t *layer_cond_mutex;
int layer_thread_wake_up;
cJSON *json;
cJSON *status_field;
uint8_t loop_loop;