summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-06-06 07:05:13 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-06-06 07:05:13 -0500
commit1a24543124bb06ec0cb0d0b174287323bbe83815 (patch)
tree7afda634d879c0835cf823835cde14e4e44fdac2 /apps
parentbb2f6234da761194100d30f33d4d839f75ab78f1 (diff)
parent39d14834f83e8727e841c51d1752d90bc7be5c63 (diff)
Merge "Confbridge: Add "sfu" video mode to bridge profile options."
Diffstat (limited to 'apps')
-rw-r--r--apps/app_confbridge.c6
-rw-r--r--apps/confbridge/conf_config_parser.c19
-rw-r--r--apps/confbridge/include/confbridge.h1
3 files changed, 21 insertions, 5 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index 42a45c10e..0f846b659 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -1483,6 +1483,8 @@ static struct confbridge_conference *join_conference_bridge(const char *conferen
if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER)) {
ast_bridge_set_talker_src_video_mode(conference->bridge);
+ } else if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_VIDEO_SRC_SFU)) {
+ ast_bridge_set_sfu_video_mode(conference->bridge);
}
/* Link it into the conference bridges container */
@@ -2841,7 +2843,9 @@ static int execute_menu_entry(struct confbridge_conference *conference,
break;
case MENU_ACTION_SET_SINGLE_VIDEO_SRC:
ao2_lock(conference);
- ast_bridge_set_single_src_video_mode(conference->bridge, bridge_channel->chan);
+ if (!ast_test_flag(&conference->b_profile, BRIDGE_OPT_VIDEO_SRC_SFU)) {
+ ast_bridge_set_single_src_video_mode(conference->bridge, bridge_channel->chan);
+ }
ao2_unlock(conference);
break;
case MENU_ACTION_RELEASE_SINGLE_VIDEO_SRC:
diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c
index 3e4075ba9..cc8fcfe5d 100644
--- a/apps/confbridge/conf_config_parser.c
+++ b/apps/confbridge/conf_config_parser.c
@@ -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;
}
diff --git a/apps/confbridge/include/confbridge.h b/apps/confbridge/include/confbridge.h
index 584499ff3..cf30d5c62 100644
--- a/apps/confbridge/include/confbridge.h
+++ b/apps/confbridge/include/confbridge.h
@@ -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 {