Commit graph

59 commits

Author SHA1 Message Date
Sebastian Jansson
9de4ef4b24 Adds signed infinity to timestamps.
Negative infinity is useful in comparisons as it represents a value
guaranteed to be less than any other timestamp. This avoid using
Timestamp::ms(0) to represent such a value or having to use optional
for the special case of first time execution.

To avoid ambiguity, Timestamp::Infinity is renamed to PlusInfinity.

Bug: webrtc:9709
Change-Id: Ib2debff91036e94d1dc903ec0c6faae30febde4e
Reviewed-on: https://webrtc-review.googlesource.com/79440
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24556}
2018-09-04 17:14:05 +00:00
Sebastian Jansson
ed1f75ab6d Removes redundant starting rate.
Sine a starting rate field was added to the constraints struct. Having
it in the initial config separately is reduntant. To simplify the code,
the extra field is removed. This is a follow up on:
https://webrtc-review.googlesource.com/c/src/+/92624

Bug: webrtc:9586
Change-Id: I9b01b16b2fc4b8479e83b7e998308be2295e0325
Reviewed-on: https://webrtc-review.googlesource.com/96801
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24514}
2018-08-31 17:36:21 +00:00
Sebastian Jansson
206b77f7ad Adds start bitrate handling to task queue congestion controller.
This adds a start bitrate field to TargetRateConstraints since this is
required in VideoSendStreamTests. This also reduces the differences
between the old SendSideCongestionController and the new TaskQueue
based version.

Bug: webrtc:9586
Change-Id: I5d3d1414e9d30b51723c911a0bf2e96b876c04e5
Reviewed-on: https://webrtc-review.googlesource.com/92624
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24384}
2018-08-22 10:09:26 +00:00
Sebastian Jansson
4932aa185c Avoids posting tasks in congestion controller.
This CL makes calls to send side congestion controller that originates
from the task queue execute directly rather than posting a task. This
ensures that side effects are applied by the time the call returns.

This reduces the risk that the task queue version of the congestion
controller introduces races that does not exist in the process thread
based version.

Bug: webrtc:9586
Change-Id: I82de032dc971c791a0f86d20ccbd47cbb09eba4b
Reviewed-on: https://webrtc-review.googlesource.com/85360
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24382}
2018-08-22 09:47:02 +00:00
Sebastian Jansson
eb73a7bd16 Removes unnecessary webrtc_cc namespaces.
Bug: webrtc:9586
Change-Id: I6407ee465d725d7469c409e5bea1c55354ab7f95
Reviewed-on: https://webrtc-review.googlesource.com/92385
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24199}
2018-08-06 17:18:45 +00:00
Ying Wang
e1d7b23915 Implement congestion window direct pushback to encoders. (Without TaskQueue)
Bug: None
Change-Id: I3c6da916ce5f4a32ff47bfb0894b00f11fbf7823
Reviewed-on: https://webrtc-review.googlesource.com/86605
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24008}
2018-07-17 14:26:05 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Alex Narest
bcf91808a2 Allows audio bitrate allocation in video calls without enabling TWCC (Transport Wide Congestion Control as defined at https://tools.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01.html) for audio stream.
This will allow experimenting with audio bitrate allocation in video calls without increasing transport overhead.

Bug: webrtc:8243
Change-Id: If961780921d53bdce95b68c26641df6875509c1f
Reviewed-on: https://webrtc-review.googlesource.com/84501
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23755}
2018-06-27 10:33:40 +00:00
Mirko Bonadei
beb2d9813c Removing usage of //build/config/compiler:no_size_t_to_int_warning.
Bug: webrtc:9251, webrtc:1348
Change-Id: I76e52abbfab5666cad73044b49172a9799539108
Reviewed-on: https://webrtc-review.googlesource.com/84144
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23686}
2018-06-20 13:44:26 +00:00
Danil Chapovalov
0040b66ad3 Replace rtc::Optional with absl::optional
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script from modules with parameters
'pacing video_coding congestion_controller remote_bitrate_estimator':

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I8ea501d7f1ee36e8d8cd3ed37e6b763c7fe29118
Reviewed-on: https://webrtc-review.googlesource.com/83900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23640}
2018-06-18 10:24:48 +00:00
Ying Wang
e61d72b37c Disables congestion window in pacer when CongestionWindowPushback is enabled.
Bug: None
Change-Id: I21a26fd6e32eadf1f2a619f6f3cc72da779fa0d3
Reviewed-on: https://webrtc-review.googlesource.com/83727
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23627}
2018-06-15 12:07:49 +00:00
Ying Wang
f2fae875d5 Add min pushback target bitrate as a parameter that can be set in field trial string.
Bug: None
Change-Id: I9922abadba8164d19e06026fe363efdd337f068e
Reviewed-on: https://webrtc-review.googlesource.com/80122
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23484}
2018-06-01 09:58:36 +00:00
Sebastian Jansson
f4d0afbb94 Always apply congestion window in pacer.
A previous change caused a regression in the congestion window behavior.
This CL restores previous behavior.

Bug: webrtc:8415
Change-Id: Id2e42d66bcfb58780c98da2227da39b970f26f0e
Reviewed-on: https://webrtc-review.googlesource.com/79483
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23428}
2018-05-29 12:02:04 +00:00
Sebastian Jansson
535bde3752 Adds data in flight information on send packet updates.
This prepares for making the BBR implementation more identical to the
implementation in Quic, this is to ensure that results are comparable.

Bug: webrtc:8415
Change-Id: I7b7e4769772d67cc5112969fefd4e56c6c72432e
Reviewed-on: https://webrtc-review.googlesource.com/76600
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23419}
2018-05-28 15:33:39 +00:00
Ying Wang
66eaed0393 Adding direct congestion window pushback to encoders.
When CongestionWindowPushback experiment is enabled, the pacer is oblivious to the congestion window. The relation between outstanding data and the congestion window affects encoder allocations directly.

Bug: None
Change-Id: Iaacc1d460d44a4ff2d586934c4f9ceb067109337
Reviewed-on: https://webrtc-review.googlesource.com/74922
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23411}
2018-05-28 12:15:59 +00:00
Sebastian Jansson
1388b30661 Adds tracking of outstanding bytes in SendTimeHistory.
This saves having to iterate trough all packets in flight to compute the
number of outstanding bytes.

Bug: webrtc:8415
Change-Id: I35b135f37649a38b44a36d300af42a815f85192d
Reviewed-on: https://webrtc-review.googlesource.com/77727
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23398}
2018-05-25 14:19:48 +00:00
Sebastian Jansson
172fd8536e Replaces redundant congestion controller components
This CL replaces components in the congestion controller module
that are identical to equivalent components in the rtp and goog_cc
subfolder. Some redundant components are left as they were not
trivial to replace.

Bug: webrtc:8415
Change-Id: I86a1f164d7b100b8ec8ba7dbc1c9bda2128a4f37
Reviewed-on: https://webrtc-review.googlesource.com/78521
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23384}
2018-05-24 13:35:31 +00:00
Sebastian Jansson
72678e11cc Adds unwrapped sequence number to sent packet info.
This prepares for making the BBR implementation more identical to the
implementation in Quic, this is to ensure that results are comparable.

Bug: webrtc:8415
Change-Id: I6b182246c988dd4a95681c063dcaa779088d0e99
Reviewed-on: https://webrtc-review.googlesource.com/76481
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23356}
2018-05-23 07:03:50 +00:00
Sebastian Jansson
02c65869c3 Adds unwrapped sequence number to feedback info.
The Quic BBR implementation uses packet sequence numbers to keep track
of the time slots used for calculation of send receive rates. To avoid
protocol dependence the port were initially written to use send times
instead.

As there are issues with running BBR in WebRTC, it makes sense to
use an identical implementation as in Quic to ensure that there
aren't implementation issues causing bad behavior. This requires
providing sequence numbers.

This prepares for making the BBR implementation more identical to the
implementation in Quic, this is to ensure that results are comparable.

Bug: webrtc:8415
Change-Id: I2cd96bc6ffb88042bb2b91421bfe6cbf7c1ff8ac
Reviewed-on: https://webrtc-review.googlesource.com/76583
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23353}
2018-05-22 16:28:19 +00:00
Niels Möller
65ec0fc81e Delete unneeded includes of basictypes.h.
This is a kitchen-sink header, some pieces should be moved to
byteorder.h, the rest likely deleted.

Delete most includes of basictypes.h. In leaf headers,
include stddef.h and stdint.h explicitly where needed.

Bug: webrtc:6853
Change-Id: Ibc809936a8f94d418e4eb650da1e89c1b9142073
Reviewed-on: https://webrtc-review.googlesource.com/77721
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23333}
2018-05-21 19:35:08 +00:00
Sebastian Jansson
dfce03af6e Allows injection of network controller factory into peer connection factory.
Bug: webrtc:9155
Change-Id: I0a17024042f154297aba20f5d2dc766feb27f3f7
Reviewed-on: https://webrtc-review.googlesource.com/73123
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23313}
2018-05-18 17:07:16 +00:00
Sebastian Jansson
c6c44268bc Moves network control interface to API.
This prepares for allowing injection of a network controller.

Bug: webrtc:9155
Change-Id: I5624f47738db9c5cd4750eac76cb6289e06a7aa3
Reviewed-on: https://webrtc-review.googlesource.com/73100
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23188}
2018-05-09 11:01:36 +00:00
Sebastian Jansson
bd9fe092ce Using shared task queue for congestion controller.
This simplifies the code and removes the need for a lot of bookkeeping
variables.

Bug: webrtc:9232
Change-Id: I0c9a4b0741ed5353caa22ba5acdcb166357441f2
Reviewed-on: https://webrtc-review.googlesource.com/74240
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23149}
2018-05-07 15:54:38 +00:00
Sebastian Jansson
ec6e550a8f Removes usage of uninitialized units in network control code.
This removes places where the units types are implicitly left
uninitialized in network_types.h and adds rtc::Optional where needed.

Also removing the change indicator in the NetworkEstimate struct as it
is not used in practice.

Bug: webrtc:9155
Change-Id: I7e30e338effba96bd466ae91e380e6a8e90f66e1
Reviewed-on: https://webrtc-review.googlesource.com/73369
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23126}
2018-05-04 16:19:14 +00:00
Sebastian Jansson
9b20677c4e Moves PostUpdates from SSCC to ControlHandler.
This moves the PostUpdates function from SendSideCongestionController
to the ControlHandler class.

Bug: None
Change-Id: I4000484a1df9d5fae02573196153c24f4f940219
Reviewed-on: https://webrtc-review.googlesource.com/70223
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22987}
2018-04-23 15:32:32 +00:00
Sebastian Jansson
010eace381 Removes redundant members in congestion controller.
last_target_rate_ and current_target_rate_msg_ both kept track of the
same value. pacer_configured_ was not used at all. This CL removes
both last_target_rate_ and pacer_configured_.

Bug: None
Change-Id: Ieb15c38c7d0c44730bef95492e3e677d505f054e
Reviewed-on: https://webrtc-review.googlesource.com/70184
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22909}
2018-04-17 16:05:03 +00:00
Sebastian Jansson
30bd4038cf Splits network units into separate headers.
This CL moves the network units files into a separate folder with a
separate BUILD file. It also splits the units into separate files.
This prepares for moving all or some of the units to somewhere that
can be accessed by more components.

Bug: None
Change-Id: I4ebbc19088b024ba920b0b3c64e5f57431f4f955
Reviewed-on: https://webrtc-review.googlesource.com/68660
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22861}
2018-04-13 13:24:28 +00:00
Sebastian Jansson
7d3efacb61 Disable toggling of controller in SSCC.
This disables toggling between transport feedback based  controller and
the fall back controller in SendSideCongestionController. The toggling
seems to cause issues with the probing in certain circumstances. Since
it's feasible to run experiments without the toggling, disable it for now.

Bug: webrtc:8415
Change-Id: Ia4a827e95d730d651eaf3facbee7e9a5b0cb2562
Reviewed-on: https://webrtc-review.googlesource.com/69803
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22856}
2018-04-13 11:54:38 +00:00
Sebastian Jansson
70488de694 Check for controller in SSCC when route changed.
Fixes potential crash in SendSideCongestionController when route is
changed before network is available.

Bug: webrtc:8415
Change-Id: I781f0e342e5bb42fedbf96c9c5c6d2c199ab3192
Reviewed-on: https://webrtc-review.googlesource.com/69801
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22851}
2018-04-13 10:49:58 +00:00
Sebastian Jansson
ae9057831f Removed observer from network controller interface.
Moving the responsibility for calling callbacks from implementations
of NetworkControllerInterface to SendSideCongestionController. This
decreases the coupling and makes the callbacks more explicit.

Bug: webrtc:8415
Change-Id: Ie75effbde01533106080bb6c40308b0c20064c45
Reviewed-on: https://webrtc-review.googlesource.com/66882
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22793}
2018-04-09 11:54:38 +00:00
Sebastian Jansson
2808ae99f8 Adds BBR network controller field trial.
This CL adds a field trial to enable the BBR congestion control method.
Since BBR is only implemented to handle per packet feedback,
SendSideCongestionController is modified to recreate network controllers
when the packet feedback availability changes and the BBR experiment is
enabled.

This also means that the periodic task used for process updates in the
network controllers has to recreated.

Bug: webrtc:8415
Change-Id: Ia24f7ad35336d2cc7a02bb3a445f1a84b8643475
Reviewed-on: https://webrtc-review.googlesource.com/61520
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22791}
2018-04-09 10:42:18 +00:00
Sebastian Jansson
5059c07604 Making periodic tasks in SSCC stoppable.
Adding Stop method of periodic tasks in SendSideCongestionController
(SSCC). This is utilized in a later CL enabling switching the network
controller which requires stopping the old periodic task and starting a
new one with a new update period.

Bug: webrtc:8415
Change-Id: I2e56c1e1fe10d88c038b2f290d94c08723ddf4e4
Reviewed-on: https://webrtc-review.googlesource.com/67280
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22786}
2018-04-09 09:09:59 +00:00
Sebastian Jansson
f2e3e7a25a Removed observer from probe controller.
Replacing observer interface with polling for pending probe clusters.
The purpose is to make it easier to reason about and control side
effects and to prepare for a similar change in the network controller
interface.

Bug: webrtc:8415
Change-Id: I8101cfda22e640a8e0fa75f3f6e63876db826a89
Reviewed-on: https://webrtc-review.googlesource.com/66881
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22775}
2018-04-06 16:13:37 +00:00
Sebastian Jansson
63b48df334 Removed static const network units.
Static const objects can cause what's called a "static initialization
order fiasco". This CL removes the statically initialized network units
in favor of constexpr defined versions available via static functions.

Bug: webrtc:8415
Change-Id: Ib1b316ae007481c52a53b2d1bb0352a630a220e2
Reviewed-on: https://webrtc-review.googlesource.com/65164
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22670}
2018-03-29 09:45:27 +00:00
Sebastian Jansson
1d430f727d Interface for packet feedback availability in SSCC
This CL adds a function to the SendSideCongestionController interface
for reporting per packet feedback availability.

This is part of a series of CLs tracking the transport feedback status
of the streams known to BitrateAllocator and reporting the status to
the congestion controller.

Bug: webrtc:8415
Change-Id: Ifcb6837bb80c5fcfc1f12f4f93ec38cc2903118f
Reviewed-on: https://webrtc-review.googlesource.com/63205
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22565}
2018-03-22 13:38:49 +00:00
Sebastian Jansson
247e0b4713 Disabling periodic tasks on SSCC in unit tests.
Time triggered tasks in the SendSideCongestionController caused
flakyness in long running unit tests of SendSideCongestionController.

This CL lets the unit test code disable the periodic tasks so they are
only triggered on demand.

Bug: webrtc:9039
Change-Id: I934045d7e6eeaa765dd221cef87389f1d98b58a5
Reviewed-on: https://webrtc-review.googlesource.com/63265
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22536}
2018-03-21 13:50:38 +00:00
Rasmus Brandt
9047dac757 Disable flaky test SendSideCongestionControllerTest/PacerQueueEncodeRatePushback.
TBR=srte@webrtc.org
NOTRY=TRUE

Bug: webrtc:9039
Change-Id: Ieb4cd437113e6291a326dff05dbcb96cbfdc06a6
Reviewed-on: https://webrtc-review.googlesource.com/63260
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22508}
2018-03-20 10:12:45 +00:00
Sebastian Jansson
537012405b Replacing unique pointer with raw pointer in SSCC checks.
Replacing the unique pointer used for access checks with a raw pointer
pointing to the object owned by the unique pointer. This is to stop
tsan from detecting a race between .get() done on the task queue and
.reset() done in the destructor.

Bug: webrtc:8415
Change-Id: Iae2ea9a2d38f319e73146e6b1e360b11b1708c76
Reviewed-on: https://webrtc-review.googlesource.com/62560
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22492}
2018-03-19 13:46:41 +00:00
Sebastian Jansson
317a522876 Fixes to posting delayed process tasks in SSCC.
The task queue based SendSideCongestionController (SSCC) was accessing
a unique pointer to the task queue from the task queue itself. This
triggered a tsan check failure when resetting the same unique pointer.

Also move declaration of SSCC member in RtpTransportControllerSend last,
to ensure that it, and its TaskQueue, are destroyed before other members.

Bug: webrtc:8415
Change-Id: I75c93f41deab637f7e4766ac4b61713c86f866e9
Reviewed-on: https://webrtc-review.googlesource.com/62143
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22478}
2018-03-16 15:28:21 +00:00
Sebastian Jansson
2ce1e749a8 Setting rate before callback in network control handler.
last_target_rate_ is used to retrieve the bandwidth in the callback
handler in RtpTransportControllerSend. If last_target_rate_ is not
set before the callback in OnNetworkInvalidation, the value will
be outdated.

Bug: webrtc:8415
Change-Id: Ic6f898db212a02c2afa1997840e3c4929bb7f0f7
Reviewed-on: https://webrtc-review.googlesource.com/61720
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22428}
2018-03-14 14:29:35 +00:00
Sebastian Jansson
a03585f611 Removing SetTransportOverhead from SSCC Interface.
This is a follow up on an earlier CL removing the usage of
SetTransportOverhead.

Bug: webrtc:8415
Change-Id: I8d9572c06f3ae1e8cacbe7b9bd57a9b65f371c0e
Reviewed-on: https://webrtc-review.googlesource.com/61502
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22427}
2018-03-14 14:27:35 +00:00
Sebastian Jansson
68ee4653ef Moving SetPacingFactor and allocation limits to SSCC.
This CL adds methods to the SendSideCongestionController (SSCC)
interface for configuring pacing factor and allocation based data rate limits.
This means that old SSCC implement the same interface as the new, task
queue based SSCC. This also allows merging the max total allocated
bit rate into SetAllocatedSendBitrateLimits.

This is done in preparation for an upcoming CL where the SSCC version
is controlled by a field trial.

Bug: webrtc:8415
Change-Id: I4d5446a3bedd5b0c725dbd009fb75815fd661eff
Reviewed-on: https://webrtc-review.googlesource.com/61320
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22408}
2018-03-13 16:58:21 +00:00
Sebastian Jansson
5f22be7cf8 Congestion controller processing using delayed tasks.
Replacing Module based mechanism for processing with posting tasks.
This prepares for allowing the interval to be changed at runtime and
for removing the dependency on Module threads.

Bug: webrtc:8415
Change-Id: Iaad50466bec695be4ba26d8bd670a1981f2e0df4
Reviewed-on: https://webrtc-review.googlesource.com/60862
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22406}
2018-03-13 16:48:31 +00:00
Sebastian Jansson
efbcfb13a7 Configuration in constructor of Goog CC.
Adding configuration of new GoogCcNetworkController to initializer, this
makes sure that it is properly initialized from the start. To achieve
this SendSideCongestionController waits until it has received the
necessary information to construct the object. This information should
be provided in the constructor for SendSideCongestionController in the
future.

Bug: webrtc:8415
Change-Id: Icc09b8b246bae9f9704b80855fc4caa3450b34fc
Reviewed-on: https://webrtc-review.googlesource.com/58099
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22404}
2018-03-13 16:05:21 +00:00
Sebastian Jansson
45d9c1de9c Added congestion control functionality to pacer.
This adds the ability to the pacer to apply a congestion window by
tracking sent data. This makes it more reliable when the congestion
window is small enough to be filled at a high rate as there are less
thread context switches that might affect the timing and performance.

Outstanding data is not reduced by the pacer as it has no information
about acknowledged packet feedback. This is by design as the pacer would
also need to keep track of on which connection packets were sent or
received, requiring a larger, more complex, change to the pacer.

Bug: webrtc:8415
Change-Id: I4ecd303e835552ced042cd21186da910288a8258
Reviewed-on: https://webrtc-review.googlesource.com/51764
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22371}
2018-03-09 17:40:24 +00:00
Sebastian Jansson
dae6aad6e7 Providing bitrate constraints in SSCC constructor.
This ensures that SendSideCongestionController is always initialized
with starting bitrate and bitrate limits.

Bug: webrtc:8415
Change-Id: If3b75e935dda755f9e0f40af1021f97ff150c9e9
Reviewed-on: https://webrtc-review.googlesource.com/59224
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22370}
2018-03-09 17:26:14 +00:00
Erik Språng
8493594dc2 Cleanup of TransportFeedbackObserver interface
The GetTransportFeedbackVector() method is only used in tests, and they
can access the class directly anyway. Keeping it is adding code bloat
and is also making upcoming refactoring more difficult.

Bug: webrtc:8975
Change-Id: I8323addb3c1461dd73b30353c8d9fe9410471c15
Reviewed-on: https://webrtc-review.googlesource.com/60860
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22349}
2018-03-08 22:51:53 +00:00
Sebastian Jansson
a06e919b9f Removing interface to access pacer via SSCC.
SSCC was accessing the pacer just to report values back to
RtpTransportControllerSend which already owns the pacer.
This CL moves those access methods.

To make RtpTransportControllerSend simpler, Call is made
responsible to keep track of network status used only as a
condition for report the pacer queuing delay.

Bug: webrtc:8415
Change-Id: I306bc9fcd3d8dcc7a637d51f2629ececebd48cad
Reviewed-on: https://webrtc-review.googlesource.com/60483
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22331}
2018-03-07 19:01:50 +00:00
Karl Wiberg
12edf4ce34 Separate build target for rtc_base/numerics/safe_minmax.h
So that we can avoid dependency cycles.

Bug: none
Change-Id: I821d9f1319dff01403d6e4e310cbb2d4b2b125e8
Reviewed-on: https://webrtc-review.googlesource.com/60500
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22328}
2018-03-07 14:12:00 +00:00
philipel
db4fa4b944 Propagating total_bitrate_bps from BitrateAllocator to ProbeController, part 3.
Trigger on total bitrate change.

Bug: webrtc:8955
Change-Id: I2373a1b7f139c7ea748a9641593e714d6895c8f6
Reviewed-on: https://webrtc-review.googlesource.com/59323
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22323}
2018-03-07 10:31:35 +00:00