33 Commits

Author SHA1 Message Date
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
a80c16a67c Revert "Update includes for webrtc/{base => rtc_base} rename (2/3)"
This reverts commit c3771cc4d37f5573fe53b7c7cff295a4f0f9560f.
(breaks downstream internal project)

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2972463002 .
Cr-Commit-Position: refs/heads/master@{#18873}
2017-07-01 14:48:18 +00:00
kjellander
c3771cc4d3 Update includes for webrtc/{base => rtc_base} rename (2/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"`

BUG=webrtc:7634
NOPRESUBMIT=True # cpplint errors that aren't caused by this CL.

Review-Url: https://codereview.webrtc.org/2969623003
Cr-Commit-Position: refs/heads/master@{#18870}
2017-06-30 20:42:44 +00:00
minyue
93e4522105 Renaming probing_interval to bwe_period globally.
probing_interval as a name is used for the period that BWE attempt to increase its estimate. The name is confusing since it is not related to "probing" which is a special mechanism for estimating BWE.

BUG=None

Review-Url: https://codereview.webrtc.org/2888893002
Cr-Commit-Position: refs/heads/master@{#18203}
2017-05-18 21:32:41 +00:00
philipel
5ef2bc1914 Reland of Fixes a bug where a video stream can get stuck in the suspended state. (patchset #1 id:1 of https://codereview.chromium.org/2703393002/ )
Reason for revert:
Downstream fixed

Original issue's description:
> Revert of Fixes a bug where a video stream can get stuck in the suspended state. (patchset #8 id:120001 of https://codereview.webrtc.org/2705603002/ )
>
> Reason for revert:
> Breaks downstream
>
> Original issue's description:
> > Fixes a bug where a video stream can get stuck in the suspended state.
> >
> > This happens if a lot of FEC is allocated when the stream becomes suspended. The required bitrate to unsuspend can then be too high so that the padding bitrate we are allowed to generate is not enough.
> >
> > This CL also switches the tests from using ISAC to OPUS as RampUpTest.UpDownUpAudioVideoTransportSequenceNumberRtx relies on audio BWE to work (which is only compatible with OPUS). I don't know why it didn't fail before.
> >
> > BUG=webrtc:7178
> >
> > Review-Url: https://codereview.webrtc.org/2705603002
> > Cr-Commit-Position: refs/heads/master@{#16739}
> > Committed: a518a39963
>
> TBR=mflodman@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:7178
>
> Review-Url: https://codereview.webrtc.org/2703393002
> Cr-Commit-Position: refs/heads/master@{#16751}
> Committed: b80bdcafed

TBR=mflodman@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:7178

Review-Url: https://codereview.webrtc.org/2704323003
Cr-Commit-Position: refs/heads/master@{#16753}
2017-02-21 15:28:31 +00:00
philipel
b80bdcafed Revert of Fixes a bug where a video stream can get stuck in the suspended state. (patchset #8 id:120001 of https://codereview.webrtc.org/2705603002/ )
Reason for revert:
Breaks downstream

Original issue's description:
> Fixes a bug where a video stream can get stuck in the suspended state.
>
> This happens if a lot of FEC is allocated when the stream becomes suspended. The required bitrate to unsuspend can then be too high so that the padding bitrate we are allowed to generate is not enough.
>
> This CL also switches the tests from using ISAC to OPUS as RampUpTest.UpDownUpAudioVideoTransportSequenceNumberRtx relies on audio BWE to work (which is only compatible with OPUS). I don't know why it didn't fail before.
>
> BUG=webrtc:7178
>
> Review-Url: https://codereview.webrtc.org/2705603002
> Cr-Commit-Position: refs/heads/master@{#16739}
> Committed: a518a39963

TBR=mflodman@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:7178

Review-Url: https://codereview.webrtc.org/2703393002
Cr-Commit-Position: refs/heads/master@{#16751}
2017-02-21 14:52:26 +00:00
stefan
a518a39963 Fixes a bug where a video stream can get stuck in the suspended state.
This happens if a lot of FEC is allocated when the stream becomes suspended. The required bitrate to unsuspend can then be too high so that the padding bitrate we are allowed to generate is not enough.

This CL also switches the tests from using ISAC to OPUS as RampUpTest.UpDownUpAudioVideoTransportSequenceNumberRtx relies on audio BWE to work (which is only compatible with OPUS). I don't know why it didn't fail before.

BUG=webrtc:7178

Review-Url: https://codereview.webrtc.org/2705603002
Cr-Commit-Position: refs/heads/master@{#16739}
2017-02-21 12:12:23 +00:00
minyue
78b4d56535 Relanding "Pass time constant to bwe smoothing filter."
An earlier attempt to land this was in https://codereview.webrtc.org/2518923003/

It was failed because it removed an API. This CL fixes this.

BUG=webrtc:6443, webrtc:6303

Review-Url: https://codereview.webrtc.org/2536753002
Cr-Commit-Position: refs/heads/master@{#15325}
2016-11-30 12:47:47 +00:00
kwiberg
af476c737f RTC_[D]CHECK_op: Remove "u" suffix on integer constants
There's no longer any need to make the two arguments have the same
signedness, so we can drop the "u" suffix on literal integer
arguments.

NOPRESUBMIT=true
BUG=webrtc:6645

Review-Url: https://codereview.webrtc.org/2535593002
Cr-Commit-Position: refs/heads/master@{#15280}
2016-11-28 23:21:51 +00:00
ossu
6287e82b9b Revert of Pass time constant to bwe smoothing filter. (patchset #8 id:140001 of https://codereview.webrtc.org/2518923003/ )
Reason for revert:
Unfortunately, this change breaks internal projects. Specifically the change to the CongestionController interface means anything implementing it will be forced to change in lock-step.

Original issue's description:
> Pass time constanct to bwe smoothing filter.
>
> BUG=webrtc:6443, webrtc:6303
>
> Committed: https://crrev.com/9abbf5ae4ec7d688a9b4aa03a405f3faadb74b90
> Cr-Commit-Position: refs/heads/master@{#15266}

TBR=minyue@webrtc.org,stefan@webrtc.org,solenberg@webrtc.org,michaelt@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6443, webrtc:6303

Review-Url: https://codereview.webrtc.org/2532993002
Cr-Commit-Position: refs/heads/master@{#15272}
2016-11-28 16:05:23 +00:00
michaelt
9abbf5ae4e Pass time constanct to bwe smoothing filter.
BUG=webrtc:6443, webrtc:6303

Review-Url: https://codereview.webrtc.org/2518923003
Cr-Commit-Position: refs/heads/master@{#15266}
2016-11-28 15:00: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
asapersson
1d02d3e5e6 Remove RTC_LOGGED_* macro.
BUG=

Review-Url: https://codereview.webrtc.org/2326843003
Cr-Commit-Position: refs/heads/master@{#14174}
2016-09-10 05:40:34 +00:00
perkj
26091b1118 This reverts commit 8eb37a39e79fe1098d3503dcb8c8c2d196203fed. Chrome now have its own implementation of TaskQueues that is based on Chrome threads.
cl was originally reviewed here:
https://codereview.webrtc.org/2060403002/

- Add task queue to Call with the intent of replacing the use of one of the process threads.

- Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue.

- BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread.

- VideoEncoderConfig and VideoSendStream::Config support move semantics.

- The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames.

TBR=mflodman@webrtc.org
BUG=webrtc:5687

Review-Url: https://codereview.webrtc.org/2250123002
Cr-Commit-Position: refs/heads/master@{#14014}
2016-09-01 08:17:43 +00:00
perkj
8eb37a39e7 Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ )
Reason for revert:
Failed on Win 10 Chrome FYI.

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio

#
# Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138
# last system error: 87
# Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295)
#

WebRtcBrowserTest

#

Original issue's description:
> - Add task queue to Call with the intent of replacing the use of one of the process threads.
>
> - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue.
>
> - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread.
>
> - VideoEncoderConfig and VideoSendStream::Config support move semantics.
>
> - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames.
>
> BUG=webrtc:5687
>
> Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473
> Cr-Commit-Position: refs/heads/master@{#13767}

TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@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/2248713003
Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 09:40:59 +00:00
perkj
cc168360f4 - Add task queue to Call with the intent of replacing the use of one of the process threads.
- Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue.

- BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread.

- VideoEncoderConfig and VideoSendStream::Config support move semantics.

- The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames.

BUG=webrtc:5687

Review-Url: https://codereview.webrtc.org/2060403002
Cr-Commit-Position: refs/heads/master@{#13767}
2016-08-16 07:38:51 +00:00
perkj
9b522f8d04 Add more logging about the bwe state and VideoSendStream state.
Review-Url: https://codereview.webrtc.org/2121273003
Cr-Commit-Position: refs/heads/master@{#13402}
2016-07-07 07:36:40 +00:00
mflodman
48a4beb7a4 Auto pause video streams based on encoder target bitrate.
This CL changes the auto-pause logic to suspend a stream based on the
encoder target bitrate instead of the allocated bitrate for a stream,
to account for possible protection, e.g. FEC and NACK.

This CL also adds periodic logging of the current BWE and possibility
to run with suspension in video loopback test.

BUG=webrtc:5868
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13360}
2016-07-01 11:04:10 +00:00
perkj
57c21f9b44 Remove ViEEncoder::Pause / Start
This cl change so that VideoSendStream::Start adds the stream as a BitrateObserver and VideoSendStream::Stop removes the stream as observer.

That also means that start will trigger a VideoEncoder::SetRate call with the most recent bitrate estimate.
VideoSendStream::Stop will trigger a VideoEncoder::SetRate with bitrate  = 0.

BUG=webrtc:5687 b/28636240

Review-Url: https://codereview.webrtc.org/2070343002
Cr-Commit-Position: refs/heads/master@{#13192}
2016-06-17 14:27:23 +00:00
perkj
71ee44cc6d This cl:
1. It moves calculation of the needed padding to VideoSendStream instead of ViEEncoder and only does it once per send Stream instead of every time the network estimate changes.

2. The maximum amount of padding sent was prior to this cl calculated and updated based on network estimate changes. However, it can only change based on encoder configuration changes and if send streams are added or removed. This cl change the VideoSendStream/VieEncoder to notify the BitrateAllocator of changes to the needed padding bitrate and for BitrateAllocator to notify Call of these changes.

3. Fixed an issue in the SendPacer where it could send a padding packet before sending a real packet. This caused the test EndToEndTest.RestartingSendStreamPreservesRtpStatesWithRtx to fail with these refactorings since the pacer suddenly could send a padding packet before the encoder had produced its first frame.

BUG=webrtc:5687

Review-Url: https://codereview.webrtc.org/1993113003
Cr-Commit-Position: refs/heads/master@{#13149}
2016-06-15 07:47:58 +00:00
mflodman
101f250a30 Implementing auto pausing of video streams.
This CL implements auto pausing video streams per stream with logic to
avoid toggling state too often.

Also re-enabling tests disabled for Mac, with the assumption the new
logic removes flakiness.

BUG=webrtc:5868,webrtc:5407
R=pbos@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13092}
2016-06-09 15:21:30 +00:00
perkj
fea93099f0 This reland https://codereview.webrtc.org/1932683002/.
Remove ViEEncoder::SetNetworkStatus.

Original cl description:
This cl removed ViEEncoder::SetNetworkStatus. Instead the PacedSender will report that frames can not be sent when the network is down and the BitrateController will report an estimated available bandwidth of 0 bps.

Patchset #1 is a pure reland.
Patchset #2 change the bitrate allocator to always return an initial bitrate >0 regardless of the estimates. The observer will be notified though if the network is down.

BUG=webrtc:5687

Review-Url: https://codereview.webrtc.org/1972183004
Cr-Commit-Position: refs/heads/master@{#12743}
2016-05-14 07:58:54 +00:00
mflodman
2ebe5b1cd8 Refactor before implementing per stream suspension.
This CL contains a few minor changes to names, function signatures and
merges two structs into one.

BUG=5868

Review-Url: https://codereview.webrtc.org/1952923005
Cr-Commit-Position: refs/heads/master@{#12716}
2016-05-13 08:43:56 +00:00
perkj
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
perkj
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
perkj
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
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
mflodman
86aabb288d Move BitrateAllocator reference from ViEEncoder to VideoSendStream.
This CL will be followed up with a CL adding AudioSendStream to
BitrateAllocator, so this is a small CL to have the video connection to
BitrateAllocator "at the same level" as for audio.

BUG=webrtc:5079
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11955}
2016-03-11 14:44:44 +00:00
tommi
63cb434691 Switch use of CriticalSectionWrapper -> rtc::CriticalSection in call/
This is a first cl of removing use of CriticalSectionWrapper after a series of cleanup CLs that have been landing recently (and still are landing).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11316}
2016-01-20 10:32:58 +00:00
mflodman
0e7e259ebd Move BitrateAllocator from BitrateController logic to Call.
This is a step on the way to have variable bitrate for audio and is
intended to be as much of a no-op as possible.

BUG=webrtc:5079

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

Cr-Commit-Position: refs/heads/master@{#10630}
2015-11-13 05:02:46 +00:00