Commit graph

45 commits

Author SHA1 Message Date
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
gnish
a36165c77b Final version of BBR, with tweaks made for WebRTC, major changes:
1) Entering PROBE_RTT when necessary.
2) Congestion window gain of 0.65 instead of constant 4 packets.
3) {1.1, 0.9} pair instead of {1.25, 0.75}
4) Recovery mode.
5) No reaction to losses due to Recovery mode's implementation.
6) Supports encoder.
7) A new test compiling most of the simulation tests.
8) Bucket for high gain phase, disabled by default.
9) Pacer specific to BBR.

BUG=webrtc:7713

Review-Url: https://codereview.webrtc.org/2999073002
Cr-Commit-Position: refs/heads/master@{#19418}
2017-08-20 16:19:58 +00:00
Danil Chapovalov
38018ba67d Merge BitrateControllerImpl::RtcpBandwidthObserverImpl into BitrateControllerImpl
This allows to protect ssrc_to_last_received_extended_high_seq_num_ member and
make calls to OnReceivedRtcpReceiverReport thread-safe without introducing new critical section.

Bug: webrtc:7735
Change-Id: Iee23bb780d07b0f906f1f8eeddde2b74cc0a2b89
Reviewed-on: https://chromium-review.googlesource.com/518130
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18540}
2017-06-12 15:21:59 +00:00
kthelgason
6bfe49c00a Remove more CriticalSectionWrappers.
BUG=webrtc:7035

Review-Url: https://codereview.webrtc.org/2785673002
Cr-Commit-Position: refs/heads/master@{#17465}
2017-03-30 08:14:41 +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
elad.alon
f949000834 Rename webrtc::PacketInfo to webrtc::PacketFeedback. This resolves ambiguity with a similarly named RTCPReceiver::PacketInformation and RtpPacketizerVp9::PacketInfo.
BUG=None

Review-Url: https://codereview.webrtc.org/2710093004
Cr-Commit-Position: refs/heads/master@{#17066}
2017-03-06 13:32:21 +00:00
Stefan Holmer
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
stefan
5ec85fbcb7 Revert of Fix race / crash in OnNetworkRouteChanged(). (patchset 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
stefan
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
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
philipel
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
ivoc
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
ivoc
9e03c3b372 Revert of Move RtcEventLog object from inside VoiceEngine to Call. (patchset 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
Ivo Creusen
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
honghaiz
059e183419 Reland of "Revert of Update the BWE when the network route changes. (patchset id:180001 of https://… (patchset 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  id:180001 of https://… (patchset  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  id:180001 of https://codereview.webrtc.org/2000063003/ )"
> >
> > This reverts commit 72d41aa6da.
> >
> > 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
honghaiz
ae4d0d922b Revert of Revert "Revert of Update the BWE when the network route changes. (patchset id:180001 of https://… (patchset 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  id:180001 of https://codereview.webrtc.org/2000063003/ )"
>
> This reverts commit 72d41aa6da.
>
> 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
Honghai Zhang
5b5d2cdad7 Revert "Revert of Update the BWE when the network route changes. (patchset id:180001 of https://codereview.webrtc.org/2000063003/ )"
This reverts commit 72d41aa6da.

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
guidou
72d41aa6da Revert of Update the BWE when the network route changes. (patchset 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
honghaiz
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
perkj
ec81bcd519 Remove SendPacer from ViEEncoder and make sure SendPacer starts at a valid bitrate
This reverts commit e30c272051 (https://codereview.webrtc.org/1958053002/)

Original reverted cl is in patch set .
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
perkj
e30c272051 Revert "Reland of Remove SendPacer from ViEEncoder
Revert due to crbug/609816. Investigation is ongoing.

This reverts commit 28a44564c9. (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 id:240001 of https://codereview.webrtc.org/1917793002/ )"
This reverts commit 825eb58d59.

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

patchset  is a pure reland.
patchset  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
perkj
825eb58d59 Revert of Remove SendPacer from ViEEncoder (patchset 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
perkj
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
philipel
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
stefan
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
terelius
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
Henrik Kjellander
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
sprang
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
sprang@webrtc.org
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
stefan@webrtc.org
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
pkasting@chromium.org
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
sprang@webrtc.org
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
stefan@webrtc.org
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
andresp@webrtc.org
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
solenberg@webrtc.org
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
andrew@webrtc.org
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
andresp@webrtc.org
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
andresp@webrtc.org
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
henrik.lundin@webrtc.org
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
henrik.lundin@webrtc.org
b56d0e383e Change the low-bitrate handling in BitrateControllerImpl
Changing to using strategy classes rather than having two different
derived classes of BitrateControllerImpl. This enables run-time switching
of the strategy, which is now possible through a new API. The reason is
that it must fit the current design of ViE.

BUG=2436
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5028 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-24 09:24:06 +00:00
henrik.lundin@webrtc.org
29dd0de5b3 Changing the bitrate clamping in BitrateControllerImpl
This CL implements an alternative to the bitrate clamping that is done
in BitrateControllerImpl. The default behavior is unchanged, but if
the new algorithm is enabled the behavior is as follows:
When the new bitrate is lower than the sum of min bitrates, the
algorithm will give each observer up to its min bitrate, one
observer at a time, until the bitrate budget is depleted. Thus,
with this change, some observers may get less than their min bitrate,
or even zero.

Unit tests are implemented.

Also fixing two old lint warnings in the affected files.

This change is related to the auto-muter feature.

BUG=2436
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5007 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-21 14:00:01 +00:00
pbos@webrtc.org
2e10b8e4a0 Include files from webrtc/.. paths in bitrate_controller/.
BUG=1662
R=tommi@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4349 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-16 12:54:53 +00:00
stefan@webrtc.org
42aa10eba7 Clarifies the bandwidth estimation interfaces.
BUG=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3087 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-11-13 15:02:13 +00:00
andrew@webrtc.org
14b43beb7c Move src/ -> webrtc/
TBR=niklas.enbom@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2963 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-10-22 18:19:23 +00:00
Renamed from src/modules/bitrate_controller/include/bitrate_controller.h (Browse further)