summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngemar Johansson S <ingemar.s.johansson@ericsson.com>2015-10-28 07:18:55 (GMT)
committerArun Raghavan <arun@centricular.com>2015-10-28 07:19:16 (GMT)
commit4c2ddbbe5516a5a12a75a8cad9dcaabc70f6e667 (patch)
treee53869739c095079e9422f417b135e16c0db7a34
parenta7ad3b6e36e90b5d664f598e8902fbb5f17abc44 (diff)
downloadopenwebrtc-gst-plugins-4c2ddbbe5516a5a12a75a8cad9dcaabc70f6e667.tar.gz
openwebrtc-gst-plugins-4c2ddbbe5516a5a12a75a8cad9dcaabc70f6e667.tar.xz
scream: Avoid rate decrease if we know reverse path is congested
-rw-r--r--gst/scream/gstscreamcontroller.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gst/scream/gstscreamcontroller.c b/gst/scream/gstscreamcontroller.c
index 9dfc70c..c496e18 100644
--- a/gst/scream/gstscreamcontroller.c
+++ b/gst/scream/gstscreamcontroller.c
@@ -992,13 +992,22 @@ static void update_target_stream_bitrate(GstScreamController *self, ScreamStream
/*
* Update target rate
*/
+
increment = br*(1.0f - OWD_GUARD * scl * priority_scale * tmp)-
- TX_QUEUE_SIZE_FACTOR * stream->tx_size_bits_avg * priority_scale * tmp - stream->target_bitrate;
+ TX_QUEUE_SIZE_FACTOR * stream->tx_size_bits_avg * priority_scale * tmp -
+ stream->target_bitrate;
+
+
if (increment < 0) {
if (stream->was_fast_start) {
stream->was_fast_start = FALSE;
stream->target_bitrate_i = stream->target_bitrate;
}
+ /*
+ * Minimize the risk that reverse path congestion
+ * reduces target bit rate
+ */
+ increment *= MIN(1.0f,self->owd_fraction_avg);
} else {
stream->was_fast_start = TRUE;
if (!is_competing_flows(self)) {