Confbridge: Add "sfu" video mode to bridge profile options.

A previous commit added plumbing to bridge_softmix to allow for an SFU
experience with Asterisk. This commit adds an option to app_confbridge
that allows for a confbridge to actually make use of the SFU video mode.

SFU mode is implemented in a "set it and forget it" kind of way. That
is, when the bridge is created, if SFU mode is enabled, then the video
mode gets set to SFU and cannot be changed. Future improvements may
allow for a hybrid experience (e.g. forward multiple video streams,
specifically those of the most recent talkers), but for this addition,
no such capability is present.

Change-Id: I87bbcb63dec6dbbb42488f894871b86f112b2020
This commit is contained in:
Mark Michelson
2017-05-24 10:09:22 -05:00
parent 2da869408a
commit 39d14834f8
5 changed files with 34 additions and 5 deletions

View File

@@ -1952,25 +1952,36 @@ static int video_mode_handler(const struct aco_option *opt, struct ast_variable
ast_set_flags_to(b_profile,
BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED
| BRIDGE_OPT_VIDEO_SRC_LAST_MARKED
| BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER,
| BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER
| BRIDGE_OPT_VIDEO_SRC_SFU,
BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED);
} else if (!strcasecmp(var->value, "last_marked")) {
ast_set_flags_to(b_profile,
BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED
| BRIDGE_OPT_VIDEO_SRC_LAST_MARKED
| BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER,
| BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER
| BRIDGE_OPT_VIDEO_SRC_SFU,
BRIDGE_OPT_VIDEO_SRC_LAST_MARKED);
} else if (!strcasecmp(var->value, "follow_talker")) {
ast_set_flags_to(b_profile,
BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED
| BRIDGE_OPT_VIDEO_SRC_LAST_MARKED
| BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER,
| BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER
| BRIDGE_OPT_VIDEO_SRC_SFU,
BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER);
} else if (!strcasecmp(var->value, "none")) {
ast_clear_flag(b_profile,
BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED
| BRIDGE_OPT_VIDEO_SRC_LAST_MARKED
| BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER);
| BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER
| BRIDGE_OPT_VIDEO_SRC_SFU);
} else if (!strcasecmp(var->value, "sfu")) {
ast_set_flags_to(b_profile,
BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED
| BRIDGE_OPT_VIDEO_SRC_LAST_MARKED
| BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER
| BRIDGE_OPT_VIDEO_SRC_SFU,
BRIDGE_OPT_VIDEO_SRC_SFU);
} else {
return -1;
}

View File

@@ -72,6 +72,7 @@ enum bridge_profile_flags {
BRIDGE_OPT_RECORD_FILE_APPEND = (1 << 4), /*!< Set if the record file should be appended to between start/stops. */
BRIDGE_OPT_RECORD_FILE_TIMESTAMP = (1 << 5), /*< Set if the record file should have a timestamp appended */
BRIDGE_OPT_BINAURAL_ACTIVE = (1 << 6), /*< Set if binaural convolution is activated */
BRIDGE_OPT_VIDEO_SRC_SFU = (1 << 7), /*< Selective forwarding unit */
};
enum conf_menu_action_id {