<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/8716">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Matthew Fredrickson: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Joshua Colp: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_confbridge / bridge_softmix: Add ability to configure REMB interval.<br><br>This change adds a configuration option to app_confbridge which can be<br>used to set the interval at which we will send a combined REMB (remote<br>estimated maximum bitrate) frame to sources of video. The bridging API<br>has also been extended slightly to allow setting this so bridge_softmix<br>can use it.<br><br>ASTERISK-27786<br><br>Change-Id: I0e49eae60f369c86434414f3cb8278709c793c82<br>---<br>M apps/app_confbridge.c<br>M apps/confbridge/conf_config_parser.c<br>M apps/confbridge/include/confbridge.h<br>M configs/samples/confbridge.conf.sample<br>M include/asterisk/bridge.h<br>M main/bridge.c<br>6 files changed, 36 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c<br>index 2527863..5907bf9 100644<br>--- a/apps/app_confbridge.c<br>+++ b/apps/app_confbridge.c<br>@@ -1543,6 +1543,7 @@<br> } else if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_VIDEO_SRC_SFU)) {<br> ast_bridge_set_sfu_video_mode(conference->bridge);<br> ast_bridge_set_video_update_discard(conference->bridge, conference->b_profile.video_update_discard);<br>+ ast_bridge_set_remb_send_interval(conference->bridge, conference->b_profile.remb_send_interval);<br> }<br> <br> /* Link it into the conference bridges container */<br>diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c<br>index 71da802..f9d7483 100644<br>--- a/apps/confbridge/conf_config_parser.c<br>+++ b/apps/confbridge/conf_config_parser.c<br>@@ -458,6 +458,18 @@<br> video update requests from clients.<br> </para></description><br> </configOption><br>+ <configOption name="remb_send_interval" default="0"><br>+ <synopsis>Sets the interval in milliseconds that a combined REMB frame will be sent to video sources</synopsis><br>+ <description><para><br>+ Sets the interval in milliseconds that a combined REMB frame will be sent<br>+ to video sources. This is done by taking all REMB frames that have been<br>+ received since the last REMB frame was sent, making a combined value,<br>+ and sending it to the source. A REMB frame contains receiver estimated<br>+ maximum bitrate information. By creating a combined REMB frame the<br>+ sender of video can be influenced on the bitrate they choose, allowing<br>+ better quality for all receivers.<br>+ </para></description><br>+ </configOption><br> <configOption name="template"><br> <synopsis>When using the CONFBRIDGE dialplan function, use a bridge profile as a template for creating a new temporary profile</synopsis><br> </configOption><br>@@ -1661,6 +1673,7 @@<br> }<br> <br> ast_cli(a->fd,"Video Update Discard: %u\n", b_profile.video_update_discard);<br>+ ast_cli(a->fd,"REMB Send Interval: %u\n", b_profile.remb_send_interval);<br> <br> ast_cli(a->fd,"sound_only_person: %s\n", conf_get_sound(CONF_SOUND_ONLY_PERSON, b_profile.sounds));<br> ast_cli(a->fd,"sound_only_one: %s\n", conf_get_sound(CONF_SOUND_ONLY_ONE, b_profile.sounds));<br>@@ -2231,6 +2244,7 @@<br> aco_option_register(&cfg_info, "language", ACO_EXACT, bridge_types, "en", OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct bridge_profile, language));<br> aco_option_register_custom(&cfg_info, "sound_", ACO_PREFIX, bridge_types, NULL, sound_option_handler, 0);<br> aco_option_register(&cfg_info, "video_update_discard", ACO_EXACT, bridge_types, "2000", OPT_UINT_T, 0, FLDSET(struct bridge_profile, video_update_discard));<br>+ aco_option_register(&cfg_info, "remb_send_interval", ACO_EXACT, bridge_types, "0", OPT_UINT_T, 0, FLDSET(struct bridge_profile, remb_send_interval));<br> /* This option should only be used with the CONFBRIDGE dialplan function */<br> aco_option_register_custom(&cfg_info, "template", ACO_EXACT, bridge_types, NULL, bridge_template_handler, 0);<br> <br>diff --git a/apps/confbridge/include/confbridge.h b/apps/confbridge/include/confbridge.h<br>index 044ab40..c2f8f9a 100644<br>--- a/apps/confbridge/include/confbridge.h<br>+++ b/apps/confbridge/include/confbridge.h<br>@@ -222,6 +222,7 @@<br> struct bridge_profile_sounds *sounds;<br> char regcontext[AST_MAX_CONTEXT];<br> unsigned int video_update_discard; /*!< Amount of time after sending a video update request that subsequent requests should be discarded */<br>+ unsigned int remb_send_interval; /*!< Interval at which a combined REMB frame is sent to video sources */<br> };<br> <br> /*! \brief The structure that represents a conference bridge */<br>diff --git a/configs/samples/confbridge.conf.sample b/configs/samples/confbridge.conf.sample<br>index e2d8a62..4028593 100644<br>--- a/configs/samples/confbridge.conf.sample<br>+++ b/configs/samples/confbridge.conf.sample<br>@@ -235,6 +235,10 @@<br> ; the video stream. Since a full frame can be large limiting how often they occur can<br> ; reduce bandwidth usage at the cost of increasing how long it may take a newly joined<br> ; channel to receive the video stream.<br>+;remb_send_interval=1000 ; Interval (in milliseconds) at which a combined REMB frame will be sent to sources of video.<br>+ ; A REMB frame contains receiver estimated maximum bitrate information. By creating a combined<br>+ ; frame and sending it to the sources of video the sender can be influenced on what bitrate<br>+ ; they choose allowing a better experience for the receivers. This defaults to 0, or disabled.<br> <br> ; All sounds in the conference are customizable using the bridge profile options below.<br> ; Simply state the option followed by the filename or full path of the filename after<br>diff --git a/include/asterisk/bridge.h b/include/asterisk/bridge.h<br>index 8d5c502..b232558 100644<br>--- a/include/asterisk/bridge.h<br>+++ b/include/asterisk/bridge.h<br>@@ -135,6 +135,7 @@<br> struct ast_bridge_video_talker_src_data talker_src_data;<br> } mode_data;<br> unsigned int video_update_discard;<br>+ unsigned int remb_send_interval;<br> };<br> <br> /*!<br>@@ -912,6 +913,14 @@<br> void ast_bridge_set_video_update_discard(struct ast_bridge *bridge, unsigned int video_update_discard);<br> <br> /*!<br>+ * \brief Set the interval at which a combined REMB frame will be sent to video sources<br>+ *<br>+ * \param bridge Bridge to set the REMB send interval on<br>+ * \param remb_send_interval The REMB send interval<br>+ */<br>+void ast_bridge_set_remb_send_interval(struct ast_bridge *bridge, unsigned int remb_send_interval);<br>+<br>+/*!<br> * \brief Update information about talker energy for talker src video mode.<br> */<br> void ast_bridge_update_talker_src_video_mode(struct ast_bridge *bridge, struct ast_channel *chan, int talker_energy, int is_keyfame);<br>diff --git a/main/bridge.c b/main/bridge.c<br>index 44a171d..5ceb272 100644<br>--- a/main/bridge.c<br>+++ b/main/bridge.c<br>@@ -3832,6 +3832,13 @@<br> ast_bridge_unlock(bridge);<br> }<br> <br>+void ast_bridge_set_remb_send_interval(struct ast_bridge *bridge, unsigned int remb_send_interval)<br>+{<br>+ ast_bridge_lock(bridge);<br>+ bridge->softmix.video_mode.remb_send_interval = remb_send_interval;<br>+ ast_bridge_unlock(bridge);<br>+}<br>+<br> void ast_bridge_update_talker_src_video_mode(struct ast_bridge *bridge, struct ast_channel *chan, int talker_energy, int is_keyframe)<br> {<br> struct ast_bridge_video_talker_src_data *data;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8716">change 8716</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8716"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I0e49eae60f369c86434414f3cb8278709c793c82 </div>
<div style="display:none"> Gerrit-Change-Number: 8716 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>