diff options
author | Joshua Colp <jcolp@digium.com> | 2018-04-04 15:12:50 -0300 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2018-04-17 11:25:17 -0600 |
commit | 8de3fa2b56cc954836a13e7d77079754d26fb990 (patch) | |
tree | d751852e79f8fd46f2e3307c488b0f2356aff443 /bridges/bridge_softmix/include/bridge_softmix_internal.h | |
parent | 3255a286b34a15d5bdaa93663d8654c0568ab14d (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 'bridges/bridge_softmix/include/bridge_softmix_internal.h')
-rw-r--r-- | bridges/bridge_softmix/include/bridge_softmix_internal.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bridges/bridge_softmix/include/bridge_softmix_internal.h b/bridges/bridge_softmix/include/bridge_softmix_internal.h index f842acb5e..3aa90915d 100644 --- a/bridges/bridge_softmix/include/bridge_softmix_internal.h +++ b/bridges/bridge_softmix/include/bridge_softmix_internal.h @@ -50,6 +50,8 @@ #include "asterisk/astobj2.h" #include "asterisk/timing.h" #include "asterisk/translate.h" +#include "asterisk/rtp_engine.h" +#include "asterisk/vector.h" #ifdef BINAURAL_RENDERING #include <fftw3.h> @@ -124,6 +126,8 @@ struct video_follow_talker_data { int energy_average; }; +struct softmix_remb_collector; + /*! \brief Structure which contains per-channel mixing information */ struct softmix_channel { /*! Lock to protect this structure */ @@ -169,6 +173,12 @@ struct softmix_channel { struct video_follow_talker_data video_talker; /*! The ideal stream topology for the channel */ struct ast_stream_topology *topology; + /*! The latest REMB report from this participant */ + struct ast_rtp_rtcp_feedback_remb remb; + /*! The REMB collector for this channel, collects REMB from all video receivers */ + struct softmix_remb_collector *remb_collector; + /*! The bridge streams which are feeding us video sources */ + AST_VECTOR(, int) video_sources; }; struct softmix_bridge_data { @@ -202,6 +212,10 @@ struct softmix_bridge_data { unsigned int binaural_init; /*! The last time a video update was sent into the bridge */ struct timeval last_video_update; + /*! The last time a REMB frame was sent to each source of video */ + struct timeval last_remb_update; + /*! Per-bridge stream REMB collectors, which flow back to video source */ + AST_VECTOR(, struct softmix_remb_collector *) remb_collectors; }; struct softmix_mixing_array { |