Commit Graph

31983 Commits

Author SHA1 Message Date
d5e6f413ab AGC2 AdaptiveDigitalGainApplier and AdaptiveAgc code improvements
This CL was written in preparation for the next CL in the chain and
it contains the following changes:
- SignalWithLevels -> AdaptiveDigitalGainApplier::FrameInfo
- Frame view removed from AdaptiveDigitalGainApplier::FrameInfo
- AdaptiveDigitalGainApplier::Process now gets side info as const& to
  avoid unnecessary copies
- AdaptiveAgc::Process: `last_audio_level` renamed to `limiter_envelope`
  to better reflect what that actually is
- Missing class/method docstrings added

Tested: bit-exactness verified with audioproc_f

Bug: webrtc:7494
Change-Id: Ie25dcd389d6eed74ea9a65f0720eeb8f20f0096b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186040
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32251}
2020-09-30 13:15:38 +00:00
8845f7e32b AGC2 AdaptiveModeLevelEstimator min consecutive speech frames (3/3)
This is the last CL needed to add a new `AdaptiveModeLevelEstimator`
feature that makes AGC2 more robus to VAD mistakes: the level estimator
discards estimation updates when too few consecutive speech frames are
observed.

This CL adds a second state property to hold temporary updates and a
counter for consecutive speech frames. When enough speech frames are
observed, the reliable state is updated; otherwise, the temporary state
is discarded.

The default for `AdaptiveModeLevelEstimator::min_consecutive_speech_frames_`
is 1, which means that the new feature is disabled.

Tested:
- Bit-exactness verified with audioproc_f
- Not bit-exact if `min_consecutive_speech_frames_` set to 10

Bug: webrtc:7494
No-Try: True
Change-Id: I0daa00e90c27c418c00baec39fb8eacd26eed858
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185125
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32250}
2020-09-30 13:08:08 +00:00
77607f1e83 Roll chromium_revision 01b26f767e..f9788a96b2 (811724:811959)
Change log: 01b26f767e..f9788a96b2
Full diff: 01b26f767e..f9788a96b2

Changed dependencies
* src/base: 4e5904669f..64ab8aa68e
* src/build: 43b644eec4..3ede10128b
* src/buildtools: 3ff4f5027b..4be464e050
* src/ios: a9535ce02b..a46002ad11
* src/testing: 4d7c596873..fe12eb7d0a
* src/third_party: 3625560476..ff671c400d
* src/third_party/perfetto: 76404b01d5..68983d39e5
* src/tools: 52771f0f31..3374ef8da7
DEPS diff: 01b26f767e..f9788a96b2/DEPS

No update to Clang.

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,
BUG=None

Change-Id: If203152a2a88b2a00ee8b4f08155b69db96451a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186060
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#32249}
2020-09-30 12:55:07 +00:00
61709a3233 Revert "Begin implementing WGC CaptureFrame"
This reverts commit e820cef5340610b9beebbcb63868743b95b97fcd.

Reason for revert: Breaks downstream client. I will investigate and
get back with a suggestion to fix.

Original change's description:
> Begin implementing WGC CaptureFrame
>
> This change introduces the design that will allow us to deliver frames
> synchronously to callers despite the Windows.Graphics.Capture APIs being
> inherently asynchronous.
>
> We achieve this by having WindowCapturerWinWgc create and maintain a
> WgcCaptureSession object for each window that it is asked to capture a
> frame for. The capture session object will be the class that actually
> uses the WGC APIs, and it will store the frames it receives in a frame
> pool and deliver them via GetMostRecentFrame.
>
> The next CL will add the necessary functionality to the
> WgcCaptureSession class.
>
> Bug: webrtc:9273
> Change-Id: I44e164f4874503d8ccc8e6a210e74f9c8458f6c4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184220
> Commit-Queue: Austin Orion <auorion@microsoft.com>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32240}

TBR=mbonadei@webrtc.org,jamiewalch@chromium.org,tommi@webrtc.org,auorion@microsoft.com

Change-Id: I114944357ce5be7d1e2da817703dc95d544aa99a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9273
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186045
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32248}
2020-09-30 10:47:53 +00:00
9cf3ea0ab2 AGC2 AdaptiveModeLevelEstimator: minor code improvements
- State -> LevelEstimatorState
- Mark two methods as const
- Call DumpDebugData() in one place
- DumpDebugData: don't check if data dumper is provided
- Add LevelEstimatorState::operator==

The changes will reduce clutter in follow up CL.

Note: this CL breaks the chain of 3 CLs titled
"AGC2 AdaptiveModeLevelEstimator min consecutive speech frames".

Bug: webrtc:7494
Change-Id: If39ce4b787069bef4af910d718cdfae3af1784a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185811
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32247}
2020-09-30 10:31:30 +00:00
f5e261aaf6 Introduce RTC_NO_UNIQUE_ADDRESS.
This macro introduces the possibility to suggest the compiler that a
data member doesn't need an address different from other non static
data members.

The usage of a macro is to maintain portability since at the moment
the attribute [[no_unique_address]] is only supported by clang
with at least -std=c++11 but it should be supported by all the
compilers starting from C++20.

Bug: webrtc:11495
Change-Id: I9f12b67b4422a2749649eaa6b004a67d5fd572d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173331
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32246}
2020-09-30 09:52:49 +00:00
1e4d4fdf88 Don't trigger key frame when encoder is not reset during reconfigure
Currently, key frames are scheduled even when the encoder is not reset
during reconfigeration. This means whenever new parameters like max
bitrate or min bitrate are updated through SetRtpParameters(), the
triggered encoder reconfigeration will always schedule key frames even
they are not necessary. Since parameters' changes like bitrate doesn't
require encoder instance reset.
This causes flood of key frames in our app since we do regularly max
bitrate update according to server control message.


Bug: None
Change-Id: I15d953b24c30e6026c0e97b30f44495d845f293f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185380
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32245}
2020-09-30 08:53:15 +00:00
d2c6967f1d Optimize RoboCaller::AddReceiver() for code size
Essentially, instead of having the inlined UntypedFunction::Create(f)
return an UntypedFunction which is then passed as an argument to
non-inlined RoboCallerReceivers::AddReceiverImpl(), we let
UntypedFunction::PrepareArgs(f) return a few different kinds of
trivial structs (depending on what sort of type f has) which are
passed as arguments to non-inlined RoboCallerReceivers::AddReceiver()
(which then converts them to UntypedFunction by calling
UntypedFunction::Create()). These structs are smaller than
UntypedFunction and optimized for argument passing, so many fewer
instructions are needed.

Example code:

  struct Foo {
    void Receive(int, float, int, float);
    void TestAddLambdaReceiver();
    webrtc::RoboCaller<int, float, int, float> rc;
  };

  void Foo::TestAddLambdaReceiver() {
    rc.AddReceiver([this](int a, float b, int c, float d){
        Receive(a, b, c, d);});
  }

On arm32, we get before this CL:

  Foo::TestAddLambdaReceiver():
        push    {r11, lr}
        mov     r11, sp
        sub     sp, sp, #24
        ldr     r1, .LCPI0_0
        mov     r2, #0
        stm     sp, {r0, r2}
        add     r1, pc, r1
        str     r2, [sp, #20]
        str     r1, [sp, #16]
        mov     r1, sp
        bl      RoboCallerReceivers::AddReceiverImpl
        mov     sp, r11
        pop     {r11, pc}
  .LCPI0_0:
        .long   CallInlineStorage<Foo::TestAddLambdaReceiver()::$_0>
  CallInlineStorage<Foo::TestAddLambdaReceiver()::$_0>:
        ldr     r0, [r0]
        b       Foo::Receive(int, float, int, float)

After this CL:

  Foo::TestAddLambdaReceiver():
        ldr     r3, .LCPI0_0
        mov     r2, r0
        add     r3, pc, r3
        b       RoboCallerReceivers::AddReceiver<1u>
  .LCPI0_0:
        .long   CallInlineStorage<Foo::TestAddLambdaReceiver()::$_0>
  CallInlineStorage<Foo::TestAddLambdaReceiver()::$_0>:
        ldr     r0, [r0]
        b       Foo::Receive(int, float, int, float)

(Symbol names abbreviated so that they'll fit on one line.)

So a reduction from 64 to 28 bytes. The improvements on arm64 and
x86_64 are similar.

Bug: webrtc:11943
Change-Id: I93fbba083be0235051c3279d3e3f6852a4a9fdad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185960
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32244}
2020-09-30 06:59:44 +00:00
79d8df021c android: add rollback RTCSdpType
BUG=webrtc:11796,webrtc:11970

Change-Id: I0047c7a050c344ef58735d9d0d6534b1ddf6c4d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184263
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#32243}
2020-09-30 06:14:57 +00:00
df2a4654a0 Improve neteq_rtp_fuzzer
This change lets the fuzzer modify the first few bytes of the RTP
payload. One of the benefits is that it can cover the RED header
splitter functionality.

The CL also fixes an issue found while running the fuzzer locally.

Bug: webrtc:11640
Change-Id: I7ca73676440897a14a0aaca796f70d381e016575
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185819
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32242}
2020-09-29 20:24:07 +00:00
be0aec2174 Ensure FakeVp8Encoder::GetEncoderInfo() writes EncoderInfo.fps_allocation:
Bug: webrtc:10155
Change-Id: I9ba5ec97319a89890b218758fa230bc27c2a917e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185805
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32241}
2020-09-29 19:29:29 +00:00
e820cef534 Begin implementing WGC CaptureFrame
This change introduces the design that will allow us to deliver frames
synchronously to callers despite the Windows.Graphics.Capture APIs being
inherently asynchronous.

We achieve this by having WindowCapturerWinWgc create and maintain a
WgcCaptureSession object for each window that it is asked to capture a
frame for. The capture session object will be the class that actually
uses the WGC APIs, and it will store the frames it receives in a frame
pool and deliver them via GetMostRecentFrame.

The next CL will add the necessary functionality to the
WgcCaptureSession class.

Bug: webrtc:9273
Change-Id: I44e164f4874503d8ccc8e6a210e74f9c8458f6c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184220
Commit-Queue: Austin Orion <auorion@microsoft.com>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32240}
2020-09-29 19:14:29 +00:00
2291fb36cf red: ensure minimum amount of header bytes
avoids out-of-bounds reads when splitting RED packets.

Bug: webrtc:11640
Change-Id: I38beb5b373c4faa878f627a5df17dd4db9ea20cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185804
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#32239}
2020-09-29 17:07:08 +00:00
cc2975cb56 Roll chromium_revision 82e79a8a7f..01b26f767e (811607:811724)
Change log: 82e79a8a7f..01b26f767e
Full diff: 82e79a8a7f..01b26f767e

Changed dependencies
* src/build: 00ed20cfb8..43b644eec4
* src/ios: 79f2c32d6b..a9535ce02b
* src/testing: 830eed9a91..4d7c596873
* src/third_party: ccd67b5f17..3625560476
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/18d69fb4e7..0f6ed71076
* src/third_party/depot_tools: ead81e2ba2..991ead187c
* src/third_party/perfetto: 88c194fccd..76404b01d5
* src/tools: fec348511e..52771f0f31
DEPS diff: 82e79a8a7f..01b26f767e/DEPS

No update to Clang.

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,
BUG=None

Change-Id: I3b72a2bb0dbd51ee482aaf8cae485db97fed684a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185944
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#32238}
2020-09-29 16:38:28 +00:00
307fab9e02 AGC2 AdaptiveModeLevelEstimator: cache last level estimate
`AdaptiveModeLevelEstimator::last_level_dbfs_` doesn't need to be optional.

Note: this CL breaks the chain of 3 CLs titled
"AGC2 AdaptiveModeLevelEstimator min consecutive speech frames".

Bug: webrtc:7494
Change-Id: Id5b409ca5cb5f11ed132c861b7995b9721e167bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185809
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32237}
2020-09-29 15:45:22 +00:00
c5152e893e Create isolated output directory when creating the output file.
Currently isolated output directory is created in flags_compatibility.py script.
This doesn't work for android swarming tasks because this script isn't called.

Bug: webrtc:11895
Change-Id: I8b8f01850d6e5970292b524d104314eef7ab17be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185883
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32236}
2020-09-29 15:38:52 +00:00
445e6b034a Break out separate compile targets for various classes
This reduces the degree of interdependency among modules related
to the PeerConnection class, and makes it easier to isolate inappropriate
external dependencies.

Bug: webrtc:11967
Change-Id: Id9777a2ab690cc349dd5842a3a95e24478144c71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185882
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32235}
2020-09-29 15:14:22 +00:00
8036cb791f Report sent_packets_queue_wait_time_us in PC level framework network debug mode
Bug: webrtc:11959
Change-Id: I9533a0daf7391d9b6a524e1d1ab6ad783f9aafa3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185962
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32234}
2020-09-29 13:59:34 +00:00
0b9e354d61 Improve perf metrics plotter
Add ability to specify which metrics to plot on the plotter level and
add sorting of plottable data because there is no guarantee on the perf
writer side that output is sorted by time.

Bug: webrtc:11959
Change-Id: I87e6f5720fff2b259f58e3fc5f7ed2462568e0d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185963
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32233}
2020-09-29 13:51:59 +00:00
10ea118410 Default-enables WebRTC-DeferredFecGeneration.
Bug: webrtc:11340
Change-Id: I9575fcf2ac12ce9b71b27f32deeb7870a1dff64b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185814
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32232}
2020-09-29 13:50:54 +00:00
3f8966f4ab Deactivating AVX2 support by default
This CL deactivates the AVX2 support by default due to issues identified
during testing.


Bug: webrtc:11663
Change-Id: Ib42791a8da9a93c986f69bfc85def2158525af79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185818
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32231}
2020-09-29 13:43:44 +00:00
435f279433 AGC2 remove incorrect field trial parsing functions
The AGC2 params must be exposed via
`AudioProcessing::Config::GainController2` and the Finch params must
be parsed in blink (see [1]).

Note: this CL breaks the chain of 3 CLs titled
"AGC2 AdaptiveModeLevelEstimator min consecutive speech frames".

[1] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/mediastream/media_stream_audio_processor.cc;l=593-596?q=HybridAgc&start=11

Bug: webrtc:7494
Change-Id: Ie7bd1bef1d6caf7d2b20600a1626c12171b67c82
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185044
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32230}
2020-09-29 13:33:15 +00:00
38b768c588 Factor out the transceiver list into a separate object.
This component is heavily referenced by both PeerConnection and
SdpOfferAnswerHandler; it's likely that it will end up in
SdpOfferAnswerHandler.

Encapsulation makes it easier to move around.

Bug: webrtc:11995
Change-Id: I5329d9a90159d203510bf3698962cd246eea7324
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185880
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32229}
2020-09-29 13:23:26 +00:00
b6bc09b099 Remove locks from BufferQueue (not needed).
Also remove test code that can cause leaks into production.
Add sequence checkers.

Bug: webrtc:11988
Change-Id: I67b4cec6ee77d73ccffbbc88c9081ebb3c3cc423
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185503
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32228}
2020-09-29 12:57:20 +00:00
f360506c7a Deferred FEC: Prevents duplicate FEC addition of non-RTX retransmission.
This CL fixes a bug where the RtpPackeToSend::fec_protect_packet flag
was not cleared when a packet copy was fetched from the packet history
in order to be retransmitted. This caused the packet to be added to the
FEC generator a second time when the retransmission passed through
RtpSenderEgress.

The bug did not affect RTX retransmission and only manifests when using
deferred FEC generation.

Bug: webrtc:11340
Change-Id: Ic7ce2800cce9a99e74bd3dd697bc0779d2a02fda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185817
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32227}
2020-09-29 12:31:01 +00:00
56f63c3e7e AGC2 AdaptiveModeLevelEstimator min consecutive speech frames (2/3)
This is the second CL needed to add a new `AdaptiveModeLevelEstimator`
feature that makes AGC2 more robus to VAD mistakes: the level estimator
discards estimation updates when too few consecutive speech frames are
observed.

In this CL, the `SaturationProtector` class has been replaced by a
struct that define the state and two functions to change it.
This is done in order to use the saturation protector state in
`AdaptiveModeLevelEstimator::State` and will allow to add a
temporary state in `AdaptiveModeLevelEstimator` (see the child CL).

Tested: Bit-exactness verified with audioproc_f

Bug: webrtc:7494
Change-Id: Ic5ecd1e174010656ed20664ef7b7e5798ebb7978
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185041
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32226}
2020-09-29 11:02:10 +00:00
b6f002b55f Add NV12 to libvpx wrappers output
Bug: webrtc:11956
Change-Id: Id8734b8f0fd87ac9b849d70b0c5764bf1ffd9c75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185300
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32225}
2020-09-29 10:26:20 +00:00
de95329daa Delete macros RTC_DISALLOW_ASSIGN and RTC_DISALLOW_IMPLICIT_CONSTRUCTORS
The former was unused, the latter is replaced with the explicit C++11
deletions. The related RTC_DISALLOW_COPY_AND_ASSIGN is left for now,
it is used in a lot more places.

Bug: None
Change-Id: I49503e7f2b9ff43c6285f8695833479bbc18c380
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185500
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32224}
2020-09-29 10:19:20 +00:00
46be80d349 Remove echo suppression in transparent mode
This change completely disables the use of suppression
when operating in transparent mode.

It also removes the following field trials:
* WebRTC-Aec3UseLowEarlyReflectionsTransparentModeGain
* WebRTC-Aec3UseLowLateReflectionsTransparentModeGain

Bug: webrtc:11985
Change-Id: I1c75efdad2d9c9d0a1aced86bf0278fc96616ea1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185402
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32223}
2020-09-29 09:35:09 +00:00
b3b45d43a3 Roll chromium_revision 8276edf45c..82e79a8a7f (811503:811607)
Change log: 8276edf45c..82e79a8a7f
Full diff: 8276edf45c..82e79a8a7f

Changed dependencies
* src/base: 46871977ab..4e5904669f
* src/build: 57c61dba3b..00ed20cfb8
* src/testing: 071b25b0e5..830eed9a91
* src/third_party: 4577dbe588..ccd67b5f17
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/21e6e530cf..18d69fb4e7
* src/third_party/depot_tools: 1099c11d5d..ead81e2ba2
* src/third_party/perfetto: df3ae5e6f9..88c194fccd
* src/tools: eae921d4b7..fec348511e
DEPS diff: 8276edf45c..82e79a8a7f/DEPS

No update to Clang.

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,
BUG=None

Change-Id: I19a9067b57afcb013e850ccc46a544fcbeb5918f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185903
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#32222}
2020-09-29 09:18:48 +00:00
cce51b628a Delete unused header file sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h
Bug: webrtc:9627
Change-Id: Iac95406dc512480788f222261db5c9b578b36bfa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185810
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32221}
2020-09-29 08:42:02 +00:00
7899e972b6 Accept NV12 frames into VP9
NV12 frames can be encoded by libvpx now, and this change allows for
encoding of them with VP9.

VP9 encode/decode tests now run with NV12 as well as I420.

Manually tested using video loopback with VP9 and NV12 generated frames.
  out/Default/video_loopback.app/Contents/MacOS/video_loopback --clip=GeneratorNV12 --codec="VP9"


Bug: webrtc:11635, webrtc:11974
Change-Id: Ifc5cbf77d2a27821cd5560c253d5d447c7a7cf53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185123
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#32220}
2020-09-29 07:54:40 +00:00
3a8c441cc4 Roll chromium_revision 5db2d14de4..8276edf45c (811347:811503)
Change log: 5db2d14de4..8276edf45c
Full diff: 5db2d14de4..8276edf45c

Changed dependencies
* src/base: 86fbe980e5..46871977ab
* src/build: 363f4e01bb..57c61dba3b
* src/ios: d2eaac6c5d..79f2c32d6b
* src/testing: b27d2ec7cd..071b25b0e5
* src/third_party: c45610f2f3..4577dbe588
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/3cd3b4e18c..21e6e530cf
* src/third_party/depot_tools: 77397c4f29..1099c11d5d
* src/tools: 4f01e9233e..eae921d4b7
DEPS diff: 5db2d14de4..8276edf45c/DEPS

No update to Clang.

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,
BUG=None

Change-Id: If1f02bbb00681279c00d69c759a15ba475e06ca8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185901
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#32219}
2020-09-29 02:32:17 +00:00
6154a74e54 Start/stop ProcessThread as first/last audio channel is added/removed.
Bug: webrtc:11989
Change-Id: I3fb068f53693b1b59759dac64022844ed3a25075
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185361
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tim Na <natim@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32218}
2020-09-28 21:39:50 +00:00
6ecfbb5155 Roll chromium_revision 3274067af3..5db2d14de4 (811217:811347)
Change log: 3274067af3..5db2d14de4
Full diff: 3274067af3..5db2d14de4

Changed dependencies
* src/base: 5fe65a574f..86fbe980e5
* src/build: 693ed52859..363f4e01bb
* src/ios: e98ee113d9..d2eaac6c5d
* src/testing: 505458c140..b27d2ec7cd
* src/third_party: f79b82e676..c45610f2f3
* src/tools: 2935ddd8dd..4f01e9233e
DEPS diff: 3274067af3..5db2d14de4/DEPS

No update to Clang.

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,
BUG=None

Change-Id: Ibfa8127539d7a1b688ada1c4f51e8c9ccfac3ee1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185861
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#32217}
2020-09-28 21:05:10 +00:00
e39b378d4a Remove tests associated to WebRTC-LibvpxVp{8,9}TrustedRateController.
The field trial has been removed from the codebase by
https://webrtc-review.googlesource.com/c/src/+/173479.

Bug: chromium:1131805, webrtc:9722
Change-Id: I467c7193f61dca75b11f7f942ed6341744e61f90
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185185
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32216}
2020-09-28 17:53:00 +00:00
fbb31dff0c Delete RtpRtcp::BitrateSent as no longer used
Bug: None
Change-Id: I3e54efcb493126803f2b7139a06d6101462d678a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185186
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32215}
2020-09-28 17:36:00 +00:00
87b11009af Roll chromium_revision 0957d98fca..3274067af3 (810507:811217)
Change log: 0957d98fca..3274067af3
Full diff: 0957d98fca..3274067af3

Changed dependencies
* src/base: 29a51be43d..5fe65a574f
* src/build: 9efd36f044..693ed52859
* src/ios: 3ad13d95c4..e98ee113d9
* src/testing: de417f8eec..505458c140
* src/third_party: a7885aa0c6..f79b82e676
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/c947efabcb..3743aafdac
* src/third_party/depot_tools: c39ab997ba..77397c4f29
* src/third_party/jsoncpp/source: 645250b669..9059f5cad0
* src/third_party/perfetto: df53732e1b..df3ae5e6f9
* src/tools: aebf124119..2935ddd8dd
DEPS diff: 0957d98fca..3274067af3/DEPS

No update to Clang.

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,
BUG=None

Change-Id: I1d9854b8d3e46f6564d1d47167e7188653ae9f26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185790
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#32214}
2020-09-28 14:40:31 +00:00
14bba6e1c3 Add API to allow legacy TLS protocols.
Bug: webrtc:10261
Change-Id: I87aeb36b8c8a08b5406516bf15bf22261e4916ed
NOKEYCHECK: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185052
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32213}
2020-09-28 14:30:01 +00:00
cdcfab0a52 Refactor webrtc::PeerConnection to split out offer/answer
This reduces the size of peer_connection.cc by more than 2000 lines.

Design doc for refatoring (available on request):
https://docs.google.com/document/d/1ETeUhon9sJihEUpA9ZZHpOGhzDqlZGLQOk3cD_CjKDM/edit

Bug: webrtc:11995
Change-Id: I9ed8603807b45bb192a01df026755cb6b5365291
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185801
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32212}
2020-09-28 14:27:51 +00:00
b2995a1e57 Delete dead signal code in pc/channel.*
SignalDtlsSrtpSetupFailure is never fired, so the setup code for it,
is dead code. Also removing declarations for methods that have no
implementation.

For other public signals in BaseChannel I've added an accessor which
has revealed a threading problem due to the member variable being public.

Bug: webrtc:11994
Change-Id: Iec6046c6a598066b92c956002ba4160708ae7dcc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32211}
2020-09-28 14:24:41 +00:00
37e22f1a4c Compile screen capturer mac test only when is_mac=true.
Starting from [1], GN is not using the global filter to implicitly
compile sources only on some platforms.

[1] - https://chromium-review.googlesource.com/c/chromium/src/+/2426564

Bug: None
Change-Id: I6f547e0bddc9cc87625d5b40a5aa1148b8dfd2d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185808
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32210}
2020-09-28 14:04:41 +00:00
08ae7cea30 Reland "Delete the non-const version of the EncodedImage::data() method."
This is a reland of f2969fa868f4913583e79f74ceced5cc6b7d6b7d

Original change's description:
> Delete the non-const version of the EncodedImage::data() method.
>
> Bug: webrtc:9378
> Change-Id: I84ace3ca6a2eb4d0f7c3d4e62f815d77df581bfa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185122
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32197}

Bug: webrtc:9378
Change-Id: I8521ac567749ea547f91cf7549eb48966baffa11
Tbr: ilnik@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185807
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32209}
2020-09-28 13:51:51 +00:00
1e40a0cabd Remove asyncinvoker from PeerConnection.
The callback that the asyncinvoker was being used for, will now use
a safety flag to check if call_ is valid before issuing calls.
Using the flag is a step towards removing the call_ptr_ variable
but in this CL we're just looking at replacing use of the async invoker.

The safety flag is cleared at the same time as call_ is, which prevents
pending callbacks for that call instance from running.

Also adding TODOs related to this change that will be
followed upon in other CLs.

Bug: webrtc:11988, webrtc:11992, webrtc:11993
Change-Id: If3986758af6d01d39b2db0cce82e57fc48be9d7f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185508
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32208}
2020-09-28 11:56:59 +00:00
b6103ff5f9 Test scalability structures do not suggest disabled layers
Bug: None
Change-Id: I85cc9dabc90882f5d1afa41ddab9489660c8b032
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185501
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32207}
2020-09-28 11:12:59 +00:00
55c178693c Add support for NV12 frame generation for tests
This can be used in the future to test NV12 video frames with encoders, both
from unittests and from tools like video_loopback.

Tested using video_loopback with generator NV12.

Bug: webrtc:11978
Change-Id: I0d24ae3ebab2267f076703cbda81e99cec465ec8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185045
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32206}
2020-09-28 09:48:08 +00:00
111de34102 Revert "Delete the non-const version of the EncodedImage::data() method."
This reverts commit f2969fa868f4913583e79f74ceced5cc6b7d6b7d.

Reason for revert: Breaks blink_platform_unittests; sample failure:
https://ci.chromium.org/p/chromium/builders/try/linux-rel/500046

Original change's description:
> Delete the non-const version of the EncodedImage::data() method.
>
> Bug: webrtc:9378
> Change-Id: I84ace3ca6a2eb4d0f7c3d4e62f815d77df581bfa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185122
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32197}

TBR=ilnik@webrtc.org,nisse@webrtc.org,philipel@webrtc.org,titovartem@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:9378
Change-Id: I6374d263e2ee10da318ab1e040ed18bed7a96edd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185507
Reviewed-by: Marina Ciocea <marinaciocea@webrtc.org>
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32205}
2020-09-27 08:28:07 +00:00
9def3ff4a3 Fix for OnSctpInboundPacket being called after transport destruction.
OnSctpInboundPacket is called not only for incoming packets, but for
notifications, which can be delivered on the usrsctp timer thread.

I suspect that these notifications can be delivered after we attempt to
close the socket, because if we attempt to close it while the timer
thread holds a reference, it isn't actually destroyed until the timer
thread finishes its operation.

Bug: chromium:1127774
Change-Id: Id6a883b14796e8f5bf1c2990f3d9d389d72c8a46
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184240
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32204}
2020-09-26 19:19:56 +00:00
16db7fff49 Move win32 files to a new "win32" target to avoid cyclic dependencies.
I ran into this when using repeating_task, which depends on clock (in
system_wrappers) which in turn added a dependency on rtc_base on Windows
due to win32 files. That's a problem since rtc_base depends on
repeating_task:

  //rtc_base:rtc_base ->
  //rtc_base/task_utils:repeating_task ->
  //system_wrappers:system_wrappers ->
  //rtc_base:rtc_base

We could additionally consider moving Clock out of system_wrappers.

Bug: webrtc:9987
Change-Id: I54ed715ad5eb9e3f5dd6c322233c18c05d895dff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185506
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32203}
2020-09-26 11:54:50 +00:00
3f7298d644 Clean up the AVX2 activation in the gni file
Bug: webrtc:11663
Change-Id: Ib85ee67c72175270ddf212c7f1a09115906f0c4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185480
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32202}
2020-09-25 21:44:54 +00:00