Граф коммитов

20523 Коммитов

Автор SHA1 Сообщение Дата
Randell Jesup ec34ccc22e Bug 1761771: Adding missing mutex to AudioBufferMemoryTracker::CollectReports r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D142212
2022-03-28 14:26:48 +00:00
Randell Jesup e82e1d91cc Bug 1207753 - MediaTrackGraph* thread-safety annotations r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D130590
2022-03-28 14:26:12 +00:00
Randell Jesup c6e4c8ed0a Bug 1207753 - dom/media webm thread-safety annotations r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D131877
2022-03-28 14:25:09 +00:00
Jeff Muizelaar 43236fc511 Bug 1759931 - Implement some missing outbound-rtp stats. r=jib,emilio,ng
Differential Revision: https://phabricator.services.mozilla.com/D141287
2022-03-25 13:33:02 +00:00
Randell Jesup 258c7cbfe7 Bug 1207753 - dom misc thread-safety annotations r=hsivonen,smaug
Differential Revision: https://phabricator.services.mozilla.com/D130598
2022-03-25 13:32:35 +00:00
stransky 91f3123417 Bug 1759137 [Linux] Reference hw_device_ctx instead of hw_frames_ctx r=alwu
We use AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX for HW decode so we need to reference hw_device_ctx instead of hw_frames_ctx.

Differential Revision: https://phabricator.services.mozilla.com/D141831
2022-03-25 11:32:55 +00:00
Randell Jesup d000ec3649 Bug 1207753 - dom/media/File* thread-safety annotations r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D130587
2022-03-25 01:36:33 +00:00
Tom Ritter e686113f04 Bug 1760274: Do not crash in RFP mode if GetWrapper is null r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D141505
2022-03-24 20:18:28 +00:00
Brad Werth 5140aa0b1e Bug 1760042: Update Win swgl test expectations for bt709.pc.yuv420p video. r=alwu
These Windows swgl tests no longer need the expanded fuzziness for asan or
beta builds. They can use the same fuzziness levels as other platforms.

Differential Revision: https://phabricator.services.mozilla.com/D141879
2022-03-24 19:24:28 +00:00
alwu 68dd7e07df Bug 1759033 - no longer start or shutdown MediaFoundation explictly, and ensure the media foundation's life cycle long enough. r=bryce
According to [1], `MFShutdown` will shutdown the media foundation for every other call of `MFStartup`, which means it's possible to shutdown the media foundation even if other components are still using that.

Therefore, we should consider make the media foundation alive when the first time any component wants to use it, and shutdown it when the whole process destroys.

We already did similar thing on the RDD process [2] so it makes sense to do it as well on other places. Especially considering we will move the MFT decoder into the RDD process in the future, we definitely don't want an encoder incorrectly shutdown the media foundation the decoder is using.

Also, it saves time to call `MFStartup` if the media foundation is already started.

[1] https://docs.microsoft.com/en-us/windows/win32/api/mfapi/nf-mfapi-mfshutdown
[2] https://searchfox.org/mozilla-central/rev/eeeba8183d3268e0d563c2becf9f4adc21a37368/dom/media/ipc/RDDParent.cpp#111,303,315

Differential Revision: https://phabricator.services.mozilla.com/D140757
2022-03-24 18:56:16 +00:00
alwu c572486947 Bug 1760464 - block certain Intel graphic cards to prevent crashes while using Intel MFT for HW VP8 decoding. r=media-playback-reviewers,gfx-reviewers,bryce,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D141810
2022-03-23 23:29:43 +00:00
Nika Layzell 5b2ada26c5 Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright
Tasks registered with shutdown tasks are called when the target
nsISerialEventTarget is about to be destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D129840
2022-03-23 22:22:04 +00:00
Butkovits Atila 43d443b619 Backed out 2 changesets (bug 1758610) for causing build bustage at FFmpegVideoFramePool.h. CLOSED TREE
Backed out changeset 00c6171a1e2a (bug 1758610)
Backed out changeset 1c377fb424c7 (bug 1758610)
2022-03-23 22:07:44 +02:00
stransky bf36926523 Bug 1758610 [Linux] Implement VideoFramePool as template r=alwu
Depends on D141827

Differential Revision: https://phabricator.services.mozilla.com/D141828
2022-03-23 19:32:32 +00:00
stransky 39c0400669 Bug 1758610 [Linux] Remove VideoFrameSurfaceVAAPI and use VideoFrameSurface only r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D141827
2022-03-23 19:32:32 +00:00
Andrew Osmond 3df496f168 Bug 1760887 - Expose FEATURE_VP8_HW_DECODE and FEATURE_VP9_HW_DECODE to the downloadable blocklist. r=gfx-reviewers,jnicol,media-playback-reviewers,alwu
This patch also exposes it as a gfxVar for cross process/thread-safe access.

Differential Revision: https://phabricator.services.mozilla.com/D141803
2022-03-23 19:28:57 +00:00
Paul Adenot b145f56728 Bug 1758536 - Reenable test_played.html on most platforms. r=media-playback-reviewers,alwu
Depends on D141597

Differential Revision: https://phabricator.services.mozilla.com/D141598
2022-03-23 17:23:58 +00:00
Paul Adenot 3257b39bcd Bug 1758536 - Special case very short file that end before seeking in test_played.html. r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D141597
2022-03-23 17:23:58 +00:00
Bryce Seager van Dyk 23eb2bb304 Bug 1739664 - Implment further telemetry for fetching update.xml from balrog. r=Gijs
Depends on D134724

Differential Revision: https://phabricator.services.mozilla.com/D134725
2022-03-23 03:23:41 +00:00
Andrew Osmond 78afd0ab38 Bug 1760663 - Add blocklist support for WebGPU. r=gfx-reviewers,nical
This patch just adds the plumbing to allow for baked in blocklist rules
or the downloadable blocklist to prevent certain configurations from
getting WebGPU. It does not add any rules.

It also changes us from allowing WebGPU only in nightly, including
tests, to not release and not beta. This allows try to run the WebGPU
tests as expected, since even try builds forked from mozilla-central are
not considered nightly builds by CI (or so it seems).

Differential Revision: https://phabricator.services.mozilla.com/D141682
2022-03-22 15:22:39 +00:00
Randell Jesup 6ba2bca6f4 Bug 1207753 - webaudio thread-safety annotations r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D130588
2022-03-22 14:07:34 +00:00
Paul Adenot 50a93923a0 Bug 1759325 - Only drain the converter at the end of the queue. r=alwu
Before this change, the converter would be drained after each packet would be
pushed to the queue, introducing discontinuities in the audio, at the end, after
all the decoding operations were finished, but before all the audio packets were
pushed to the queue.

This went unnoticed because there is no converter most of the time, with audio
that has a sample-rate higher or equal to the common 44100Hz value.

Depends on D141356

Differential Revision: https://phabricator.services.mozilla.com/D141357
2022-03-22 11:43:45 +00:00
Paul Adenot 6ce58a96c5 Bug 1759325 - Use PushProcessedAudio in DrainConverter instead of having almost the same code written twice. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D141356
2022-03-22 11:43:45 +00:00
Csoregi Natalia 8183a2d0cd Backed out changeset 22dd9ee7e4a4 (bug 1207753) for causing bustage on ProcessHangMonitor.cpp. CLOSED TREE 2022-03-22 01:31:19 +02:00
Randell Jesup b18c3e4ebb Bug 1207753 - dom misc thread-safety annotations r=hsivonen,smaug,media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D130598
2022-03-21 23:02:23 +00:00
Csoregi Natalia 4195cf45fe Backed out changeset 956a3ddb6ea0 (bug 1759931) for failures on test_peerConnection_stats.html. CLOSED TREE 2022-03-21 23:21:15 +02:00
Jeff Muizelaar 300bcc9619 Bug 1759931 - Implement some missing outbound-rtp stats. r=jib,emilio
Differential Revision: https://phabricator.services.mozilla.com/D141287
2022-03-21 19:31:56 +00:00
Karl Tomlinson 6711292cb5 Bug 1753316 remove unnecessary sSingletonMutex r=jib
This was added due to a mistaken reading of the thread on which sSingleton was
cleared.
https://phabricator.services.mozilla.com/D48512#1545100

Differential Revision: https://phabricator.services.mozilla.com/D140035
2022-03-18 00:57:06 +00:00
Karl Tomlinson 881368d581 Bug 1753316 Use NS_NewRunnableFunction to simplify MediaEngine shutdown task r=jib
Differential Revision: https://phabricator.services.mozilla.com/D140034
2022-03-17 22:46:05 +00:00
Karl Tomlinson ae56be7e3b Bug 1753316 Remove main thread block on MediaManager TaskQueue shutdown r=jib
The main thread should not block on the media task queue because media tasks
block on the main thread.
https://searchfox.org/mozilla-central/rev/8e1eb5cbd89a2455c34032d921f8de28261d016b/dom/media/MediaManager.h#188

This synchronous TaskQueue shutdown was unreviewed.
https://phabricator.services.mozilla.com/D82159?vs=308672&id=309405#2539546

It was added apparently on a concern of a race of completion of MediaManager
shutdown with CubebDeviceEnumerator and/or persistent MTA thread singleton
shutdown.  However both CubebDeviceEnumerator and MTA thread use
ShutdownPhase::XPCOMShutdownThreads, which will not race with MediaManager's
earlier xpcom-will-shutdown barrier.
https://searchfox.org/mozilla-central/rev/8e1eb5cbd89a2455c34032d921f8de28261d016b/dom/media/webrtc/CubebDeviceEnumerator.cpp#35
https://searchfox.org/mozilla-central/rev/b697834e78a3ef7613e2fa57c07624b1d9d1c909/ipc/mscom/EnsureMTA.cpp#177
https://searchfox.org/mozilla-central/rev/b697834e78a3ef7613e2fa57c07624b1d9d1c909/dom/media/systemservices/MediaUtils.cpp#24

Differential Revision: https://phabricator.services.mozilla.com/D140033
2022-03-17 22:46:04 +00:00
Karl Tomlinson 1c4ac2ab20 Bug 1753316 allow GetBackend() to continue as normal after main thread shutdown r=jib
GetBackend() is used only on the media thread, on which mBackend is shut down
after main thread MediaManager shutdown.

Creating a backend on the media thread shortly after sHasMainThreadShutdown is
set on the main thread is not necessarily any different from creating shortly
before sHasMainThreadShutdown is set.  The simplest way to handle these is to
take the same code path in each case.

MediaEventListener::operator=() will assert if another backend is created
after a previous backend is shutdown.
https://searchfox.org/mozilla-central/rev/8e1eb5cbd89a2455c34032d921f8de28261d016b/dom/media/MediaEventSource.h#336
https://searchfox.org/mozilla-central/rev/2a0b0ababd4541ecffb74cbe0820a9d0a25da636/dom/media/MediaManager.cpp#3112

Depends on D140031

Differential Revision: https://phabricator.services.mozilla.com/D140032
2022-03-17 20:56:07 +00:00
Karl Tomlinson eaffb53183 Bug 1753316 remove pre-TaskQueue comments relating to Chromium Thread shutdown r=jib
Obsolete since
https://hg.mozilla.org/mozilla-central/rev/4af433832f071364df98d95bbef0a107d4dbd336#l1.299

Depends on D140030

Differential Revision: https://phabricator.services.mozilla.com/D140031
2022-03-17 20:56:07 +00:00
Zaggy1024 e21dfb7adb Bug 1758605 - Fix MediaCapabilities not detecting hardware support for certain H264 profiles. r=alwu
Added two missing flags to H264::CreateExtraData that are required to parse the avcC box correctly.

Differential Revision: https://phabricator.services.mozilla.com/D140695
2022-03-17 20:39:51 +00:00
Zaggy1024 0802b7b07f Bug 1569686 - Fixed MediaCapabilities API not returning powerEfficient=true all VP8/VP9 codecs. r=alwu
VPXChangeMonitor never initialized a decoder to test for that hardware support on when requested by MediaCapabilities. To fix this, codec initialization data is created to be processed by VPXChangeMonitor to initialize a dummy decoder.

MediaCapabilities and related APIs will now accept VP9 Profile 3, as the profile is supported by libdav1d.

Depends on D138884

Differential Revision: https://phabricator.services.mozilla.com/D140148
2022-03-17 20:39:51 +00:00
Zaggy1024 b2ffa025f0 Bug 1652945 - Added support for the Windows Media Foundation AV1 decoder for hardware decoding. r=alwu
The method of creating decoder MFTs was replaced with MFEnumEx queries in order to get an instance of the AV1 decoder.

Differential Revision: https://phabricator.services.mozilla.com/D138884
2022-03-17 20:39:51 +00:00
Randell Jesup c5917ed65a Bug 1207753: Basic thread-safety annotations to quiet errors until real annotations land r=nika
Differential Revision: https://phabricator.services.mozilla.com/D141062
2022-03-17 18:39:15 +00:00
Emilio Cobos Álvarez b055f536ea Bug 1758702 - Allow ThreadSafeWeakPtr<IncompleteType> to work. r=glandium
This will be used to avoid problematic includes from WorkerPrivate.h,
and it matches the behavior of RefPtr<> and WeakPtr<>.

Differential Revision: https://phabricator.services.mozilla.com/D140658
2022-03-17 15:24:40 +00:00
criss 9302fa739c Backed out 2 changesets (bug 1758702) for causing build bustages. CLOSED TREE
Backed out changeset 3e00d9203851 (bug 1758702)
Backed out changeset 66625baf0875 (bug 1758702)
2022-03-17 15:21:31 +02:00
Emilio Cobos Álvarez 370bce32dc Bug 1758702 - Allow ThreadSafeWeakPtr<IncompleteType> to work. r=glandium
This will be used to avoid problematic includes from WorkerPrivate.h,
and it matches the behavior of RefPtr<> and WeakPtr<>.

Differential Revision: https://phabricator.services.mozilla.com/D140658
2022-03-17 12:15:20 +00:00
Paul Adenot ccbb18aba2 Bug 1752917 - Check that a ScriptProcessorNode still has a track after marking it as inactive while updating its connection status. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D141247
2022-03-17 11:09:35 +00:00
Cristian Tuns 8b4654fca4 Backed out changeset 2a13a8e2de82 (bug 1759931) for causing mochitest failures in test_peerConnection_simulcastAnswer.html CLOSED TREE 2022-03-17 00:59:59 -04:00
Karl Tomlinson c534faa84e Bug 1757505 remove unnecessary lock and notify on shutdown r=jib
mIPCIsAlive is already cleared and notified before Shutdown() is called on the
IPC thread.

mIPCIsAlive is read only in DispatchToParent() on the MediaManager thread,
which cannot happen while Shutdown() is called on the same thread.

Depends on D140029

Differential Revision: https://phabricator.services.mozilla.com/D140030
2022-03-17 04:10:07 +00:00
Karl Tomlinson 89c4564af8 Bug 1757505 remove unnecessary shutdown from destructor r=padenot
DeallocPCamerasChild() already calls Shutdown() since
https://hg.mozilla.org/mozilla-central/rev/366a2aa802b5a7bd06328a7162f10292cbde3411

Differential Revision: https://phabricator.services.mozilla.com/D140029
2022-03-17 04:10:06 +00:00
Karl Tomlinson 5cf10ab86d Bug 1757505 remove unnecessary AllDone() message r=jib
Closing the BackgroundChild for the media thread is sufficient to destroy the
actors.
https://searchfox.org/mozilla-central/rev/9f61d854547cedbde0773b2893e4f925352be3b3/ipc/glue/BackgroundImpl.cpp#409

Depends on D140027

Differential Revision: https://phabricator.services.mozilla.com/D140028
2022-03-17 04:10:06 +00:00
Karl Tomlinson 2af2245080 Bug 1757505 delete CamerasParent when shutting down r=jib
so that CamerasChild gets notified that the parent will no longer reply.

CamerasParent::ActorDestroy() now calls StopVideoCapture() in response to the
delete.

This change also means that no further IPC messages will be received on this
CamerasParent after the StopVideoCapture().

Differential Revision: https://phabricator.services.mozilla.com/D140027
2022-03-17 02:21:47 +00:00
Karl Tomlinson 8508e777d3 Bug 1757505 Clarify that aFailureValue is used by copy r=jib
in contrast to aSuccessValue which is used as a reference.

Depends on D140025

Differential Revision: https://phabricator.services.mozilla.com/D140026
2022-03-17 01:55:23 +00:00
Karl Tomlinson 8961413fcf Bug 1757505 indicate failure to receive reply even when the parent is shut down after dispatch r=jib
mReplySuccess is set appropriately only when the reply is received.
An inappriopriate success could lead to incorrect data being returned.

Depends on D140023

Differential Revision: https://phabricator.services.mozilla.com/D140025
2022-03-17 01:55:23 +00:00
Karl Tomlinson dda7cc0748 Bug 1757505 correct thread specified in comment for shutting down IPC thread r=jib
The comment has been out of date since
https://hg.mozilla.org/mozilla-central/rev/03540c2e61c12a3e31869efb34fcee59b0adeec3

Depends on D140022

Differential Revision: https://phabricator.services.mozilla.com/D140023
2022-03-17 01:55:22 +00:00
Jeff Muizelaar 8a1a93ff08 Bug 1759931 - Implement some missing outbound-rtp stats. r=jib,emilio
Differential Revision: https://phabricator.services.mozilla.com/D141287
2022-03-17 01:50:17 +00:00
Karl Tomlinson c951d6e5ef Bug 1753266 don't start a video capture thread after AppShutdown r=jib
RecvPCamerasConstructor() is used because IPC messages cannot be sent from
AllocPCamerasParent() because SetManagerAndRegister() has not been called to
change mLinkStatus to Connected.

Differential Revision: https://phabricator.services.mozilla.com/D140022
2022-03-16 23:02:19 +00:00