Commit graph

379 commits

Author SHA1 Message Date
Jared Siskin
c018bae807 Format /modules
git ls-files | grep -e  "\(\.h\|\.cc\)$" | grep -e  "^modules/" | xargs clang-format -i ; git cl format
after landing: add to .git-blame-ignore-revs

Bug: webrtc:15082
Change-Id: I2c3cd28740062794f8c10e39d8406aadb9e9a35a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Jared Siskin <jtsiskin@meta.com>
Cr-Commit-Position: refs/heads/main@{#39901}
2023-04-20 02:02:45 +00:00
Per K
b812b7a86b Delay probes after route change until transport is writable
Ensure probes are not created until after the transport becomes writable even if the network route change.
DTLS negotiation must complete before there is a point in sending probes.

Bug: webrtc:14928
Change-Id: Ib3cb93aef9f38e306b094dd700ed595cf9eb3f32
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301362
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39870}
2023-04-17 10:18:34 +00:00
Danil Chapovalov
1821faaa6c Cleanup AimdRateControl interface and unittests
Pass FieldTrialsView by const& to note it can't be null and doesn't need to outlive the constructor
In unittests use AimdRateControl object directly instead of through helpers
Use unit types (TimeDelta, DataRate) directly, reducing their conversion to plain numbers
Replace SimulatedClock with a single Timestamp now variable or constant

Bug: None
Change-Id: I147f85e629b4d8923aa19896ea211a6f9dca1e68
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299260
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39707}
2023-03-28 16:43:24 +00:00
Diep Bui
980c6bc09f Update loss based bwe - probe integration.
Instead of use probe_bitrate as the bandwidth estimate, the change uses probe bitrate as the bandwidth limit.

The experiment is not started, so it does not affect production.

Bug: webrtc:12707
Change-Id: Iefd8cdfe87983057489e551816bf5d4cb38f7c9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296040
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39603}
2023-03-20 11:14:46 +00:00
Diep Bui
5ece09b2db Init delay_detector_state to be kNormal
Bug: webrtc:14933
Change-Id: If667aac639ebd23b4aa2bb857d7db12c5cfefcae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294700
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39379}
2023-02-23 11:59:54 +00:00
Diep Bui
14e2779a6c Do not use acknowledge bitrate for backing off in alr.
Without the flag enabled: https://screenshot.googleplex.com/BZ6fqsNHQAUxbyU

With the flag enabled: https://screenshot.googleplex.com/4GKrfvAdUpsQDx9

Bug: webrtc:12707
Change-Id: Ia1a9761aeaedc57cff6a2d1eca3c61519b9dd26e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293660
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39372}
2023-02-22 14:38:23 +00:00
Diep Bui
2badc0907e Fix pending time calculation in goog_cc.
Packet pending time should be diffed between max_revc_time and receive time as it is done at line 436. The current implementation makes pending time to be negative.

Bug: webrtc:14850
Change-Id: Ie6590ef11caa67254750591abb6bf72679d76941
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292461
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39311}
2023-02-15 09:55:12 +00:00
Diep Bui
4dd3260698 Do not probe if rtt is higher than the limit defined in RTTBasedBackoff
Bug: webrtc:14754
Change-Id: If7e0426fb8e568e3d51a767df12500f181fa86d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292841
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39308}
2023-02-14 08:53:23 +00:00
philipel
b02a8f5a7c Remove expired MidCallProbing metrics.
Bug: chromium:1039328
Change-Id: I60c931f5996579c140b00c09772912bbd2842b8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287682
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38879}
2022-12-13 10:36:33 +00:00
Diep Bui
c1080dc884 Do not send probes if network is either overusing or underusing.
Bug: webrtc:14754
Change-Id: I795eaafd846cc70efac3cf1af4226b387196020d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287021
Commit-Queue: Diep Bui <diepbp@google.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38856}
2022-12-09 08:20:45 +00:00
Diep Bui
e04726281c Update default param values of loss based bwe v2.
This will enable loss based bwe v2 by default. The default params were used in Chrome experiment and got positive result. Remove some tests in goog_cc, which are for loss based bwe v1.


Bug: webrtc:12707
Change-Id: Ice126a128f6e8cea8b861f879d09e390ee69e521
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285740
Commit-Queue: Diep Bui <diepbp@google.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38851}
2022-12-08 14:17:27 +00:00
Per Kjellander
e0b4cab69c Remove default enabled field trial WebRTC-SendSideBwe-WithOverhead
Bug: webrtc:6762
Change-Id: I520188a13ee5f50c441226574ccb3df54f842835
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285300
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38783}
2022-11-30 20:19:36 +00:00
Per Kjellander
a7013ee650 Remove unused field trial WebRTC-Bwe-LossBasedStableRate
Originally submitted here: https://webrtc.googlesource.com/src/+/350a82aec3556cfab385e41b67ab4f26f2fb0151

Bug: None
Change-Id: Id464770b089122e2cf13ce2d841f7114aa9eb9d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284942
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38726}
2022-11-24 15:02:11 +00:00
Diep Bui
34f4ec26e3 Fix the loss based bwe state.
When best candidate estimate increases above the delay based estimate, the state should be DelayBasedEstimate because the final esimate is bounded by delay based bwe anyway.

Bug: webrtc:12707
Change-Id: I0bcae684b33e5f1e9a7c57cb32c431b4eb58fd35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283802
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38677}
2022-11-18 11:50:39 +00:00
Diep Bui
d2811761e3 Probe when bandwidth is loss limited and the estimate is increasing.
Add loss_limited_probe_scale as a scale factor which decides how much we  should probe when bandwidth is loss limited.

Bug: webrtc:12707
Change-Id: I194b2b40c9a7861d82b61585bcaf484ab228eedb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281360
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38636}
2022-11-16 08:34:55 +00:00
Diep Bui
c40cf325b7 Remove flag PaceAtLossBaseBweWhenLoss as it is not used.
Change-Id: Ie08745e302c1fe582d4ed3b86e96d7a95d021d78
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283361
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38632}
2022-11-15 23:34:04 +00:00
Diep Bui
7d8d64323c Bound loss based estimate by upper link capacity when bandwidth is loss limited.
Motivation: loss based ramp-up can be incorrect when (1) bandwidth is loss limited, and (2) delay based estimate might be incorrect due to no delay signals. Therefore, bounding the loss based estimate by the delay based estimate is not much helpful in those cases.
Thus strengthening the bounding logic by using upper link capacity is one of solutions to avoid incorrect ramp-up.

Without the change: screen/qmLedxapJWvUTmn
With the change: screen/8sQcksWa6CptywK

Bug: webrtc:12707
Change-Id: I32ba82693b3ffa83cbb89c2cc9690fe16fb10c78
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283085
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38626}
2022-11-15 14:53:05 +00:00
Per Kjellander
6b0aea07ab Reland "Continue probing if networkstat estimate increase""
Patchset 1 contrains the original cl.
Later patchsets contain fix.

Original description:
Continue probing if networkstat estimate increase

This fixes an issue where continues probing stops if networkstate estimate is low when a probe is sent, but increase as a consequence of the probe.

Bug: webrtc:14392
Change-Id: I8d4e1968020f9f8de18e12a4a0322a87f1a8fd2f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283082
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38612}
2022-11-11 16:54:42 +00:00
Per Kjellander
95c950af03 Revert "Continue probing if networkstat estimate increase"
This reverts commit dd7dc25a30.

Reason for revert: Bug in CL. Continuously probe if experiment for probing based on the link capacity is enabled. 

Original change's description:
> Continue probing if networkstat estimate increase
>
> This fixes an issue where continues probing stops if networkstate estimate is low when a probe is sent, but increase as a consequence of the probe.
>
>
> Bug: webrtc:14392
> Change-Id: Id1d703f7efc824a6a6f8d899c367660291bd88c8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282941
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38606}

Bug: webrtc:14392
Change-Id: Ib241b190951a78c436188c0b83d0247bf7d0dddd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283080
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38609}
2022-11-11 08:07:42 +00:00
Per Kjellander
dd7dc25a30 Continue probing if networkstat estimate increase
This fixes an issue where continues probing stops if networkstate estimate is low when a probe is sent, but increase as a consequence of the probe.


Bug: webrtc:14392
Change-Id: Id1d703f7efc824a6a6f8d899c367660291bd88c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282941
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38606}
2022-11-10 14:45:33 +00:00
Diep Bui
3d7771cc08 Clean up loss based bwe v2: store delay based estimate locally.
This is to avoid passing delay based estimate value twice from send side  bwe.

Bug: webrtc:12707
Change-Id: Idc77cf7c2f4ecc60ae1dcfead325320532e7a7ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282864
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38600}
2022-11-10 10:21:08 +00:00
Per Kjellander
01e8a2ad7c Refactor use of ProbeController::OnMaxTotalAllocatedBitrate
Instead of disabling probing when the total allocated bitrate has
changed in goog_cc, it can be done via a new field trial parameter,
"probe_max_allocation". Not that the currently used flag
RateControlSettings::TriggerProbeOnMaxAllocatedBitrateChange() is per
default enabled and will be cleaned up in a follow up cl.

The field trial flag "skip_if_est_larger_than_fraction_of_max" now also
skip probing if the current estimate is larger than the currently max
allocated bitrate. ie, alr probing is skippe if the current estimate >
max configured bitrate or current estimate > max send bitrate of all
streams.

Bug: webrtc:14392
Change-Id: I2a09be39f85a9122410edd5acb1158ece12fca60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282860
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38597}
2022-11-09 22:40:08 +00:00
Per Kjellander
e73a8b662f Use loss based state to inform probe controller
Instead of trying to guess the state from the loss based estimator by
looking at the estimate, use the state.


Bug: webrtc:14392
Change-Id: Ibf6e762f02bfbfff175f2aa2bc98f45b1c5beb1a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282823
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38589}
2022-11-09 11:48:18 +00:00
Diep Bui
8850aecb45 Probing integration in loss based bwe 2.
Previously, cleanup in GetCandidateBandwidthUpperBound in loss_based_bwe_v2.cc causes unbounded bandwidth estimate. It leads to many warning logs being printed out at loss_based_bwe_v2.cc:95.
However, the cleanup is still necessary because the param bandwidth_rampup_upper_bound_factor is not used in current launches.

To fix the infinite estimate, we set max_bitrate in loss based bwe, which is derived from goog_cc, and not allow the estimate to go above that value.

*** Original change description ***
* Revert "Probing integration in loss based bwe 2." (diepbp@webrtc.org)
* https://webrtc-review.googlesource.com/c/src/+/277400
***

Bug: webrtc:12707
Change-Id: If0cd16daba4a4941043a1610edca2a13c9564328
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281280
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38574}
2022-11-08 06:31:50 +00:00
Mirko Bonadei
248fdb16ba Reland "Add documentation, tests and simplify webrtc::SimulatedNetwork."
This is a reland of commit c1d5fda22c

Original change's description:
> Add documentation, tests and simplify webrtc::SimulatedNetwork.
>
> This CL increases the test coverage for webrtc::SimualtedNetwork, adds
> some more comments to the class and the interface it implements and
> simplify the logic around capacity and delay management in the
> simulated network.
>
> More CLs will follow to continue the refactoring but this is the
> ground work to make this more modular in the future.
>
> Bug: webrtc:14525, b/243202138
> Change-Id: Ib0408cf6e2c1cdceb71f8bec3202d2960c5b4d3c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278042
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38388}

Bug: webrtc:14525, b/243202138, b/256595485
Change-Id: Iaf8160eb8f8e29034b8f98e81ce07eb608663d30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280963
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38557}
2022-11-06 13:14:26 +00:00
Per Kjellander
1639787400 Reland "Periodically probe if current estimate lower than a ratio of NetworkState estimate"
This reverts commit e02fbb040e.

Reason for revert: Downstream tests temporalily disabled.

Original change's description:
> Revert "Periodically probe if current estimate lower than a ratio of NetworkState estimate"
>
> This reverts commit c371a13273.
>
> Reason for revert: Speculative revert (breaks downstream project)
>
> Original change's description:
> > Periodically probe if current estimate lower than a ratio of NetworkState estimate
> >
> > This replace the immmediate probing if NetworkState estimate change.
> >
> >
> > Bug: webrtc:14392
> > Change-Id: I2cc79c21015a4da2e6cba2098f1bc3c69944821f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280741
> > Reviewed-by: Diep Bui <diepbp@webrtc.org>
> > Commit-Queue: Per Kjellander <perkj@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#38495}
>
> Bug: webrtc:14392
> Change-Id: I83cc8ab9986171e58971fb443d3e5d83afab3a2c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280948
> Owners-Override: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38497}

Bug: webrtc:14392
Change-Id: I211599ab6061d51a825588afb0babf12c5686dfc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281120
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38507}
2022-10-31 13:42:06 +00:00
Artem Titov
e02fbb040e Revert "Periodically probe if current estimate lower than a ratio of NetworkState estimate"
This reverts commit c371a13273.

Reason for revert: Speculative revert (breaks downstream project)

Original change's description:
> Periodically probe if current estimate lower than a ratio of NetworkState estimate
>
> This replace the immmediate probing if NetworkState estimate change.
>
>
> Bug: webrtc:14392
> Change-Id: I2cc79c21015a4da2e6cba2098f1bc3c69944821f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280741
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38495}

Bug: webrtc:14392
Change-Id: I83cc8ab9986171e58971fb443d3e5d83afab3a2c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280948
Owners-Override: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38497}
2022-10-28 19:01:45 +00:00
Per Kjellander
c371a13273 Periodically probe if current estimate lower than a ratio of NetworkState estimate
This replace the immmediate probing if NetworkState estimate change.


Bug: webrtc:14392
Change-Id: I2cc79c21015a4da2e6cba2098f1bc3c69944821f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280741
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38495}
2022-10-28 13:56:29 +00:00
Rasmus Brandt
baf5c9fabd Revert "Add documentation, tests and simplify webrtc::SimulatedNetwork."
This reverts commit c1d5fda22c.

Reason for revert: This CL created thousands of metric alerts in the perf tests. It's possible that these are all expected, but since mbonadei@ is OOO right now, I think it's better to revert, and have him re-land when he is back.

Most alerts are here: https://bugs.chromium.org/p/webrtc/issues/detail?id=14549

Original change's description:
> Add documentation, tests and simplify webrtc::SimulatedNetwork.
>
> This CL increases the test coverage for webrtc::SimualtedNetwork, adds
> some more comments to the class and the interface it implements and
> simplify the logic around capacity and delay management in the
> simulated network.
>
> More CLs will follow to continue the refactoring but this is the
> ground work to make this more modular in the future.
>
> Bug: webrtc:14525, b/243202138
> Change-Id: Ib0408cf6e2c1cdceb71f8bec3202d2960c5b4d3c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278042
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38388}

Bug: webrtc:14525, b/243202138
Change-Id: I5bc56c954bb12e7c27cb859e838f0b7a89e006f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279522
Owners-Override: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38415}
2022-10-17 13:11:34 +00:00
Diep Bui
70d08c05aa Revert "Probing integration in loss based bwe 2."
This reverts commit 332810ab5d.

Reason for revert: This commit chain seems to cause problems in LossBasedBwe.

Original change's description:
> Probing integration in loss based bwe 2.
>
> - Loss based bwe has 3 states: increasing (increasing when loss limited), decreasing (decreasing when loss limited), or delay based bwe (the same as delay based estimate).
> - When bandwidth is loss limited and decreasing, and probe result is available, GetLossBasedResult = min(estimate, probe result).
> - When bandwidth is loss limited and increasing, and the estimate is bounded by acked bitrate * a factor.
> - When bandwidth is loss limited and probe result is available, use probe bitrate as the current estimate, and reset probe bitrate.
>
> Bug: webrtc:12707
> Change-Id: I53cb82aa16397941c0cfaf1035116f775bdce72b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277400
> Commit-Queue: Diep Bui <diepbp@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38382}

Bug: webrtc:12707
Change-Id: Ied86323b0ce94b87ac503a2ee34753cebef5f53d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279500
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38412}
2022-10-17 10:34:20 +00:00
Diep Bui
bb9b6d1b32 Revert "Probe when network is loss limited."
This reverts commit aa71259b06.

Reason for revert: This commit chain seems to cause problems in LossBasedBwe.

Original change's description:
> Probe when network is loss limited.
>
> Trigger probes next process intervals if the loss based current state is either increasing or decreasing. 0/ first probe at the loss based estimate. 1/ if increasing: allow further probing. 2/ if decreasing: not allow further probing.
>
>
> Bug: webrtc:12707
> Change-Id: I4e99edcbe4e2c315e8498ffb7fb2e589cdb4e666
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279041
> Commit-Queue: Diep Bui <diepbp@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38395}

Bug: webrtc:12707
Change-Id: I1fb61337148faf6faaa0056dc25f14536a19a462
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279480
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38410}
2022-10-17 09:24:57 +00:00
Diep Bui
aa71259b06 Probe when network is loss limited.
Trigger probes next process intervals if the loss based current state is either increasing or decreasing. 0/ first probe at the loss based estimate. 1/ if increasing: allow further probing. 2/ if decreasing: not allow further probing.


Bug: webrtc:12707
Change-Id: I4e99edcbe4e2c315e8498ffb7fb2e589cdb4e666
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279041
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38395}
2022-10-14 11:45:42 +00:00
Mirko Bonadei
c1d5fda22c Add documentation, tests and simplify webrtc::SimulatedNetwork.
This CL increases the test coverage for webrtc::SimualtedNetwork, adds
some more comments to the class and the interface it implements and
simplify the logic around capacity and delay management in the
simulated network.

More CLs will follow to continue the refactoring but this is the
ground work to make this more modular in the future.

Bug: webrtc:14525, b/243202138
Change-Id: Ib0408cf6e2c1cdceb71f8bec3202d2960c5b4d3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278042
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38388}
2022-10-13 14:17:00 +00:00
Diep Bui
332810ab5d Probing integration in loss based bwe 2.
- Loss based bwe has 3 states: increasing (increasing when loss limited), decreasing (decreasing when loss limited), or delay based bwe (the same as delay based estimate).
- When bandwidth is loss limited and decreasing, and probe result is available, GetLossBasedResult = min(estimate, probe result).
- When bandwidth is loss limited and increasing, and the estimate is bounded by acked bitrate * a factor.
- When bandwidth is loss limited and probe result is available, use probe bitrate as the current estimate, and reset probe bitrate.

Bug: webrtc:12707
Change-Id: I53cb82aa16397941c0cfaf1035116f775bdce72b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277400
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38382}
2022-10-13 10:06:19 +00:00
Rasmus Brandt
8c8b5c3f82 Logging clarification for inter_arrival_delta.
Bug: b/250447844
Change-Id: I2a19f0a5c3fb58139ee1b07c47867bc0a1b49da6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278627
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38344}
2022-10-11 08:50:06 +00:00
Björn Terelius
c0b0494860 Fix loss of precision in accumulation of RTT in GoogCC
Bug: webrtc:14513
Change-Id: Iefa4cf906ded02b224b970cabeea5b8c4ed122de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277760
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38273}
2022-10-03 12:10:48 +00:00
Diep Bui
2c1b4dac57 Apply stricter bandwidth cap for high loss.
When loss rate is above a certain threshold, set instant_limit = 500 - 1000 * average_loss_rate, which returns 200kbps at 30% loss rate, or 100kbps at 40% loss rate. When the loss rate is above 50%, use the min_bitrate from send_side_bandwidth_estimation.

The high_loss_rate_threshold is set to 1.0, so the change is not activated by default.

Tested the change with hamrit, when average loss rate is above 50%, bandwidth backed to 10kbps, and it took ~10s to ramp up to 1.5Mbps.
https://screenshot.googleplex.com/7dvPoWa2b5SgMSL

Bug: webrtc:12707
Change-Id: I5eea04ef709a183bdf696246094dbd4a204e48f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272061
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38243}
2022-09-29 10:24:13 +00:00
Per Kjellander
a18144182d Dont send probe if NetworkStateEstimate.link_capacity_upper=DataRate::Zero
Bug: webrtc:14392
Change-Id: I7df34239f3f9ef27a26d04a16e6f3edf3e45d4bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276183
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38151}
2022-09-21 11:59:46 +00:00
Per Kjellander
7d1f6bb86c Add field trial to not probe if estimates are larger that max needed.
This add field trial string "skip_if_est_larger_than_fraction_of_max"
Dont send a probe if min(estimate, network state estimate) is larger than this
fraction of the set max bitrate.



Bug: webrtc:14392
Change-Id: I7333f6ef45ab0c019f21b9e4c604352219e1d025
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275940
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38123}
2022-09-20 07:55:49 +00:00
Per Kjellander
bd0e8ef946 Make it possible to set the packet size needed to trigger a probe.
The value is today set to 200 which is too low for an audio packet to trigger sending probes.

For the initial probing, it would be good if audio packets, that may arrive before the first video frame can trigger sending a probe.

Also fix field trial parsing of required number of probes.

Bug: webrc:14392
Change-Id: I1f3cebcda38b71446e3602eef9cfa76de61a1ccf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275620
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38089}
2022-09-15 10:13:57 +00:00
Per Kjellander
565e5b0829 Ensure Lossbased BWE v2 target rate is updated before updating probe controller
Loss based BWE v2 rate is updated immediately when transport feedback is received.
This ensure that when GoogCcNetworkController::MaybeTriggerOnNetworkChanged is invoked, the loss based estimate is updated.

Bug: webrtc:14392
Change-Id: If404576c5793a29096cea52884862807cde8b615
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275306
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38070}
2022-09-13 14:47:18 +00:00
Per Kjellander
8c56380129 Dont probe further if BWE is loss limited.
Bug: webrtc:14392
Change-Id: I2fc9b804943305bef6675fc024591548a30be3e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274261
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38029}
2022-09-07 14:03:15 +00:00
Per Kjellander
ee969299f9 Add field trial to probe if NetworkState drop below a threshold
Change ProbeController field trial to also probe when loss limited but probe at the current estimate.

Bug: webrtc:14392
Change-Id: I8b30e316b935a0f2c375e2204a8e33e6671eb956
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273901
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38004}
2022-09-05 07:44:41 +00:00
Per Kjellander
16fff1d0ee Ensure bwe_limited_due_to_packet_loss not set in GoogCC before initial BWE exist
Change-Id: Ief01d0647392bde7e4267784dcbd5a61ca28f621

Bug: webrtc:14392
Change-Id: Ief01d0647392bde7e4267784dcbd5a61ca28f621
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273302
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37990}
2022-09-02 10:10:19 +00:00
Per Kjellander
43e11c881b Field trials for ProbeController when a network state estimate is known.
Ensure initial second probe can be disabled.
Can configure separate probe duration if the network state estimate is known.
Can probe immediately if network state estimate increase more than a factor

Bug: webrtc:14392
Change-Id: Iefb980f0b10c7c51db62793c3bd3f187fc67593d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273349
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37966}
2022-08-31 09:49:36 +00:00
Per Kjellander
d6e9749942 Replace int with Timestamp and DataRate in ProbeController
Replace most instances. SetAlrStartTime is set as is should be cleaned up together with the callsite.

Bug: webrtc:14404
Change-Id: I8ec532828ef665afbf08f0943465a429ab40baa1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273300
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37932}
2022-08-29 14:48:32 +00:00
Per Kjellander
6d47f2e1fa Add field trial to periodically probe at networkstate estimate.
Add field trial to not probe if loss based limited

If both Alr probing and periodic probing of networkstate estimate is enabled, probes are limited by the network state estimate * factor controlled by field trial.


Bug: webrtc:14392
Change-Id: I46e1dbdd8b14f63a7c223b4c03c114717b802023
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272805
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37915}
2022-08-26 10:26:09 +00:00
Diep Bui
d65dc979b1 Fix calculation of feedback min_pending_time in goog_cc.
Bug: webrtc:13106
Change-Id: I6dae108e044ce9abc4651375638160293d01ac2f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269385
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37864}
2022-08-22 11:24:37 +00:00
Ali Tofigh
15b464deaf Adopt absl::string_view in modules/congestion_controller/
Bug: webrtc:13579
Change-Id: I8d62487689293e425ee76c2dce5de243d7edc97a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271284
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37807}
2022-08-17 08:41:23 +00:00
Philipp Hancke
a204ad210d clean up misc TimeDelta use
follow-up from https://webrtc-review.googlesource.com/c/src/+/262810

* replace Time::Millis(0) and TimeDelta::Millis(0) with ::Zero()
* drop unnecessary webrtc namespace from some TimeDeltas
* make TimeDelta do the unit conversion for stats

BUG=webrtc:13756

Change-Id: Ic60625ae0fc7959a47a6be9f5051851feaf76373
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265875
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37664}
2022-08-02 13:52:36 +00:00