FS-9912: [mod_conference] floor-only and file-only not working properly in canvas-layouts #resolve

This commit is contained in:
Anthony Minessale 2017-01-03 15:29:57 -06:00
parent 15278f6ea0
commit 3bb9cefcf1
1 changed files with 14 additions and 8 deletions

View File

@ -173,7 +173,7 @@ void conference_video_parse_layouts(conference_obj_t *conference, int WIDTH, int
}
if ((val = switch_xml_attr(x_image, "file-only"))) {
fileonly = floor = switch_true(val);
fileonly = switch_true(val);
}
if ((val = switch_xml_attr(x_image, "overlap"))) {
@ -206,6 +206,10 @@ void conference_video_parse_layouts(conference_obj_t *conference, int WIDTH, int
if (!border) border = conference->video_border_size;
if (fileonly) {
floor = flooronly = 0;
}
vlayout->images[vlayout->layers].border = border;
vlayout->images[vlayout->layers].x = x;
vlayout->images[vlayout->layers].y = y;
@ -217,6 +221,7 @@ void conference_video_parse_layouts(conference_obj_t *conference, int WIDTH, int
vlayout->images[vlayout->layers].fileonly = fileonly;
vlayout->images[vlayout->layers].overlap = overlap;
if (res_id) {
vlayout->images[vlayout->layers].res_id = switch_core_strdup(conference->pool, res_id);
}
@ -1114,6 +1119,8 @@ void conference_video_init_canvas_layers(conference_obj_t *conference, mcu_canva
layer->geometry.zoom = vlayout->images[i].zoom;
layer->geometry.border = vlayout->images[i].border;
layer->geometry.floor = vlayout->images[i].floor;
layer->geometry.flooronly = vlayout->images[i].flooronly;
layer->geometry.fileonly = vlayout->images[i].fileonly;
layer->geometry.overlap = vlayout->images[i].overlap;
layer->idx = i;
layer->refresh = 1;
@ -1964,7 +1971,7 @@ switch_status_t conference_video_find_layer(conference_obj_t *conference, mcu_ca
conference_video_attach_video_layer(member, canvas, i);
break;
}
} else if (xlayer->geometry.flooronly && !xlayer->fnode) {
} else if (xlayer->geometry.flooronly && !xlayer->fnode && !xlayer->geometry.fileonly) {
if (member->id == conference->video_floor_holder) {
layer = xlayer;
conference_video_attach_video_layer(member, canvas, i);
@ -1975,7 +1982,6 @@ switch_status_t conference_video_find_layer(conference_obj_t *conference, mcu_ca
(conference->canvas_count > 1 || xlayer->member_id != (int)conference->video_floor_holder))) &&
!xlayer->fnode && !xlayer->geometry.fileonly) {
switch_status_t lstatus;
lstatus = conference_video_attach_video_layer(member, canvas, i);
if (lstatus == SWITCH_STATUS_SUCCESS || lstatus == SWITCH_STATUS_BREAK) {