summaryrefslogtreecommitdiff
path: root/include/asterisk/bridge.h
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2018-04-04 15:12:50 -0300
committerJoshua Colp <jcolp@digium.com>2018-04-17 11:25:17 -0600
commit8de3fa2b56cc954836a13e7d77079754d26fb990 (patch)
treed751852e79f8fd46f2e3307c488b0f2356aff443 /include/asterisk/bridge.h
parent3255a286b34a15d5bdaa93663d8654c0568ab14d (diff)
bridge_softmix / app_confbridge: Add support for REMB combining.
This change adds the ability for multiple REMB reports in bridge_softmix to be combined according to a configured behavior into a single report. This single report is sent back to the sender of video, which adjusts the encoding bitrate to be at or below the bitrate of the report. The available behaviors are: lowest, highest, and average. Lowest uses the lowest received bitrate. Highest uses the highest received bitrate. Average goes through the received bitrates adding them to the previous average and creates a new average. Other behaviors can be added in the future and the existing average one may be adjusted, but this provides the foundation to do so. Support for configuring which behavior to use has been added to app_confbridge. ASTERISK-27804 Change-Id: I9eafe4e7c1f72d67074a8d6acb26bfcf19322b66
Diffstat (limited to 'include/asterisk/bridge.h')
-rw-r--r--include/asterisk/bridge.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/include/asterisk/bridge.h b/include/asterisk/bridge.h
index c96cefb60..3584085af 100644
--- a/include/asterisk/bridge.h
+++ b/include/asterisk/bridge.h
@@ -126,6 +126,24 @@ struct ast_bridge_video_talker_src_data {
struct ast_channel *chan_old_vsrc;
};
+/*! \brief REMB report behaviors */
+enum ast_bridge_video_sfu_remb_behavior {
+ /*! The average of all reports is sent to the sender */
+ AST_BRIDGE_VIDEO_SFU_REMB_AVERAGE = 0,
+ /*! The lowest reported bitrate is forwarded to the sender */
+ AST_BRIDGE_VIDEO_SFU_REMB_LOWEST,
+ /*! The highest reported bitrate is forwarded to the sender */
+ AST_BRIDGE_VIDEO_SFU_REMB_HIGHEST,
+};
+
+/*! \brief This is used for selective forwarding unit configuration */
+struct ast_bridge_video_sfu_data {
+ /*! The interval at which a REMB report is generated and sent */
+ unsigned int remb_send_interval;
+ /*! How the combined REMB report is generated */
+ enum ast_bridge_video_sfu_remb_behavior remb_behavior;
+};
+
/*! \brief Data structure that defines a video source mode */
struct ast_bridge_video_mode {
enum ast_bridge_video_mode_type mode;
@@ -133,9 +151,10 @@ struct ast_bridge_video_mode {
union {
struct ast_bridge_video_single_src_data single_src_data;
struct ast_bridge_video_talker_src_data talker_src_data;
+ struct ast_bridge_video_sfu_data sfu_data;
} mode_data;
+ /*! The minimum interval between video updates */
unsigned int video_update_discard;
- unsigned int remb_send_interval;
};
/*!
@@ -917,10 +936,22 @@ void ast_bridge_set_video_update_discard(struct ast_bridge *bridge, unsigned int
*
* \param bridge Bridge to set the REMB send interval on
* \param remb_send_interval The REMB send interval
+ *
+ * \note This can only be called when the bridge has been set to the SFU video mode.
*/
void ast_bridge_set_remb_send_interval(struct ast_bridge *bridge, unsigned int remb_send_interval);
/*!
+ * \brief Set the REMB report generation behavior on a bridge
+ *
+ * \param bridge Bridge to set the REMB behavior on
+ * \param behavior How REMB reports are generated
+ *
+ * \note This can only be called when the bridge has been set to the SFU video mode.
+ */
+void ast_brige_set_remb_behavior(struct ast_bridge *bridge, enum ast_bridge_video_sfu_remb_behavior behavior);
+
+/*!
* \brief Update information about talker energy for talker src video mode.
*/
void ast_bridge_update_talker_src_video_mode(struct ast_bridge *bridge, struct ast_channel *chan, int talker_energy, int is_keyfame);