24 Commits

Author SHA1 Message Date
terelius
3376c84c90 Add probing to recover faster from large bitrate drops. A single probe at 85% of the original bitrate is sent when transitioning from underusing back to normal state. The actual sending of the probes is disabled by default, and enabled by the field trial string WebRTC-BweRapidRecoveryExperiment/Enabled/. Existing code that did probing after large drops in ALR have been restructured so that it also delays the probe until we are no longer overusing.
BUG=webrtc:8015

Review-Url: https://codereview.webrtc.org/2986563002
Cr-Commit-Position: refs/heads/master@{#19187}
2017-07-31 11:23:25 +00:00
Edward Lemur
c20978e581 Rename webrtc/base -> webrtc/rtc_base
NOPRESUBMIT=True # cpplint errors that aren't caused by this CL.
NOTRY=True
NOTREECHECKS=True
TBR=kwiberg@webrtc.org, kjellander@webrtc.org

Bug: webrtc:7634
Change-Id: I3cca0fbaa807b563c95979cccd6d1bec32055f36
Reviewed-on: https://chromium-review.googlesource.com/562156
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18919}
2017-07-06 19:11:40 +00:00
Henrik Kjellander
dca1e09db7 Revert "Update includes for webrtc/{base => rtc_base} rename (1/3)"
This reverts commit c8fa692ec44fd6ba4fa3d085ac3161a262fc18c5.

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2964773002 .
Cr-Commit-Position: refs/heads/master@{#18872}
2017-07-01 14:42:25 +00:00
kjellander
c8fa692ec4 Update includes for webrtc/{base => rtc_base} rename (1/3)
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`

The only manual edit is to add an include of webrtc/rtc_base/checks.h in
webrtc/modules/audio_device/android/opensles_common.h, which likely
was needed due to changed include paths due to 'git cl format'.

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2969653002
Cr-Commit-Position: refs/heads/master@{#18871}
2017-06-30 21:02:00 +00:00
philipel
d1d247fa3c Don't initiate perodic probing if we don't have a bandwidth estimate.
BUG=webrtc:7582

Review-Url: https://codereview.webrtc.org/2861673006
Cr-Commit-Position: refs/heads/master@{#18018}
2017-05-04 15:35:52 +00:00
elad.alon
61ce37e2e0 Mark |Clock*| as |const Clock*| (for some CongestionController and BWE related modules)
BUG=None

Review-Url: https://codereview.webrtc.org/2735423002
Cr-Commit-Position: refs/heads/master@{#17148}
2017-03-09 15:09:31 +00:00
philipel
cb9ba301f0 Perform probing on network route change.
BUG=webrtc:7208

Review-Url: https://codereview.webrtc.org/2714503002
Cr-Commit-Position: refs/heads/master@{#17096}
2017-03-07 14:30:59 +00:00
kwiberg
d3edd770ad Introduce dchecked_cast, and start using it
It's the faster, less strict cousin of checked_cast.

BUG=none

Review-Url: https://codereview.webrtc.org/2714063002
Cr-Commit-Position: refs/heads/master@{#16958}
2017-03-02 02:52:48 +00:00
stefan
f00497c573 Improve bitrate probing for the audio-only case.
This means that smaller probe packets will be allowed at lower bitrates.

BUG=webrtc:7043

Review-Url: https://codereview.webrtc.org/2650393002
Cr-Commit-Position: refs/heads/master@{#16317}
2017-01-27 10:27:33 +00:00
philipel
da5e9d04f5 Initiate mid-call probing even if estimated bitrate is at max configured bitrate.
BUG=none

Review-Url: https://codereview.webrtc.org/2634883003
Cr-Commit-Position: refs/heads/master@{#16107}
2017-01-17 10:08:28 +00:00
philipel
2df07342ee Add WebRTC.BWE.MidCallProbing.* metrics.
BUG=webrtc:6984

Review-Url: https://codereview.webrtc.org/2629893003
Cr-Commit-Position: refs/heads/master@{#16100}
2017-01-16 17:31:49 +00:00
philipel
fd58b61068 BitrateProber::CreateProbeCluster now only accept one parameter (bitrate_bps).
Instead of having to specify a bitrate and how many packets to use,
the BitrateProber will now use the bitrate to calculate how many
bytes it will use to probe that bitrate instead.

For now, |kMinProbeDurationMs| is set to 15 ms which means that probing
at 1900 kbps will result in 1900/8*0.015 = 3.5 kB used. Since we can
expect packets to be smaller at the beginning of a stream (500 to 700
bytes) this will result in 7 to 5 packets sent for that bitrate, and
should work very similar to how the current initial probing works.

A minimum of 5 packets are always sent.

BUG=webrtc:6822

Review-Url: https://codereview.webrtc.org/2609113003
Cr-Commit-Position: refs/heads/master@{#15899}
2017-01-04 15:05:25 +00:00
sergeyu
5bc3945f8f Fix integer overflow in ProbeController.
Previously ProbeController would overflow int when calculating
min_bitrate_to_probe_further_bps and when probing bitrate is
above 17 Mbps. The problem was introduced in
https://codereview.webrtc.org/2504023002. Fixed ProbeController to use
int64_t internally for bitrate calculations.

BUG=6332

Review-Url: https://codereview.webrtc.org/2574533002
Cr-Commit-Position: refs/heads/master@{#15642}
2016-12-15 18:42:17 +00:00
sergeyu
9cef11b75e Fix exponential probing in ProbeController.
https://codereview.webrtc.org/2504023002 broke exponential probing.
After that change ProbeController stops exponential probes prematurely:
it goes to kProbingComplete state if SetEstimatedBitrate() is called
with bitrate lower than min_bitrate_to_probe_further_bps_, which always
happens with the first pair of probes. As result it wasn't sending
repeated probes as it should. This change fixes that issue by moving
probe expieration logic to ProbeContoller::Process(). This also ensures
that the controller goes to kProbingComplete state as soon as probing
timeout expired, without waiting for the next SetEstimatedBitrate()
call.

BUG=669421

Review-Url: https://codereview.webrtc.org/2546613003
Cr-Commit-Position: refs/heads/master@{#15392}
2016-12-02 19:03:08 +00:00
philipel
06251f1955 Reduce ProbeController::kDefaultMaxProbingBitrateBps to 10 mbps.
BUG=none

Review-Url: https://codereview.webrtc.org/2535903003
Cr-Commit-Position: refs/heads/master@{#15322}
2016-11-30 10:48:46 +00:00
sergeyu
80ed35e21c Implement periodic bandwidth probing in application-limited region.
Now ProbeController can send periodic bandwidth probes when in
application-limited region. This will allow to maintain correct
bottleneck bandwidth estimate, even not all bandwidth is being used.
The feature is not enabled by default, but can be enabled with a flag.
Interval between probes is currently set to 5 seconds.

BUG=webrtc:6332

Review-Url: https://codereview.webrtc.org/2504023002
Cr-Commit-Position: refs/heads/master@{#15279}
2016-11-28 21:11:24 +00:00
Sergey Ulanov
e2b1501101 Start probes only after network is connected.
Previously ProbeController was starting probing as soon as SetBitrates()
is called. As result these probes would often timeout while connection
is being established. Now ProbeController receives notifications about
network route changes. This allows to start probing only when transport
is connected. This also makes it possible to restart probing whenever
transport route changes (will be done in a separate change).

BUG=webrtc:6332
R=honghaiz@webrtc.org, philipel@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/2458863002 .

Committed: https://crrev.com/5c99c76255ee7bface3c742c25fb5617748ac86e
Cr-Original-Commit-Position: refs/heads/master@{#15094}
Cr-Commit-Position: refs/heads/master@{#15204}
2016-11-23 00:08:37 +00:00
honghaiz
906c5dc6b7 Revert of Start probes only after network is connected. (patchset #9 id:240001 of https://codereview.webrtc.org/2458863002/ )
Reason for revert:
It broke downstream test.

Original issue's description:
> Start probes only after network is connected.
>
> Previously ProbeController was starting probing as soon as SetBitrates()
> is called. As result these probes would often timeout while connection
> is being established. Now ProbeController receives notifications about
> network route changes. This allows to start probing only when transport
> is connected. This also makes it possible to restart probing whenever
> transport route changes (will be done in a separate change).
>
> BUG=webrtc:6332
>
> Committed: https://crrev.com/5c99c76255ee7bface3c742c25fb5617748ac86e
> Cr-Commit-Position: refs/heads/master@{#15094}

TBR=philipel@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6332

Review-Url: https://codereview.webrtc.org/2504783002
Cr-Commit-Position: refs/heads/master@{#15098}
2016-11-15 22:39:09 +00:00
sergeyu
5c99c76255 Start probes only after network is connected.
Previously ProbeController was starting probing as soon as SetBitrates()
is called. As result these probes would often timeout while connection
is being established. Now ProbeController receives notifications about
network route changes. This allows to start probing only when transport
is connected. This also makes it possible to restart probing whenever
transport route changes (will be done in a separate change).

BUG=webrtc:6332

Review-Url: https://codereview.webrtc.org/2458863002
Cr-Commit-Position: refs/heads/master@{#15094}
2016-11-15 20:25:37 +00:00
sergeyu
07c147d25d Cap probing bitrate by the max bitrate instead of hardcoded 10Mbps.
Previously probing bitrate was capped at 10Mbps, which is too low for some
application. Now ProbeContoller limits max probing rate to max allowed
bitrate, which can be specified by the application.

BUG=webrtc:6332

Review-Url: https://codereview.webrtc.org/2430133005
Cr-Commit-Position: refs/heads/master@{#14927}
2016-11-03 18:59:57 +00:00
Irfan Sheriff
1eb12934e7 Handle BW drop in ALR region and initiate probing
Original change by isheriff@chromium.org: http://crrev.com/2387463002#ps40001

BUG=webrtc:6332
TBR=philipel@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/2432633002 .

Patch from Irfan Sheriff <isheriff@chromium.org>.

Cr-Commit-Position: refs/heads/master@{#14673}
2016-10-19 00:04:35 +00:00
isheriff
8e6a76194d ProbeController: Limit max probing bitrate
BUG=webrtc:6332

Review-Url: https://codereview.webrtc.org/2352093002
Cr-Commit-Position: refs/heads/master@{#14436}
2016-09-29 12:37:05 +00:00
Irfan Sheriff
9b7b75324f Avoid max bitrate probing when exponential probing in progress
Avoid starting the max probing when there is an exponential probing session in progress.

BUG=webrtc:6332
R=philipel@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/2269873002 .

Cr-Commit-Position: refs/heads/master@{#14268}
2016-09-16 18:30:52 +00:00
Irfan Sheriff
b2540bb99f Probing: Add support for exponential startup probing
Adds support for exponentially probing the bandwidth at start-up to allow
ramp-up to real capacity of the network.

BUG=webrtc:6332
R=philipel@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/2235373004 .

Cr-Commit-Position: refs/heads/master@{#14189}
2016-09-12 19:29:05 +00:00