Commit graph

60 commits

Author SHA1 Message Date
Per K
cc92b6e1bd Add ProbeController::EnableRepeatedInitialProbing
This adds a new mode to the ProbeController that sends probes every
second the first 5seconds. Intented usage is before normal media has
started flowing. If enabled, the max allocated bitrat is ignored during
these initial probes.
The purpose is to have a more accurate estimate at the beginning of a
call.
The cl also removes ProbeController::SetFirstProbeToMaxBitrate.

Bug: webrtc:14928
Change-Id: I04feefb2f1b82ff38b35ee2be810f9119c53536a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349924
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42252}
2024-05-07 19:37:23 +00:00
Per K
55f6613fc0 Retry initial probe if it times out and BWE has not been updated.
This is to avoid the case where the initial probe fail and the BWE is not updated, which can lead to a long period of low bandwidth.

Bug: webrtc:14928
Change-Id: Ie8f84270507b59995d57e4ab6e2a984570191529
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349580
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42208}
2024-05-02 12:42:32 +00:00
Per K
fb61154da1 Reland "Ignore allocated bitrate during initial exponential BWE."
This reverts commit 501c4f37bf.

Patch set 1 contains pure reland.

The reason why we want to do this is  because audio can allocate a needed bitrate before video when starting a call, which may lead to a race between the first probe result and updating the allocated bitrate.
That is the, initial probe will try to probe up to the max configured bitrate.

Bug: webrtc:14928
Change-Id: I6a8660da20ac54237f04a29461e03b31bd988bb0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347643
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@google.com>
Owners-Override: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42086}
2024-04-16 15:34:49 +00:00
Per Kjellander
501c4f37bf Revert "Ignore allocated bitrate during initial exponential BWE."
This reverts commit 33cc83595a.

Reason for revert: Perf bots showed that this cl cause a change in metrics. It looks like it is for the better, but we want this to be behind a field trial. 

Original change's description:
> Ignore allocated bitrate during initial exponential BWE.
>
> The reason why we want to do this is  because audio can allocate a needed bitrate before video when starting a call, which may lead to a race between the first probe result and updating the allocated bitrate.
> That is the, initial probe will try to probe up to the max configured bitrate.
>
> ProbeController::SetFirstProbeToMaxBitrate will allow the first probe to
> continue up to the max configured bitrate, regardless of of the max
> allocated bitrate.
>
> Bug: webrtc:14928
> Change-Id: I6e0ae90e21a78466527f3464951e6033dc846470
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346760
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42049}

Bug: webrtc:14928
Change-Id: I56ba58560b6857b6069552c02df822691f7af64d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347622
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Owners-Override: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42081}
2024-04-16 09:50:37 +00:00
Per K
33cc83595a Ignore allocated bitrate during initial exponential BWE.
The reason why we want to do this is  because audio can allocate a needed bitrate before video when starting a call, which may lead to a race between the first probe result and updating the allocated bitrate.
That is the, initial probe will try to probe up to the max configured bitrate.

ProbeController::SetFirstProbeToMaxBitrate will allow the first probe to
continue up to the max configured bitrate, regardless of of the max
allocated bitrate.

Bug: webrtc:14928
Change-Id: I6e0ae90e21a78466527f3464951e6033dc846470
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346760
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42049}
2024-04-12 09:13:44 +00:00
Per K
08848ea04c Reland "Stop exponential probing if 2xmax allocated bitrate lower than BWE."
This reverts commit 802dd5bdbd.

First patch set is pure reland.
New patch set adds field trial flag.


Original change's description:
Stop exponential probing if 2xmax allocated bitrate lower than BWE.
 
Without this, if max allocated bitrate is lowered while exponential probing is ongoing, a new probe can be sent at a rate of the new low max allocated bitrate which may cause BWE to decrease.

Bug: webrtc:14928
Change-Id: I35c341bbaced800d9931657d62c73a17a3279b7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344440
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41965}
2024-03-26 08:06:47 +00:00
George Panayotov
802dd5bdbd Revert "Stop exponential probing if 2xmax allocated bitrate lower than BWE."
This reverts commit 5a4ce03101.

Reason for revert: Breaks tests in downstream project.

Original change's description:
> Stop exponential probing if 2xmax allocated bitrate lower than BWE.
>
> Without this, if max allocated bitrate is lowered while exponential probing is ongoing, a new probe can be sent at a rate of the new low max allocated bitrate which may cause BWE to decrease.
>
> Bug: webrtc:14928
> Change-Id: Id8e314740c2403d3b801d28f634dbc718f77c16e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343384
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41929}

Bug: webrtc:14928
Change-Id: I0d48b37bfb8684fd490f5685e510b438a83254b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343900
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41958}
2024-03-23 18:04:31 +00:00
Per K
5a4ce03101 Stop exponential probing if 2xmax allocated bitrate lower than BWE.
Without this, if max allocated bitrate is lowered while exponential probing is ongoing, a new probe can be sent at a rate of the new low max allocated bitrate which may cause BWE to decrease.

Bug: webrtc:14928
Change-Id: Id8e314740c2403d3b801d28f634dbc718f77c16e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343384
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41929}
2024-03-19 10:26:55 +00:00
Per K
45242adc4c Add field trial property alloc_current_bwe_limit
The new field trial can be used to ensure probes are limited by the current BWE and does not automatically send a probe at the new max rate.

Also removes unused
  FieldTrialFlag allocation_allow_further_probing;
  FieldTrialParameter<DataRate> allocation_probe_max;



Bug: webrtc:14928
Change-Id: I0d5c350c0231ca0600033ad8211dca0574104201
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339840
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41744}
2024-02-15 12:47:16 +00:00
Per K
ef4c71c204 Change expectation of GoogCCNetworkController::OnNetworkAvailability
Expect OnNetworkAvailabability to be invoked when the transport becomes writable.
Before this change, ProbeController in GoogCC was expected to be created when the transport is writable or explicitly  notifed after creation that network is not writable.

Bug: None
Change-Id: I623b1c34e40a82e912f85b92fea49629e7e72d4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323463
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40975}
2023-10-19 17:34:42 +00:00
Per K
7c612c3074 Default dont probe when BWE estimators detects a limit
Cleanup field trials for not probing when BWE limited due to high RTT,
loss.

Bug: webrtc:14754, webrtc:12707
Change-Id: Ib664784e321d9284d842ea42a0dd1d8361000f20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323640
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40949}
2023-10-17 11:48:32 +00:00
Per K
e0083d4804 lower limit cap of probe to max of current estimate and link capacity
The purpose is to not allow an initial low link capacity estimate to reduce the current estimate.
Only delay overuse detection , low probe results or  a loss event can
reduce the estimate.

Bug: webrtc:14392
Change-Id: Ib1618347f2c7681e3bd65d85ee687dec3cd67c97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320380
Reviewed-by: Diep Bui <diepbp@google.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40751}
2023-09-15 08:20:12 +00:00
Björn Terelius
c4a205c7fa Clean up includes in goog_cc/
Bug: None
Change-Id: I5388bc018d7ddd285d154436b5fc52a15469a97d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319220
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40710}
2023-09-06 12:40:36 +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
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
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
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
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
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
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
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
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
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
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
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
Artem Titov
6f4b4fa18b Use backticks not vertical bars to denote variables in comments for /modules/congestion_controller
Bug: webrtc:12338
Change-Id: Id46786886f13266177dd7fa8f1fb30c097df1373
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227094
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34622}
2021-08-02 11:09:20 +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
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
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
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
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
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
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
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
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
Piotr (Peter) Slatala
c39f462b2d Move RtcEventProbeClusterCreated to the network controller.
Originally RtcEventProbeClusterCreated was logged in bitrate prober. This means that anyone who was using GoogCcNetworkControl wasn't logging it, and the NetworkControl wasn't self-contained.
This changes moves the responsibility for logging ProbeClusterCreated to ProbeController (where the probe is created), it also moves the responsibility for assigning probe ids to the probe controller.

Bug: None
Change-Id: If0433cc6d311b5483ea3980749b03ddbcd2bf041
Reviewed-on: https://webrtc-review.googlesource.com/c/122927
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26713}
2019-02-15 16:42:47 +00:00
Sebastian Jansson
95edb037a4 Adds WebRtcKeyValueConfig interface
The WebRtcKeyValueConfig interface allows providing custom key value
configurations that changes per instance of GoogCcNetworkController.

Bug: webrtc:10009
Change-Id: I520fff030d1c3c755455ec8f67896fe8a6b4d970
Reviewed-on: https://webrtc-review.googlesource.com/c/116989
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26312}
2019-01-18 08:45:08 +00:00
Erik Språng
74fb822b67 Allow probing up to 2x allocation limit
The limit we put on probing is a bit too conservative now. If an
allocation limit is set, this CL allows probing up to 2x the current
max allocation limit.

This better handles overshooting when networks actually have the
capacity to allow bursts.

Bug: webrtc:10070
Change-Id: I0003f6b22512c13b6a83c1934952a2c3a2b70b48
Reviewed-on: https://webrtc-review.googlesource.com/c/112905
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25888}
2018-12-04 11:43:54 +00:00
Erik Språng
cfe36ca3b3 Cap probing bitrate to max total allocated bitrate
Bug: webrtc:10070
Change-Id: I3ba2656dff08e9ff054e263d78dcacba1ff77dd1
Reviewed-on: https://webrtc-review.googlesource.com/c/112384
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25845}
2018-11-29 17:35:15 +00:00
Yves Gerey
3e70781361 [Cleanup] Add missing #include. Remove useless ones. IWYU part 2.
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.

Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
2018-11-28 18:25:07 +00:00