mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
app_confbridge: Add "all" variants of REMB behavior.
When producing a combined REMB value the normal behavior is to have a REMB value which is unique for each sender based on all of their receivers. This can result in one sender having low bitrate while all the rest are high. This change adds "all" variants which produces a bridge level REMB value instead. All REMB reports are combined together into a single REMB value that is the same for each sender. ASTERISK-28401 Change-Id: I883e6cc26003b497c8180b346111c79a131ba88c
This commit is contained in:
@@ -1565,6 +1565,12 @@ static struct confbridge_conference *join_conference_bridge(const char *conferen
|
||||
ast_brige_set_remb_behavior(conference->bridge, AST_BRIDGE_VIDEO_SFU_REMB_LOWEST);
|
||||
} else if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST)) {
|
||||
ast_brige_set_remb_behavior(conference->bridge, AST_BRIDGE_VIDEO_SFU_REMB_HIGHEST);
|
||||
} else if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE_ALL)) {
|
||||
ast_brige_set_remb_behavior(conference->bridge, AST_BRIDGE_VIDEO_SFU_REMB_AVERAGE_ALL);
|
||||
} else if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_REMB_BEHAVIOR_LOWEST_ALL)) {
|
||||
ast_brige_set_remb_behavior(conference->bridge, AST_BRIDGE_VIDEO_SFU_REMB_LOWEST_ALL);
|
||||
} else if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST_ALL)) {
|
||||
ast_brige_set_remb_behavior(conference->bridge, AST_BRIDGE_VIDEO_SFU_REMB_HIGHEST_ALL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -505,6 +505,18 @@
|
||||
<enum name="highest">
|
||||
<para>The highest estimated maximum bitrate is forwarded to the sender.</para>
|
||||
</enum>
|
||||
<enum name="average_all">
|
||||
<para>The average of all estimated maximum bitrates is taken from all
|
||||
receivers in the bridge and a single value is sent to each sender.</para>
|
||||
</enum>
|
||||
<enum name="lowest_all">
|
||||
<para>The lowest estimated maximum bitrate of all receivers in the bridge
|
||||
is taken and sent to each sender.</para>
|
||||
</enum>
|
||||
<enum name="highest_all">
|
||||
<para>The highest estimated maximum bitrate of all receivers in the bridge
|
||||
is taken and sent to each sender.</para>
|
||||
</enum>
|
||||
</enumlist>
|
||||
</description>
|
||||
</configOption>
|
||||
@@ -1737,7 +1749,8 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e,
|
||||
|
||||
switch (b_profile.flags
|
||||
& (BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE | BRIDGE_OPT_REMB_BEHAVIOR_LOWEST
|
||||
| BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST)) {
|
||||
| BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST | BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE_ALL
|
||||
| BRIDGE_OPT_REMB_BEHAVIOR_LOWEST_ALL | BRIDGE_OPT_REMB_BEHAVIOR_LOWEST_ALL)) {
|
||||
case BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE:
|
||||
ast_cli(a->fd, "REMB Behavior: average\n");
|
||||
break;
|
||||
@@ -1747,6 +1760,15 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e,
|
||||
case BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST:
|
||||
ast_cli(a->fd, "REMB Behavior: highest\n");
|
||||
break;
|
||||
case BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE_ALL:
|
||||
ast_cli(a->fd, "REMB Behavior: average_all\n");
|
||||
break;
|
||||
case BRIDGE_OPT_REMB_BEHAVIOR_LOWEST_ALL:
|
||||
ast_cli(a->fd, "REMB Behavior: lowest_all\n");
|
||||
break;
|
||||
case BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST_ALL:
|
||||
ast_cli(a->fd, "REMB Behavior: highest_all\n");
|
||||
break;
|
||||
default:
|
||||
ast_assert(0);
|
||||
break;
|
||||
@@ -2108,7 +2130,10 @@ static int remb_behavior_handler(const struct aco_option *opt, struct ast_variab
|
||||
|
||||
ast_clear_flag(b_profile, BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE |
|
||||
BRIDGE_OPT_REMB_BEHAVIOR_LOWEST |
|
||||
BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST);
|
||||
BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST |
|
||||
BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE_ALL |
|
||||
BRIDGE_OPT_REMB_BEHAVIOR_LOWEST_ALL |
|
||||
BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST_ALL);
|
||||
|
||||
if (!strcasecmp(var->value, "average")) {
|
||||
ast_set_flag(b_profile, BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE);
|
||||
@@ -2116,6 +2141,12 @@ static int remb_behavior_handler(const struct aco_option *opt, struct ast_variab
|
||||
ast_set_flag(b_profile, BRIDGE_OPT_REMB_BEHAVIOR_LOWEST);
|
||||
} else if (!strcasecmp(var->value, "highest")) {
|
||||
ast_set_flag(b_profile, BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST);
|
||||
} else if (!strcasecmp(var->value, "average_all")) {
|
||||
ast_set_flag(b_profile, BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE_ALL);
|
||||
} else if (!strcasecmp(var->value, "lowest_all")) {
|
||||
ast_set_flag(b_profile, BRIDGE_OPT_REMB_BEHAVIOR_LOWEST_ALL);
|
||||
} else if (!strcasecmp(var->value, "highest_all")) {
|
||||
ast_set_flag(b_profile, BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST_ALL);
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
|
@@ -82,6 +82,9 @@ enum bridge_profile_flags {
|
||||
BRIDGE_OPT_REMB_BEHAVIOR_LOWEST = (1 << 9), /*!< The lowest estimated maximum bitrate is sent to the sender */
|
||||
BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST = (1 << 10), /*!< The highest estimated maximum bitrate is sent to the sender */
|
||||
BRIDGE_OPT_ENABLE_EVENTS = (1 << 11), /*!< Enable sending events to participants */
|
||||
BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE_ALL = (1 << 12), /*!< The average of all REMB reports in the entire bridge is sent to each sender */
|
||||
BRIDGE_OPT_REMB_BEHAVIOR_LOWEST_ALL = (1 << 13), /*!< The lowest estimated maximum bitrate from all receivers is sent to each sender */
|
||||
BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST_ALL = (1 << 14), /*!< The highest estimated maximum bitrate from all receivers is sent to each sender */
|
||||
};
|
||||
|
||||
enum conf_menu_action_id {
|
||||
|
Reference in New Issue
Block a user