提交 c83f7871 authored 作者: Chad Phillips's avatar Chad Phillips

FS-11276: dedicated video layers can no longer become audio floor holder

In mod_conference 1.6.x, all conference users could get the audio floor
regardless of the kind of video layer they were placed in.

In 1.8.x, the concept of a 'dedicated video layer' was introduced, such that
video layout slots with a reservation ID or a role ID are marked with the
'MFLAG_DED_VID_LAYER' member flag when a member is in the slot, and such
marked layers are prevented from becoming the conference audio/video floor
holder.

This makes sense for the video floor in all circumstances, and the audio floor
in most circumstances.

However, there are some circumstances where allowing users in these dedicated
video layers to become the conference audio floor holder is preferred, such as
when all slots in the layout have reservation IDs, and the audio floor events
are used to manage users in those slots manually.

This adds a conference profile flag, 'ded-vid-layer-audio-floor, which, when
enabled, allows conference members in dedicated video layers to become the
conference audio floor holder.
上级 d5af9296
......@@ -2306,7 +2306,7 @@ switch_status_t conference_api_sub_floor(conference_member_t *member, switch_str
if (member == NULL)
return SWITCH_STATUS_GENERR;
if (conference_utils_member_test_flag(member, MFLAG_DED_VID_LAYER)) {
if (conference_utils_member_test_flag(member, MFLAG_DED_VID_LAYER) && !conference_utils_test_flag(member->conference, CFLAG_DED_VID_LAYER_AUDIO_FLOOR)) {
if (stream != NULL) {
stream->write_function(stream, "-ERR cannot set floor on a member in an active video role\n");
}
......
......@@ -1081,7 +1081,7 @@ void conference_member_set_floor_holder(conference_obj_t *conference, conference
member = lmember = conference_member_get(conference, id);
}
if (member && conference_utils_member_test_flag(member, MFLAG_DED_VID_LAYER)) {
if (member && conference_utils_member_test_flag(member, MFLAG_DED_VID_LAYER) && !conference_utils_test_flag(conference, CFLAG_DED_VID_LAYER_AUDIO_FLOOR)) {
goto end;
}
......
......@@ -214,6 +214,8 @@ void conference_utils_set_cflags(const char *flags, conference_flag_t *f)
f[CFLAG_MANAGE_INBOUND_VIDEO_BITRATE] = 1;
} else if (!strcasecmp(argv[i], "video-muxing-personal-canvas")) {
f[CFLAG_PERSONAL_CANVAS] = 1;
} else if (!strcasecmp(argv[i], "ded-vid-layer-audio-floor")) {
f[CFLAG_DED_VID_LAYER_AUDIO_FLOOR] = 1;
}
}
......
......@@ -312,7 +312,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
//(!conference_utils_test_flag(conference, CFLAG_VID_FLOOR) || switch_channel_test_flag(channel, CF_VIDEO))) {
if (!conference_utils_member_test_flag(imember, MFLAG_DED_VID_LAYER)) {
if (!conference_utils_member_test_flag(imember, MFLAG_DED_VID_LAYER) || conference_utils_test_flag(conference, CFLAG_DED_VID_LAYER_AUDIO_FLOOR)) {
conference_member_set_floor_holder(conference, imember, 0);
floor_holder = conference->floor_holder;
}
......
......@@ -261,6 +261,7 @@ typedef enum {
CFLAG_REFRESH_LAYOUT,
CFLAG_VIDEO_MUTE_EXIT_CANVAS,
CFLAG_NO_MOH,
CFLAG_DED_VID_LAYER_AUDIO_FLOOR,
/////////////////////////////////
CFLAG_MAX
} conference_flag_t;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论