Commit Graph

11115 Commits

Author SHA1 Message Date
8d08a92c05 Do not copy I420 frames in the decoder when not necessary.
In most cases we can just return a frame referencing the buffer
returned by the decoder.

Bug: webrtc:7760
Change-Id: I0b42ab9662b39149e42a3c83adfd38a9d80e0e30
Reviewed-on: https://chromium-review.googlesource.com/544299
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18824}
2017-06-29 08:10:16 +00:00
b14fad45b8 Adding newline at the end of .proto files
Some .proto files have newline at the end. This CL levels all our .proto
files. A presubmit check will follow.

NOTRY=True
TBR=minyue@webrtc.org

Bug: None
Change-Id: I988fe94c31abf91c85a45b564c488329d677b958
Reviewed-on: https://chromium-review.googlesource.com/552137
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18823}
2017-06-29 07:09:12 +00:00
f4efb6fb3d Reland "Move webrtc/{base => rtc_base} (stub headers)
Add the stub headers from https://codereview.webrtc.org/2877023002
as a separate commit. This preserves git blame history of the moved files.

BUG=webrtc:7634
NOTRY=True
TBR=kwiberg@webrtc.org

Change-Id: Ic141abf11801fbfdeea5bcdb23608696ad449013
Reviewed-on: https://chromium-review.googlesource.com/554623
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18822}
2017-06-29 06:21:49 +00:00
c03627683f Reland "Move webrtc/{base => rtc_base}" (https://codereview.webrtc.org/2877023002)
Reland the base->rtc_base without adding stub headers (will be
done in follow-up CL). This preserves git blame history of all files.

BUG=webrtc:7634
NOTRY=True
TBR=kwiberg@webrtc.org

Change-Id: Iea3bb6f3f67b8374c96337b63e8f5aa3e6181012
Reviewed-on: https://chromium-review.googlesource.com/554611
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18821}
2017-06-29 06:04:25 +00:00
ec78f1cebc Revert "Move webrtc/{base => rtc_base}" (https://codereview.webrtc.org/2877023002)
Will reland in two different commits to preserve git blame history.

BUG=webrtc:7634
NOTRY=True
TBR=kwiberg@webrtc.org

Change-Id: I550da8525aeb9c5b8f96338fcf1c9714f3dcdab1
Reviewed-on: https://chromium-review.googlesource.com/554610
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18820}
2017-06-29 05:54:22 +00:00
a4c113afe1 Support building WebRTC without audio and video for IOS.
Reorganized the targets in webrtc/sdk/BUILD.gn so that the applications which use
WebRTC DataChannel only can depend on the "peerconnection_factory_no_media"
instead of "rtc_sdk_objc" to reduce the binary size.

Provided a no-media implementation of RTCPeerConnectionFactory using the macro
"HAVE_NO_MEDIA".

BUG=webrtc:7613

Review-Url: https://codereview.webrtc.org/2944643002
Cr-Commit-Position: refs/heads/master@{#18819}
2017-06-28 21:05:44 +00:00
6776518bea Move webrtc/{base => rtc_base}
This refactoring takes a careful approach to avoid rushing the change:
* stub headers are left in all the old locations of webrtc/base
* existing GN targets are kept and now just forward to the moved ones
  using public_deps.
The only exception to the above is the base_java target and its .java files,
which were moved to webrtc/rtc_base right away since it's not possible
to use public_deps for android_library.
To avoid breaking builds, a temporary Dummy.java file was added to
the new intermediate target in webrtc/rtc_base:base_java as well to avoid
hitting a GN assert in the android_library template.

The above approach should make the transition smooth without breaking
downstream.

A helper script was created (https://codereview.webrtc.org/2879203002/)
and was run like this:
stub-headers.py -s webrtc/base -d webrtc/rtc_base -i 7634
stub-headers.py -s webrtc/base/numerics -d webrtc/rtc_base/numerics -i 7634

Fixed invalid header guards in the following files:
webrtc/base/base64.h
webrtc/base/cryptstring.h
webrtc/base/event.h
webrtc/base/flags.h
webrtc/base/httpbase.h
webrtc/base/httpcommon-inl.h
webrtc/base/httpcommon.h
webrtc/base/httpserver.h
webrtc/base/logsinks.h
webrtc/base/macutils.h
webrtc/base/nattypes.h
webrtc/base/openssladapter.h
webrtc/base/opensslstreamadapter.h
webrtc/base/pathutils.h
webrtc/base/physicalsocketserver.h
webrtc/base/proxyinfo.h
webrtc/base/sigslot.h
webrtc/base/sigslotrepeater.h
webrtc/base/socket.h
webrtc/base/socketaddresspair.h
webrtc/base/socketfactory.h
webrtc/base/stringutils.h
webrtc/base/testbase64.h
webrtc/base/testutils.h
webrtc/base/transformadapter.h
webrtc/base/win32filesystem.h

Added new header guards to:
sslroots.h
testbase64.h

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True
R=kwiberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2877023002 .
Cr-Commit-Position: refs/heads/master@{#18816}
2017-06-28 18:58:10 +00:00
86c40a14b4 Fixing RTCIceCandidatePairStats.nominated for ICE controlling agent.
Was only working when the nonstandard "renomination" extension to ICE
is enabled, which chromium doesn't use.

BUG=chromium:734094

Review-Url: https://codereview.webrtc.org/2957303002
Cr-Commit-Position: refs/heads/master@{#18814}
2017-06-28 16:37:23 +00:00
c3e3e60f59 nit: Rename RtpDemuxer::sink_ to RtpDemuxer::ssrc_sinks_
Rationale:
1. sinks_ is not properly differentiated from rsid_sinks_.
2. Consistency with RtcpDemuxer.

BUG=webrtc:7135

Review-Url: https://codereview.webrtc.org/2958283002
Cr-Commit-Position: refs/heads/master@{#18813}
2017-06-28 15:18:51 +00:00
9f789a4500 LowCutFilter::BiqueadFilter::Process: Fix UBSan fuzzer bug
(left shift of negative value)


Bug: chromium:735593
Change-Id: I9f1165370d850456480fbb22ce2434bf933a420b
Reviewed-on: https://chromium-review.googlesource.com/552136
Commit-Queue: Alex Loiko <aleloi@google.com>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18812}
2017-06-28 14:55:20 +00:00
d6e9466e7e No compliation-flag-dependent members in CriticalSection
Having members in a class which only exist when certain compliation flags are turned on (unless relating to the target platform) means that those flags must be the same when compiling the module as when including its headers from other modules. This means that code outside of WebRTC runs the risk of misjudging the size of an rtc::CriticalSection, or any class which has an rtc::CriticalSection as a member. (This rule is applied recursively.) If a mismatch occurs, memory corruption is likely.

Having discussed this a bit, we have decided that the simplest solution is probably the best - always define those members, even when compilation flags (namely, CS_DEBUG_CHECKS) render it unused.

BUG=webrtc:7867

Review-Url: https://codereview.webrtc.org/2957753002
Cr-Commit-Position: refs/heads/master@{#18811}
2017-06-28 14:31:30 +00:00
3d0e7bb907 Improved thread checking scheme for iOS.
TBR=zeke

Bug: b/63071036
Change-Id: Iaa6325a8d360f121f82683115c73cc136e174ba6
Reviewed-on: https://chromium-review.googlesource.com/552539
Reviewed-by: Henrik Andreasson <henrika@webrtc.org>
Commit-Queue: Henrik Andreasson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18810}
2017-06-28 14:20:30 +00:00
1330166bc0 Add value_type alias to rtc::Buffer
It allows to use rtc::Buffer in templates that expect std container,
e.g. it can now be used as ::testing::ElementsAreArray parameter

Bug: None
Change-Id: I97d7ffb13393d02850ddb213f7a1d01129b10b05
Reviewed-on: https://chromium-review.googlesource.com/539635
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18809}
2017-06-28 13:59:40 +00:00
c8e0552c07 Limit the number of simultaneous event logs.
BUG=webrtc:7887

Review-Url: https://codereview.webrtc.org/2956003003
Cr-Commit-Position: refs/heads/master@{#18808}
2017-06-28 13:40:51 +00:00
3635f44f3e Workaround for hardware encoders crashing timing frames processing
BUG=webrtc:7893

Review-Url: https://codereview.webrtc.org/2961043002
Cr-Commit-Position: refs/heads/master@{#18806}
2017-06-28 10:53:19 +00:00
03fa534fcc Support getting external HMAC auth context with libsrtp 2.1.0.
This is in preparation of upgrading to libsrtp 2.1.0.

BUG=webrtc:7856

Review-Url: https://codereview.webrtc.org/2958123002
Cr-Commit-Position: refs/heads/master@{#18805}
2017-06-28 10:35:57 +00:00
db3c9b0f72 Expose ILBC codec in webrtc/api/audio_codecs/
BUG=webrtc:7834, webrtc:7840

Review-Url: https://codereview.webrtc.org/2951873002
Cr-Commit-Position: refs/heads/master@{#18803}
2017-06-28 09:05:04 +00:00
372e587ea8 Fix samplingMatrix for I420Frames converted from VideoFrame.
The conversion code was wrong because it assumed the 3x3 matrix is a
XYZ-matrix when it really is XYW-matrix. We have to override the matrix
for I420 frames to flip the vertically before rendering.

R=magjed@webrtc.org

Bug: webrtc:7760
Change-Id: I1f08c1a929bf5721706e2a902701100cf7a9c31d
Reviewed-on: https://chromium-review.googlesource.com/541346
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18801}
2017-06-28 07:58:42 +00:00
3aa3ea7913 Improve HardwareVideoDecoder stability.
Adds a timeout to the dequeue input buffer call. This improves stability
because WebRTC quickly queues frames multiple when the call starts. This
might cause the decoder to run out of input buffers. Waiting for
dequeueOutputBuffers call is no longer necessary.

Bug: webrtc:7760
Change-Id: I503ff1cf44042c4d8610077090148d9dfef169f5
Reviewed-on: https://chromium-review.googlesource.com/548357
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18800}
2017-06-28 07:38:22 +00:00
3dd574ad31 Ensure Dxgi duplicator works correctly in session 0
A recent update of Windows 10 blocks IDXGIAdapter::EnumOutputs() in session 0,
so ScreenCapturerWinDirectx::IsSupported() always returns false in session 0. We
should ensure ScreenCapturerWinDirectx can respond correctly in session 0.
Meanwhile, this change looses the requirement of DirectX capturer: it still
works if some of the video adapters do not support DirectX 11 or
IDXGIOutputDuplication. This issue usually happens when handling a virtual video
adapter.

BUG=webrtc:7809

Review-Url: https://codereview.webrtc.org/2937663003
Cr-Commit-Position: refs/heads/master@{#18797}
2017-06-28 05:04:21 +00:00
696f8ca2fa Handle the PROTO_TSL when getting the protocol priority.
This bug breaks the internal project.

TBR=deadbeef@webrtc.org, pthacher@webrtc.org
BUG=webrtc:7889

Review-Url: https://codereview.webrtc.org/2959993002
Cr-Commit-Position: refs/heads/master@{#18792}
2017-06-27 22:11:24 +00:00
a7d0df7ac1 Enable libjingle_peerconnection_datachannelonly_so target.
This change also wires up the rest of the production code in
webrtc/sdk/android to be built when the directory is a dependency.

BUG=webrtc:7613
NOTRY=True

Change-Id: Ideda181970a5a570c3f8148b033e471e926243d1
Reviewed-on: https://chromium-review.googlesource.com/548038
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18791}
2017-06-27 20:20:05 +00:00
323197ab0c Attempt to reduce AUDIO_RECORD_START_STATE_MISMATCH error rate on Android.
Bug: b/63010674
Change-Id: I75ab10d43c13622084f5819bef7fbe2185f40b20
Reviewed-on: https://chromium-review.googlesource.com/549363
Commit-Queue: Alex Glaznev <glaznev@chromium.org>
Reviewed-by: Alex Glaznev <glaznev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#18788}
2017-06-27 15:58:43 +00:00
471f63559f Allow passing in decoder factory to PeerConnectionFactory.
Bug: webrtc:7760
Change-Id: I8509de8f0170f1f60f917992b5806b926a8bb392
Reviewed-on: https://chromium-review.googlesource.com/535561
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18787}
2017-06-27 15:31:13 +00:00
8179a7cf97 Fixing bad use of std::sort in test method.
It was used to force a codec to the top of a list, but it resulted in
"a < a" being true, which some C++ runtimes complain about.

BUG=None
TBR=pthatcher@webrtc.org

Review-Url: https://codereview.webrtc.org/2963543002
Cr-Commit-Position: refs/heads/master@{#18786}
2017-06-27 14:52:50 +00:00
376473054c Only use 95% of the link capacity if the true link capacity is found by probing.
Dont do a normal AimdRateControlUpdate update after a probe. Only set result.updated if the bitrate estimate has changed.

BUG=webrtc:7866

Review-Url: https://codereview.webrtc.org/2949203002
Cr-Commit-Position: refs/heads/master@{#18785}
2017-06-27 14:50:31 +00:00
4bdced5d93 Corrected the initialization of the AEC3
This CL corrects the initialization of the AEC3, as well 
as for the other submodules in the whole audio processing module
in the sense that it properly update the submodule states also
for the case when reinitialization is trigger from the render
side of the audio processing module.

Bug: chromium:736889,webrtc:7879
Change-Id: I423e963835d0c3227caa8e186b29031bcb912515
Reviewed-on: https://chromium-review.googlesource.com/549315
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18784}
2017-06-27 14:43:03 +00:00
267041c470 Fix deadlock in webrtc_perf_tests
Reenable hanging tests on Mac.

Deadlock happened because the following locks were grabbed by two threads at the end of a test:
Thread 1:
CapturedFrameForwarder::AddOrUpdateSink() locks CapturedFrameForwarder::crit_ and calls
FrameGeneratorCapturer::AddOrUpdateSink() what tries to lock FrameGeneratorCapturer::lock_.

Thread 2:
FrameGeneratorCapturer::InsertFrame() locks FrameGeneratorCapturer::lock_ and calls
CapturedFrameForwarder::OnFrame() which tries to lock CapturedFrameForwarder::crit_.

So two threads are locking two same locks in different orders which may cause deadlock.

BUG=webrtc:7870

Review-Url: https://codereview.webrtc.org/2955083002
Cr-Commit-Position: refs/heads/master@{#18783}
2017-06-27 14:21:01 +00:00
4847ae6b51 Reland of Periodically update codec bit/frame rate settings.
Patch set 1 is a reland + trivial rebase.
Patch set >= 2 contains bug fixes.

> Original issue's description:
> > Fix bug in vie_encoder.cc which caused channel parameters not to be updated at regular intervals, as it was intended.
> >
> > That however exposes a bunch of failed test, so this CL also fixed a few other things:
> > * FakeEncoder should trust the configured FPS value rather than guesstimating itself based on the realtime clock, so as not to completely undershoot targets in offline mode. Also, compensate for key-frame overshoots when outputting delta frames.
> > * FrameDropper should not assuming incoming frame rate is 0 if no frames have been seen.
> > * Fix a bunch of test cases that started failing because they were relying on the fake encoder undershooting.
> > * Fix test
> >
> > BUG=7664
> >
> > Review-Url: https://codereview.webrtc.org/2883963002
> > Cr-Commit-Position: refs/heads/master@{#18473}
> > Committed: 6431e21da6

BUG=webrtc:7664

Review-Url: https://codereview.webrtc.org/2953053002
Cr-Commit-Position: refs/heads/master@{#18782}
2017-06-27 14:06:52 +00:00
f0a6fb19c6 Corrected the computation of the headroom in the AEC3 buffer alignment
This CL corrects the computation of the delay headroom so that
it is only updated when the delay is updated. This is important
as otherwise a too large headroom will be reported, which then
could cause buffer access issues.

Bug: webrtc:7878, chromium:736893
Change-Id: Ib37cb608b064dd5d4df3f8fc423448ee80ed0106
Reviewed-on: https://chromium-review.googlesource.com/549335
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18781}
2017-06-27 11:42:37 +00:00
17c11ec37c Fix building RTCCameraVideoCapturereTests with iOS 11 SDK.
The iOS 11 SDK adds nullability annotations to several framework functions
and in this it added the _Nonnull specifier to a protocol method that
we implement. We were passing nil to that method in a test.
The warning is now fixed by passing a mock object instead of nil.

Bug: webrtc:7883
Change-Id: I9f64b0c59750629ca3969400aa725729bb10541b
Reviewed-on: https://chromium-review.googlesource.com/549927
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Kári Tristan Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18780}
2017-06-27 11:01:47 +00:00
121ea329ba Notify delegates about audio glitches in real time
Bug: webrtc:7819
Change-Id: I72ec77d216ce386dd45aef68eeac833b3a75b670
Reviewed-on: https://chromium-review.googlesource.com/543239
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Henrik Andreasson <henrika@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18778}
2017-06-27 09:43:27 +00:00
93ad1f7f1b Reland C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces.
This reverts commit 37a23504980bbd06fa9b1709357ce6a33afada30.

Reason for revert: Fix compilation error on release builds.

Original change's description:
> Revert "C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces."
> 
> This reverts commit ef4342f21ba9448138fc7d22482f3210cb20fd7e.
> 
> Reason for revert: Breaks chromium.webrtc.fyi
> 
> Original change's description:
> > C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces.
> > 
> > Bug: webrtc:7760
> > Change-Id: I136aff9bcfb9244bb45ec552b5443f4a06b87c27
> > Reviewed-on: https://chromium-review.googlesource.com/535475
> > Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> > Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#18773}
> 
> TBR=magjed@webrtc.org,sakal@webrtc.org
> 
> Change-Id: I45810b9f3573074bb52539aa63843d59865c02f2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:7760
> Reviewed-on: https://chromium-review.googlesource.com/549337
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#18776}

TBR=magjed@webrtc.org,sakal@webrtc.org

Change-Id: Id38836a1cb63ff265af6562a0512818acb8afb0a
Bug: webrtc:7760
Reviewed-on: https://chromium-review.googlesource.com/549338
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18777}
2017-06-27 08:26:00 +00:00
37a2350498 Revert "C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces."
This reverts commit ef4342f21ba9448138fc7d22482f3210cb20fd7e.

Reason for revert: Breaks chromium.webrtc.fyi

Original change's description:
> C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces.
> 
> Bug: webrtc:7760
> Change-Id: I136aff9bcfb9244bb45ec552b5443f4a06b87c27
> Reviewed-on: https://chromium-review.googlesource.com/535475
> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#18773}

TBR=magjed@webrtc.org,sakal@webrtc.org

Change-Id: I45810b9f3573074bb52539aa63843d59865c02f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7760
Reviewed-on: https://chromium-review.googlesource.com/549337
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18776}
2017-06-27 07:35:42 +00:00
ef4342f21b C++ wrapper for VideoDecoder and VideoDecoderFactory interfaces.
Bug: webrtc:7760
Change-Id: I136aff9bcfb9244bb45ec552b5443f4a06b87c27
Reviewed-on: https://chromium-review.googlesource.com/535475
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18773}
2017-06-27 07:15:00 +00:00
a52722fac4 Reland of Create RtcpDemuxer (patchset #1 id:1 of https://codereview.webrtc.org/2957763002/ )
Reason for revert:
About to fix problem and reland.

Original issue's description:
> Revert of Create RtcpDemuxer (patchset #13 id:240001 of https://codereview.webrtc.org/2943693003/ )
>
> Reason for revert:
> Breaks Chromium FYI bots.
>
> The problem is in the BUILD.gn file.
>
> Sample failure:
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/17829
>
> Sample logs:
> use_goma = true
> """ to /b/c/b/Linux_Builder/src/out/Release/args.gn.
>
> /b/c/b/Linux_Builder/src/buildtools/linux64/gn gen //out/Release --check
>   -> returned 1
> ERROR at //third_party/webrtc/call/BUILD.gn:46:5: Can't load input file.
>     "//webrtc/base:rtc_base_approved",
>     ^--------------------------------
>
> Original issue's description:
> > Create RtcpDemuxer. Capabilities:
> > 1. Demux RTCP messages according to the sender-SSRC.
> > 2. Demux RTCP messages according to the RSID (resolved to an SSRC, then compared to the sender-RTCP).
> > 3. Allow listening in on all RTCP messages passing through the demuxer ("broadcast sinks").
> >
> > BUG=webrtc:7135
> >
> > Review-Url: https://codereview.webrtc.org/2943693003
> > Cr-Commit-Position: refs/heads/master@{#18763}
> > Committed: cb83bdf01f
>
> BUG=webrtc:7135
>
> Review-Url: https://codereview.webrtc.org/2957763002
> Cr-Commit-Position: refs/heads/master@{#18764}
> Committed: 0e7e7869e7

BUG=webrtc:7135

Review-Url: https://codereview.webrtc.org/2960623002
Cr-Commit-Position: refs/heads/master@{#18768}
2017-06-26 18:23:54 +00:00
b89f300e03 Run cl format on audio_device_pulse_linux.cc.
Occurrences of WEBRTC_TRACE(...) will in the future be replaced with the preferred logging mechanism LOG(...). That will be done with a script that runs 'git cl format' on diffs, which will break formatting of surrounding code if the file is not already formatted. Hence this CL.

BUG=webrtc:5118

Review-Url: https://codereview.webrtc.org/2953793002
Cr-Commit-Position: refs/heads/master@{#18766}
2017-06-26 14:01:32 +00:00
0e7e7869e7 Revert of Create RtcpDemuxer (patchset #13 id:240001 of https://codereview.webrtc.org/2943693003/ )
Reason for revert:
Breaks Chromium FYI bots.

The problem is in the BUILD.gn file.

Sample failure:
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/17829

Sample logs:
use_goma = true
""" to /b/c/b/Linux_Builder/src/out/Release/args.gn.

/b/c/b/Linux_Builder/src/buildtools/linux64/gn gen //out/Release --check
  -> returned 1
ERROR at //third_party/webrtc/call/BUILD.gn:46:5: Can't load input file.
    "//webrtc/base:rtc_base_approved",
    ^--------------------------------

Original issue's description:
> Create RtcpDemuxer. Capabilities:
> 1. Demux RTCP messages according to the sender-SSRC.
> 2. Demux RTCP messages according to the RSID (resolved to an SSRC, then compared to the sender-RTCP).
> 3. Allow listening in on all RTCP messages passing through the demuxer ("broadcast sinks").
>
> BUG=webrtc:7135
>
> Review-Url: https://codereview.webrtc.org/2943693003
> Cr-Commit-Position: refs/heads/master@{#18763}
> Committed: cb83bdf01f

TBR=stefan@webrtc.org,danilchap@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org,holmer@google.com,eladalon@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7135

Review-Url: https://codereview.webrtc.org/2957763002
Cr-Commit-Position: refs/heads/master@{#18764}
2017-06-26 13:28:36 +00:00
cb83bdf01f Create RtcpDemuxer. Capabilities:
1. Demux RTCP messages according to the sender-SSRC.
2. Demux RTCP messages according to the RSID (resolved to an SSRC, then compared to the sender-RTCP).
3. Allow listening in on all RTCP messages passing through the demuxer ("broadcast sinks").

BUG=webrtc:7135

Review-Url: https://codereview.webrtc.org/2943693003
Cr-Commit-Position: refs/heads/master@{#18763}
2017-06-26 12:56:34 +00:00
3ac91c7580 Disable AudioBweIntegrationTest.NoBandwidthDropAfterDtx - it's flaky
BUG=webrtc:7872

Review-Url: https://codereview.webrtc.org/2962493002
Cr-Commit-Position: refs/heads/master@{#18762}
2017-06-26 12:04:12 +00:00
1b97e26364 Don't forget to support G722 stereo decoding
https://codereview.webrtc.org/2940833002 added support for G722
decoding with the AudioDecoderFactoryTemplate API, but forgot to
support stereo.

BUG=webrtc:7839

Review-Url: https://codereview.webrtc.org/2945423003
Cr-Commit-Position: refs/heads/master@{#18761}
2017-06-26 11:19:43 +00:00
2f45b6b15f Remove unused "crypto_options_" field.
It is not used anywhere and looks like a leftover of
https://codereview.webrtc.org/2815513012/

BUG=None

Review-Url: https://codereview.webrtc.org/2958683002
Cr-Commit-Position: refs/heads/master@{#18760}
2017-06-26 11:07:52 +00:00
587ff11208 Revert of Disable RTCVideoRenderFrameCallbackNV12 test (patchset #1 id:20001 of https://codereview.webrtc.org/2951273002/ )
Reason for revert:
Test has been fixed.

Original issue's description:
> Disable RTCVideoRenderFrameCallbackNV12 test
>
> It has been crashing on trybots
>
> BUG=webrtc:7863
> TBR=magjed@webrtc.org
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2951273002
> Cr-Commit-Position: refs/heads/master@{#18720}
> Committed: 4d25a0554a

TBR=kjellander@webrtc.org,oprypin@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7863

Review-Url: https://codereview.webrtc.org/2959673002
Cr-Commit-Position: refs/heads/master@{#18758}
2017-06-26 10:11:51 +00:00
d3cf0476b4 Put attribute before function name instead of after, as required by GCC
As suggested by marxin.liska@gmail.com in bug 7857.

BUG=webrtc:7857

Review-Url: https://codereview.webrtc.org/2947383002
Cr-Commit-Position: refs/heads/master@{#18757}
2017-06-26 08:32:40 +00:00
93ecc5dad0 Rename safe_cmp::{Eq,Ne,Lt,Le,Ge,Gt} to Safe{Eq,Ne,Lt,Le,Ge,Gt}
For consistency with SafeMin(), SafeMax(), and SafeClamp(). And so that we avoid introducing a namespace.

BUG=webrtc:7459

Review-Url: https://codereview.webrtc.org/2802423002
Cr-Commit-Position: refs/heads/master@{#18756}
2017-06-26 08:31:31 +00:00
3059378f7d Always reset the audio session configuration after a call.
After returning from the call the AVAudioSession was configured to
use the receiver instead of the speaker for audio output. The
configuration was only restored if the sound loop was previously
playing, this change makes sure that the configuration is always
reset so the sound can be played audibly after a call has been
finished.

Bug: webrtc:7792
Change-Id: Idabf6fadc8041b18722cb8f5e89e0c8c36b1b74d
Reviewed-on: https://chromium-review.googlesource.com/544819
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18754}
2017-06-26 07:19:11 +00:00
852a560088 Fix some bugs in the HardwareVideoDecoder.
This change preserves rotation through the decoder, rather than requiring
callers to keep track of rotation.  The test now uses a non-zero rotation
to ensure it is preserved.

Commit 3814524 inadvertently reverted several changes that weren't merged
properly before submit.  In particular, it clobbered some log messages,
comments, and error codes.  This change fixes those mistakes.

BUG=webrtc:7760

Change-Id: If529ee59fc56de7937e362dc15591295e2cf9f79
Reviewed-on: https://chromium-review.googlesource.com/546415
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18752}
2017-06-26 06:11:21 +00:00
7790e8779d Disable FullStackTest.SimulcastFullHdOveruse on Mac
This test was added in "Add cropping to VIEEncoder to match simulcast streams resolution (https://codereview.webrtc.org/2936393002) and makes
webrtc_perf_tests fail+timeout on Mac:
https://build.chromium.org/p/client.webrtc.perf/builders/Mac%2010.11/builds/2896

[ RUN      ] FullStackTest.SimulcastFullHdOveruse
- Uh, I'm-I'm not quite dead, sir.
- Uh, I-I think uh, I could pull through, sir.
../../webrtc/video/video_quality_test.cc:419: Failure
Expected: (frames_processed) > (last_frames_processed), actual: 591 vs 591
Analyzer stalled while waiting for test to finish.

TBR=sprang@webrtc.org,magjed@webrtc.org,ilnik@webrtc.org
BUG=webrtc:7375, webrtc:6958
NOTRY=True

Review-Url: https://codereview.webrtc.org/2960573002
Cr-Commit-Position: refs/heads/master@{#18748}
2017-06-25 20:50:03 +00:00
5e5f7e14b2 Remove unneeded enum forward declaration
While building Chrome with the VC++ 2017 /permissive- flag I got a
warning about a forward declaration of enum RateControlRegion. Untyped
forward declarations of enums are illegal because the compiler doesn't
know what size to make them. The only reason this forward declaration is
legal is because it isn't needed (the type is already defined).

This was found because /permissive- (or, equivalently for this purpose,
/w14471) incorrectly fires on this forward declaration even though it is
legal.

BUG=chromium:736059

Review-Url: https://codereview.webrtc.org/2834753002
Cr-Commit-Position: refs/heads/master@{#18741}
2017-06-24 20:04:29 +00:00
e5960ce737 Revert "Revert "Revert "Revert "Support more formats in RTCVideoFrame""""
This reverts commit 1cfeb435427a2fa677a495e34c882096efc193d0.

Reason for revert: Fix unit test

Original change's description:
> Revert "Revert "Revert "Support more formats in RTCVideoFrame"""
> 
> This reverts commit 7583390d1a3a7c4e9a77da0d77250abac0c34d1d.
> 
> Reason for revert: Breaks unit tests
> 
> Original change's description:
> > Revert "Revert "Support more formats in RTCVideoFrame""
> > 
> > This reverts commit 0789dab2cbd1617e94d7300e375163d42345f3d4.
> > 
> > Reason for revert: Include obc_corevideoframebuffer target
> > 
> > Original change's description:
> > > Revert "Support more formats in RTCVideoFrame"
> > > 
> > > This reverts commit bd2220a9c496ef2e8567b68d4be9435a110bdc34.
> > > 
> > > Reason for revert: Broke external clients
> > > 
> > > Original change's description:
> > > > Support more formats in RTCVideoFrame
> > > > 
> > > > Implement Obj-C version of webrtc::VideoFrameBuffer and use that in
> > > > RTCVideoFrame.
> > > > 
> > > > Bug: webrtc:7785
> > > > Change-Id: I49f42bcf451dd6769b3a79a65fe7b400dce22677
> > > > Reviewed-on: https://chromium-review.googlesource.com/536773
> > > > Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> > > > Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#18691}
> > > 
> > > TBR=magjed@webrtc.org,andersc@webrtc.org
> > > 
> > > Change-Id: Id765dd9543ed0613a6b2de108b268c3501025fcd
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:7785
> > > Reviewed-on: https://chromium-review.googlesource.com/542837
> > > Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> > > Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#18697}
> > 
> > TBR=magjed@webrtc.org,andersc@webrtc.org
> > 
> > Change-Id: I1ef5313b4a6c56eb8c7fd02d95db62c4e3c00255
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:7785
> > Reviewed-on: https://chromium-review.googlesource.com/542838
> > Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> > Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#18716}
> 
> TBR=magjed@webrtc.org,andersc@webrtc.org
> 
> Change-Id: Id12f33698eb02041607cb9a5c54f37f01bfac5b1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:7785
> Reviewed-on: https://chromium-review.googlesource.com/544840
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#18718}

TBR=magjed@webrtc.org,andersc@webrtc.org

Change-Id: I184303ecba8db91ef7de709f982a295a2efe92eb
Bug: webrtc:7785
Reviewed-on: https://chromium-review.googlesource.com/544841
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18731}
2017-06-23 10:59:41 +00:00