Commit Graph

30845 Commits

Author SHA1 Message Date
2af35ab984 FakeAudioCaptureModule: remove lock recursions.
This change removes lock recursions and adds thread annotations.

The module had incorrect locking WRT the callback critical section:

ProcessFrameP: locks crit_
ReceiveFrameP: locks crit_callback_
-------------
SendFrameP: locks crit_callback_
MicrophoneVolume: locks crit_

Lock crit_callback_ was rolled in under crit_ instead.

Bug: webrtc:11567
Change-Id: I974fe91d44de0ddf1a1287fe91db9dfe63a61af9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175662
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31313}
2020-05-18 18:01:58 +00:00
8de900cdcb Reland "Make TransformableVideoFrameInterface::GetMetadata pure virtual."
This reverts commit 3e9068a6b488c63d98e5dd8a21caf7b83eb3744f.

Reason for revert: Fixed Chrome compile in https://crrev.com/c/2207191.

Original change's description:
> Revert "Make TransformableVideoFrameInterface::GetMetadata pure virtual."
> 
> This reverts commit 576ad5d510894040d7bbc041d5c86745c67f30f8.
> 
> Reason for revert: Causes compile error in Chrome.
> 
> Original change's description:
> > Make TransformableVideoFrameInterface::GetMetadata pure virtual.
> > 
> > GetMetadata() has been implemented downstream and can be made pure
> > virtual.
> > 
> > Bug: chromium:1069295
> > Change-Id: I62a3be6106552d2d82d8c413c6f523d31626b0d8
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175001
> > Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31281}
> 
> TBR=hta@webrtc.org,marinaciocea@webrtc.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: chromium:1069295
> Change-Id: I5915270d5b8dab9fc30a07f22fddedb29beca01a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175620
> Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
> Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31304}

TBR=hta@webrtc.org,guidou@webrtc.org,marinaciocea@webrtc.org

# Not skipping CQ checks because this is a reland.

Bug: chromium:1069295
Change-Id: Icc192a38f2c17898d3547e0eb38aa399befe6250
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175624
Reviewed-by: Marina Ciocea <marinaciocea@webrtc.org>
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31312}
2020-05-18 17:53:38 +00:00
3fa23eec4b VideoAdapter: add missing attribute thread annotations.
Bug: webrtc:11567
Change-Id: Iacb4ba4504e58778f828e7027a1b8d0f96227267
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175660
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31311}
2020-05-18 17:40:55 +00:00
3a35312b64 In pc/ replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: I09b28654b7b71a77224e7cf72fdf6a1e4823e67a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175137
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31310}
2020-05-18 17:06:25 +00:00
909f3a5339 Rename several more tests that use EXPECT_DEATH to *DeathTest.
Bug: webrtc:11577
Change-Id: I0397ee933464496e4885bb0f8030f3d669e5e612
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175641
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31309}
2020-05-18 16:10:04 +00:00
31c61c5091 RtcpSender: remove lock recursions.
This change removes lock recursions and adds thread annotations.

Bug: webrtc:11567
Change-Id: Idc872bda693776667f3b9126bd79589d74398b34
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175640
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31308}
2020-05-18 14:28:19 +00:00
da357a9495 Rename EchoPathDelayEstimator to EchoPathDelayEstimatorDeathTest.
...for the NullDataDumper, WrongCaptureBlockSize and
DISABLED_WrongRenderBlockSize tests. This is to avoid creation
of additional threads on Mac, which can cause issues on asan bots.

Bug: webrtc:11577
Change-Id: I4e6a64d47ec3b0a0e0018b19a0486208ba7e6ae2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175600
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31307}
2020-05-18 14:27:14 +00:00
61bc0d1ed3 Introduce ChainDiffCalculator
to convert flags which chains a video frame part of into chain_diffs

Bug: webrtc:10342
Change-Id: I6fb899eae934078223b101c9f85e2ac101980d4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175108
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31306}
2020-05-18 14:22:44 +00:00
532cac526c Add support for injecting Clock to RepeatingTaskHandle.
This will improve support for tests that use Clock as well as offer
a way to remove use of Sleep() in the tests.

Bug: none
Change-Id: I25fd0c6fc1b52ec0c917e56fae6807b136213d8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175566
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31305}
2020-05-18 14:11:44 +00:00
3e9068a6b4 Revert "Make TransformableVideoFrameInterface::GetMetadata pure virtual."
This reverts commit 576ad5d510894040d7bbc041d5c86745c67f30f8.

Reason for revert: Causes compile error in Chrome.

Original change's description:
> Make TransformableVideoFrameInterface::GetMetadata pure virtual.
> 
> GetMetadata() has been implemented downstream and can be made pure
> virtual.
> 
> Bug: chromium:1069295
> Change-Id: I62a3be6106552d2d82d8c413c6f523d31626b0d8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175001
> Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31281}

TBR=hta@webrtc.org,marinaciocea@webrtc.org

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

Bug: chromium:1069295
Change-Id: I5915270d5b8dab9fc30a07f22fddedb29beca01a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175620
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31304}
2020-05-18 13:56:43 +00:00
c50976ace9 Revert "Remove android_manifest_for_lint from BUILD.gn files"
This reverts commit 340106ad4659faca563509016097a091bfb5289f.

Reason for revert: Broke internal project.

Original change's description:
> Remove android_manifest_for_lint from BUILD.gn files
> 
> The Chromium Roll into WebRTC isn't flowing
> The first CL that caused the problem is https://webrtc-review.googlesource.com/c/src/+/175140/
> The error is: ERROR at //examples/BUILD.gn:104:33: Assignment had no effect. android_manifest_for_lint = "androidapp/AndroidManifest.xml"
> android_manifest_for_lint has ben removed so update BUILD files that use that feature to reflect this.
> 
> BUG=None
> 
> Change-Id: Ic3eb16eab8e4a4ab87daac9998d7a07373fec493
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175569
> Commit-Queue: Courtney Edwards <courtneyfe@google.com>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31299}

TBR=mbonadei@webrtc.org,titovartem@webrtc.org,courtneyfe@google.com,courtneyfe@chromium.org

Change-Id: I6055b4363254d353d116805aac4ec63d7c5c7c59
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175622
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31303}
2020-05-18 13:23:09 +00:00
c325246753 Log content name (aka mid) in messages from channel.cc
Logging of content name (mid) is valuable to debug issues
in scenarios with multiple m= line sections in SDP.
For example, video conferencing applications which
uses SFU and Unified Plan SDPs will likely to leverage
from more detailed logs when issues need to be debugged.


Bug: webrtc:10139
Change-Id: Id52ba3ad54af5caa0f8c03daaa51bdb0caf9fe67
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175115
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31302}
2020-05-18 13:09:19 +00:00
8ce078de5d Add thread annotations to PhysicalSocketServer members
Bug: webrtc:11567
Change-Id: Icfaeedef968c9529e263ca8b359dcabde3eb8684
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175003
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31301}
2020-05-18 12:49:56 +00:00
2c0bf26629 in DependencyDescriptor writer zero remaing bytes
adjust zeroing to support more than 64 bits.

Bug: b/156802687
Change-Id: I42448b4dd6d5c04143eb9075cd61317e115ed936
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175564
Reviewed-by: Erik Varga <erikvarga@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31300}
2020-05-18 12:47:16 +00:00
340106ad46 Remove android_manifest_for_lint from BUILD.gn files
The Chromium Roll into WebRTC isn't flowing
The first CL that caused the problem is https://webrtc-review.googlesource.com/c/src/+/175140/
The error is: ERROR at //examples/BUILD.gn:104:33: Assignment had no effect. android_manifest_for_lint = "androidapp/AndroidManifest.xml"
android_manifest_for_lint has ben removed so update BUILD files that use that feature to reflect this.

BUG=None

Change-Id: Ic3eb16eab8e4a4ab87daac9998d7a07373fec493
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175569
Commit-Queue: Courtney Edwards <courtneyfe@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31299}
2020-05-18 12:36:06 +00:00
6af97742ed Reduce calls to LastReceivedReportBlockMs() + add TODOs.
ModuleRtpRtcpImpl::Process seems to be called as many
times as 200 times a second (kRtpRtcpMaxIdleTimeProcessMs == 5).

This CL changes it so that LastReceivedReportBlockMs() is called
once a second instead of potentially every time Process() runs.
This should result in grabbing locks fewer times, however there
are still other call sites for the same lock.

Bug: webrtc:11581
Change-Id: I4c2fd9aa43343fdac2763250ae7f4d2545e98ec2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175350
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31298}
2020-05-18 12:08:08 +00:00
ae4d097382 Fork VideoReceiveStream test for VideoReceiveStream2
Change-Id: I2a9861269ace3e35ec626d3b270d5e9d33b7d3fd
Bug: webrtc:11489
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175562
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31297}
2020-05-18 10:21:48 +00:00
c18b7bfeb6 JsepTransport: remove lock recursions.
This change removes lock recursions and adds thread annotations.

Bug: webrtc:11567
Change-Id: Iefe1875182b7f8f8df3e9bd02e964530389b0b3d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175123
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31296}
2020-05-18 09:58:09 +00:00
35fc1537af Fallback to software decoders on consequtive decode errors on key-frames
Bug: webrtc:11575
Change-Id: I09be17ab5155e9f610c8f7c451ca52d7d65e24d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175222
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31295}
2020-05-18 09:57:04 +00:00
222598d1bf SimulatedTimeController: remove lock recursions.
This change removes lock recursions and adds thread annotations.

Bug: webrtc:11567
Change-Id: If6c86adddf006367eefedf10cce819e776e6afc2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175111
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31294}
2020-05-18 07:42:46 +00:00
37e42bed01 Give correct error code when SCTP is abruptly terminated.
Bug: chromium:1030631
Change-Id: I1890d6c7b30c06de1f4fdc6fe0cf1ff62ea4a63d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174830
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31293}
2020-05-18 05:23:27 +00:00
cf84607875 Reland "Use Windows 10 thread naming API"
This reverts commit d0d55515c4b88a07446bc66a5c183f50ee896282.

Reason for revert: Relanding with workaround.

Original change's description:
> Revert "Use Windows 10 thread naming API"
>
> This reverts commit e35004dffb42dd96b8cf37b33c9a3af4a5fd376c.
>
> Reason for revert: Reverting while downstream issue is resolved.
>
> Original change's description:
> > Use Windows 10 thread naming API
> >
> > While profiling video chat in Chrome I noticed that some of the webrtc
> > threads were not named. This change adds conditional use of the thread
> > naming APIs. These thread names work even if you attach a debugger after
> > the thread is named, and they show up in ETW traces, for easier
> > profiling.
> >
> > The sctp_create_thread_adapter threads are still not named but since
> > those are in C files they would require a C++-with-extern-C interface
> > to fix, so I'm leaving them for now.
> >
> > Bug: webrtc:10745
> > Change-Id: I68f6aa780e2417ce706764d69e5b64cc48aba333
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175280
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Reviewed-by: Tommi <tommi@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31285}
>
> TBR=kwiberg@webrtc.org,tommi@webrtc.org,brucedawson@chromium.org
>
> Change-Id: Icf877afbd82918ebe0c42a93b8a763cdab9a73ce
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10745
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175347
> Reviewed-by: Tommi <tommi@webrtc.org>
> Commit-Queue: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31289}

TBR=kwiberg@webrtc.org,tommi@webrtc.org,brucedawson@chromium.org


Bug: webrtc:10745
Change-Id: I51ee413fd8a0ff62f6b8b2a11f546b2a70168842
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175349
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31292}
2020-05-17 17:22:01 +00:00
04c94ad491 Fix misleading SequenceChecker variable name.
I named the network sequence checker 'worker' some time ago.
It represents the network TQ in RtpTransportControllerSendInterface
though, so should rather be called 'network'.

Bug: none
Change-Id: If82d7528b8cfcc180e1515b2fad63ed01610ec32
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175340
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31291}
2020-05-17 17:17:50 +00:00
ec3ba734e9 Don't wrap the main thread when running death tests.
Also re-enable the TestAnnotationsOnWrongQueueDebug test and rename
the test suite to SequenceCheckerDeathTest so that it gets executed
before other tests.

Bug: webrtc:11577
Change-Id: I3b8037644e4b9139755ccecb17e42b09327e4996
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175346
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31290}
2020-05-17 17:15:10 +00:00
d0d55515c4 Revert "Use Windows 10 thread naming API"
This reverts commit e35004dffb42dd96b8cf37b33c9a3af4a5fd376c.

Reason for revert: Reverting while downstream issue is resolved.

Original change's description:
> Use Windows 10 thread naming API
> 
> While profiling video chat in Chrome I noticed that some of the webrtc
> threads were not named. This change adds conditional use of the thread
> naming APIs. These thread names work even if you attach a debugger after
> the thread is named, and they show up in ETW traces, for easier
> profiling.
> 
> The sctp_create_thread_adapter threads are still not named but since
> those are in C files they would require a C++-with-extern-C interface
> to fix, so I'm leaving them for now.
> 
> Bug: webrtc:10745
> Change-Id: I68f6aa780e2417ce706764d69e5b64cc48aba333
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175280
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31285}

TBR=kwiberg@webrtc.org,tommi@webrtc.org,brucedawson@chromium.org

Change-Id: Icf877afbd82918ebe0c42a93b8a763cdab9a73ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10745
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175347
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31289}
2020-05-17 12:40:50 +00:00
e6e7f6a473 Reland "Re-enable absl FailureSignalHandler in tests."
This is a reland of 46e9629dda1de4315b5106741cc7072b4e01548c.

Relanding this one since it looks unrelated from the death tests
failure, see https://bugs.chromium.org/p/webrtc/issues/detail?id=11577.

Original change's description:
> Re-enable absl FailureSignalHandler in tests.
>
> It was not the cause of the SIGSEGV on iossim, so it is fine to
> re-enable it.
>
> TBR: titovartem@webrtc.org
> Bug: None
> Change-Id: I593a010f83f1a0df6b3419dd4f925380210844c9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175105
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31277}

TBR: titovartem@webrtc.org
Bug: None
Change-Id: I8d57c102e175bf66819f58057dd961830c2ab094
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175345
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31288}
2020-05-17 12:05:17 +00:00
fd5ae7f959 Pass datachannel priority in DC open messages
This adds priority to the API configuration of datachannels,
and passes the value in the OPEN message.

It does not yet influence SCTP prioritization of messages.

Bug: chromium:1083227
Change-Id: I46ddd1eefa0e3d07c959383788b9e80fcbfa38d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175107
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31287}
2020-05-17 10:57:27 +00:00
49a5e3ec3c Logging of demuxer conflicts and sink bindings.
Bug: webrtc:10139
Change-Id: I7e49069c636a2aa4abc76dd0ee7cacaaa06007fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175114
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31286}
2020-05-17 07:43:41 +00:00
e35004dffb Use Windows 10 thread naming API
While profiling video chat in Chrome I noticed that some of the webrtc
threads were not named. This change adds conditional use of the thread
naming APIs. These thread names work even if you attach a debugger after
the thread is named, and they show up in ETW traces, for easier
profiling.

The sctp_create_thread_adapter threads are still not named but since
those are in C files they would require a C++-with-extern-C interface
to fix, so I'm leaving them for now.

Bug: webrtc:10745
Change-Id: I68f6aa780e2417ce706764d69e5b64cc48aba333
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175280
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31285}
2020-05-17 07:38:21 +00:00
c17587484e Disable SequenceCheckerTest.TestAnnotationsOnWrongQueueDebug due to flake
Bug: webrtc:11577
Change-Id: Ia55eebfe3e4c3137309890bbdf96c488417e9e28
Tbr: mbonadei@webrtc.org
NoTry: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175342
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31284}
2020-05-16 14:09:41 +00:00
29a5fe8a4f Reland "Revert back to using the task_queue_ for guarding access."
This reverts commit af1b9ceb62dce3462083f9a44e26ee6d79639cef.

Reason for revert: Speculative reland after looking into downstream
failures. It's possible that carryover state from unrelated tests
running in parallel was causing failures.

Original change's description:
> Revert "Revert back to using the task_queue_ for guarding access."
> 
> This reverts commit 475006d4a30f8bc47f82eb540a6a066da2829095.
> 
> Reason for revert: Speculative revert. Breaks downstream project
> 
> Original change's description:
> > Revert back to using the task_queue_ for guarding access.
> > 
> > This removes the SequenceChecker that was temporarily used while
> > the rtc::Thread TQ implementation was being fixed.
> > 
> > Bug: none
> > Change-Id: Iaa46e47371211ac0a97b2dcaf23cef12b43ee8ea
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175081
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31256}
> 
> TBR=tommi@webrtc.org,srte@webrtc.org
> 
> Change-Id: I17a12bdca888a63f2fd161da30c0def5b9c3d04e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: none
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175103
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31258}

TBR=tommi@webrtc.org,srte@webrtc.org,titovartem@webrtc.org

# Not skipping CQ checks because this is a reland.

Bug: none
Change-Id: I23992643126d7d6dae63da1bb14420b2b8794fd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175135
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31283}
2020-05-15 18:22:53 +00:00
b4baf102bc in DependencyDescriptor writer do not leave remaing bits uninitialized
Bug: b/156462854
Change-Id: Iaceadb9cebdf5c4a34ff794966535cc873a53399
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175109
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Varga <erikvarga@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31282}
2020-05-15 18:13:04 +00:00
576ad5d510 Make TransformableVideoFrameInterface::GetMetadata pure virtual.
GetMetadata() has been implemented downstream and can be made pure
virtual.

Bug: chromium:1069295
Change-Id: I62a3be6106552d2d82d8c413c6f523d31626b0d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175001
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31281}
2020-05-15 17:46:20 +00:00
4515a55eed Revert "Re-enable absl FailureSignalHandler in tests."
This reverts commit 46e9629dda1de4315b5106741cc7072b4e01548c.

Reason for revert: Speculative revert.

Original change's description:
> Re-enable absl FailureSignalHandler in tests.
> 
> It was not the cause of the SIGSEGV on iossim, so it is fine to
> re-enable it.
> 
> TBR: titovartem@webrtc.org
> Bug: None
> Change-Id: I593a010f83f1a0df6b3419dd4f925380210844c9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175105
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31277}

TBR=mbonadei@webrtc.org,titovartem@webrtc.org,handellm@webrtc.org

Change-Id: I5e8456ea2918f740428517ee7eb5c561cb016652
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175112
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31280}
2020-05-15 15:54:36 +00:00
cf6544aef7 Avoids unnecessary calls to audio encoder.
As of this CL:
https://webrtc-review.googlesource.com/c/src/+/173704
...we now call AudioEncoder::OnReceivedOverhead() too often, since we
don't check if overhead has actually changed.
This CL rectifies that.

Bug: webrtc:10809
Change-Id: I0b86e0296a7860dde3e62e817f9b941fa82afe4a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175009
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31279}
2020-05-15 15:26:46 +00:00
b471ac791c Introduce layering controller interface for av1 encoder
Add TODOs into AV1 encoder wrapper where it suppose to be used.

Bug: webrtc:11404
Change-Id: If049066b84be72829867d5084827a7d275648a7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174806
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31278}
2020-05-15 15:25:42 +00:00
46e9629dda Re-enable absl FailureSignalHandler in tests.
It was not the cause of the SIGSEGV on iossim, so it is fine to
re-enable it.

TBR: titovartem@webrtc.org
Bug: None
Change-Id: I593a010f83f1a0df6b3419dd4f925380210844c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175105
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31277}
2020-05-15 13:54:16 +00:00
9a5efe925d In call/ replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: I81d06041b80ce470e4859c4d0ebad7ff0f831af9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175134
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31276}
2020-05-15 13:36:00 +00:00
fa8019c3c3 Clear address:port in icecandidateerror for tcp servers with private IP
Bug: chromium:1072401
Change-Id: I6af81a2b2b22b5f8d7edb8fb7f66f69b866db1c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174753
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#31275}
2020-05-15 11:30:20 +00:00
f9c6b68057 In audio/ replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: Ibdefed35fc73c8bf74db47df7469af7968f8e59d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175138
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31274}
2020-05-15 10:54:00 +00:00
6866dc7806 Reland "Make sure that "current" rtc::Thread instances are always current for TaskQueueBase."
This reverts commit 28685dc08cb34f756f9200519fba3222ba3a66f2.

Reason for revert: Speculative reland after looking into downstream
failures. It's possible that carryover state from unrelated tests
running in parallel was causing failures.

Original change's description:
> Revert "Make sure that "current" rtc::Thread instances are always current for TaskQueueBase."
> 
> This reverts commit 46b3bc6c24c233fe41a2401ce6e8eb8204a2d5a8.
> 
> Reason for revert: Speculative revert. Breaks downstream project
> 
> Original change's description:
> > Make sure that "current" rtc::Thread instances are always current for TaskQueueBase.
> > 
> > This is a necessary part of fulfilling the TaskQueueBase
> > interface. If a thread does not register as the current TQ, yet offers
> > the TQ interface, TQ 'current' checks will not work as expected and
> > code that relies them (TaskQueueBase::Current() and IsCurrent())
> > will run in unexpected ways.
> > 
> > Bug: webrtc:11572
> > Change-Id: Iab747bc474e74e6ce4f9e914cfd5b0578b19d19c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175080
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31254}
> 
> TBR=mbonadei@webrtc.org,tommi@webrtc.org
> 
> Change-Id: I69ff3355f0ec447b25604bd95fdacbdb4d4f3f27
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:11572
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175104
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31259}

TBR=mbonadei@webrtc.org,tommi@webrtc.org,titovartem@webrtc.org

# Not skipping CQ checks because this is a reland.

Bug: webrtc:11572
Change-Id: I00c82d99af8e05851769e09cb682b5b73895a6f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175133
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31273}
2020-05-15 10:20:03 +00:00
bb13f38a9e Add MockTransformableVideoFrame to api/test/.
Define MockTransformableVideoFrame in api/test to be use in Blink
tests.

Bug: chromium:1069295
Change-Id: I960d8228eddbdf8263b731814a00fd02d0a6c54e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175136
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31272}
2020-05-15 09:50:19 +00:00
e7864f5894 FakeNetworkInterface: remove lock recursions.
This change removes lock recursions and adds thread annotations.

Bug: webrtc:11567
Change-Id: I28b18256e627f43dc0d01d28452b2bcbf59cebac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175124
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31271}
2020-05-15 09:49:17 +00:00
772b1494a9 MediaChannel: remove lock recursions.
This change removes lock recursions and adds thread annotations.

Bug: webrtc:11567
Change-Id: I2730e8159673e7a2802ab0525ebcf26be0e36fd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175100
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31270}
2020-05-15 09:48:12 +00:00
8133ffb187 In GenericFrameInfo do not set frame_id and frame_diff
No code reads these properties.
They are recalculated by RtpPayloadParams
and set directly into RTPVideoHeader::generic.

Bug: webrtc:10342
Change-Id: Ib7bda4e6e5b0d0b3a585a848e3312fb66f8ae36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175127
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31269}
2020-05-15 09:43:34 +00:00
9b7232a68c Set up a new rtc::Thread instance per test.
Several tests leave pending tasks behind after executing, which may
affect the state of subsequent tests. This CL isolates each test in
the sense that a dedicated Thread instance is created per test and
then pending tasks are flushed and the Thread instance deleted.

Down the line we may want to improve on this and flag those tests
that leave pending tasks/timers etc.

Change-Id: Ibaf3719a9974c57ac2169edca0e2a06a9ea6c78f
Bug: webrtc:11574
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175132
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31268}
2020-05-15 09:13:02 +00:00
54706d68f6 In test/ replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: I75496d2f9f5612c4677057ce6fab2a55efa8674a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175129
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31267}
2020-05-15 08:15:02 +00:00
42748d8e22 In rtc_base/ and api/ replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: I8f4171490df39c683276f9d401a4083962ee409a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175130
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31266}
2020-05-14 19:33:26 +00:00
cdc89b4d14 Add GetMetadata() to TransformableVideoFrameInterface API.
Define VideoHeaderMetadata, containing a subset of the metadata in RTP
video header, and expose it the TransformableVideoFrameInterface, to
enable web application to compute additional data according to their own
logic, and eventually remove GetAdditionalData() from the interface.

Bug: chromium:1069295
Change-Id: Id85b494a72cfd8bdd4c0614844b9f0ffae98c956
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174822
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31265}
2020-05-14 19:26:55 +00:00
91fdc607d8 In video/ replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: Iec9dded7a3f045e048d0546c268ae206a7d3a7c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175128
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31264}
2020-05-14 18:12:40 +00:00