Commit Graph

29393 Commits

Author SHA1 Message Date
c907d4f223 Revert "Ensure loss-based controller is always enabled."
This reverts commit 60ec3703cd1f87081c0e4becde5d9ef210a6d44a.

Reason for revert: Needs back-end test before always enabling.

Original change's description:
> Ensure loss-based controller is always enabled.
> 
> The new default parameters are the ones that were used in the Chrome
> Finch trial. The deleted unit test is invalidated by these changes.
> 
> Bug: chromium:941413
> Change-Id: I597f4b0defaebe5bb3a6710b071fae2ee5c6f461
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160652
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30049}

TBR=srte@webrtc.org,crodbro@webrtc.org,jonasolsson@webrtc.org

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

Bug: chromium:941413
Change-Id: I5da4676ad8be2569ad7eed99e954e0d0b624110b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161902
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30061}
2019-12-11 14:09:20 +00:00
4fc52c8329 Make struct SynchronizationDelays more general.
Bug: none
Change-Id: Iab263789cc8b51917acb3db2803fa71a927bc62a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161640
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30060}
2019-12-11 13:55:16 +00:00
3fdb3cbc6a Remove potential real-time reallocation in PushResampler
This CL removes the use of absl::InlineVector in the PushResampler which
causes real-time reallocations for setups with more than 8 channels.

As part of the CL, it also removes one dependency on absl for the
common_audio module.

Bug: webrtc:11197
Change-Id: I0788ee9a0f3d08b91bb18caa65f660fb52368a97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161729
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30059}
2019-12-11 13:16:37 +00:00
375eff4f04 Add guidance to style guide how to reference a bug in a TODO
Bug: None
Change-Id: Icfbce347d0c2a71fd728507e5005eb05736b13a1
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161733
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30058}
2019-12-11 11:55:52 +00:00
3c4fda2ed8 Do not disable metrics by default.
Starting from [1] metrics are optional but by default they should be
enabled.

[1] - https://webrtc-review.googlesource.com/c/src/+/161043

Bug: webrtc:11144
Change-Id: I0b22e2c59ff9df73a82f354997f073b6da028875
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161728
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30057}
2019-12-11 08:08:58 +00:00
947a380b81 Split unit tests out of end-to-end PeerConnection test.
Splits PeerConnectionTest.java into 4 files:
 - PeerConnectionEndToEndTest.java
 - PeerConnectionTest.java
 - RtpTranceiverTest.java
 - VideoTrackTest.java

Also deletes some dead code.

Bug: None
Change-Id: I9b81fec042bc6be261e3010ec5a30baf6d7211bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161680
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30056}
2019-12-10 17:38:51 +00:00
a3ecb7a656 Migrate tests from RtpDepacketizer to VideoRtpDepacketizer interface
Bug: webrtc:11152
Change-Id: I1b1c5183d35b791c09c14c9d1f0ca240c1749d9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161455
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30055}
2019-12-10 17:37:46 +00:00
007915a37e Refresh some links in the docs folder.
No-Try: True
Bug: None
Change-Id: I3b708f29bbdbdaacf0934a092f887c9be63e8da9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161725
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30054}
2019-12-10 15:32:48 +00:00
b04b2a1719 Initial version of ResourceAdaptationProcessor and friends.
This CL adds Resource, ResourceConsumer, ResourceConsumerConfiguration
and ResourceAdaptationProcessor and implements the algorithm outlined
in
https://docs.google.com/presentation/d/13jyqCWNpIa873iKT6yDuB5Q5ma-c0CvxBpX--0tCclY/edit?usp=sharing.

Simply put, if any resource (such as "CPU") is overusing, the most
expensive consumer (e.g. encoded stream) is adapted one step down.
If all resources are underusing, the least expensive consumer is
adapted one step up.

The current resources, consumers and configurations are all fakes;
this CL has no effect on the current adaptation algorithms used in
practise, but it lays down the foundation for future work in this
area.

Bug: webrtc:11167, webrtc:11168, webrtc:11169
Change-Id: I4054ec7728a52a49e137eee6fa67fa27debd9254
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161237
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30053}
2019-12-10 15:31:43 +00:00
f18f9206e5 Revert "Moves TransportFeedbackAdapter to TaskQueue."
This reverts commit 62d01cde6f6ec1fa91b1e5234a7922ad1a4ce036.

Reason for revert: Causes SIGSEGV in webrtc::RTPSender::BuildRtxPacket.

Original change's description:
> Moves TransportFeedbackAdapter to TaskQueue.
>
> Bug: webrtc:9883
> Change-Id: Id87e281751d98043f4470df5a71d458f4cd654c1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158793
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30037}

TBR=sprang@webrtc.org,srte@webrtc.org

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

No-Try: True
Bug: webrtc:9883
Change-Id: If54bdb8694144fae3fafbabd72d1ac1198e51aa6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161726
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30052}
2019-12-10 13:51:29 +00:00
89aaedac12 Move audioproc_f to rtc_tools.
The motivation in https://webrtc-review.googlesource.com/c/src/+/32340/3 applies here as well. We
would like to use this tool downstream.

Bug: None
Change-Id: Id5b23f792679ab9c07294bfb8e53119c423044b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161681
Commit-Queue: Daniel Johansson <dajo@webrtc.org>
Reviewed-by: Daniel Johansson <dajo@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30051}
2019-12-10 12:08:56 +00:00
ded86c1ad8 Remove remaining settings for using legacy AEC
This CL removes the remaining settings for using the legacy AEC.

It also adds a missing printout of the enforce_high_pass_filtering
parameter in the ToString method.

Bug: webrtc:11165
Change-Id: I58f0861bf1c6cd24bd83f4d3e394653b2fab3d71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161683
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30050}
2019-12-10 10:31:07 +00:00
60ec3703cd Ensure loss-based controller is always enabled.
The new default parameters are the ones that were used in the Chrome
Finch trial. The deleted unit test is invalidated by these changes.

Bug: chromium:941413
Change-Id: I597f4b0defaebe5bb3a6710b071fae2ee5c6f461
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160652
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30049}
2019-12-10 10:30:02 +00:00
565c05888d [UBSan] Remove suppression for opus.
Defective code was fixed upstream,
so the suppression isn't needed anymore.

Bug: webrtc:11110
Change-Id: I7232f2c23de50005277893ce3ea2fe3be11c425d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161682
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#30048}
2019-12-10 08:59:30 +00:00
5f728fc04f Fix nullablity on CameraCapturer
Both cameraThreadHandler and surfaceHelper shouldn't be null.

Bug: None
Change-Id: I3c239c4275c53b836bbc2e9d6af71bf2b1b65387
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161480
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30047}
2019-12-10 08:33:15 +00:00
1425d40369 Remove MessageBoxA UI API call from socket code
There is code in socket_adapters.cc that was trying to display UI by
invoking the MessageBoxA API. This causes a linker failure when building
apps for versions of Windows that do not have the MessageBoxA API.

The text message that the socket code tries display also does not seem
right. It references Google Talk and provides a HTTP URI that is
invalid. The message is only in English instead of being localized in
all the languages supported by the app.

I am fixing this by replacing the call to MessageBoxA with a call to
RTC_LOG(LS_ERROR).
I am also attempting to clean up the text of the message by removing
the invalid URL and removing references to Google products. I am trying
to make the logging message more matter-of-fact about what is going on.
As I understand it, the message is displayed when a HTTP proxy sends a
Proxy-Authenticate HTTP response header that specifies an unsupported
authentication scheme. I changed the text of the logging message to
state this.

Bug: webrtc:11187
Change-Id: I14df32943b62130ac623f72fe901e8f2bb1e8f24
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161475
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30046}
2019-12-10 08:32:10 +00:00
951e289853 Add VideoTimingExtension to kFecOrPaddingExtensionSizes.
As of https://webrtc-review.googlesource.com/c/src/+/158899, FEC may be
used on packets with VideoTimingExtension.  This may result in creation
of FEC packets that exceed the maximum configured RTP packet size.

This problem occurs most frequently with datagram transports that define a
smaller maximum packet size.

Bug: webrtc:9719
Change-Id: I842216a6696a695f0a3f01a221e538605fc5b9bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161557
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30045}
2019-12-09 18:46:53 +00:00
a764999e3f Don't try to load kernel32.dll in RWLockWin class
The RWLockWin::Create() function returns NULL on some Windows platforms because it cannot load kernel32.dll. This causes a crash.
RWLockWin tries to load kernel32.dll to check if the Slim Reader/Writer Lock APIs are present in kernel32.dll but on newer Windows platforms, kernel32.dll does not exist and the APIs are exported by kernelbase.dll instead.

The fix is quite simple: There is no need to try to load any DLL to check if the Slim Reader/Writer Lock APIs are present, because these APIs
are always present in all Windows versions since Windows Vista.
I am removing the code that attempts to load kernel32.dll. This prevents the crash on platforms that use kernelbase.dll.

If the WINUWP preprocessor symbol is defined, RWLockWin was already doing the right thing. But this issue is not limited to WINUWP and in
some scenarios, building for WINUWP is not the right solution because it causes other problems. So, my fix is essentially to use the WINUWP
code path for all Windows builds.

The only version of Windows which does not have the Slim Reader/Writer Lock APIs is Windows XP (and older ones, of course.)
However, since the current code does not fall back to an alternative implementation when the Slim Reader/Writer Lock APIs are missing,
WebRTC is already broken on such old versions of Windows.

Bug: webrtc:11186
Change-Id: I34aad066e18b924792d47c244ecee00669e86c4d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161472
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30044}
2019-12-09 18:45:03 +00:00
2115d2d268 Roll chromium_revision 34a43a356e..5939567173 (722057:722888)
Manual tweak: Do not roll src/ios, since it breaks ios_sim_x64_dbg_ios10.

Change log: 34a43a356e..5939567173
Full diff: 34a43a356e..5939567173

Changed dependencies
* src/base: ad02e24051..4a67f656da
* src/build: fae06de3dd..b1050d1e6a
* src/testing: 0775600850..2363b239d0
* src/third_party: ca4f6358dd..244bb7a24b
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/c6bece5e5b..8953fbe6c5
* src/third_party/depot_tools: 9212599f6a..6b52dc21e1
* src/third_party/lss: https://chromium.googlesource.com/linux-syscall-support.git/+log/726d71ec08..7bde79cc27
* src/tools: b7dec18459..3f49cabf04
* src/tools/luci-go: git_revision:7d11fd9e66407c49cb6c8546a2ae45ea993a240c..git_revision:37a855b64d59b7f079c9a0e5368f2757099d14d3
DEPS diff: 34a43a356e..5939567173/DEPS

No update to Clang.

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

Change-Id: I0d3509efa554a5f8090678b22448f8ee960ac912
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161554
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#30043}
2019-12-09 15:19:23 +00:00
f22af3cca7 Revert "Distinguish between send and receive video codecs"
This reverts commit 18314bd8d2cb27fa58e4d304bbc428e3ed1736ba.

Reason for revert: Breaks downstream test.

Original change's description:
> Distinguish between send and receive video codecs
> 
> Even though send and receive codecs are the same,
> they might have different support in HW.
> Distinguish between send and receive codecs to be able to keep
> track of which codecs have HW support.
> 
> Bug: chromium:1029737
> Change-Id: I16a80da44c5061ca42f2aabda76e6bf0b879bf7b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161306
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Commit-Queue: Johannes Kron <kron@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30041}

TBR=steveanton@webrtc.org,andersc@webrtc.org,kron@webrtc.org

Change-Id: I7e5807460006db613e9b3b369ec6036b88f164fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1029737
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161662
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30042}
2019-12-09 14:48:55 +00:00
18314bd8d2 Distinguish between send and receive video codecs
Even though send and receive codecs are the same,
they might have different support in HW.
Distinguish between send and receive codecs to be able to keep
track of which codecs have HW support.

Bug: chromium:1029737
Change-Id: I16a80da44c5061ca42f2aabda76e6bf0b879bf7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161306
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30041}
2019-12-09 13:56:55 +00:00
ef3998ffd1 Add directive to make webrtc metrics optional.
Bug: webrtc:11144
Change-Id: I4e75e6aec033784685de3670e880bb9f2b6ee8d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161043
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30040}
2019-12-09 13:55:50 +00:00
00d0f178c2 Revert "Reland "Reland "Implemented screen enumeration and selection for desktop capture under X11 using the X Resize and Rotate extension version 1.5."""
This reverts commit af51be7869994a299451e22e6382ae641767b26d.

Reason for revert: Causes failure of Linxu CFI Chromium bot.
See https://crbug.com/1031930

Original change's description:
> Reland "Reland "Implemented screen enumeration and selection for desktop capture under X11 using the X Resize and Rotate extension version 1.5.""
> 
> This is a reland of a0adf3d4409036d095480e9bfa0fc06990362f84
> 
> Original change's description:
> > Reland "Implemented screen enumeration and selection for desktop capture under X11 using the X Resize and Rotate extension version 1.5."
> > 
> > This is a reland of e7153012682ccd3d1eacc18f802cab7820e3bad3
> > 
> > Original change's description:
> > > Implemented screen enumeration and selection for desktop capture under X11 using the X Resize and Rotate entension version 1.5.
> > >
> > > Bug: chromium:396091
> > > Change-Id: Ia1b36c771632c536bb8d15322461b479fabc409e
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148768
> > > Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
> > > Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#29083}
> > 
> > Bug: chromium:396091
> > Change-Id: I0d9171ae5f340e0489e4b45ce5d97bc52b0a4904
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156067
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Reviewed-by: Tommi <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#29655}
> 
> Bug: chromium:396091
> Change-Id: I47525911095fabc6cee613d03b0d83134b95b084
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158900
> Reviewed-by: Tomas Gunnarsson <tommi@chromium.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Commit-Queue: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30032}

TBR=zijiehe@chromium.org,jamiewalch@chromium.org,tommi@webrtc.org,julien.isorce@chromium.org,sergeyu@chromium.org,tommi@chromium.org,trevor.axiom@gmail.com,jonringle@gmail.com,justin.franco@arterys.com

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

Bug: chromium:396091
Change-Id: Ibd7b21ade1547d96f42b3c24860e9f901fc71065
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161458
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30039}
2019-12-09 11:26:20 +00:00
034f767a91 Allow setting the initial congestion window size by config.
Bug: webrtc:11148
Change-Id: I4700a261661dca51d769e0a277704e1f9316e83d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161089
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30038}
2019-12-09 11:00:10 +00:00
62d01cde6f Moves TransportFeedbackAdapter to TaskQueue.
Bug: webrtc:9883
Change-Id: Id87e281751d98043f4470df5a71d458f4cd654c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158793
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30037}
2019-12-09 10:38:54 +00:00
62ea0aaea0 Remove deprecated legacy AEC code
This CL removes the deprecated legacy AEC code.

Note that this CL should not be landed before the M80 release has been cut.

Bug: webrtc:11165
Change-Id: I59ee94526e62f702bb9fa9fa2d38c4e48f44753c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161238
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30036}
2019-12-09 10:37:49 +00:00
5b030cabcc Change jni VideoEncoderWrapper to not use the encoder task queue
If the task to call OnEncodedImage is posted to the encoder task queue
just after VideoStreamEncoder::Stop post the task to release the
encoder, the destruction sequence of java HardwareVideoEncoder
deadlocks in outputBuffersBusyCount.waitForZero();

Encoders are generally allowed to call OnEncodedImage on any internal
encoder thread, so posting to the encoder task queue seems unnecessary.

Bug: webrtc:9378
Change-Id: Iee14f151d9efdc5ab348f9c86069fdb762e6a0dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161447
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30035}
2019-12-09 10:11:00 +00:00
dfbfb46062 Return an error when datachannel closes due to network error
This is the start of generating compliant errors, including diagnostics,
when datachannels close because of errors.

Bug: chromium:1030631
Change-Id: I39aa41728efb25bca6193a782db4cbdaad8e0dc1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161304
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30034}
2019-12-08 17:33:54 +00:00
33f9d2b383 Migrate WebRTC on FrameGeneratorInterface and remove FrameGenerator class
Bug: webrtc:10138
Change-Id: If85290581a72f81cf60181de7a7134cc9db7716e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161327
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30033}
2019-12-07 00:54:26 +00:00
af51be7869 Reland "Reland "Implemented screen enumeration and selection for desktop capture under X11 using the X Resize and Rotate extension version 1.5.""
This is a reland of a0adf3d4409036d095480e9bfa0fc06990362f84

Original change's description:
> Reland "Implemented screen enumeration and selection for desktop capture under X11 using the X Resize and Rotate extension version 1.5."
> 
> This is a reland of e7153012682ccd3d1eacc18f802cab7820e3bad3
> 
> Original change's description:
> > Implemented screen enumeration and selection for desktop capture under X11 using the X Resize and Rotate entension version 1.5.
> >
> > Bug: chromium:396091
> > Change-Id: Ia1b36c771632c536bb8d15322461b479fabc409e
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148768
> > Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
> > Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#29083}
> 
> Bug: chromium:396091
> Change-Id: I0d9171ae5f340e0489e4b45ce5d97bc52b0a4904
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156067
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29655}

Bug: chromium:396091
Change-Id: I47525911095fabc6cee613d03b0d83134b95b084
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158900
Reviewed-by: Tomas Gunnarsson <tommi@chromium.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30032}
2019-12-06 19:39:45 +00:00
80bc1acb9c Add implementations of the VideoRtpDepacketizer interface
while suboptimal, these implementions are complete and allow to
swap code from using RtpDepacketizer interface to VideoRtpDepacketizer

Bug: webrtc:11152
Change-Id: Ie7823feeb5b0563b74754255aaedfada9d446ac5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161380
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30031}
2019-12-06 15:20:29 +00:00
907dc806c7 Reland "Add support for RtpEncodingParameters::max_framerate"
Perf test failure was fixed separately.

TBR=steveanton@webrtc.org,sprang@webrtc.org,asapersson@webrtc.org

Original change's description:
> This adds the framework support for the max_framerate parameter.
> It doesn't implement it in any encoder yet.
>
> Bug: webrtc:11117
> Change-Id: I329624cc0205c828498d3623a2e13dd3f97e1629
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160184
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29907}

Bug: webrtc:11117
Change-Id: I9c1daf7887c2024c6669dc79bff89d737417458c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161445
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30030}
2019-12-06 15:11:54 +00:00
895069045f Fix: IvfFrameGenerator won't decode frame on release build
Bug: webrtc:10138
Change-Id: Id0a6328da20bbb841ed3cb013a0d96d8d88c0152
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161446
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30029}
2019-12-06 15:10:49 +00:00
1518fd34d8 Add support for setting a custom NetEqFactory in PeerConnection level tests.
This allows running Peerconnection level tests with a custom NetEqFactory.

Bug: webrtc:11005
Change-Id: If3063cf61a6274a137e4ab74f9ec2665425f21ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161307
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30028}
2019-12-06 12:34:02 +00:00
ee1e015655 Expose methods to validate and merge FieldTrial strings.
Bug: webrtc:11177
Change-Id: I0514d82bc904b1548c64fdef8b0a2a99a8dbd735
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161309
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Konrad Hofbauer <hofbauer@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30027}
2019-12-06 11:15:49 +00:00
c347585927 Use RtpPacket instead of legacy RtpHeaderParser in video/ tests
Bug: None
Change-Id: Ia35daa58aae51becef40910187006398d825c5b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161331
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30026}
2019-12-06 10:54:39 +00:00
eb8c4ca608 Remove unnecessary checks from AudioDeviceWindowsCore::CoreAudioIsSupported
This removes some code in the AudioDeviceWindowsCore::CoreAudioIsSupported function that was checking that every audio input and output device was functional. There are legitimate cases where some, or all, audio devices may not be accessible, and that was causing CoreAudioIsSupported to return false.

If CoreAudioIsSupported returns false, a subsequent RTC_CHECK call fails, which causes the entire app to exit.

After this change, the CoreAudioIsSupported() function simply checks if the Core Audio APIs are supported and no longer tries to do extra stuff unrelated to checking if the APIs are supported.

Note that Core Audio is actually supported in all versions of Windows after Windows XP. There were log messages in the code saying that if CoreAudioIsSupported() returns false, WebRTC will use the Wave Audio APIs instead. But this is no longer the case. The Wave Audio APIs would only be needed for Windows XP, and this code appears to have already been removed from WebRTC.
It is tempting to simply make CoreAudioIsSupported() do a "return true;" but for now I only removed the part of the logging messages that mentioned the Wave Audio APIs.

I understand that there is a new Audio Device Module (ADM) called WindowsCoreAudio2, which is now recommended for use by apps. Apps are supposed to instantiate WindowsCoreAudio2 and pass it in to WebRTC. When the app supplies its own ADM, CoreAudioIsSupported() does not get invoked, which avoids the bug. To help make it clearer that using WindowsCoreAudio2 is an acceptable solution, I am removing a comment that says that kWindowsCoreAudio2 is "experimental".

Bug: webrtc:11081
Change-Id: I7ed1684a276799f4c83006b45629e48814f0b18b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161463
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30025}
2019-12-06 10:09:03 +00:00
cec2433c47 Exposing more features in the network emulation manager API.
Bug: webrtc:9883
Change-Id: I2a687b46e3374db0dd08b0c02dfea1482e6fb89f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161229
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30024}
2019-12-06 08:47:19 +00:00
1fce3f8e55 Remove custom constructors for AudioProcessing::Config.
This CL follows the "Rule of zero".

Those constructors made no sense compared to default generated ones,
since all members are POD.
They were introduced to quiet a memory sanitizer warning,
which apparently was misleading.

As a bonus, the struct is now movable.

Bug: webrtc:11180, webrtc:9855
Change-Id: Iff9fd950bec8040bc6e7e7ece33cc49c5f453f5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161381
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#30023}
2019-12-06 06:49:04 +00:00
1256d9bcac Avoid capturing system UI over selected window
This change avoids inadvertent capture of certain system windows (e.g.
the Start menu, other taskbar menus, and notification toasts) when
capturing a specific window on Windows.

It stops using EnumWindows for detection of overlapping windows, because
this API excludes these system windows from its enumeration. Using
FindWindowEx instead enumerates these windows.

The enumeration logic is refactored somewhat because a callback is no
longer necessary.

Bug: webrtc:10835
Change-Id: I1cccd44d6ef07f13a68e8daf2d2573d422001201
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161153
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#30022}
2019-12-05 19:13:03 +00:00
16189c6429 Apply network estimate by default.
Bug: webrtc:10498
Change-Id: I49e5a3dd989152abfa0abdf90356b37cab912a91
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161382
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30021}
2019-12-05 17:09:56 +00:00
e9ecdc0a96 Roll chromium_revision 3f97848513..34a43a356e (720272:722057)
Change log: 3f97848513..34a43a356e
Full diff: 3f97848513..34a43a356e

Changed dependencies
* src/base: 0759871ba8..ad02e24051
* src/build: 2fc048cf25..fae06de3dd
* src/ios: a31907ccb8..11ba078b59
* src/testing: c011aaeb88..0775600850
* src/third_party: 245344e1cb..ca4f6358dd
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/6ba98ff601..243b5cc9e3
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/bcfcc04c53..c6bece5e5b
* src/third_party/depot_tools: 5ae4817ada..9212599f6a
* src/third_party/freetype/src: 4270e9f324..dfc9a049de
* src/third_party/googletest/src: 076c46198f..5395345ca4
* src/third_party/libvpx/source/libvpx: b8549ed889..d2a5e26359
* src/third_party/objenesis: 9e367f55e5a65781ee77bfcbaa88fb82b30e75c0..tknDblENYi8IaJYyD6tUahUyHYZlzJ_Y74_QZSz4DpIC
* src/tools: cc179a4932..b7dec18459
DEPS diff: 3f97848513..34a43a356e/DEPS

Clang version changed e84b7a5fe230e42b8e6fe451369874a773bf1867:c2443155a0fb245c8f17f2c1c72b6ea391e86e81
Details: 3f97848513..34a43a356e/tools/clang/scripts/update.py

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

Change-Id: Ie10a3621c1fec702012dc654e4956499af96a5fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161400
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@{#30020}
2019-12-05 16:47:34 +00:00
cee54179a3 Stop setting -Wextra (the toolchain already does that).
The comment was stale and setting -Wextra actually turns on diagnostics
that are turned off by Chromium.

For example:
"-Wextra -Wno-deprecated-copy -Wextra" will turn on -Wdeprecated-copy
because starting from https://reviews.llvm.org/D70342
-Wdeprecated-copy is part of -Wextra.

Bug: webrtc:11180
Change-Id: Ia5d1e22bfe42d67cd892ae07620e7fd2daf9a7a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161332
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30019}
2019-12-05 15:14:32 +00:00
fc50e44a03 Introduce VideoRtpDepacketizer interface to replace RtpDepacketizer
Bug: webrtc:11152
Change-Id: I20fd81233080d45d8978e5e57d0be6b592f44f43
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161322
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30018}
2019-12-05 15:05:30 +00:00
fc9079700c Fix for defect found by clusterfuzz.
Cause: VideoRtpReceiver::media_channel_ was used when it was null.
Fix: only use when provably not null.

Bug: chromium:1031013
Change-Id: I765e183186d895f39c122e26d50ac787216c44f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161328
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30017}
2019-12-05 14:12:33 +00:00
755187f9c3 Detect and reject mismatched DataChannel types.
Test is in Chromium:
https://chromium-review.googlesource.com/c/chromium/src/+/1951011

Bug: chromium:1030628
Change-Id: I525d810b504f5b1e9dc05ad17da192f7fae5b07f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161330
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30016}
2019-12-05 14:05:33 +00:00
2512604705 Adding a copy constructor for the Config in AudioProcessing
Bug: webrtc:11180
Change-Id: I4621f83c0441fda55d0f81606174c004668dd6c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161325
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30015}
2019-12-05 13:58:20 +00:00
cae277959b Introduce InbandComfortNoise RTP header extension.
BUG: webrtc:11085
Change-Id: I9b556a0d67d3c239abc247787103af9e50af4e65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159710
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30014}
2019-12-05 13:35:01 +00:00
78782a806f Fix IVF FrameGenerator factory method name
Bug: webrtc:10138
Change-Id: I8175209beade8a67e63addf30fb0bda1d941f6c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161326
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30013}
2019-12-05 10:14:51 +00:00
0020226e63 Replace VideoSourceInterface with FrameGeneratorInterface in AddVideoConfig
Replace VideoSourceInterface with FrameGeneratorInterface in
AddVideoConfig in PC quality test fixture.

Bug: webrtc:10138
Change-Id: I6e5fe91d286e0360bfcad1785af1fb1d8f890563
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161239
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30012}
2019-12-05 10:02:22 +00:00