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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}