Commit graph

358 commits

Author SHA1 Message Date
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
Mike Wei
a13b048870 Fixed mistake in DelayBasedBwe. Use audio_inter_arrival_delta_ when separate audio is enabled.
Bug: None
Change-Id: Ie657126a89d3a9177d2b76e876afa5da8cac9d48
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266490
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37638}
2022-07-28 09:31:49 +00:00
Danil Chapovalov
8743db9865 Cleanup congestion controller min bitrate
Replace helper functions with the constant

Remove option to set min bitrate in RemoteBitrateEstimator as unused:
ReceivedSideCongestionController is the only user of the
RemoteBitrateEstimator interface, and it always sets the same value
right after construction that RemoteBitreateEstimators already use.

Bug: None
Change-Id: If179fdd72b1ded6ad1fd0a6dfffc97b302153322
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269383
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37613}
2022-07-25 17:31:28 +00:00
Diep Bui
5edefa87f7 Update loss based bwe 2 to handle low bandwidth networks and no delay signal.
1. Add loss threshold for high bandwidth preference. If the average loss ratio is less than the threshold, then the model prefers higher bandwidth candidates. Otherwise, it prefers lower bandwidth candidates. Before, it always prefers higher bandwidth candidate. The default value is 0.99, means it always prefers high bandwidth candidates.

2. Only increase the estimate if the inherent loss (random loss) is equal to/greater than the average loss. If the inherent loss is less than the average loss, then it is oversending, thus should not increase the estimate.

Bug: webrtc:12707
Change-Id: I37eb536679ca29e017a4a47703b417efd4d103ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269101
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37608}
2022-07-25 10:45:47 +00:00
Diep Bui
9804aa5f6a Avoid fraction_loss overflowing when packet loss is negative in send_side_bandwidth_estimation.cc.
Update an affected unit test by the change in goog_cc.

Bug: webrtc:14272
Change-Id: I83e97530c861b126bed876d57f6d4f91aa45de7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269002
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37587}
2022-07-21 14:31:04 +00:00
Ali Tofigh
b7821cea6b Remove unnecessary overload in RtcEventLogOutput
Bug: webrtc:13579
Change-Id: I3ea4b8ce8d111ae6b9ce7e92f75bd4196bc9656b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268420
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37508}
2022-07-12 22:09:36 +00:00
Björn Terelius
63299a3124 Add absl::string_view overload for RtcEventLogOutput::Write
Bug: webrtc:13579
Change-Id: I13f63fb6be6aa62c2e011c18327499fa16b5824e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267641
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37440}
2022-07-05 10:47:47 +00:00
Erik Språng
f82e8fa911 Remove WebRTC-Bwe-AlrLimitedBackoff field trial.
This trial has been unused for some time, time to clean it up.

Bug: webrtc:10144
Change-Id: I2b1bd9ff0335efdc07f47a361878915f1be383a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267410
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37421}
2022-07-04 16:29:42 +00:00
Danil Chapovalov
0fd2ed516b Delete ProcessThread and related Module interface
Bug: webrtc:7219
Change-Id: Id71430a24b21e591494557cf54419d2bc8b3f8c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267400
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37416}
2022-07-04 10:20:35 +00:00
Erik Språng
48cc54e4ce Remove code for unused field trial WebRTC-BweCappedProbing
Bug: None
Change-Id: I6799794659dce52f0d9f98dc1b5c63e0806d152d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267403
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37406}
2022-07-01 19:11:15 +00:00
Diep Bui
c4ca83c2bd Send side bwe receives the delay based state even if the delay based bwe does not change its estimate.
Bug: webrtc:12707
Change-Id: If67dcc6d1cb70dc763ab65bdb8426de100bcc626
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261312
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37084}
2022-06-02 04:33:16 +00:00
Tommi
f6f4543304 Rename VideoReceiveStream to VideoReceiveStreamInterface
Bug: webrtc:7484
Change-Id: I653cfe46486e0396897dd333069a894d67e3c07b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262769
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36958}
2022-05-22 10:54:38 +00:00
Per Kjellander
88af20356f Use ProbeClusterConfig in BitrateProber from GoogCC
Instead of using field trials in BitrateProber for probe duration, use values provided in ProbeClusterConfig from GoogCC.
Field trials are instead read in ProbeController.

To avoid having to do a thread jump for every ProbeClusterConfig, RtpPacketPacer interface is changed to RtpPacketPacer::CreateProbeClusters(std::vector<ProbeClusterConfig>

Deprecates field trial  "WebRTC-Bwe-ProbingConfiguration"

Change-Id: I3991e4b54770601855a3af2d6a16678f11d41c31
Bug: webrtc:14027
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261265
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36911}
2022-05-17 12:29:25 +00:00
Diep Bui
d97af7b1b9 Clean loss based bwe 2.
This is for cleaning loss based bwe v2 implementation according to some comments from https://webrtc-review.googlesource.com/c/src/+/261240.

Bug: webrtc:12707
Change-Id: I2cb278f136cddcd0eeb2c5e4c319a9cc6aab94a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262251
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36875}
2022-05-13 10:07:19 +00:00
Björn Terelius
eb9af84a55 Improved RobustThroughputEstimator
- Filter out very old packets (to ensure that the estimate doesn't drop to zero if sending is paused and later resumed).
- Discard packets older than previously discarded packets (to avoid the estimate dropping after deep reordering.)
- Add tests cases for high loss, deep reordering and paused/resumed streams to unittest.
- Remove some field trial settings that have very minor effect and rename some of the others.
- Change analyzer.cc to only draw data points if the estimators have valid estimates.

Bug: webrtc:13402
Change-Id: I47ead8aa4454cced5134d10895ca061d2c3e32f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236347
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36849}
2022-05-11 08:45:53 +00:00
Diep Bui
f783b938fa Delay increasing estimate to the delay based estimate after loss happens.
The change bounds the estimate increment by MaxIncreaseFactor in DelayedIncreaseWindow after seeing loss. MaxIncreaseFactor is set to 1000 to disable the change by default.

Improve trendline integration: always allow to decrease the estimate, and only allow to increase the estimate if overusing and underusing are not in the state window.

Other improvement: bound candidates by delay based estimate, instance upper bound, and bandwidth limit in the current window.

Clean: remove the flag BackoffWhenOverusing since it has negative impacts when experimenting.

Bug: webrtc:12707
Change-Id: Ia4c1e58d692071967e8807a8b9d64b8ae4caf837
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261240
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36847}
2022-05-11 07:23:13 +00:00
Filip Hlasek
f2fe43b655 Don't round the computed time deltas to nearest ms.
Resolving https://bugs.chromium.org/p/webrtc/issues/detail?id=14023

At the moment, in DelayBasedBwe the time deltas are rounded to the
nearest millisecond. This change makes sure the numbers are passed as
doubles as expected by the TrendlineEstimator.

Change-Id: I68882547fb19af0e67e7b5d8de4159083a54d7eb
Bug: webrtc:14023
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261320
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36806}
2022-05-09 07:02:46 +00:00
Florent Castelli
c3e6e3a3e8 Remove dependency on rtc_base_approved from most targets
Bug: webrtc:9838
Change-Id: Ibd0199803597eff48ca139a5cecdc3209c62c5d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259873
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36643}
2022-04-25 12:15:30 +00:00
Florent Castelli
f4db351625 Move race_checker out of rtc_base_approved
Bug: webrtc:9838
Change-Id: If180abcca1ef598314de3aed70e4a6eb04f062d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258770
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36607}
2022-04-21 14:40:06 +00:00
Florent Castelli
71337f387e Move random out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I64a5ef18c19d446139354d04aa6cb2a76d18aad0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258762
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36572}
2022-04-19 14:00:47 +00:00
Artem Titov
a529b0c0f2 Fix chromium roll: remove variables that are written but not accessed
Bug: b/228208976
Change-Id: Iee4df1249f9bc4aa2fa840c0a039543e8560c7c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258122
Reviewed-by: Björn Terelius <terelius@google.com>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36459}
2022-04-06 09:48:20 +00:00
Florent Castelli
0af55ba60d Remove //rtc_base:logging from public deps
Bug: webrtc:8603
Change-Id: I2704da8618f88032adac7ae9eb2a0f47fce4a836
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257908
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36443}
2022-04-05 10:31:19 +00:00