Commit graph

379 commits

Author SHA1 Message Date
Christoffer Rodbro
2ab4764b9e Clean-up for calculation of upper bandwidth limit.
Follow-up for https://webrtc-review.googlesource.com/c/src/+/219696.

Bug: webrtc:12306
Change-Id: I94861f87e83216d8e92ff09e0f2ce39fd672d9f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220100
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34113}
2021-05-25 10:56:19 +00:00
Christoffer Rodbro
6396b48b18 Avoid modifying BWE internal state on reception of REMB feedback.
Instead, cap the final bandwidth estimate by the last received cap. This allows fast rampup after a REMB cap is lifted.

Bug: webrtc:12306
Change-Id: Ia99707134ce145275460524b3e46923876fdf62f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219696
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34109}
2021-05-25 09:03:23 +00:00
Per Kjellander
62b6c92298 Refactor LossBasedBandwidthEstimation
- Reset functionality based on loss history
- BWE rampup/down moved to SendSideBandwidthEstimation::UpdateEstimate to align with other estimators.


Bug: None
Change-Id: Ic13795c7ed1852b38baf8359c5c9f4dae6e9ea04
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207427
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33288}
2021-02-17 12:22:22 +00:00
Per Kjellander
4b1c72c2f9 Reland "Replace field trials with WebRtcKeyValueConfig in LossBasedBandwidthEstimation"
This reverts commit 7bad75b390.

Reason for revert: Downstream projects fixed.

Original change's description:
> Revert "Replace field trials with WebRtcKeyValueConfig in LossBasedBandwidthEstimation"
>
> This reverts commit 51f8e09540.
>
> Reason for revert: Breaks downstream project.
>
> Original change's description:
> > Replace field trials with WebRtcKeyValueConfig in LossBasedBandwidthEstimation
> >
> >
> > Bug: webrtc:10335
> > Change-Id: I85d62b9b63e0b6ec5dd4b957738a67a9a11e3a1f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205627
> > Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> > Commit-Queue: Per Kjellander <perkj@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33210}
>
> TBR=perkj@webrtc.org,crodbro@webrtc.org
>
> Change-Id: I220a0e5316c54c435d04bc2bbd714b9d9b92be26
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10335
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206645
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33214}

TBR=mbonadei@webrtc.org,perkj@webrtc.org,crodbro@webrtc.org

# Not skipping CQ checks because this is a reland.

Bug: webrtc:10335
Change-Id: I894be638d987e1ac39d7e8a9e642622f14e1acd1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206806
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33221}
2021-02-10 16:56:59 +00:00
Mirko Bonadei
7bad75b390 Revert "Replace field trials with WebRtcKeyValueConfig in LossBasedBandwidthEstimation"
This reverts commit 51f8e09540.

Reason for revert: Breaks downstream project.

Original change's description:
> Replace field trials with WebRtcKeyValueConfig in LossBasedBandwidthEstimation
>
>
> Bug: webrtc:10335
> Change-Id: I85d62b9b63e0b6ec5dd4b957738a67a9a11e3a1f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205627
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33210}

TBR=perkj@webrtc.org,crodbro@webrtc.org

Change-Id: I220a0e5316c54c435d04bc2bbd714b9d9b92be26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10335
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206645
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33214}
2021-02-10 09:34:48 +00:00
Per Kjellander
51f8e09540 Replace field trials with WebRtcKeyValueConfig in LossBasedBandwidthEstimation
Bug: webrtc:10335
Change-Id: I85d62b9b63e0b6ec5dd4b957738a67a9a11e3a1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205627
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33210}
2021-02-09 21:50:41 +00:00
Andrey Logvin
e7c79fd3d6 Remove from chromium build targets that are not compatible with it.
We need to be able build chromium with rtc_include_tests = true. It
reveals a lot of targets that are not compatible with chromium but
aren't marked so.

`rtc_include_tests=true` has been considered a way to disable targets for the Chromium build, causing an overload on rtc_include_tests while the meaning of the two GN args (rtc_include_tests and build_with_chromium) should be kept separated.

Bug: webrtc:12404
Change-Id: I2f72825445916eae7c20ef9338672d6a07a9b9ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203890
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33124}
2021-02-01 13:46:19 +00:00
Danil Chapovalov
098da17f35 Reland "Replace RTC_WARN_UNUSED_RESULT with ABSL_MUST_USE_RESULT in c++ code"
This is a reland of 8c2250eddc

Original change's description:
> Replace RTC_WARN_UNUSED_RESULT with ABSL_MUST_USE_RESULT in c++ code
>
> Bug: webrtc:12336
> Change-Id: If76f00d0883b5c8a90d3ef5554f5e22384b3fb58
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197620
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32978}

Bug: webrtc:12336
Change-Id: I1cd017d45c1578528dec4532345950e9823f4a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201732
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33003}
2021-01-15 17:59:05 +00:00
Andrey Logvin
f9ee0e08ec Add cross trafic emulation api
Bug: webrtc:12344
Change-Id: I958dc4deda4af4576818600c31aecdf48285172f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/200981
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32989}
2021-01-15 07:38:17 +00:00
Danil Chapovalov
4319b1695e Revert "Replace RTC_WARN_UNUSED_RESULT with ABSL_MUST_USE_RESULT in c++ code"
This reverts commit 8c2250eddc.

Reason for revert: breaks downstream project

Original change's description:
> Replace RTC_WARN_UNUSED_RESULT with ABSL_MUST_USE_RESULT in c++ code
>
> Bug: webrtc:12336
> Change-Id: If76f00d0883b5c8a90d3ef5554f5e22384b3fb58
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197620
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32978}

TBR=danilchap@webrtc.org,mbonadei@webrtc.org,crodbro@webrtc.org

Change-Id: I5c9d419785254878a825865808b56841cd30b9b5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12336
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201731
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32979}
2021-01-14 15:02:47 +00:00
Danil Chapovalov
8c2250eddc Replace RTC_WARN_UNUSED_RESULT with ABSL_MUST_USE_RESULT in c++ code
Bug: webrtc:12336
Change-Id: If76f00d0883b5c8a90d3ef5554f5e22384b3fb58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32978}
2021-01-14 14:32:26 +00:00
Danil Chapovalov
1399211a96 Fix potential 32bit integer overflow on rtcp receiver report
Bug: b/174613134
Change-Id: I8c9c8496ca6e4072d280d2024edff61edf9be250
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/199960
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32892}
2020-12-30 23:36:07 +00:00
Christoffer Rodbro
8649e49d10 Add a field trial to skip REMB modification of BWE internal state.
By enabling the field trial, REMB caps the output target bitrate, but
does not change any internal BWE state variables.

Bug: webrtc:12306
Change-Id: I43e9ac1d1b7dff292d7aa5800c01d874bc91aaff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197809
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32867}
2020-12-21 10:49:06 +00:00
Per Kjellander
ea969d287b Reland Addd class InterArrivalDelta to goog_cc
This time the class is added but only used if the field trial "WebRTC-Bwe-NewInterArrivalDelta/Enabled/" is enabled.
Original cl description:

This cl copies modules/remote_bitrate_estimator/inter_arrival.x to inter_arrival.h and interrival_delta.cc in goog_cc
but modified to use webrtc::Timestamp and webrtc::Timedelta in order to avoid having to use 24 bit time repressentation.

patchset 1 is a pure revert of the revert https://webrtc-review.googlesource.com/c/src/+/196343
patchset 2 contains a modification to allow running it behind an experiment.


Bug: webrtc:12269
Change-Id: Ide80e9f5243362799a2cc1f0fcf7e613e707d851
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196502
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32784}
2020-12-07 11:02:22 +00:00
Christoffer Rodbro
d13178cb55 Cleanup obsolete filtering of small packets in delay based estimator.
Also deletes unused constructor in Results struct.

Bug: webrtc:10932
Change-Id: Id33f57db30df49aa23fb0b5959812cc3834f1eaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196508
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32777}
2020-12-04 16:02:55 +00:00
Per Kjellander
a760bca072 Revert "Add class InterArrivalDelta to goog_cc"
This reverts commit 0496a41211.

Reason for revert: Causes unexpected changes in perf tests.

Original change's description:
> Add class InterArrivalDelta to goog_cc
>
> This cl copies modules/remote_bitrate_estimator/inter_arrival.x to inter_arrival.h and interrival_delta.cc in goog_cc in the first patchset.
> In the following- this class is modified to use webrtc::Timestamp and webrtc::Timedelta in order to avoid having to use 24 bit time repressentation.
>
> Bug: none
> Change-Id: I9befe6e3e283cf7e21efa974ae33e8a83e26cbe6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194004
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32733}

TBR=perkj@webrtc.org,crodbro@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: none
Change-Id: I725b246f6ec0c293cb3ada39b1a65a14ef9a001e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196343
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32765}
2020-12-03 22:50:42 +00:00
Per Kjellander
0496a41211 Add class InterArrivalDelta to goog_cc
This cl copies modules/remote_bitrate_estimator/inter_arrival.x to inter_arrival.h and interrival_delta.cc in goog_cc in the first patchset.
In the following- this class is modified to use webrtc::Timestamp and webrtc::Timedelta in order to avoid having to use 24 bit time repressentation.

Bug: none
Change-Id: I9befe6e3e283cf7e21efa974ae33e8a83e26cbe6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194004
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32733}
2020-12-01 20:13:12 +00:00
Niels Möller
0d863f72a8 Cleanup of bwe_defines.h
Delete unused macros BWE_MIN and BWE_MAX.

Move enum RateControlState: Make it a private enum class in
AimdRateControl, the only user.

Change users of the header file that only need BandwidthUsage, to
instead include api/network_state_predictor.h, the file defining this
class. As a result, fewer dependencies on
modules/remote_bitrate_estimator.

Bug: None
Change-Id: I4450c79dd58e1875d64dd74d1ae2cb7d911a14b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195222
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32704}
2020-11-26 12:26:02 +00:00
Per Kjellander
9dfe2fce9a Replace field trials with WebRtcKeyValueConfig in SendSideBandwidthEstimate
And ad field trial flag to be able to disable RttBasedBackoff

Bug: webrtc:10335
Change-Id: Ib67d3e75787daed96e22b2c732f6839e23e4abda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191967
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32566}
2020-11-09 09:52:05 +00:00
Erik Språng
9d69cbeabf Changes default pacing factor to 1.1x
This changes the default behavior to use pacing factor of 1.1x instead
of 2.5x, it also sets libvpx rate controler as trusted, turns on the
encoder pushback mechanism and sets spatial hysteresis to 1.2.
The unused "dynamic rate" settings in libvpx is removed.

The new settings matches what has been used in chromium since 2019.
If needed, the legacy behavior can be enabled using the field trial
WebRTC-VideoRateControl.

Bug: webrtc:10155
Change-Id: I8186b491aa5bef61e8f568e96c980ca68f0c208f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186661
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32477}
2020-10-23 13:43:32 +00:00
Erik Språng
279f37052c Makes WebRTC-Pacer-SmallFirstProbePacket default enabled.
This is expected to yield slightly higher bandwidth estimates when
probing is used, since it reduces a bias in how packet sizes are counted.

Bug: webrtc:11780
Change-Id: I6a4a3af0c50670d248dbe043a4d9da60915e3699
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187491
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32394}
2020-10-13 21:45:42 +00:00
Niels Möller
de95329daa Delete macros RTC_DISALLOW_ASSIGN and RTC_DISALLOW_IMPLICIT_CONSTRUCTORS
The former was unused, the latter is replaced with the explicit C++11
deletions. The related RTC_DISALLOW_COPY_AND_ASSIGN is left for now,
it is used in a lot more places.

Bug: None
Change-Id: I49503e7f2b9ff43c6285f8695833479bbc18c380
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185500
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32224}
2020-09-29 10:19:20 +00:00
Niels Möller
d381eede92 Rename PlayoutDelay --> VideoPlayoutDelay, move to api/video/video_timing.h
We can then finally delete the top-level common_types.h, and the
corresponding build target webrtc_common.

Bug: webrtc:7660
Change-Id: I1c1096541477586d90774c7a3405b9d36edec14a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182800
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32044}
2020-09-07 08:37:14 +00:00
Mirko Bonadei
2dcf348011 Use absl_deps in order to preapre to the Abseil component build release.
Bug: webrtc:1046390
Change-Id: Ia35545599de23b1a2c2d8be2d53469af7ac16f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176502
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31463}
2020-06-08 12:59:40 +00:00
Danil Chapovalov
014197b581 In modules/ replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: I8a87389a795029feb818449ab1e5bbe69486db28
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175908
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31364}
2020-05-27 10:21:08 +00:00
Bjorn Terelius
efdff53176 Limit BWE drops from probes to 85% of the throughput estimate.
Bug: webrtc:11498
Change-Id: Ia4bb1a3cbde951d7fce5f4408da481ee506f8d21
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173180
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31088}
2020-04-16 14:51:43 +00:00
Tommi
3c9bcc1f7a Reland of the test portion of:
https://webrtc-review.googlesource.com/c/src/+/172847

------------ original description --------------

Preparation for ReceiveStatisticsProxy lock reduction.

Update tests to call VideoReceiveStream::GetStats() in the same or at
least similar way it gets called in production (construction thread,
same TQ/thread).

Mapped out threads and context for ReceiveStatisticsProxy,
VideoQualityObserver and VideoReceiveStream. Added
follow-up TODOs for webrtc:11489.

One functional change in ReceiveStatisticsProxy is that when sender
side RtcpPacketTypesCounterUpdated calls are made, the counter is
updated asynchronously since the sender calls the method on a different
thread than the receiver.

Make CallClient::SendTask public to allow tests to run tasks in the
right context. CallClient already does this internally for GetStats.

Remove 10 sec sleep in StopSendingKeyframeRequestsForInactiveStream.

Bug: webrtc:11489
Change-Id: I491e13344b9fa714de0741dd927d907de7e39e83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173583
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31077}
2020-04-15 16:09:44 +00:00
Ali Tofigh
dfae553e3a Delete unused class MedianSlopeEstimator
Bug: webrtc:11480
Change-Id: I410ef28793e9e36fd08f53801ad9a978d5e1f4e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172780
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31029}
2020-04-08 07:20:38 +00:00
Artem Titov
16cc9efd54 Revert "Preparation for ReceiveStatisticsProxy lock reduction."
This reverts commit 24eed2735b.

Reason for revert: Speculative revert: breaks downstream project

Original change's description:
> Preparation for ReceiveStatisticsProxy lock reduction.
> 
> Update tests to call VideoReceiveStream::GetStats() in the same or at
> least similar way it gets called in production (construction thread,
> same TQ/thread).
> 
> Mapped out threads and context for ReceiveStatisticsProxy,
> VideoQualityObserver and VideoReceiveStream. Added
> follow-up TODOs for webrtc:11489.
> 
> One functional change in ReceiveStatisticsProxy is that when sender
> side RtcpPacketTypesCounterUpdated calls are made, the counter is
> updated asynchronously since the sender calls the method on a different
> thread than the receiver.
> 
> Make CallClient::SendTask public to allow tests to run tasks in the
> right context. CallClient already does this internally for GetStats.
> 
> Remove 10 sec sleep in StopSendingKeyframeRequestsForInactiveStream.
> 
> Bug: webrtc:11489
> Change-Id: Ib45bfc59d8472e9c5ea556e6ecf38298b8f14921
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172847
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31008}

TBR=mbonadei@webrtc.org,henrika@webrtc.org,kwiberg@webrtc.org,tommi@webrtc.org,juberti@webrtc.org,mflodman@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:11489
Change-Id: I48b8359cdb791bf22b1a2c2c43d46263b01e0d65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173082
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31023}
2020-04-07 19:50:20 +00:00
Ali Tofigh
d339bde338 Remove undefined member functions in AlrDetector
Bug: webrtc:11494
Change-Id: I5443931eb194287faf655b2c812d6c4625419a29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172925
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31009}
2020-04-06 15:21:58 +00:00
Tommi
24eed2735b Preparation for ReceiveStatisticsProxy lock reduction.
Update tests to call VideoReceiveStream::GetStats() in the same or at
least similar way it gets called in production (construction thread,
same TQ/thread).

Mapped out threads and context for ReceiveStatisticsProxy,
VideoQualityObserver and VideoReceiveStream. Added
follow-up TODOs for webrtc:11489.

One functional change in ReceiveStatisticsProxy is that when sender
side RtcpPacketTypesCounterUpdated calls are made, the counter is
updated asynchronously since the sender calls the method on a different
thread than the receiver.

Make CallClient::SendTask public to allow tests to run tasks in the
right context. CallClient already does this internally for GetStats.

Remove 10 sec sleep in StopSendingKeyframeRequestsForInactiveStream.

Bug: webrtc:11489
Change-Id: Ib45bfc59d8472e9c5ea556e6ecf38298b8f14921
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172847
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31008}
2020-04-06 14:34:38 +00:00
Mirko Bonadei
57cabed0b0 Replace std::string::find() == 0 with absl::StartsWith.
Bug: None
Change-Id: I070c4a5d19455f3a5c5d3ccc05f418545c351987
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172584
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30960}
2020-04-01 11:15:00 +00:00
Björn Terelius
3bc8123247 Scale unacked_data consistently in RobustThroughputEstimator
Bug: webrtc:10274
Change-Id: I4bb460ec13a17080a50750e59f87d7e972f9947b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170232
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30764}
2020-03-11 15:02:44 +00:00
Björn Terelius
987ef48258 Adds field trial to separate audio and video packets for delay-based overuse detection.
The decision to route audio packets to a separate overuse detector
is off by default and requires the field trial
WebRTC-Bwe-SeparateAudioPackets/enabled,packet_threshold:10,time_threshold:1000ms/
The parameters control the threshold for switching over to the
audio overuse detector if we stop receiving feedback for video.

Bug: webrtc:10932
Change-Id: Icdde35bc7a98b18b1a344bd2d620a890fd9421d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168342
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30694}
2020-03-05 16:29:55 +00:00
Sebastian Jansson
cabed431f8 Adds stable target rate to GoogCC debug output.
Bug: webrtc:9510
Change-Id: I99bcc469f758d645d7db180f48b5d1eb623c1117
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169360
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30647}
2020-02-28 15:13:50 +00:00
Jakob Ivarsson
e7fe3a5086 Update target rates if stable target has changed.
Bug: None
Change-Id: I93572290a41f44582b84cee8aec511a4b10a09da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168765
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30566}
2020-02-20 10:51:20 +00:00
Danil Chapovalov
cad3e0e2fa Replace DataSize and DataRate factories with newer versions
This is search and replace change:
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::Bytes<\(.*\)>()/DataSize::Bytes(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::bytes/DataSize::Bytes/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BitsPerSec<\(.*\)>()/DataRate::BitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BytesPerSec<\(.*\)>()/DataRate::BytesPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::KilobitsPerSec<\(.*\)>()/DataRate::KilobitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::bps/DataRate::BitsPerSec/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::kbps/DataRate::KilobitsPerSec/g"
git cl format

Bug: webrtc:9709
Change-Id: I65aaca69474ba038c1fe2dd8dc30d3f8e7b94c29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168647
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30545}
2020-02-18 16:09:50 +00:00
Danil Chapovalov
ea820932d8 Delete legacy TimeDelta and Timestamp factories
Bug: webrtc:9709
Change-Id: Ic294a6dc324fde06d868a3d00941b0f2fc970935
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168490
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30510}
2020-02-13 08:50:22 +00:00
Christoffer Rodbro
377f5a2197 Add configuration for capping allocation probes.
Bug: webrtc:11354
Change-Id: If4d4b6b409da5036e37f288768b43b19531974fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168440
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30506}
2020-02-12 10:57:01 +00:00
Danil Chapovalov
5528402ef8 Use newer version of TimeDelta and TimeStamp factories in modules/
This change generated with following commands:
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g"
git cl format

Bug: None
Change-Id: I117d64a54950be040d996035c54bc0043310943a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168340
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30489}
2020-02-10 11:49:57 +00:00
Ying Wang
9b881abea9 Enable congestion window pushback to reduce bitrate by only drop video frames.
With current congestion window pushback, when congestion window is filling up, it will reduce bitrate directly and encoder may reduce encode quality, resolution, or framerate to adapt to the allocated bitrate, the behavior is depending on the degradation preference.
This change enable congestion window to only drop frames to reduce bitrate (when needed) instead of reduce general bitrate allocation.

Bug: webrtc:11334
Change-Id: I9cf5c20a0858c4d07d006942abe72aa5e1f7cb38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168059
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30483}
2020-02-07 14:14:47 +00:00
Björn Terelius
be99ee8f17 Add more options for tuning the RobustThroughputEstimator through field trial.
Bug: webrtc:10274
Change-Id: I94a8c200947c66277d67812bc1d0acc9e1f40e7a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168045
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30432}
2020-01-30 19:05:56 +00:00
Sebastian Jansson
c9f42ad909 Simplifies transport overhead mechanism in Scenario test framework.
This changes the behavior for adding virtual transport overhead so it
doesn't change the size of the actual payload buffer, only the
calculated packet size.

Bug: webrtc:9883
Change-Id: I6e24598378c4dd6a591d36ca3b162e933ff4ef7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164523
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30298}
2020-01-17 11:30:02 +00:00
Jonas Olsson
b2b2031457 Concatenate string literals at compile time.
This CL was generated by running:
git ls-files | grep ".cc" | xargs perl -i -ne 'BEGIN {undef $/}; s/("[\s\n]*<<[\s\n]*")/" "/g; print;'; git cl format

After that I manually edited modules/audio_processing/gain_controller2.cc to preserve its original
formatting.

This primary benefit of this change is a small reduction in binary size.

Bug: None
Change-Id: I689fa7ba9c717c314bb167e5d592c3c4e0871e29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165961
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30251}
2020-01-14 14:47:48 +00:00
Sebastian Jansson
3e66a498c3 Use RTX SSRCs in scenario test framework.
Using RTX SSRCs and payload type for retransmission of video. This
corresponds to the behavior when using the peer connection API.

Bug: webrtc:9883
Change-Id: Ic0e3964d097f42219ca225513a4bc771d70ccaa4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164460
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30248}
2020-01-14 12:04:56 +00:00
Jonas Oreland
350a82aec3 Reland "Add field trial to base stable target rate on loss based target rate"
This is a reland of 63db77007b that
was broken as I flipped != and == :(

Luckily this made a test flaky, and hence was the original change reverted.

Original change's description:
> Add field trial to base stable target rate on loss based target rate
>
> I.e not the pushback_rate that includes the congestion window pushback
> (if enabled).
>
> Bug: None
> Change-Id: I413d011004a95da03dd62f5b423abc3c8b66b333
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165383
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30189}

Bug: None
Change-Id: Ia637d0498e6c0c2708eba659e2a30f3235944d4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165391
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30196}
2020-01-09 14:21:07 +00:00
Jonas Oreland
b93a7d7e05 Revert "Add field trial to base stable target rate on loss based target rate"
This reverts commit 63db77007b.

Reason for revert: Flipped !=which should have been == makes tests

Original change's description:
> Add field trial to base stable target rate on loss based target rate
> 
> I.e not the pushback_rate that includes the congestion window pushback
> (if enabled).
> 
> Bug: None
> Change-Id: I413d011004a95da03dd62f5b423abc3c8b66b333
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165383
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30189}

TBR=brandtr@webrtc.org,srte@webrtc.org,jonaso@webrtc.org

Change-Id: I883edb8a74f1ae2a4d783b9825cc08c6a5228aa9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165388
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30193}
2020-01-09 12:52:06 +00:00
Jonas Oreland
63db77007b Add field trial to base stable target rate on loss based target rate
I.e not the pushback_rate that includes the congestion window pushback
(if enabled).

Bug: None
Change-Id: I413d011004a95da03dd62f5b423abc3c8b66b333
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165383
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30189}
2020-01-09 11:32:25 +00:00
Jonas Olsson
c907d4f223 Revert "Ensure loss-based controller is always enabled."
This reverts commit 60ec3703cd.

Reason for revert: Needs back-end test before always enabling.

Original change's description:
> Ensure loss-based controller is always enabled.
> 
> The new default parameters are the ones that were used in the Chrome
> Finch trial. The deleted unit test is invalidated by these changes.
> 
> Bug: chromium:941413
> Change-Id: I597f4b0defaebe5bb3a6710b071fae2ee5c6f461
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160652
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30049}

TBR=srte@webrtc.org,crodbro@webrtc.org,jonasolsson@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:941413
Change-Id: I5da4676ad8be2569ad7eed99e954e0d0b624110b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161902
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30061}
2019-12-11 14:09:20 +00:00
Jonas Olsson
60ec3703cd Ensure loss-based controller is always enabled.
The new default parameters are the ones that were used in the Chrome
Finch trial. The deleted unit test is invalidated by these changes.

Bug: chromium:941413
Change-Id: I597f4b0defaebe5bb3a6710b071fae2ee5c6f461
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160652
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30049}
2019-12-10 10:30:02 +00:00
Christoffer Rodbro
034f767a91 Allow setting the initial congestion window size by config.
Bug: webrtc:11148
Change-Id: I4700a261661dca51d769e0a277704e1f9316e83d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161089
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30038}
2019-12-09 11:00:10 +00:00
Sebastian Jansson
16189c6429 Apply network estimate by default.
Bug: webrtc:10498
Change-Id: I49e5a3dd989152abfa0abdf90356b37cab912a91
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161382
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30021}
2019-12-05 17:09:56 +00:00
Mirko Bonadei
a3cd717bb6 Remove WebRTC-Bwe-CongestionWindowDownlinkDelay.
Bug: webrtc:11143
Change-Id: Iaf89758de7d2a58f6e1c88293f38c5eff1a78583
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160787
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29956}
2019-11-28 21:09:12 +00:00
Björn Terelius
9281436650 Add field trial to cap trendline slope in delay-based BWE.
Bug: webrtc:10932
Change-Id: I34a36a8cad16d65143eff9c675ee98bdbf176ace
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160014
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29872}
2019-11-22 13:14:53 +00:00
Christoffer Rodbro
58a3210823 Add config to reduce weight on small samples in BitrateEstimator.
Change #159711 adds the option to filter out small packets on the
input to the delay-based BWE. This change adds similar functionality
to BitrateEstimator by reducing the weight of small observations.

Bug: webrtc:10932
Change-Id: I0a673a067f7ef86769cabd30443e60e9de70053c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160009
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29865}
2019-11-21 15:52:25 +00:00
Björn Terelius
f3fcde36c2 Store delay measurements as struct instead of std::pair
Bug: None
Change-Id: I60f375cda4f910550a86d2238acf39d429e2a17b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160004
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29837}
2019-11-19 17:44:11 +00:00
Nikita Zetilov
8ae70f6a30 Enable WebRTC-Bwe-MaxRttLimit by default.
Some of the field trial default values are changed as well.

Now available bitrate estimation will be decreasing when RTT is more than 3 seconds.
Unless different parameters for the field trial are specified.

Bug: None
Change-Id: Icd1923fc2e2e7766a7f645016c5432a52537145f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158840
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Konrad Hofbauer <hofbauer@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Nikita Zetilov <zetilovn@google.com>
Cr-Commit-Position: refs/heads/master@{#29823}
2019-11-18 16:53:11 +00:00
Björn Terelius
fd0e32a87a Fix filtering of small packets in delay-based BWE
crodbro@ found that the previous field trial, which filtered the deltas
in the trendline estimator, can increase the noise caused by varying
packet sizes. Moving the filtering to the DelayBasedBwe class fixes the
issue.

To avoid confusion, we've updated the field trial name, so e.g.
WebRTC-BweIgnoreSmallPacketsFix/small:200bytes,large:200bytes,
                                fraction_large:0.25,smoothing:0.1/
should be used to enable the feature.

Bug: webrtc:10932
Change-Id: If77e83043c37fff909038405f634e541ce41abb8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159711
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29804}
2019-11-15 14:53:59 +00:00
Björn Terelius
251b0dcc4f Simplified throughput estimator
Add interface for AcknowledgedBitrateEstimator
Add simplified throughput estimator, implementing the same interface.
The choice of estimator implementation can be controlled by a field trial.

Bug: webrtc:10274
Change-Id: I6bef090a8a6a1783f3f5750a2ee56189f562a9c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158892
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29761}
2019-11-11 21:21:10 +00:00
Per Kjellander
632d57d3d0 Ignore low probe results when using NetworkStateEstimator under field trial
The feature is added as part a new field trial WebRTC-Bwe-IgnoreProbesLowerThanNetworkStateEstimate

Bug: webrtc:10498
Change-Id: I72b3c73256a35e0583f4d595edef45848f8bbb22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158260
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29624}
2019-10-28 08:36:01 +00:00
Per Kjellander
eec39190ce Remove trial WebRTC-Bwe-ProbeRateFallback
It was intended to be used for to fall back to probe rate if ack rate is missing.

This partly reverts commit aa4f100225.

Reason for revert:
Code is unused 1 year after submitted.

Original change's description:
> Adds trial to fall back to probe rate if ack rate is missing.
>
> Bug: webrtc:9718
> Change-Id: I7b6e1d3c051e67b97f6de1ec95e84631af9c5b0d
> Reviewed-on: https://webrtc-review.googlesource.com/c/113600
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25953}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:9718
Change-Id: I06804782c2e210d1c484426e915e4d8447572739
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158084
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29597}
2019-10-24 08:30:42 +00:00
Danil Chapovalov
e34fb878b9 Clarify NetworkControl interface: result of each function must be used
Bug: None
Change-Id: Iff93513d36ed60d2c1bcbabb4dd5f8716e40d183
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157860
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29558}
2019-10-21 12:35:07 +00:00
Jakob Ivarsson
33ed88287f Update the minimum bitrate when a stream allocation is removed.
The minimum bitrate was lower bounded by the previous value and could thus not become lower when a stream allocation was removed.

Bug: None
Change-Id: I60068dbc7691121f001cbb233ca4a25269047f6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157424
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29541}
2019-10-18 15:39:40 +00:00
Mirko Bonadei
86d053c2db Use source_sets in component builds and static_library in release builds.
Static libraries don't guarantee that an exported symbol gets linked
into a shared library (and in order to support Chromium's component
build mode, WebRTC needs to be linked as a shared library).

Source sets always pass all the object files to the linker.

On the flip side, source_sets link more object files in release builds
and to avoid this, this CL introduces a the GN template "rtc_library" that
expands to static_library during release builds and to source_set during
component builds.

See: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_source_set

Bug: webrtc:9419
Change-Id: I4667e820c2b3fcec417becbd2034acc13e4f04fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157168
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29525}
2019-10-17 21:17:18 +00:00
Sebastian Jansson
65c57ff6af Adds logging of NetworkStateEstimator estimates.
Bug: webrtc:10498
Change-Id: I4c7e1a28c37066dbc11e8c60ab5d357b20e17119
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156561
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29468}
2019-10-14 15:42:17 +00:00
Sebastian Jansson
24c678fd41 Adds test for loss based controller under cross traffic induced loss.
Bug: webrtc:9883
Change-Id: I85a83dd15afe523e0ba5b3a723979317f0b98ab7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156501
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29465}
2019-10-14 13:59:11 +00:00
Sebastian Jansson
d8aff21849 Adds support for stopping fake TCP cross traffic.
Bug: webrtc:9510
Change-Id: I95bca7e620e0b3916f1ae633ff1b7067f19bd8ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156500
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29451}
2019-10-11 15:42:26 +00:00
Niels Möller
7536bc5395 Account for IP and UDP headers in emulated network
Add header size both for network emulation and stats.

Bug: webrtc:11003
Change-Id: I6f5b6bc1e761bdc40da4e2e0f10a9696e8a45c88
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155442
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29382}
2019-10-04 12:32:02 +00:00
Sebastian Jansson
79f3287fcf Cleanup of simple TODO(srte) comments.
Just fixing some minor TODOs in my name. Not worth splitting into
separate CLs as the changes are minor.

Bug: webrtc:9883
Change-Id: I05c54b76507a1d51b92cad080ca4e2dfe8546bf1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155520
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29377}
2019-10-04 07:57:16 +00:00
Elad Alon
fddbe6c632 Improve readability in GoogCcNetworkController::OnSentPacket
Bug: None
Change-Id: Iff8a73611982506d44ac6818300663c3a4ac49b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155177
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29363}
2019-10-01 16:27:00 +00:00
Sebastian Jansson
e00ea5ef11 Refactoring CapBitrateToThresholds in SendSideBandwidthEstimation.
Renaming and splitting it into helper methods. This is to more clearly
separate the things it does and prepares for moving things to GoogCC.

Additionally, replacing calls with current_target_ as input with
ApplyTargetLimits to better reflect the intended behavior.

Bug: webrtc:9883
Change-Id: I2c47ec74a9cbc271aff91645c763373297f26acc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154425
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29346}
2019-09-30 13:30:32 +00:00
Sebastian Jansson
2bc55585f6 Renaming variables in SendSideBandwidthEstimation.
This makes them better reflect their contents and usage. Also replacing
zero with infinity where it's used to reflect the lack of a limit.

Bug: webrtc:9883
Change-Id: Ibc498aa3a41d34c16d363e892a927e482949ab51
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154423
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29313}
2019-09-26 08:30:40 +00:00
Sebastian Jansson
ad10222289 Cleanup of unused field trials and options in SendSideBandwidthEstimation
Bug: webrtc:9883
Change-Id: Icbf4d6cb84da51f800343675f181e41b7cc45a6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154422
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29306}
2019-09-25 15:08:12 +00:00
Sebastian Jansson
461ee8538a Cleanup of target rates in GoogCC/SendSideBandwidthEstimation.
Removing the redundant last_estimated_bitrate_bps_ and renaming some
members to better reflect the contents. Also replacing the CurrentEstimate
method of SendSideBandwidthEstimation with value specific access methods.

Bug: webrtc:9883
Change-Id: I73cb08e09374adddf5991cb3793fa4a4fee20c85
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154351
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29304}
2019-09-25 14:31:39 +00:00
Sebastian Jansson
01dd88505c Moves contents of bitrate_controller to goog_cc
This CL moves send_side_bandwidth_estimation.cc/h and
loss_based_bandwidth_estimation.cc/h from modules/bitrate_controller
to modules/congestion_controller/goog_cc.

Bug: webrtc:9883
Change-Id: Ibb2c2ba3762007e7e5114f39042ee96431b73776
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154346
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29297}
2019-09-25 08:43:24 +00:00
Sebastian Jansson
f34116e356 Replacing bandwidth adaptation trial with stable target in Opus encoder.
This also means that the NetworkEstimate::bandwidth can be deprecated
as it's currently just a copy of the target_rate.

Bug: webrtc:10981
Change-Id: I1bc57b98480bd77ce052736b19d630c775428546
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153669
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29288}
2019-09-24 16:35:02 +00:00
Björn Terelius
489843f1b1 Improve trendline estimator logging.
Bug: None
Change-Id: I7cc6dc7f45ddb7325252516490436bea1ec8d250
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153521
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29231}
2019-09-19 08:33:11 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Per Kjellander
dc7d2c6fd7 Backoff to acked bitrate during first overuse detection
In DelayBasedBwe, in experiment WebRTC-Bwe-AlrLimitedBackoff, back off relative the BWE only after the first detected overuse. The first time overuse is detected, back down to the acked bitrate.

The idea is to faster drop BWE in the beginning of the call when the initial BWE guess may be too high. Withouth this, it may take a too long time to initially back down.

BUG=webrtc:10542

Change-Id: I2a11457d2391ad25658e7c13d9cae02a38973ecb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152541
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29163}
2019-09-12 10:51:45 +00:00
Danil Chapovalov
16cb1f61c0 Stop using rtc_event.h forward header
Bug: webrtc:10206
Change-Id: I16905ec745673178195d6715fda6175c31500163
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151601
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29149}
2019-09-11 08:20:29 +00:00
Florent Castelli
1067d31022 Make the stable target rate always less or equal than the target rate
This behavior seems to conform to expectations from the rate allocators,
using this signal to chose which layers to enable and then distributing
the remaining bandwidth to the activated layers.

Bug: webrtc:10126
Change-Id: If0e1b27dc672ec2fbb30a5f5ac734e5ed4b42e45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151306
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29065}
2019-09-04 13:56:50 +00:00
Bjorn Terelius
602942f14c Filter out small packets from delay-based overuse detection.
The change is behind a field trial. The intention is to use this
to (heuristically) base the bandwidth estimate only on video packets
even if both audio and video packets have transport sequence numbers.

Bug: webrtc:10932
Change-Id: I6cc5bb9ab6f1a3f25b84ee6ac78e4abb4112032e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150787
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29031}
2019-09-01 17:57:01 +00:00
Florent Castelli
4e615d590a Wire the stable target bitrate from GoogCC to the BitrateAllocator
Deprecated the field BitrateAllocationUpdate::link_capacity since it is only
used by the Opus codec in order to smooth the target bitrate, which is
equivalent to the stable_target_bitrate field.

The unused field trial WebRTC-Bwe-StableBandwidthEstimate is also removed.

Bug: webrtc:10126
Change-Id: Ic4a8a9ca4202136d011b91dc23c3a27cfd00d975
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149839
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28941}
2019-08-22 15:25:15 +00:00
Konrad Hofbauer
fdf38802a6 Make "WebRTC-BweAllocProbingOnlyInAlr/Enabled/" default and remove key.
Bug: chromium:951299
Change-Id: Idf612040e21f2962cc63d7de3dcb237bbf868034
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148985
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Konrad Hofbauer <hofbauer@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28902}
2019-08-19 15:39:25 +00:00
Sebastian Jansson
3aa0d76cb0 Use struct parser for AlrDetector config.
Bug: webrtc:9883
Change-Id: Ib58fa5ba87607a268f4960898625b1a5adcab69a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148596
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28862}
2019-08-14 18:23:05 +00:00
Niels Möller
5297cf368d Delete unused class MockTargetTransferRateObserver
Bug: None
Change-Id: I60e9dc05450207dfd572ae17a42cf1adaed4c1b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148525
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28813}
2019-08-09 06:15:06 +00:00
Danil Chapovalov
83bbe91398 Delete deprecated rtc_event_log header
Bug: webrtc:10206
Change-Id: I9ed3148843c647372993729b87c0e74741ab540b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147870
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28791}
2019-08-07 10:58:17 +00:00
Evan Shrubsole
7db19e0b02 Report congestion window updates on GoogCC time updates
In https://webrtc-review.googlesource.com/c/src/+/138275
the congestion window was recalculated during OnProcessInterval, as
to consider the case when downlink is down. However, this update
was not propagated to the congestion window pusback controller,
nor returned in the update.

This patch fixes that issue, as well as adding two tests to ensure
the behaviour works as expected.

Bug: None
Change-Id: Ic126d929dc7a7a3393a2f34a4682eea1ee1f2240
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146704
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28667}
2019-07-24 14:49:59 +00:00
Evan Shrubsole
55c4a42099 Add congestion window values to GoogCcPrinter
Bug: None
Change-Id: I9a31e9783f3ea8482281285c8454e24eb15f0925
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146706
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#28661}
2019-07-24 13:27:16 +00:00
Sebastian Jansson
22ff9fc6bc Removes overuse predictor.
It's not currently used and it complicates receive side estimation.

Bug: webrtc:10742
Change-Id: Iaa3c86807c7b637aea3ff393e728dc91eac23db6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145724
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28623}
2019-07-19 15:22:25 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Sebastian Jansson
49167de0be Adds interface for remote network estimates to NetworkControllerInterface.
Bug: webrtc:10742
Change-Id: I593fc17ce5d42c5dc17fd289f0621230319f9752
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144039
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28405}
2019-06-27 16:57:32 +00:00
Sebastian Jansson
88290ae358 Reland "Cleanup of RTP references in GoogCC implementation."
This is a reland of fa79081dca

It crashed due to inability to handle small timestamps in probe
estimator. This was fixed by moving history window check to avoid
subtracting from the timestamp.

Original change's description:
> Cleanup of RTP references in GoogCC implementation.
>
> As the send time congestion controller now has been removed,
> we don't need the RTP related constructs anymore.
>
> Bug: webrtc:9510
> Change-Id: I02c059ed8ae907ab4672d183c5639ad459b581aa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142221
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28330}

Bug: webrtc:9510
Change-Id: I3bf91222068e4fbb6aa159bfeb7a73e00bb6a0d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143165
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28347}
2019-06-24 09:10:52 +00:00
Sebastian Jansson
7953ad5dab Revert "Cleanup of RTP references in GoogCC implementation."
This reverts commit fa79081dca.

Reason for revert: Breaks downstream project.

Original change's description:
> Cleanup of RTP references in GoogCC implementation.
> 
> As the send time congestion controller now has been removed,
> we don't need the RTP related constructs anymore.
> 
> Bug: webrtc:9510
> Change-Id: I02c059ed8ae907ab4672d183c5639ad459b581aa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142221
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28330}

TBR=terelius@webrtc.org,srte@webrtc.org

Change-Id: I562365fc5d1da68326d603338ccc6371114d7e12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9510
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143164
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28331}
2019-06-20 10:21:51 +00:00
Sebastian Jansson
fa79081dca Cleanup of RTP references in GoogCC implementation.
As the send time congestion controller now has been removed,
we don't need the RTP related constructs anymore.

Bug: webrtc:9510
Change-Id: I02c059ed8ae907ab4672d183c5639ad459b581aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142221
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28330}
2019-06-20 10:08:29 +00:00
Sebastian Jansson
5740afa0a4 Removes SimulatedTimeClient
Bug: webrtc:9883
Change-Id: Id6e760b37360e7dafc67ded99e06128be20797d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141417
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28269}
2019-06-13 15:37:10 +00:00
Sebastian Jansson
f3f57700a8 Using full scenario test client for loss based control test.
Bug: webrtc:9883
Change-Id: I7c3b2561ddba846e4cdde05e1067679ada14ad80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141405
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28267}
2019-06-13 14:44:09 +00:00
Sebastian Jansson
28aced5c3c Adds debug logs for loss based controller.
Bug: webrtc:9883
Change-Id: I525d88b1eba22f6198da04b1e18c26ec4a15c42d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141406
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28230}
2019-06-11 13:08:55 +00:00
Sebastian Jansson
b13ccc5288 Adds TCP fairness test to GoogCC.
Bug: webrtc:9883
Change-Id: Ie78e51edb08f6c22dbf02168b1d3b067b2c0c55e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140293
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28193}
2019-06-07 11:52:03 +00:00
Jonas Olsson
944dacec25 Make interval budget use ratio instead of percent
All usages compare the budget usage to ratios, so we can skip a few
multiplications.

Bug: webrtc:10719
Change-Id: I0205d74762043d972c087c152915e4fdd9510057
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140289
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28190}
2019-06-07 08:53:57 +00:00
Christoffer Rodbro
b3b3e3f632 Add acked bandwidth estimator config for sample uncertainty in ALR.
Change-Id: Ie01d66d459f704e7fa99b439dd6f917e4e41cead
Bug: webrtc:10698
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139106
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28105}
2019-05-29 13:08:53 +00:00
Sebastian Jansson
0b97e177e1 Cleanup of CongestionWindowDownlinkDelay trial.
Bug: webrtc:9883
Change-Id: If77fdad610149c01d72891d4a9f61b61006b21ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138827
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28087}
2019-05-28 14:16:44 +00:00
Ying Wang
8b27910cbc Include downlink delay into congestion window size.
Change-Id: I33db0c8134b6b3181a7b3abcf32a622a89ff3ab4

Bug: webrtc:10688
Change-Id: I33db0c8134b6b3181a7b3abcf32a622a89ff3ab4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138275
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28079}
2019-05-27 16:07:19 +00:00
Jonas Olsson
2e8d78ce42 Allow overriding subsets of probing field trials
The probe configuration is currently a single field trial. To allow
multiple experiments with non-overlapping subsets of these keys I've
added a few extra keys that override different subsets of the config.

Bug: webrtc:10394
Change-Id: I54ffd1105129794fcdae4cce314910acaa4074af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138274
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28076}
2019-05-27 13:43:45 +00:00
Sebastian Jansson
acab559c7b Adds overuse predictor to GoogCC.
Bug: webrtc:10498
Change-Id: Ic97c16d28cbc1e30609f6c1daa3a61423d44641c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136924
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28012}
2019-05-21 16:50:39 +00:00
Sebastian Jansson
871ac42597 Refactor of GoogCC debug printer.
Simplifying the code to better fit with how it is used.

Bug: webrtc:9883
Change-Id: I2bd52f26b829413e516dee4f551cf36574275019
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136681
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27994}
2019-05-20 18:40:26 +00:00
Per Kjellander
eb9bf411f3 Fix problem in WebRTC-Bwe-AlrLimitedBackoff experiment
When backing down, the delay based estimator can still use acked bitrate instead of the last set estimate.

Original code was reviewed in:
https://webrtc-review.googlesource.com/c/src/+/113880

BUG=webrtc:10144

Change-Id: Ia6e2d6d7d05f88f7e51d61b6e37c61a89adccf8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135950
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27912}
2019-05-10 13:58:27 +00:00
Per Kjellander
b600de286e Provide AlrDetector with event log in GoogCC.
BUG=webrtc:10596

Change-Id: Ifd02419c6880dd55e18c46ec07976f1dde66bad7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135124
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27844}
2019-05-03 13:24:15 +00:00
Sebastian Jansson
e847481dc8 Adds debug printing of network estimate.
Bug: webrtc:10498
Change-Id: Idce952675ef079b5981f973ca58ca2cd7e5d5332
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134648
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27838}
2019-05-03 10:08:46 +00:00
Sebastian Jansson
2db5fc00c0 Deprecating injection of event log into GoogCC factory.
Bug: webrtc:9883
Change-Id: I6087b4a0a2c934e6a9ab435fffaf2eb1fc2a29e4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134644
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27824}
2019-05-02 11:05:17 +00:00
Per Kjellander
a7caaf07a1 Change AlrDetector to be able to set field trials that only affect AlrDetector
Bug: webrtc:10542
Change-Id: If7cb4086dfcfb313c6ffc0b8f662b8eae5bd4355
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134200
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27804}
2019-04-29 13:46:35 +00:00
Sebastian Jansson
7ccaf8969d Cleanup of network controller handling in Scenario tests.
Removing functionality to choose congestion controller implementation,
using injection instead. Also cleaning up some related functionality
that's no longer needed, such as the injection of event logs into the
factory.

Bug: webrtc:9883
Change-Id: Ia528005625430ae31a15bc88881e2d4ac6ad1d42
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133890
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27768}
2019-04-25 12:40:00 +00:00
Sebastian Jansson
5e3d0f88c8 Moves trendline estimation configuration to trendline_estimator.cc
Bug: webrtc:9883
Change-Id: I5b2139de0c085e1c5ec7c55b5c5ff9a95067e170
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134205
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27767}
2019-04-25 12:27:19 +00:00
Per Kjellander
416d5db75d Add field trial to AimdRateController to only increase while not in ALR
The idea is that when ALR is detected, the encoder can not produce the bitrate
needed for the delay based estimator to detect overuse and thus the delay based
estimator should not be allowed to increase further.
Likewise, if ALR is not detected, the delay based estimator is allowed to
increase the BWE to ensure that there is no region where the BWE can get stuck.

BUG=webrtc:10542

Change-Id: Ic94b708461c9077fd09132ee4ecb6279ffcd5f99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133190
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27661}
2019-04-17 12:05:24 +00:00
Per Kjellander
494947bbcf Remove direct use of FieldTrials from modules/remote_bitrate_estimator
Instead use WebRtcKeyValueConfig and FieldTrialBasedConfig

BUG=webrtc:10335

Change-Id: Ie148cb466f86d8fa1ded5c7f125fbcccf6e7dbe3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132714
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27642}
2019-04-16 13:23:12 +00:00
Sebastian Jansson
df88cc014a Allow injection of network estimator into GoogCC.
Bug: webrtc:10498
Change-Id: Ie9225411db201dfcfa0a37a3c40992acbdc215bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132402
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27624}
2019-04-15 14:12:08 +00:00
Sebastian Jansson
ef86d1413e Refactor of SimulationNode.
This prepares for using network emulation manager in Scenario tests.

Bug: webrtc:9510
Change-Id: I6ae1b21790d0bcd2b01a3b293231d0859afc1ac8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132719
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27623}
2019-04-15 14:11:00 +00:00
Per Kjellander
5b69873cb5 Remove direct use of FieldTrials from AlrDetector
Instead use WebRtcKeyValueConfig and FieldTrialBasedConfig.
The purpose is to allow a user of GoogCC to use different settings on different instances.

BUG=webrtc:10335

Change-Id: I2f837688c9fdd341eecb44484cc784b1c80da1a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132791
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27617}
2019-04-15 12:11:36 +00:00
Evan Shrubsole
ae68ea0008 Reland "Add new field trial for controlling congestion window settings"
This is a reland of dd33d8ec71

Original change's description:
> Add new field trial for controlling congestion window settings
>
> Bug: None
> Change-Id: Idb7425e394db74a9dfb4f3764a58710497adff56
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131127
> Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Cr-Commit-Position: refs/heads/master@{#27538}

TBR=mflodman@webrtc.org,crodbro@webrtc.org

Bug: None
Change-Id: Icee2efb90e219ef2c3384ad84498fd6938a98e56
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132400
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27550}
2019-04-10 16:49:08 +00:00
Ying Wang
0810a7c25a Add base class NetworkPredictor and NetworkPredictorFactory and wire up.
Add base class NetworkPredictor and NetworkPredictorFactory in /api, make it possible to inject customized NetworkPredictor in PeerConnectionFactory level. The NetworkPredictor object will be pass down to GoogCCNetworkControl and DelayBasedBwe.

Bug: webrtc:10492
Change-Id: Iceeadbe1c9388b11ce4ac01ee56554cb0bf64d04
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130201
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27543}
2019-04-10 12:38:58 +00:00
Evan Shrubsole
bd167cf140 Revert "Add new field trial for controlling congestion window settings"
This reverts commit dd33d8ec71.

Reason for revert: Breaks upstream tests

Original change's description:
> Add new field trial for controlling congestion window settings
>
> Bug: None
> Change-Id: Idb7425e394db74a9dfb4f3764a58710497adff56
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131127
> Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Cr-Commit-Position: refs/heads/master@{#27538}

TBR=mflodman@webrtc.org,crodbro@webrtc.org,eshr@google.com

Change-Id: I17c6c2ed109f4427657457065abe186ec8b3d10c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132322
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27541}
2019-04-10 12:18:38 +00:00
Konrad Hofbauer
25f35a8fa5 Add FieldTrial to only send probes on OnMaxTotalAllocatedBitrate()
if currently sent bitrate is application-limited.

Bug: chromium:951299
Change-Id: Ibc1ebd74eaa4a019dc290c11b606796c5be21d0f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131126
Commit-Queue: Konrad Hofbauer <hofbauer@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27539}
2019-04-10 11:23:35 +00:00
Evan Shrubsole
dd33d8ec71 Add new field trial for controlling congestion window settings
Bug: None
Change-Id: Idb7425e394db74a9dfb4f3764a58710497adff56
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131127
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#27538}
2019-04-10 10:52:51 +00:00
Mirko Bonadei
6a489f22c7 Fully qualify googletest symbols.
Semi-automatically created with:

git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format

After this, two .cc files failed to compile and I have fixed them
manually.

Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
2019-04-09 17:18:20 +00:00
Sebastian Jansson
ebd94f6df1 Using simulated time for GoogCC tests.
Bug: webrtc:10365
Change-Id: I482e544f1585fdb54dc49740ba81870104dd58a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130509
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27468}
2019-04-05 15:58:29 +00:00
Sebastian Jansson
d98cbd8f91 Moves send side bandwidth estimation bandwidth cap inside class.
Bug: webrtc:9883
Change-Id: I0bcfacccf522de1a7276c5bee07418159c57e514
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130495
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27421}
2019-04-02 18:03:04 +00:00
Sebastian Jansson
5b84f67fba Cleaner reading of field trials in GoogCcNetworkController.
Bug: webrtc:9883
Change-Id: Ib871dfdef6221f2a231f6862edec6ed7db684613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130515
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27420}
2019-04-02 17:58:09 +00:00
Niels Möller
9d8eaac4ee Delete unneeded direct includes of common_types.h
And delete corresponding dependencies on :webrtc_common. After this
change, common_types.h is included directly only from code in the
following directories:

api/
api/video/
api/video_codecs/
common_video/libyuv/include/
media/base/
modules/remote_bitrate_estimator/
modules/rtp_rtcp/source/
modules/video_coding/codecs/vp9/

There remains plenty of indirect dependencies on the types declared in
common_types.h, but the fewer direct dependencies should make it
easier to find the proper place for each type.

Bug: webrtc:5876
Change-Id: I93e8f214025ecb613c19fdec2015bd3f96c59aae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130501
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27376}
2019-04-01 07:18:13 +00:00
Christoffer Rodbro
ed2207abee Introduce a configurable "critical low" bandwidth in AIMD rate control.
When a bandwidth decrease to the estimated throughput would lead to
the "critical low" region we allow dropping to the link capacity
estimate instead (if it is higher).
Also moved BweInitialBackOffInterval config to the same field trial
string.

Bug: webrtc:10462
Change-Id: I4d6ee020a9ab8cede035b64253e3b3b1e2fb92b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129920
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27325}
2019-03-27 19:37:05 +00:00
Christoffer Rodbro
53c75cff2e Fix for acknowledged bitrate estimator getting stuck at low bandwidth.
Problem seems to be that once the estimate drops, "sample_uncertainty"
becomes very large, and it therefore takes a long time to recover.
Fix is under config for further downstream verification.

Bug: webrtc:10462
Change-Id: I5c2035f06e8a5088db0f0cb6ca511ef900e07645
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128902
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27320}
2019-03-27 16:16:37 +00:00
Jonas Olsson
01d3618a75 Make the OnMaxTotalAllocation probes configurable.
This CL allows us to control how many probes we send when the bandwidth
allocation is updated, and how big they are.

Bug: webrtc:10394
Change-Id: I19e40740a528f83384b65d7509295034cc9a3031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129904
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27317}
2019-03-27 16:10:17 +00:00
Christoffer Rodbro
4bd3177ae5 Reland "Avoid calling OnRoundTripTimeUpdate with invalid RTTs."
This is a reland of afa61c94e5

Original change's description:
> Avoid calling OnRoundTripTimeUpdate with invalid RTTs.
> 
> Bug: none
> Change-Id: Ic19b87ad7094465da6091d0e99b10a6d1b7d2e58
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128776
> Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27308}

Bug: none
Change-Id: Ic5669a27ea66ab0c207556c54bb595c83850ffd3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129924
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27315}
2019-03-27 15:07:11 +00:00
Jonas Olsson
24923e8cfa Make some constants in the bitrate prober configurable.
This lets us change how many bytes and packets goes into the probes, as
well as some other things.

Bug: webrtc:10394
Change-Id: I26bb26a644e6f00366e9275228760c8744d63735
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128424
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27312}
2019-03-27 13:50:35 +00:00
Christoffer Rodbro
7b6acd68ee Revert "Avoid calling OnRoundTripTimeUpdate with invalid RTTs."
This reverts commit afa61c94e5.

Reason for revert: Breaks a downstream test.

Original change's description:
> Avoid calling OnRoundTripTimeUpdate with invalid RTTs.
> 
> Bug: none
> Change-Id: Ic19b87ad7094465da6091d0e99b10a6d1b7d2e58
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128776
> Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27308}

TBR=srte@webrtc.org,crodbro@webrtc.org

Change-Id: Ic4c516d3325050858ac99731f6d25181fb40b7bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129922
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27309}
2019-03-27 12:52:48 +00:00
Christoffer Rodbro
afa61c94e5 Avoid calling OnRoundTripTimeUpdate with invalid RTTs.
Bug: none
Change-Id: Ic19b87ad7094465da6091d0e99b10a6d1b7d2e58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128776
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27308}
2019-03-27 12:13:25 +00:00
Sebastian Jansson
7db3bb95dc Revert "Remove rtc::TimeMillis() call from ALR detector."
This reverts commit 2c7964832e.

NOTE: Build file changes had to be manually reverted to avoid
merge conflict.

Reason for revert: Bad interaction with Chromium issue.

Original change's description:
> Remove rtc::TimeMillis() call from ALR detector.
>
> We want to avoid system clock dependencies in congestion
> controllers as it makes it harder to test them. This CL removes
> a rtc::TimeMillis() call from the AlrDetector class and removes
> dependencies on rtc_base_approved as it exposes time_utils.h.
>
> Bug: None
> Change-Id: Ie50a27399c05a0c50cdc17ad142db884b94ee918
> Reviewed-on: https://webrtc-review.googlesource.com/c/124491
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26879}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:942752
Change-Id: I7fc4391f16779ebb5d3c72a058fc72a3e4c64bce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129440
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27267}
2019-03-25 14:08:53 +00:00
Sebastian Jansson
9debe5aee4 Deleting copy constructors for Scoped* classes.
Bug: webrtc:10365
Change-Id: Ia670b7b1ac72eb19f9e30228fd023601e2fb8a88
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128901
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27259}
2019-03-25 09:05:29 +00:00
Artem Titov
94b57c044e Cleanup BUILD.gn files from imports like foo:foo
Repalce all occurrences of foo:foo in deps with just foo in BUILD.gn
files.

Done with Sublime regex replace.
Find: \b([-a-zA-Z0-9_]+):+\1\b
In: *.gn
Replace with: \1

Bug: None
Change-Id: I40aba1b14face687a595b852ffe443cb20197611
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127899
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27225}
2019-03-21 13:05:28 +00:00
Artem Titov
533a9fec55 Clean BUILD.gn files: remove extra :memory
Use //third_party/abseil-cpp/absl/memory instead of
//third_party/abseil-cpp/absl/memory:memory in BUILD.gn files.

Bug: None
Change-Id: I47c915f0847b102b37c5b38009c91b315cd3a1b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128615
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27222}
2019-03-21 12:09:50 +00:00
Sebastian Jansson
7dbc0eb2ef Makes loss based controller test more robust.
Current implementation of loss based controller has a sensitive filter.
This CL increases the moderate loss rate to ensure robustness to small
changes in network behavior.

Bug: webrtc:10365
Change-Id: I0dcb5ba45904d8dda4c78b39bd13619523bc90ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127901
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27160}
2019-03-18 12:21:11 +00:00
Magnus Jedvert
35816cc9a1 Revert "Log an error if the RTT is negative"
This reverts commit a594ef0893.

Reason for revert: This log is triggered more than 10,000 times per run, spamming the log output to the extent that tests start failing with EXCESSIVE_OUTPUT.

The tests are chromium.webrtc.fyi tests:
 * WebRtcStressResolutionSwitchBrowserTest.MANUAL_SurvivesPeerConnectionResolutionSwitching
 * WebRtcStressPauseBrowserTest.MANUAL_SurvivesPeerConnectionVideoPausePlaying
on linux, win, and mac.

Example run: https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Linux%20Tester/2556

Original change's description:
> Log an error if the RTT is negative
> 
> Bug: webrtc:10407
> Change-Id: I5479cb2b7163c6e9e58854f4ffa7976b3d606da5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127568
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27122}

TBR=srte@webrtc.org,eshr@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10407
Change-Id: Ida2572b722b92bae4893d4567597dd21d1df54b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128120
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27144}
2019-03-15 13:11:24 +00:00
Evan Shrubsole
a594ef0893 Log an error if the RTT is negative
Bug: webrtc:10407
Change-Id: I5479cb2b7163c6e9e58854f4ffa7976b3d606da5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127568
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27122}
2019-03-14 08:44:09 +00:00
Sebastian Jansson
5ce38fff17 Making UpdatesTargetRateBasedOnLinkCapacity more robust.
This CL adds enough simulated time to recover the built up delay. This
makes the test less sensitive to small timing changes. This prepares
for further changes in Scenario test framework.

Bug: webrtc:10365
Change-Id: Iddbe6a57e31f17f590004e29221f907321cbb3d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127567
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27107}
2019-03-13 15:36:55 +00:00
Seth Hampson
bd50a84336 Revert "Reland "DCHECK feedback_rtt is positive""
This reverts commit ab0d03dcaa.

Reason for revert: Broke webrtc importer.

Original change's description:
> Reland "DCHECK feedback_rtt is positive"
> 
> This is a reland of 37d4f91db3
> Reason for reland: Got Aliby for Android FEC test flakes.
> 
> Original change's description:
> > DCHECK feedback_rtt is positive
> >
> > Bug: None
> > Change-Id: I6eb10d6a20a679fff08f604441f8e58dcd417608
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126464
> > Commit-Queue: Evan Shrubsole <eshr@google.com>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27034}
> 
> Bug: None
> Change-Id: Iacacda9e3b141c69189f7931a1ec63d74b2dd845
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126920
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Ying Wang <yinwa@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27082}

TBR=srte@webrtc.org,yinwa@webrtc.org,yvesg@webrtc.org,yvesg@google.com,eshr@google.com

Change-Id: Ia59f20019309c1e0b44029179d63558e92d39a85
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127324
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27085}
2019-03-12 19:40:25 +00:00
Evan Shrubsole
ab0d03dcaa Reland "DCHECK feedback_rtt is positive"
This is a reland of 37d4f91db3
Reason for reland: Got Aliby for Android FEC test flakes.

Original change's description:
> DCHECK feedback_rtt is positive
>
> Bug: None
> Change-Id: I6eb10d6a20a679fff08f604441f8e58dcd417608
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126464
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27034}

Bug: None
Change-Id: Iacacda9e3b141c69189f7931a1ec63d74b2dd845
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126920
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27082}
2019-03-12 17:00:51 +00:00
Jonas Olsson
e096004745 Enable configuring probes via field trial.
This CL adds a field trial that lets us control the size of the initial probes, how we grow the following probes and how big and frequent our ALR probes are.

Bug: webrtc:10394
Change-Id: I6c7783dfada9aaf55cd836dd8991bb7b8ca4993b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126880
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27077}
2019-03-12 14:27:18 +00:00
Sebastian Jansson
8a0c1f58cc Don't reset bitrate when allocatable minimum changes.
This fixes an issue where the time between freezes dropped in
perf tests. This was triggered by resetting and updating the bitrates
immediately if the min allocatable bitrate changed, causing a drop in
target bitrate. With this CL, the change in min bitrate will not take
effect until we get more data.

Bug: chromium:940349
Change-Id: Ia680a5f1cfe71847ef90669987e7b89b240b9524
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126625
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27054}
2019-03-11 11:46:38 +00:00
Yves Gerey
c0c3e966d3 Revert "DCHECK feedback_rtt is positive"
This reverts commit 37d4f91db3.

Reason for revert: Breaks downstream Android projects.

Original change's description:
> DCHECK feedback_rtt is positive
> 
> Bug: None
> Change-Id: I6eb10d6a20a679fff08f604441f8e58dcd417608
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126464
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27034}

TBR=srte@webrtc.org,yinwa@webrtc.org,eshr@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: None
Change-Id: I412cc3bf9fd6991d3afa68c0fd9289bfc84a98cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126622
Reviewed-by: Yves Gerey <yvesg@google.com>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#27047}
2019-03-10 11:00:37 +00:00
Evan Shrubsole
37d4f91db3 DCHECK feedback_rtt is positive
Bug: None
Change-Id: I6eb10d6a20a679fff08f604441f8e58dcd417608
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126464
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27034}
2019-03-08 13:04:41 +00:00
Sebastian Jansson
06b77f9d8f Use min allocatable bitrate as lower bound for target bitrate.
Bug: None
Change-Id: Iee060064bb35bc916dcf2744d969ccd512bf8973
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126004
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27018}
2019-03-07 14:18:35 +00:00