31 Commits

Author SHA1 Message Date
stefan
a86f57e624 Move GetOutstandingBytes() call inside field trial check to avoid taking an unneccessary lock.
BUG=webrtc:7926

Review-Url: https://codereview.webrtc.org/3009673002
Cr-Commit-Position: refs/heads/master@{#19540}
2017-08-26 13:33:43 +00:00
Stefan Holmer
5c8942aee1 Move PacedSender ownership to RtpTransportControllerSend.
BUG=webrtc:8089
R=nisse@webrtc.org, terelius@webrtc.org

Review-Url: https://codereview.webrtc.org/3000773002 .
Cr-Commit-Position: refs/heads/master@{#19451}
2017-08-22 14:16:49 +00:00
stefan
7441827b61 Reland of Make the acceptable queue in the cwnd experiment configurable. (patchset #1 id:1 of https://codereview.webrtc.org/2999893002/ )
Reason for revert:
Reland

Original issue's description:
> Revert of Make the acceptable queue in the cwnd experiment configurable. (patchset #1 id:1 of https://codereview.webrtc.org/2998753002/ )
>
> Reason for revert:
> Speculative revert to see if this caused regressions in android perf tests.
>
> Original issue's description:
> > Make the acceptable queue in the cwnd experiment configurable.
> >
> > BUG=webrtc:7926
> >
> > Review-Url: https://codereview.webrtc.org/2998753002
> > Cr-Commit-Position: refs/heads/master@{#19320}
> > Committed: 7c83c56b6d
>
> TBR=philipel@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:7926
>
> Review-Url: https://codereview.webrtc.org/2999893002
> Cr-Commit-Position: refs/heads/master@{#19337}
> Committed: c5d9e63c2b

TBR=philipel@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7926

Review-Url: https://codereview.webrtc.org/2999083002
Cr-Commit-Position: refs/heads/master@{#19377}
2017-08-17 09:13:54 +00:00
stefan
9e117c5e1b Reland of Add functionality which limits the number of bytes on the network. (patchset #1 id:1 of https://codereview.webrtc.org/3001653002/ )
Reason for revert:
Reland

Original issue's description:
> Revert of Add functionality which limits the number of bytes on the network. (patchset #26 id:500001 of https://codereview.webrtc.org/2918323002/ )
>
> Reason for revert:
> Speculative revert to see if this caused regressions in android perf tests.
>
> Original issue's description:
> > Add functionality which limits the number of bytes on the network.
> >
> > The limit is based on the bandwidth delay product, but also adds some additional slack to compensate for the sawtooth-like BWE pattern and the slowness of the encoder rate control. The delay is estimated based on the time from sending a packet until an ack is received. Since acks are received in bursts (feedback is only sent periodically), a min filter is used to estimate the rtt.
> >
> > Whenever the in flight bytes reaches the congestion window, the pacer is paused, which in turn will result in send-side queues growing. Eventually the encoders will be paused as the pacer queue grows large (currently 2 seconds).
> >
> > BUG=webrtc:7926
> >
> > Review-Url: https://codereview.webrtc.org/2918323002
> > Cr-Commit-Position: refs/heads/master@{#19289}
> > Committed: 8497fdde43
>
> TBR=terelius@webrtc.org,philipel@webrtc.org,tschumim@webrtc.org,gnish@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:7926
>
> Review-Url: https://codereview.webrtc.org/3001653002
> Cr-Commit-Position: refs/heads/master@{#19339}
> Committed: 64136af364

TBR=terelius@webrtc.org,philipel@webrtc.org,tschumim@webrtc.org,gnish@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7926

Review-Url: https://codereview.webrtc.org/2994343002
Cr-Commit-Position: refs/heads/master@{#19373}
2017-08-16 15:16:25 +00:00
stefan
64136af364 Revert of Add functionality which limits the number of bytes on the network. (patchset #26 id:500001 of https://codereview.webrtc.org/2918323002/ )
Reason for revert:
Speculative revert to see if this caused regressions in android perf tests.

Original issue's description:
> Add functionality which limits the number of bytes on the network.
>
> The limit is based on the bandwidth delay product, but also adds some additional slack to compensate for the sawtooth-like BWE pattern and the slowness of the encoder rate control. The delay is estimated based on the time from sending a packet until an ack is received. Since acks are received in bursts (feedback is only sent periodically), a min filter is used to estimate the rtt.
>
> Whenever the in flight bytes reaches the congestion window, the pacer is paused, which in turn will result in send-side queues growing. Eventually the encoders will be paused as the pacer queue grows large (currently 2 seconds).
>
> BUG=webrtc:7926
>
> Review-Url: https://codereview.webrtc.org/2918323002
> Cr-Commit-Position: refs/heads/master@{#19289}
> Committed: 8497fdde43

TBR=terelius@webrtc.org,philipel@webrtc.org,tschumim@webrtc.org,gnish@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7926

Review-Url: https://codereview.webrtc.org/3001653002
Cr-Commit-Position: refs/heads/master@{#19339}
2017-08-14 15:03:17 +00:00
stefan
c5d9e63c2b Revert of Make the acceptable queue in the cwnd experiment configurable. (patchset #1 id:1 of https://codereview.webrtc.org/2998753002/ )
Reason for revert:
Speculative revert to see if this caused regressions in android perf tests.

Original issue's description:
> Make the acceptable queue in the cwnd experiment configurable.
>
> BUG=webrtc:7926
>
> Review-Url: https://codereview.webrtc.org/2998753002
> Cr-Commit-Position: refs/heads/master@{#19320}
> Committed: 7c83c56b6d

TBR=philipel@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7926

Review-Url: https://codereview.webrtc.org/2999893002
Cr-Commit-Position: refs/heads/master@{#19337}
2017-08-14 12:54:58 +00:00
stefan
7c83c56b6d Make the acceptable queue in the cwnd experiment configurable.
BUG=webrtc:7926

Review-Url: https://codereview.webrtc.org/2998753002
Cr-Commit-Position: refs/heads/master@{#19320}
2017-08-11 08:23:54 +00:00
stefan
8497fdde43 Add functionality which limits the number of bytes on the network.
The limit is based on the bandwidth delay product, but also adds some additional slack to compensate for the sawtooth-like BWE pattern and the slowness of the encoder rate control. The delay is estimated based on the time from sending a packet until an ack is received. Since acks are received in bursts (feedback is only sent periodically), a min filter is used to estimate the rtt.

Whenever the in flight bytes reaches the congestion window, the pacer is paused, which in turn will result in send-side queues growing. Eventually the encoders will be paused as the pacer queue grows large (currently 2 seconds).

BUG=webrtc:7926

Review-Url: https://codereview.webrtc.org/2918323002
Cr-Commit-Position: refs/heads/master@{#19289}
2017-08-09 14:17:33 +00:00
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
tschumim
9d11764344 Reimplemeted "Test and fix for huge bwe drop after alr state"
BUG=webrtc:7746

Test and fix for huge bwe drop after alr state.

BUG=webrtc:7746

Review-Url: https://codereview.webrtc.org/2931873002
Cr-Commit-Position: refs/heads/master@{#18692}
Committed: 37aa8ba616

patch from issue 2931873002 at patchset 320001 (http://crrev.com/2931873002#ps320001)

Review-Url: https://codereview.webrtc.org/2970653004
Cr-Commit-Position: refs/heads/master@{#19055}
2017-07-17 08:41:41 +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
terelius
e75d96b5bd Revert of Test and fix for huge bwe drop after alr state. (patchset #13 id:320001 of https://codereview.webrtc.org/2931873002/ )
Reason for revert:
Resetting the estimate means that we need to start gathering data from scratch again. The combination of
1) DelayBasedEstimator not reacting to overuse unless there is a valid estimate of the acknowledged bitrate, and
2) AcknowledgedBitrateEstimator needing a significant amount of time/data to obtain an provide an estimate
causes poor performance in simulations/tests. It is not clear whether this will affect real networks negatively, but I suggest reverting this to be on the safe side.
See also https://bugs.chromium.org/p/webrtc/issues/detail?id=7884

Original issue's description:
> Test and fix for huge bwe drop after alr state.
>
> BUG=webrtc:7746
>
> Review-Url: https://codereview.webrtc.org/2931873002
> Cr-Commit-Position: refs/heads/master@{#18692}
> Committed: 37aa8ba616

TBR=solenberg@webrtc.org,kwiberg@webrtc.org,minyue@webrtc.org,holmer@chromium.org,philipel@webrtc.org,oprypin@webrtc.org,holmer@google.com,stefan@webrtc.org,tschumim@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7746

Review-Url: https://codereview.webrtc.org/2964213002
Cr-Commit-Position: refs/heads/master@{#18866}
2017-06-30 15:11:44 +00:00
tschumim
37aa8ba616 Test and fix for huge bwe drop after alr state.
BUG=webrtc:7746

Review-Url: https://codereview.webrtc.org/2931873002
Cr-Commit-Position: refs/heads/master@{#18692}
2017-06-21 06:42:30 +00:00
erikvarga
bf5a2fc11b Use RaceChecker instead of ThreadChecker in a few places.
There are some functions in packet_router.cc and modules/congestion_controller that could be used by different threads, but they're protected using rtc::ThreadChecker which doesn't allow them to be called by more than one thread even if the calls are synchronised. This CL replaces those with rtc::RaceChecker, which allows serialized access of the functions from multiple threads.

BUG=webrtc:7826

Review-Url: https://codereview.webrtc.org/2940133003
Cr-Commit-Position: refs/heads/master@{#18628}
2017-06-16 12:02:05 +00:00
tschumim
3fae628094 Reland Refactored incoming bitrate estimator.
BUG=webrtc:7746

Review-Url: https://codereview.webrtc.org/2928913002
Cr-Commit-Position: refs/heads/master@{#18529}
2017-06-12 06:57:17 +00:00
tschumim
807736ef02 Revert of Refactored incoming bitrate estimator. (patchset #8 id:140001 of https://codereview.webrtc.org/2917873002/ )
Reason for revert:
Breaks Vice tests

Original issue's description:
> Refactored incoming bitrate estimator.
>
> BUG=webrtc:7746
>
> Review-Url: https://codereview.webrtc.org/2917873002
> Cr-Commit-Position: refs/heads/master@{#18478}
> Committed: 5fc8bf8b87

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

Review-Url: https://codereview.webrtc.org/2924243002
Cr-Commit-Position: refs/heads/master@{#18486}
2017-06-08 07:10:31 +00:00
tschumim
5fc8bf8b87 Refactored incoming bitrate estimator.
BUG=webrtc:7746

Review-Url: https://codereview.webrtc.org/2917873002
Cr-Commit-Position: refs/heads/master@{#18478}
2017-06-07 16:48:20 +00:00
nisse
76e62b0d38 Address some violations of chromium-style.
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2913793002
Cr-Commit-Position: refs/heads/master@{#18345}
2017-05-31 09:24:52 +00:00
asapersson
fc5e81c979 Replace first_packet_sent_ms_ in Call.
Instead of using the time on the first callback to Call::OnSentPacket, use the time when the first packet is sent from the pacer (to make sure this packet corresponds to an audio/video RTP packet).

BUG=webrtc:6244

Review-Url: https://codereview.webrtc.org/2825333002
Cr-Commit-Position: refs/heads/master@{#17777}
2017-04-20 06:28:53 +00:00
terelius
6737045af1 Move BWE period calculation from ProbingIntervalEstimator to AimdRateControl.
Remove the ProbingIntervalEstimator and MockAimdRateControl.

BUG=webrtc:7441

Review-Url: https://codereview.webrtc.org/2789233005
Cr-Commit-Position: refs/heads/master@{#17769}
2017-04-19 16:15:04 +00:00
stefan
80fba25fc3 Fix crash when all acks in a feedback message arrive too late.
BUG=b/37279144

Review-Url: https://codereview.webrtc.org/2820353002
Cr-Commit-Position: refs/heads/master@{#17739}
2017-04-18 13:45:12 +00:00
nisse
23425f9068 Add methods to register congestion controller observer after construction.
The point of this change is to make it possible to create the congestion
controller as part of creating RtpTransportController, later pass it to the
constructor of Call, and then let Call register itself as an observer.

BUG=webrtc:7135

Review-Url: https://codereview.webrtc.org/2795643002
Cr-Commit-Position: refs/heads/master@{#17504}
2017-04-03 11:54:25 +00:00
philipel
c3b3f7a8aa Reland of Log created probe clusters to RtcEventLog. (patchset #1 id:1 of https://codereview.chromium.org/2781853002/ )
Reason for revert:
Fix

Original issue's description:
> Revert of Log created probe clusters to RtcEventLog. (patchset #1 id:1 of https://codereview.chromium.org/2783693002/ )
>
> Reason for revert:
> Break bots.
>
> Original issue's description:
...
>
> TBR=terelius@webrtc.org,stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6984
>
> Review-Url: https://codereview.webrtc.org/2781853002
> Cr-Commit-Position: refs/heads/master@{#17425}
> Committed: e3b354bdfa

TBR=terelius@webrtc.org,stefan@webrtc.org
BUG=webrtc:6984

Review-Url: https://codereview.webrtc.org/2779893004
Cr-Commit-Position: refs/heads/master@{#17433}
2017-03-29 08:23:13 +00:00
philipel
e3b354bdfa Revert of Log created probe clusters to RtcEventLog. (patchset #1 id:1 of https://codereview.chromium.org/2783693002/ )
Reason for revert:
Break bots.

Original issue's description:
> Reland of Log created probe clusters to RtcEventLog. (patchset #1 id:1 of https://codereview.chromium.org/2775273003/ )
>
> Reason for revert:
> Speculative reland since it apparently built on https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/22852
>
> Original issue's description:
> > Revert of Log created probe clusters to RtcEventLog. (patchset #3 id:40001 of https://codereview.chromium.org/2776073003/ )
> >
> > Reason for revert:
> > Break build bots.
> >
> > Original issue's description:
> > > Log created probe clusters to RtcEventLog.
> > >
> > > BUG=webrtc:6984
> > >
> > > Review-Url: https://codereview.webrtc.org/2776073003
> > > Cr-Commit-Position: refs/heads/master@{#17413}
> > > Committed: bb9e6edc32
> >
> > TBR=terelius@webrtc.org,stefan@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=webrtc:6984
> >
> > Review-Url: https://codereview.webrtc.org/2775273003
> > Cr-Commit-Position: refs/heads/master@{#17415}
> > Committed: 7ac5c32db2
>
> TBR=terelius@webrtc.org,stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6984
>
> Review-Url: https://codereview.webrtc.org/2783693002
> Cr-Commit-Position: refs/heads/master@{#17424}
> Committed: 2a63160b95

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

Review-Url: https://codereview.webrtc.org/2781853002
Cr-Commit-Position: refs/heads/master@{#17425}
2017-03-28 14:59:51 +00:00
philipel
2a63160b95 Reland of Log created probe clusters to RtcEventLog. (patchset #1 id:1 of https://codereview.chromium.org/2775273003/ )
Reason for revert:
Speculative reland since it apparently built on https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/22852

Original issue's description:
> Revert of Log created probe clusters to RtcEventLog. (patchset #3 id:40001 of https://codereview.chromium.org/2776073003/ )
>
> Reason for revert:
> Break build bots.
>
> Original issue's description:
> > Log created probe clusters to RtcEventLog.
> >
> > BUG=webrtc:6984
> >
> > Review-Url: https://codereview.webrtc.org/2776073003
> > Cr-Commit-Position: refs/heads/master@{#17413}
> > Committed: bb9e6edc32
>
> TBR=terelius@webrtc.org,stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6984
>
> Review-Url: https://codereview.webrtc.org/2775273003
> Cr-Commit-Position: refs/heads/master@{#17415}
> Committed: 7ac5c32db2

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

Review-Url: https://codereview.webrtc.org/2783693002
Cr-Commit-Position: refs/heads/master@{#17424}
2017-03-28 14:42:39 +00:00
philipel
7ac5c32db2 Revert of Log created probe clusters to RtcEventLog. (patchset #3 id:40001 of https://codereview.chromium.org/2776073003/ )
Reason for revert:
Break build bots.

Original issue's description:
> Log created probe clusters to RtcEventLog.
>
> BUG=webrtc:6984
>
> Review-Url: https://codereview.webrtc.org/2776073003
> Cr-Commit-Position: refs/heads/master@{#17413}
> Committed: bb9e6edc32

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

Review-Url: https://codereview.webrtc.org/2775273003
Cr-Commit-Position: refs/heads/master@{#17415}
2017-03-28 11:20:56 +00:00
philipel
bb9e6edc32 Log created probe clusters to RtcEventLog.
BUG=webrtc:6984

Review-Url: https://codereview.webrtc.org/2776073003
Cr-Commit-Position: refs/heads/master@{#17413}
2017-03-28 11:12:26 +00:00
elad.alon
d12a8e1c8e Attach TransportFeedbackPacketLossTracker to ANA (PLR only)
This CL is one in a series. To finish the work, the following CLs will be added:
1. CL for connecting RPLR as well
2. CL for RPLR-based FecController
3. CL for allowing experiment-driven configuration of the above (through both field-trials and protobuf)

BUG=webrtc:7058

Review-Url: https://codereview.webrtc.org/2638083002
Cr-Commit-Position: refs/heads/master@{#17365}
2017-03-23 18:04:48 +00:00
nisse
559af38a15 Split CongestionController into send- and receive-side classes.
New class ReceiveSideCongestionController, extracted from CongestionController, and responsible for the
OnReceivedPacket processing.

Rest of the CongestionController moved to a new class
SendSideCongestionController.

To avoid breaking applications, CongestionController is redefined
as a union of these two classes, with no intended change in behavior.

With one exception: CongestionController::SetBweBitrates used to call
remote_bitrate_estimator_.SetMinBitrate, but after remote_bitrate_estimator_ was moved to ReceiveSideCongestionController,
it no longer does this.

BUG=webrtc:6847

Review-Url: https://codereview.webrtc.org/2752233002
Cr-Commit-Position: refs/heads/master@{#17321}
2017-03-21 13:41:12 +00:00