mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-04 17:51:03 +00:00
FS-10107: [mod_conference] Reduce contention on layer floor changes #resolve
This commit is contained in:
parent
88fb841a5d
commit
5c01be768b
@ -2575,12 +2575,6 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//VIDFLOOR
|
|
||||||
if (conference->canvas_count == 1 && canvas->layout_floor_id > -1 && imember->id == conference->video_floor_holder &&
|
|
||||||
imember->video_layer_id != canvas->layout_floor_id) {
|
|
||||||
conference_video_attach_video_layer(imember, canvas, canvas->layout_floor_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (conference->playing_video_file) {
|
if (conference->playing_video_file) {
|
||||||
switch_img_free(&img);
|
switch_img_free(&img);
|
||||||
switch_core_session_rwunlock(imember->session);
|
switch_core_session_rwunlock(imember->session);
|
||||||
@ -2592,6 +2586,11 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
|
|||||||
|
|
||||||
switch_mutex_lock(canvas->mutex);
|
switch_mutex_lock(canvas->mutex);
|
||||||
|
|
||||||
|
if (canvas->layout_floor_id > -1 && imember->id == conference->video_floor_holder &&
|
||||||
|
imember->video_layer_id != canvas->layout_floor_id) {
|
||||||
|
conference_video_attach_video_layer(imember, canvas, canvas->layout_floor_id);
|
||||||
|
}
|
||||||
|
|
||||||
//printf("MEMBER %d layer_id %d canvas: %d/%d\n", imember->id, imember->video_layer_id,
|
//printf("MEMBER %d layer_id %d canvas: %d/%d\n", imember->id, imember->video_layer_id,
|
||||||
// canvas->layers_used, canvas->total_layers);
|
// canvas->layers_used, canvas->total_layers);
|
||||||
|
|
||||||
@ -3704,15 +3703,6 @@ void conference_video_set_floor_holder(conference_obj_t *conference, conference_
|
|||||||
|
|
||||||
//VIDFLOOR
|
//VIDFLOOR
|
||||||
if (member) {
|
if (member) {
|
||||||
mcu_canvas_t *canvas = NULL;
|
|
||||||
|
|
||||||
if ((canvas = conference_video_get_canvas_locked(member))) {
|
|
||||||
if (canvas->layout_floor_id > -1) {
|
|
||||||
conference_video_attach_video_layer(member, canvas, canvas->layout_floor_id);
|
|
||||||
}
|
|
||||||
conference_video_release_canvas(&canvas);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "Adding video floor %s\n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "Adding video floor %s\n",
|
||||||
switch_channel_get_name(member->channel));
|
switch_channel_get_name(member->channel));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user