Commit Graph

56 Commits

Author SHA1 Message Date
8d193a72bc Do not update OnReceivedRtcpReceiverReport if report block list is empty (and rtt zero).
For example, zero rtt may be reported to:
BitrateControllerImpl::OnReceivedRtcpReceiverReport:
- SendSideBandwidthEstimation::UpdateReceiverBlock
- SendSideBandwidthEstimation::UpdateUmaStats
BitrateAllocator::OnNetworkChanged:
- ProtectionBitrateCalculator::SetTargetRates

Re-add check that was removed in https://codereview.webrtc.org/2422063002.

BUG=webrtc:6692

Review-Url: https://codereview.webrtc.org/2552883010
Cr-Commit-Position: refs/heads/master@{#15486}
2016-12-08 16:13:08 +00:00
26b675625f Fix BitrateControllerImpl not to ignore BW probe results mid-call.
Previously when BitrateControllerImpl::OnDelayBasedBweResult() is
called as result of a probe it was calling
bandwidth_estimation_.SetSendBitrate(), but not
UpdateDelayBasedEstimate(). As result SendSideBandwidthEstimation was
effectively ignoring probe results as it kept the old
delay_based_bitrate_bps_ value, which caps the resulting bitrate.

BUG=webrtc:6332,webrtc:6710

Review-Url: https://codereview.webrtc.org/2481383002
Cr-Commit-Position: refs/heads/master@{#15071}
2016-11-14 18:53:03 +00:00
492ee28b73 Use bayesian estimate of acked bitrate.
This helps a lot to avoid reducing the bitrate too quickly when there's a short period of very few packets delivered, followed by the rate resuming at the regular rate. It specifically avoids the BWE going down to super low values as a response delay spikes.

BUG=webrtc:6566
R=terelius@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14802}
2016-10-27 15:19:34 +00:00
61050f67ef Fixig issues in BWE dynamics plot scripts.
BUG=None

Review-Url: https://codereview.webrtc.org/2360053003
Cr-Commit-Position: refs/heads/master@{#14459}
2016-09-30 13:29:57 +00:00
280de9e1c3 Reland: Fix race / crash in OnNetworkRouteChanged().
To achieve this some refactoring was done to make it possible to synchronize
access to the DelayBasedBwe in TransportFeedbackAdapter:
- The callback was removed from DelayBasedBwe, it now instead returns its
  result.
- TransportFeedbackAdapter was moved to modules/congestion_controller to avoid
  unnecessary dependencies.

Reenables previously disabled flaky test. Can no longer reproduce flakiness with gtest-parallel and asan/tsan builds.

BUG=webrtc:6427, webrtc:6422
R=terelius@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14452}
2016-09-30 08:07:00 +00:00
5ec85fbcb7 Revert of Fix race / crash in OnNetworkRouteChanged(). (patchset #5 id:80001 of https://codereview.webrtc.org/2366333003/ )
Reason for revert:
Caused issues with webrtc_perf_tests on build bots.

Original issue's description:
> Fix race / crash in OnNetworkRouteChanged().
>
> To achieve this some refactoring was done to make it possible to synchronize
> access to the DelayBasedBwe in TransportFeedbackAdapter:
> - The callback was removed from DelayBasedBwe, it now instead returns its
>   result.
> - TransportFeedbackAdapter was moved to modules/congestion_controller to avoid
>   unnecessary dependencies.
>
> Reenables previously disabled flaky test. Can no longer reproduce flakiness with gtest-parallel and asan/tsan builds.
>
> BUG=webrtc:6427, webrtc:6422
>
> Committed: https://crrev.com/fd0d42669204e6dd92a60736bca7ae0196663024
> Cr-Commit-Position: refs/heads/master@{#14430}

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

Review-Url: https://codereview.webrtc.org/2377303002
Cr-Commit-Position: refs/heads/master@{#14433}
2016-09-29 11:19:42 +00:00
fd0d426692 Fix race / crash in OnNetworkRouteChanged().
To achieve this some refactoring was done to make it possible to synchronize
access to the DelayBasedBwe in TransportFeedbackAdapter:
- The callback was removed from DelayBasedBwe, it now instead returns its
  result.
- TransportFeedbackAdapter was moved to modules/congestion_controller to avoid
  unnecessary dependencies.

Reenables previously disabled flaky test. Can no longer reproduce flakiness with gtest-parallel and asan/tsan builds.

BUG=webrtc:6427, webrtc:6422

Review-Url: https://codereview.webrtc.org/2366333003
Cr-Commit-Position: refs/heads/master@{#14430}
2016-09-29 09:44:38 +00:00
52a5703721 Enable BWE logging to command line when rtc_enable_bwe_test_logging is set to true
This patch enables bwe related variable logging to the command line.
This is useful to test congestion control algorithm over real networks.

NOTRY=true

Review-Url: https://codereview.webrtc.org/2296253002
Cr-Commit-Position: refs/heads/master@{#14209}
2016-09-14 12:04:43 +00:00
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
0aa9d1808b Set send side bitrate estimate on successful probing attempt.
BUG=webrtc:5859

Review-Url: https://codereview.webrtc.org/2263973004
Cr-Commit-Position: refs/heads/master@{#13887}
2016-08-24 09:45:42 +00:00
d48717b455 Fix issue where the number of packets reported in tests/simulations sometimes are negative.
BUG=webrtc:6159

Review-Url: https://codereview.webrtc.org/2223033002
Cr-Commit-Position: refs/heads/master@{#13850}
2016-08-22 15:50:36 +00:00
14d5dbe5b3 Reland of "Move RtcEventLog object from inside VoiceEngine to Call.", "Fix to make the start/stop functions for the Rtc Eventlog non-virtual." and "Fix for RtcEventLog ObjC interface"
The breaking tests in Chromium have been temporarily disabled, they will be fixed and reenabled soon.

Original CLs: https://codereview.webrtc.org/1748403002/, https://codereview.webrtc.org/2107253002/ and https://codereview.webrtc.org/2106103003/.

TBR=solenberg@webrtc.org,tommi@webrtc.org,stefan@webrtc.org,terelius@webrtc.org,tkchin@webrtc.org
BUG=webrtc:4741, webrtc:5603, chromium:609749

Review-Url: https://codereview.webrtc.org/2110113003
Cr-Commit-Position: refs/heads/master@{#13379}
2016-07-04 14:07:03 +00:00
9e03c3b372 Revert of Move RtcEventLog object from inside VoiceEngine to Call. (patchset #16 id:420001 of https://codereview.webrtc.org/1748403002/ )
Reason for revert:
Reverting all CLs related to moving the eventlog, as they break Chromium tests.

Original issue's description:
> Move RtcEventLog object from inside VoiceEngine to Call.
>
> In addition to moving the logging object itself, this also moves the interface from PeerConnectionFactory to PeerConnection, which makes more sense for this functionality. An API parameter to set an upper limit to the size of the logfile is introduced.
> The old interface on PeerConnectionFactory is not removed in this CL, because it is called from Chrome, it will be removed after Chrome is updated to use the PeerConnection interface.
>
> BUG=webrtc:4741,webrtc:5603,chromium:609749
> R=solenberg@webrtc.org, stefan@webrtc.org, terelius@webrtc.org, tommi@webrtc.org
>
> Committed: https://crrev.com/1895526c6130e3d0e9b154f95079b8eda7567016
> Cr-Commit-Position: refs/heads/master@{#13321}

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

Review-Url: https://codereview.webrtc.org/2111813002
Cr-Commit-Position: refs/heads/master@{#13340}
2016-06-30 07:59:49 +00:00
1895526c61 Move RtcEventLog object from inside VoiceEngine to Call.
In addition to moving the logging object itself, this also moves the interface from PeerConnectionFactory to PeerConnection, which makes more sense for this functionality. An API parameter to set an upper limit to the size of the logfile is introduced.
The old interface on PeerConnectionFactory is not removed in this CL, because it is called from Chrome, it will be removed after Chrome is updated to use the PeerConnection interface.

BUG=webrtc:4741,webrtc:5603,chromium:609749
R=solenberg@webrtc.org, stefan@webrtc.org, terelius@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13321}
2016-06-29 11:57:01 +00:00
059e183419 Reland of "Revert of Update the BWE when the network route changes. (patchset #5 id:180001 of https://… (patchset #1 id:1 of https://codereview.webrtc.org/2098703004/ )
Reason for revert:
It turns out this revert was not necessary because the connection-state mapping for turn-turn connections was not done in connection.

Original issue's description:
> Revert of Revert "Revert of Update the BWE when the network route changes. (patchset #5 id:180001 of https://… (patchset #5 id:120001 of https://codereview.webrtc.org/2041593002/ )
>
> Reason for revert:
> ReadyToSendMedia did not consider the new presumed_writable state.
>
> Original issue's description:
> > Revert "Revert of Update the BWE when the network route changes. (patchset #5 id:180001 of https://codereview.webrtc.org/2000063003/ )"
> >
> > This reverts commit 72d41aa6da94dacb8a8464d1abd4ca7d1afffc65.
> >
> > New change made:
> > Do not reset the BWE when the new network route is not ready to send media.
> >
> > BUG=
> > R=pthatcher@webrtc.org, stefan@webrtc.org
> >

TBR=pthatcher@webrtc.org,stefan@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.webrtc.org/2094863003
Cr-Commit-Position: refs/heads/master@{#13282}
2016-06-24 18:04:00 +00:00
ae4d0d922b Revert of Revert "Revert of Update the BWE when the network route changes. (patchset #5 id:180001 of https://… (patchset #5 id:120001 of https://codereview.webrtc.org/2041593002/ )
Reason for revert:
ReadyToSendMedia did not consider the new presumed_writable state.

Original issue's description:
> Revert "Revert of Update the BWE when the network route changes. (patchset #5 id:180001 of https://codereview.webrtc.org/2000063003/ )"
>
> This reverts commit 72d41aa6da94dacb8a8464d1abd4ca7d1afffc65.
>
> New change made:
> Do not reset the BWE when the new network route is not ready to send media.
>
> BUG=
> R=pthatcher@webrtc.org, stefan@webrtc.org
>
> Committed: https://crrev.com/5b5d2cdad7018993272525a723ef34f7da5c45f2
> Cr-Commit-Position: refs/heads/master@{#13280}

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

Review-Url: https://codereview.webrtc.org/2098703004
Cr-Commit-Position: refs/heads/master@{#13281}
2016-06-24 17:06:25 +00:00
5b5d2cdad7 Revert "Revert of Update the BWE when the network route changes. (patchset #5 id:180001 of https://codereview.webrtc.org/2000063003/ )"
This reverts commit 72d41aa6da94dacb8a8464d1abd4ca7d1afffc65.

New change made:
Do not reset the BWE when the new network route is not ready to send media.

BUG=
R=pthatcher@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13280}
2016-06-24 17:01:01 +00:00
72d41aa6da Revert of Update the BWE when the network route changes. (patchset #5 id:180001 of https://codereview.webrtc.org/2000063003/ )
Reason for revert:
Speculative revert due to failure in Mac Tester FYI bot. See https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Tester/builds/30642

Will reland if the revert doesn't fix the bot.

Original issue's description:
> Update the BWE when the network route changes.
>
> BUG=
>
> Committed: https://crrev.com/2221e1cd1dd19ae16c87c14bbea92fa62d15154d
> Cr-Commit-Position: refs/heads/master@{#13021}

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

Review-Url: https://codereview.webrtc.org/2030283002
Cr-Commit-Position: refs/heads/master@{#13023}
2016-06-03 06:24:58 +00:00
2221e1cd1d Update the BWE when the network route changes.
BUG=

Review-Url: https://codereview.webrtc.org/2000063003
Cr-Commit-Position: refs/heads/master@{#13021}
2016-06-02 21:48:11 +00:00
ec81bcd519 Remove SendPacer from ViEEncoder and make sure SendPacer starts at a valid bitrate
This reverts commit e30c27205148b34ba421184efe65f6a0780b436d (https://codereview.webrtc.org/1958053002/)

Original reverted cl is in patch set #1.
Changes in following patch sets.

The cl now also make sure SendPacer starts with the configured bitrate provided in a call to CongestionController::SetBweBitrates)()

It turns out that the failing tests in 609816 is due to a bug in the current code that runs the proper at 300kbit regardless of configured start bitrate.

Original cl description:
Remove SendPacer from ViEEncoder
This CL moves the logic where the ViEEncoder pause if the pacer is full to the BitrateController. If the queue is full, the controller reports a bitrate of zero to  Call (and BitrateAllocator)

BUG=chromium:609816, webrtc:5687
TBR=mflodman@webrtc.org
NOTRY=True  // Due to bug  in android_x86 cq builder....

Review-Url: https://codereview.webrtc.org/1958113003
Cr-Commit-Position: refs/heads/master@{#12688}
2016-05-11 13:01:19 +00:00
e30c272051 Revert "Reland of Remove SendPacer from ViEEncoder
Revert due to crbug/609816. Investigation is ongoing.

This reverts commit 28a44564c93b12839618dc0da2e2541ec6a0db23. (https://codereview.webrtc.org/1947873002/)

TBR=stefan@webrtc.org,  ivoc@webrtc.org,

BUG=609816, webrtc:5687

Review-Url: https://codereview.webrtc.org/1958053002
Cr-Commit-Position: refs/heads/master@{#12663}
2016-05-09 11:57:18 +00:00
Per
28a44564c9 Revert "Revert of Remove SendPacer from ViEEncoder (patchset #13 id:240001 of https://codereview.webrtc.org/1917793002/ )"
This reverts commit 825eb58d59940a4c3c9837595c4b3b07059c93ca.

This Relands the cl reviewed in https://codereview.webrtc.org/1917793002/

patchset #1 is a pure reland.
patchset #2 fix an overflow in BitrateProber that caused WebRtcVideoChannel2BaseTest.TwoStreamsSendAndReceive to fail.

Original cl description:
Remove SendPacer from ViEEncoder
This CL moves the logic where the ViEEncoder pause if the pacer is full to the BitrateController. If the queue is full, the controller reports a bitrate of zero to  Call (and BitrateAllocator)

R=stefan@webrtc.org
TBR=mflodman@webrtc.org

BUG=webrtc:5687

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

Cr-Commit-Position: refs/heads/master@{#12630}
2016-05-04 15:13:06 +00:00
825eb58d59 Revert of Remove SendPacer from ViEEncoder (patchset #13 id:240001 of https://codereview.webrtc.org/1917793002/ )
Reason for revert:
Fails in the waterfall here:

https://build.chromium.org/p/client.webrtc/builders/Win32%20Debug/builds/7832/steps/rtc_media_unittests/logs/stdio

Original issue's description:
> Remove SendPacer from ViEEncoder
>
> This CL moves the logic where the ViEEncoder pause if the pacer is full to the BitrateController. If the queue is full, the controller reports a bitrate of zero to  Call (and BitrateAllocator)
>
> BUG=webrtc:5687
>
> Committed: https://crrev.com/857c5ccdb56e4c94196f7c6227abd5993c95abe2
> Cr-Commit-Position: refs/heads/master@{#12620}

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

Review-Url: https://codereview.webrtc.org/1947853002
Cr-Commit-Position: refs/heads/master@{#12621}
2016-05-04 08:08:15 +00:00
857c5ccdb5 Remove SendPacer from ViEEncoder
This CL moves the logic where the ViEEncoder pause if the pacer is full to the BitrateController. If the queue is full, the controller reports a bitrate of zero to  Call (and BitrateAllocator)

BUG=webrtc:5687

Review-Url: https://codereview.webrtc.org/1917793002
Cr-Commit-Position: refs/heads/master@{#12620}
2016-05-04 07:09:56 +00:00
c6957c7b73 De-flake VideoSendStreamTest.ReconfigureBitratesSetsEncoderBitratesCorrectly
BUG=webrtc:5382
R=pbos@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12547}
2016-04-28 13:52:59 +00:00
a26ac925f7 Reland of move ignored return code from modules. (patchset #1 id:1 of https://codereview.webrtc.org/1736663004/ )
Reason for revert:
Revert breaks other uses, a fix will be rolled into Chromium instead.

Original issue's description:
> Revert of Remove ignored return code from modules. (patchset #3 id:40001 of https://codereview.webrtc.org/1703833002/ )
>
> Reason for revert:
> Breaks Chromium.
>
> Original issue's description:
> > Remove ignored return code from modules.
> >
> > ModuleProcessImpl doesn't act on return codes and having them around is
> > confusing (it's unclear what an error return code here would do even).
> >
> > BUG=
> > R=tommi@webrtc.org
> >
> > Committed: f14c47a58c
>
> TBR=tommi@webrtc.org,pbos@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=
>
> Committed: https://crrev.com/da33a8a2a22f6d19ba2a8cce963beafbdbaa8fd8
> Cr-Commit-Position: refs/heads/master@{#11761}

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

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

Cr-Commit-Position: refs/heads/master@{#11762}
2016-02-25 12:50:09 +00:00
da33a8a2a2 Revert of Remove ignored return code from modules. (patchset #3 id:40001 of https://codereview.webrtc.org/1703833002/ )
Reason for revert:
Breaks Chromium.

Original issue's description:
> Remove ignored return code from modules.
>
> ModuleProcessImpl doesn't act on return codes and having them around is
> confusing (it's unclear what an error return code here would do even).
>
> BUG=
> R=tommi@webrtc.org
>
> Committed: f14c47a58c

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

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

Cr-Commit-Position: refs/heads/master@{#11761}
2016-02-25 12:34:12 +00:00
f14c47a58c Remove ignored return code from modules.
ModuleProcessImpl doesn't act on return codes and having them around is
confusing (it's unclear what an error return code here would do even).

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11747}
2016-02-24 15:51:23 +00:00
f91e6d0438 Enable cpplint for webrtc/modules/bitrate_controller and fix all uncovered cpplint errors.
This CL enableds cpplint for webrtc/modules/bitrate_controller.

BUG=webrtc:5311
NOTRY=true

TESTED=Fixed issues reported by:
find webrtc/modules/bitrate_controller -type f -name *.cc -o -name *.h | xargs cpplint.py
followed by 'git cl presubmit'.

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

Cr-Commit-Position: refs/heads/master@{#11363}
2016-01-25 07:05:26 +00:00
32f81542c2 Support REMB in combination with send-side BWE.
BUG=webrtc:4173

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

Cr-Commit-Position: refs/heads/master@{#11322}
2016-01-20 15:14:03 +00:00
006d93d3c6 Added protobuf message for loss-based BWE events, and wired it up to the send side bandwidth estimator.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#10531}
2015-11-05 20:02:19 +00:00
ff761fba82 modules: more interface -> include renames
This changes the following module directories:
* webrtc/modules/audio_conference_mixer/interface
* webrtc/modules/interface
* webrtc/modules/media_file/interface
* webrtc/modules/rtp_rtcp/interface
* webrtc/modules/utility/interface

To avoid breaking downstream, I followed this recipe:
1. Copy the interface dir to a new sibling directory: include
2. Update the header guards in the include directory to match the style guide.
3. Update the header guards in the interface directory to match the ones in include. This is required to avoid getting redefinitions in the not-yet-updated downstream code.
4. Add a pragma warning in the header files in the interface dir. Example:
#pragma message("WARNING: webrtc/modules/interface is DEPRECATED; "
                "use webrtc/modules/include")
5. Search for all source references to webrtc/modules/interface and update them to webrtc/modules/include (*.c*,*.h,*.mm,*.S)
6. Update all GYP+GN files. This required manual inspection since many subdirectories of webrtc/modules referenced the interface dir using ../interface etc(*.gyp*,*.gn*)

BUG=5095
TESTED=Passing compile-trybots with --clobber flag:
git cl try --clobber --bot=win_compile_rel --bot=linux_compile_rel --bot=android_compile_rel --bot=mac_compile_rel --bot=ios_rel -m tryserver.webrtc

R=stefan@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10500}
2015-11-04 07:32:04 +00:00
b6b0b9268e Rate limit the low bandwidth / min bitrate warning to once every 10 seconds.
R=terelius@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9855}
2015-09-04 10:05:02 +00:00
867fb5224e Add support for transport wide sequence numbers
Also refactor packet router to use a map rather than iterate over all
rtp modules for each packet sent.

BUG=webrtc:4311

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

Cr-Commit-Position: refs/heads/master@{#9670}
2015-08-03 11:38:48 +00:00
e590416722 Moving the pacer and the pacer thread to ChannelGroup.
This means all channels within the same group will share the same pacing queue and scheduler. It also means padding will be computed and sent by a single pacer. To accomplish this I also introduce a PacketRouter which finds the RTP module which owns the packet to be paced out.

BUG=4323
R=mflodman@webrtc.org, pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/45549004

Cr-Commit-Position: refs/heads/master@{#8864}
2015-03-26 10:11:22 +00:00
8bd2f40a8c Remove code related to REMB suppressor experiment.
Stats indicate this isn't helping. Ditching the whole thing.

BUG=4082
R=mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47569004

Cr-Commit-Position: refs/heads/master@{#8734}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8734 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-16 14:11:42 +00:00
14665ff7d4 Roll chromium_revision e144d30..6fdb142 (318658:318841) + remove OVERRIDE macro
Clang version changed 223108:230914
Details: e144d30..6fdb142/tools/clang/scripts/update.sh

Removes the OVERRIDE macro defined in:
* webrtc/base/common.h
* webrtc/typedefs.h

The majority of the source changes were done by running this in src/:
perl -0pi -e "s/virtual\s([^({;]*(\([^({;]*\)[^({;]*))(OVERRIDE|override)/\1override/sg" `find {talk,webrtc} -name "*.h"  -o -name "*.cc*" -o -name "*.mm*"`

which converted all:
virtual Foo() OVERRIDE
functions to:
Foo() override

Then I manually edited:
* talk/media/webrtc/fakewebrtccommon.h
* webrtc/test/fake_common.h

Remaining uses of OVERRIDE was fixed by search+replace.

Manual edits were done to fix virtual destructors that were
overriding inherited ones.

Finally a build error related to the pure virtual definitions of
Read, Write and Rewind in common_types.h required a bit of
refactoring in:
* webrtc/common_types.cc
* webrtc/common_types.h
* webrtc/system_wrappers/interface/file_wrapper.h
* webrtc/system_wrappers/source/file_impl.cc

This roll should make it possible for us to finally re-enable deadlock
detection for TSan on the buildbots.

BUG=4106
R=pbos@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41069004

Cr-Commit-Position: refs/heads/master@{#8596}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8596 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-04 13:04:54 +00:00
792f1a14e2 Break out allocation from BitrateController into a BitrateAllocator.
This also refactors some of the padding and allocation code in ViEEncoder, and
makes ChannelGroup a simple forwarder from BitrateController to
BitrateAllocator.

This CL is part of a bigger picture, see https://review.webrtc.org/35319004/ for
details.

BUG=4323
R=mflodman@webrtc.org, pbos@webrtc.org, sprang@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/44399004

Cr-Commit-Position: refs/heads/master@{#8595}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8595 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-04 12:25:17 +00:00
16825b1a82 Use int64_t more consistently for times, in particular for RTT values.
Existing code was inconsistent about whether to use uint16_t, int, unsigned int,
or uint32_t, and sometimes silently truncated one to another, or truncated
int64_t.  Because most core time-handling functions use int64_t, being
consistent about using int64_t unless otherwise necessary minimizes the number
of explicit or implicit casts.

BUG=chromium:81439
TEST=none
R=henrik.lundin@webrtc.org, holmer@google.com, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/31349004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8045 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-12 21:51:21 +00:00
9b79197c80 Suppress REMB in bitrate ctrl if it seems lika a short network glitch.
BUG=4082
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37369004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7948 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-18 11:53:59 +00:00
0b1534c52e Use int64_t for milliseconds more often, primarily for TimeUntilNextProcess.
This fixes a variety of MSVC warnings about value truncations when implicitly
storing the 64-bit values we get back from e.g. TimeTicks in 32-bit objects, and
removes the need for a number of explicit casts.

This also moves a number of constants so they're declared right where they're used, which is easier to read and maintain, and makes some of them of integral type rather than using the "enum hack".

BUG=chromium:81439
TEST=none
R=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/33649004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7905 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-15 22:09:40 +00:00
edeea91803 Change all system clock types to int64_t in bitrate_controller.
They are both compared to int64_t types inside the class, and is being called
with int64_t types. Could possibly cause bugs.

R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/33529004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7832 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-08 19:46:23 +00:00
077593b805 Ensure that the start bitrate can be set multiple times.
If the start bitrate is set twice, it will be set to the sum of the start
bitrates of the currently registered bitrate observers, or left unchanged
if the current estimate actually is greater than the sum.

BUG=3503
R=henrik.lundin@webrtc.org, pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/15839004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6491 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-19 12:13:00 +00:00
44caf01c34 Re-submit: rev5775
Modify bitrate controller to update bitrate based on process call and not
only whenever a RTCP receiver block is received.

Additionally:
 Add condition to only start rampup after a receiver block is received. This was same as old behaviour but now an explicit check is needed to verify process does not ramps up before the first block.

 Fix logic around capping max bitrate increase at 8% per second. Before it was only increasing once every 1 second and each increase would be as high as 8%. If receiver blocks had a different interval before it would lose an update or waste an update slot and not ramp up as much as a 8% (e.g. if RTCP received < 1 second).

 Did not touch decrease logic, however since it can be triggered more often it
 may decrease much faster and closer to the original written cap of once every
 300ms + rtt.

Note:
 rampup_tests.cc don't seem to be affected by this since there is no packet loss or REMB that go higher than expected cap.
 bitrate_controller_unittests.cc are don't really simulate a clock and the process thread, but trigger update by inserting an rtcp block.

BUG=3065
R=stefan@webrtc.org, mflodman@webrtc.org

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5794 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-26 21:00:21 +00:00
4e65602886 Add API to allow deducting bitrate from incoming estimates before the capacity is distributed among outgoing video streams. For example, this can be used to reserve space for audio streams.
BUG=
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/10499004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5791 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-26 14:32:47 +00:00
6cd201cf31 Revert 5775 "Modify bitrate controller to update bitrate based o..."
This triggered an occasional TSAN failure in
CallTest.ReceivesPliAndRecoversWithNack e.g.:
http://build.chromium.org/p/client.webrtc/builders/Linux%20Tsan/builds/1444/steps/memory%20test%3A%20video_engine_tests/logs/stdio

I managed to reproduce this locally and verified that reverting this CL
corrected it.

> Modify bitrate controller to update bitrate based on process call and not
> only whenever a RTCP receiver block is received.
> 
> Additionally:
>  Add condition to only start rampup after a receiver block is received. This was same as old behaviour but now an explicit check is needed to verify process does not ramps up before the first block.
> 
>  Fix logic around capping max bitrate increase at 8% per second. Before it was only increasing once every 1 second and each increase would be as high as 8%. If receiver blocks had a different interval before it would lose an update or waste an update slot and not ramp up as much as a 8% (e.g. if RTCP received < 1 second).
> 
>  Did not touch decrease logic, however since it can be triggered more often it
>  may decrease much faster and closer to the original written cap of once every
>  300ms + rtt.
> 
> Note:
>  rampup_tests.cc don't seem to be affected by this since there is no packet loss or REMB that go higher than expected cap.
>  bitrate_controller_unittests.cc are don't really simulate a clock and the process thread, but trigger update by inserting an rtcp block.
> 
> BUG=3065
> R=stefan@webrtc.org, mflodman@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/10529004

TBR=andresp@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/10079005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5785 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-25 19:42:39 +00:00
da07737e68 Modify bitrate controller to update bitrate based on process call and not
only whenever a RTCP receiver block is received.

Additionally:
 Add condition to only start rampup after a receiver block is received. This was same as old behaviour but now an explicit check is needed to verify process does not ramps up before the first block.

 Fix logic around capping max bitrate increase at 8% per second. Before it was only increasing once every 1 second and each increase would be as high as 8%. If receiver blocks had a different interval before it would lose an update or waste an update slot and not ramp up as much as a 8% (e.g. if RTCP received < 1 second).

 Did not touch decrease logic, however since it can be triggered more often it
 may decrease much faster and closer to the original written cap of once every
 300ms + rtt.

Note:
 rampup_tests.cc don't seem to be affected by this since there is no packet loss or REMB that go higher than expected cap.
 bitrate_controller_unittests.cc are don't really simulate a clock and the process thread, but trigger update by inserting an rtcp block.

BUG=3065
R=stefan@webrtc.org, mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/10529004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5775 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-25 12:48:42 +00:00
07bc734459 Refactor in BitrateController module.
- Move condition of 0 bps as max meaning 1gbps from SendSideBandwidthEstimation to BitrateController.
 - Remove condition on bitrate=0 meaning bandwidth estimation off as that could only happen when no observers existed
   and in which case the estimation would be ignored.
 - Add MaybeTriggerOnNetworkChanged which only runs rate allocation if any of the dependent variables has changed
   thus allowing to remove many of the bool returns that try to indicate if the estimation has changed which would not
   be aware if the observers have changed.
 - SendSideBandwidthEstimation now has a UpdateBitrate and has clear code paths to which calls update bitrate.
 - Changes in enforce_min_bitrate so the 10kbps min is set from the BitrateController and not from the outside this keep valid as observers are changed.

R=henrik.lundin@webrtc.org, stefan@webrtc.org
BUG=3065

Review URL: https://webrtc-codereview.appspot.com/10189004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5752 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-21 16:51:01 +00:00
16b75c2c7a Remove locks in SendSideBandwidthEstimation since those are only accessed while owning locks in
BitrateControllerImpl (excluding AvailableBandwidth).

 + Refactor BitrateController logic around LowRate allocation so access to SendSideBandwidthEstimation
is clear.
 + Refactor NormalRateAllocation away from OnNetworkChange.
 + Annotate BitrateController locks.

R=henrik.lundin@webrtc.org, stefan@webrtc.org
BUG=3065

Review URL: https://webrtc-codereview.appspot.com/10129004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5749 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-21 14:00:51 +00:00
845862f279 Adding a new ramp-up-down-up test
The new test is based upon the exisiting rampup test, but also adds
a low-rate period. The main purpose of the test is to verify the
SuspendBelowMinBitrate functionality, which must be enabled for the
test to pass.

The CL also adds a change to the min bitrate in the send-side bandwidth
estimator when SuspendBelowMinBitrate is enabled.

An anonymous namespace is added around the StreamObserver classes
in the test to avoid silent linker conflicts that could happen
otherwise.

Note: this CL depends on https://webrtc-codereview.appspot.com/9049004/

BUG=2636
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9059004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5646 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-06 07:19:28 +00:00