This is a reland of Id63f0deb7b335690157ab157c35177b7836688da.
Original change's description:
> Enable the clang style plugin in rtc_base/
>
> Enabled the plugin and cleaned up all issues it found.
>
> Bug: webrtc:163
> Change-Id: Id63f0deb7b335690157ab157c35177b7836688da
> Reviewed-on: https://webrtc-review.googlesource.com/14660
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20401}
Bug: webrtc:163
Change-Id: I861a5fe741215115b0e7a2be9c0786836ff5376e
Reviewed-on: https://webrtc-review.googlesource.com/15040
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20416}
The DataChannel OPEN message is sent in-band in this test, and waiting
for the signaling state to change is not sufficient to guarantee that the
callee received this message
Bug: webrtc:8443
Change-Id: I76fa6348b6f8e1e70fb41a4e644aee805b2ef4de
Reviewed-on: https://webrtc-review.googlesource.com/15060
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20415}
RtcpTransceiver name reserved for thread-safe version that planned to
be wrapper of the RtcpTransceiverImpl
BUG=webrtc:8239
Change-Id: If8a3092eb1b8e4175e3efd23b52e1043cdabf19f
Reviewed-on: https://webrtc-review.googlesource.com/7920
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20414}
WebRtcSession is being merged into PeerConnection, and to make the
code review easier this is the first step towards achieving that.
Bug: webrtc:8323
Change-Id: I33778e46f20cb14089dff4328947868e207476bd
Reviewed-on: https://webrtc-review.googlesource.com/8760
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20413}
Originally, the idea was to implement QUIC data channels as a
PeerConnection API. Now, the effort has shifted to implementing it as a
part of ORTC which will live in Chromium. Since this code has not been
maintained and is not currently being used, remove it to reduce
maintenance overhead while a copy will be retained in the Git history.
Bug: webrtc:8385
Change-Id: I2719c007a0de0118b67d41a425f900b66c52f65a
Reviewed-on: https://webrtc-review.googlesource.com/14100
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20412}
This CL adds an EncodedFrameChecker interface which can be used by users
of the VideoProcessor to inject customized per-frame checks to the
encoding/decoding pipeline. This currently has two uses:
- Verifying that the QP parser works correctly for VP8 and VP9, by comparing the
parsed QP to that produced by libvpx.
- Verifying that our H.264 encoders always produce SPS/PPS/IDR in tandem.
TESTED=Galaxy S8, Pixel 2 XL, iPhone 7.
BUG=webrtc:8423
Change-Id: Ic3e401546e239a9ffaf2ed2907689cebb1127805
Reviewed-on: https://webrtc-review.googlesource.com/14559
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20409}
This is protected behind a field trial, for controlled rollout.
TESTED=MediaCodec (Qualcomm + Exynos) and VideoToolbox senders.
BUG=webrtc:8423
Change-Id: Ibccefb3d374e4a44461d33e77eff754d8d752666
Reviewed-on: https://webrtc-review.googlesource.com/13863
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20408}
In the legacy C part of AGC, an audio level 'cur_level' is represented as
(1+frac) * 2^(31 - zeros)
The 'zeros' exponent part is used for looking up a gain value in a
table, and 'frac' is used for interpolating between two nearby table
values. Code snippet below:
zeros = WebRtcSpl_NormU32((uint32_t)cur_level);
tmp32 = (cur_level << zeros) & 0x7FFFFFFF;
frac = (int16_t)(tmp32 >> 19);
In the second line, 'cur_level' is shifted upwards so that the leading
bit is '1', after which the leading bit is cleared. The result is
'frac' in Q31.
The compiler type of 'cur_level << zeros' is 'int32_t'. This is a
fuzzer error 'Left shift cannot be represented in int32_t',
because the leading sign bit is 1. This CL changes the compiler type to
uint32_t.
Bug: chromium:776286
Change-Id: Ie29552b75e690057bd76fc88e747841b531e3802
Reviewed-on: https://webrtc-review.googlesource.com/14841
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20405}
Alternative VAD based on the existing one in WebRTC.
It is used to extract VAD annotations in APM-QA.
TBR=
Bug: webrtc:7494
Change-Id: I6af412742f804631ad4f3ba3ccf71a30d74de984
Reviewed-on: https://webrtc-review.googlesource.com/14553
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20404}
In SrtpTransport::SetRtcpParams, send_rtcp_session_ should really call
SetSend rather than SetRecv.
Modified the LOG message in SrtpTransport::SetRtpParams.
Bug: webrtc:8436
Change-Id: Iccbfbc5ef2d4f4ebd5f876c3f6dcc81671fdc631
Reviewed-on: https://webrtc-review.googlesource.com/14562
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20403}
This reverts commit af551a1956.
Reason for revert: Fails to compile on Chromium FYI bot: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/21375
Original change's description:
> Enable the clang style plugin in rtc_base/
>
> Enabled the plugin and cleaned up all issues it found.
>
> Bug: webrtc:163
> Change-Id: Id63f0deb7b335690157ab157c35177b7836688da
> Reviewed-on: https://webrtc-review.googlesource.com/14660
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20401}
TBR=steveanton@webrtc.org,kwiberg@webrtc.org
Change-Id: Iafdf4bc1744a981b5d7d38e4a0c5b2d88753f00a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:163
Reviewed-on: https://webrtc-review.googlesource.com/14740
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20402}
Enabled the plugin and cleaned up all issues it found.
Bug: webrtc:163
Change-Id: Id63f0deb7b335690157ab157c35177b7836688da
Reviewed-on: https://webrtc-review.googlesource.com/14660
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20401}
This is a reland of b49b66109e.
Original change's description:
> Rewrite WebRtcSession BUNDLE tests as PeerConnection tests
>
> Bug: webrtc:8222
> Change-Id: Id47e4544dc073564ad7e63d02865ca80dd5a85ff
> Reviewed-on: https://webrtc-review.googlesource.com/8280
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20365}
Bug: webrtc:8222
Change-Id: If3dcd8090875c641881e2b9e92fc1db387ba1de5
Reviewed-on: https://webrtc-review.googlesource.com/14400
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20397}
In addition to NV12 frames, also support cropping/scaling RGB frames and
converting RGB frames to i420.
This CL also removes the hardcoding of pixel format in
RTCCameraVideoCapturer. Instead, use the first available format for the
output device that our pipeline supports.
Bug: webrtc:8351
Change-Id: If479b4934c47cd2994936913f55e60fbbee3893b
Reviewed-on: https://webrtc-review.googlesource.com/8920
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20396}
This CL includes the patch from oprypin@webrtc.org, which is also applied
to the MIPS code (also affected), and the protobuf for ApmTest.Process
(audio_processing_unittest.cc), which used when WEBRTC_AUDIOPROC_FIXED_PROFILE
is set.
This change has been tested on mobile platforms.
Bug: webrtc:8200
Change-Id: Ic50a5ab57c16551397756b1fb473e1067b8e7ece
Reviewed-on: https://webrtc-review.googlesource.com/10811
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20394}
Eliminates manual reference counting logic, and one of the few
remaining uses of the Atomic32 type.
Bug: webrtc:8270
Change-Id: Ibbbf227c710f7e8f68a98bac46d3e24b7cb5ee2f
Reviewed-on: https://webrtc-review.googlesource.com/14600
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20393}
The 'parametricNoise' field is never initialized in the
'WebRtcNs_InitCore' function that initializes a 'NoiseSuppressionC'
struct.
This leads to use of unititialized value, which may affect the audio
output and result of the noise suppressor.
The issue was found by the Chrome fuzzer:
https://clusterfuzz.com/v2/testcase-detail/4749034115039232
Bug: chromium:776673
Change-Id: I1c3fd80cff178f2d5917064ad07f88c7b9a29e7d
Reviewed-on: https://webrtc-review.googlesource.com/14556
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20388}
UBSan will trigger when shifting a negative value. This change avoids
that by replacing "x << 8" with "x * (1 << 8)".
Bug: chromium:666877
Change-Id: Ic89bd98e5a3feff35075df96b104b386cb4d8803
Reviewed-on: https://webrtc-review.googlesource.com/14552
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20387}
To make testing easier all of PacketQueues functions have been made virtual,
and PacketQueue2 now inherits PacketQueue. This change was made to minimize
changes in PacedSender.
Bug: webrtc:8287, webrtc:8288
Change-Id: I2593340e7cc7da617370b0a33e7b9deeb46d9487
Reviewed-on: https://webrtc-review.googlesource.com/9380
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20385}
It was used only in tests.
Bug: webrtc:8422
Change-Id: I67b58663c171202240d1c5a7c230d6cd4cd6149b
Reviewed-on: https://webrtc-review.googlesource.com/13102
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20382}
This is pretty useful if you need to debug an SCTP issue. SCTP goes
over DTLS, which is encrypted, which means you need a private key
in order to decrypt a normal packet capture. We don't log this key,
for understandable reasons. So the alternative is to turn on SCTP
verbose logging, then turn the text log into a pcap file.
NOTRY=True
TBR=zhihuang@webrtc.org
Bug: None
Change-Id: If3380d7953ea829b3ae9945326d3c820ce7cc6a3
Reviewed-on: https://webrtc-review.googlesource.com/14561
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20380}
This is a reland of 3df5dcac9b
Original change's description:
> Rewrite WebRtcSession media tests as PeerConnection tests
>
> Bug: webrtc:8222
> Change-Id: I782a3227e30de70eb8f6c26a48723cb3510a84ad
> Reviewed-on: https://webrtc-review.googlesource.com/6640
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20364}
Bug: webrtc:8222
Change-Id: I0a5398170d469eb9223bc781bfb417a85a72a2d2
Reviewed-on: https://webrtc-review.googlesource.com/14380
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20377}
Chromoting is planning to bump up the iOS deployment target to 10.0
before but is blocked by WebRTC because it uses deprecated OSAtomic*
APIs.
This CL replaces the platform specific Atomic32 implementation and uses
C++11's std::atomic instead.
Bug: webrtc:8413
Change-Id: Icbd29bb92eec60066589bbabf53e0d50df2f9b0d
Reviewed-on: https://webrtc-review.googlesource.com/12740
Commit-Queue: Yuwei Huang <yuweih@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20376}
Internally in NetEq, an FEC packet looks very similar to a split packet, which caused NetEq to miscalculate the frame length of FEC packets. This incorrect framelength calculation was incorrectly handled as a framelength change by NetEq.
Bug: webrtc:8410
Change-Id: Icaea961d055e49d7726b87811881db0b9149805b
Reviewed-on: https://webrtc-review.googlesource.com/12420
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20373}
peerConnectionParameters.videoCodec can be null in some cases.
Previously, this would cause a crash in AppRTCMobile.
Bug: b/67938523
Change-Id: I30ebf0f91fad23a3cf34946736b9f4e6c266277f
Reviewed-on: https://webrtc-review.googlesource.com/14200
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20372}
Fixes the warning below:
WebRtcAudioTrack.java:364: warning: [StaticAccessedFromInstance] Static method getMaxVolume
should not be accessed from an object instance; instead use AudioTrack.getMaxVolume
+ "max gain: " + audioTrack.getMaxVolume());
Bug: NONE
Change-Id: I6247584b65ac972a6a3739fba718387873964f9f
Reviewed-on: https://webrtc-review.googlesource.com/14180
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20371}
when first key frame is encoded) to avoid a too high initial estimate.
Bug: webrtc:8375
Change-Id: I404e394d8f2ac648170dd3828065435a4d2c6147
Reviewed-on: https://webrtc-review.googlesource.com/14061
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20370}
NetEq has been fuzzed by neteq_rtp_fuzzer for some time. That fuzzer
hammers the RTP data, but leaves much of the other data alone. This
new fuzzer instead alters the encoded audio, packet arrival timing,
clock drift, and packet losses.
Bug: webrtc:8421
Change-Id: Ie25b77590a66a7451f32a73c6b5b570944244027
Reviewed-on: https://webrtc-review.googlesource.com/13860
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20368}
This allows injection of a user-defined post processing module from
the Android layer.
Bug: webrtc:8163
Change-Id: If3a6b4726c34c5f82d186b8cf95373c283cbd3f6
Reviewed-on: https://webrtc-review.googlesource.com/7610
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20367}