Commit graph

90 commits

Author SHA1 Message Date
John Lin
38b0fef2bc Bug 1815553 - follow the naming convention of existing code (mf -> wmf). r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D169401
2023-02-11 01:48:59 +00:00
Sandor Molnar
c03b470303 Backed out 2 changesets (bug 1815553) for causing mbu failures. CLOSED TREE
Backed out changeset 789d292e1b47 (bug 1815553)
Backed out changeset b2cfe3ce1eb1 (bug 1815553)
2023-02-10 23:43:01 +02:00
John Lin
aa32c6167e Bug 1815553 - follow the naming convention of existing code (mf -> wmf). r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D169401
2023-02-10 21:20:44 +00:00
John Lin
66644f0063 Bug 1810817 - p3: initial MFCDM protocol. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D167057
2023-02-07 03:43:49 +00:00
Csoregi Natalia
7468edeb58 Backed out 7 changesets (bug 1810817) for causing assertion failures on MFCDMParent.cpp. CLOSED TREE
Backed out changeset cfbe0be01c67 (bug 1810817)
Backed out changeset eedaee18c125 (bug 1810817)
Backed out changeset 07bcec895e6b (bug 1810817)
Backed out changeset 4be39a7ba24f (bug 1810817)
Backed out changeset e16e293637cf (bug 1810817)
Backed out changeset 0c66474f6010 (bug 1810817)
Backed out changeset 3c7aa682681f (bug 1810817)
2023-02-05 17:56:58 +02:00
John Lin
3509b55c8c Bug 1810817 - p3: initial MFCDM protocol. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D167057
2023-02-05 03:40:01 +00:00
Cosmin Sabou
61cd968772 Backed out 7 changesets (bug 1810817) for causing build bustages on KeySystemConfig.cpp. CLOSED TREE
Backed out changeset a2e5f26278a2 (bug 1810817)
Backed out changeset 5cb2ad9409db (bug 1810817)
Backed out changeset 66f1559b58e3 (bug 1810817)
Backed out changeset 7090c7757040 (bug 1810817)
Backed out changeset cad21cfbc4e5 (bug 1810817)
Backed out changeset cacab6822f87 (bug 1810817)
Backed out changeset 5018bb13f45a (bug 1810817)
2023-02-03 09:51:17 +02:00
John Lin
82f71addac Bug 1810817 - p3: initial MFCDM protocol. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D167057
2023-02-03 07:21:21 +00:00
Andreas Pehrson
b5e0b242db Bug 1796069 - Apply tracking id to DecodeStages. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D160773
2022-12-01 09:52:52 +00:00
alwu
3d1bc29d56 Bug 1785738 - part4 : run media engine in the new utility process. r=gerard-majax,azebrowski
This patch moves the media engine from the RDD process to the new
utility process, and create video bridge between the new utility process
and the GPU process in order to share the texture.

Differential Revision: https://phabricator.services.mozilla.com/D155901
2022-09-03 00:53:59 +00:00
Jim Blandy
2f5eb12516 Bug 1777656: Delete mozilla::ipc::SharedMemory::SharedMemorytype. r=nika,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D150852
2022-07-05 20:08:31 +00:00
alwu
9f4133b91f Bug 1758789 - part18 : disable the media engine feature on MinGW. r=media-playback-reviewers,firefox-build-system-reviewers,jolin,ahochheiden
On MinGW, it lacks of the headers for RunTimeClass and we have trouble to make it work. This patch adds a new config for Media Engine in order not to build related files on MinGW environment.

In addition, MinGW build version of Firefox is only used for Tor browser and it's ok to disable this feature for them for now. If they want to port this feature in the future as well, then we can see if we can fix the build problems at that time.

Differential Revision: https://phabricator.services.mozilla.com/D150660
2022-06-30 22:34:22 +00:00
alwu
9ff25b7c78 Bug 1758789 - part3 : create the media engine. r=jolin
Create a media engine that would be responsible to play media. We would perform any commands sent from the content process on the media engine, and also notify the content process when the media engine updates its status, notifying some useful events, or encountering any error.

Differential Revision: https://phabricator.services.mozilla.com/D144634
2022-06-30 22:34:16 +00:00
smolnar
50d8d18c90 Backed out 18 changesets (bug 1758789) for causing win AArch64 build bustages. CLOSED TREE
Backed out changeset e3f1d216b7b0 (bug 1758789)
Backed out changeset 737731f1056d (bug 1758789)
Backed out changeset 76a2ae95718a (bug 1758789)
Backed out changeset c134ab07a603 (bug 1758789)
Backed out changeset 84f574f95348 (bug 1758789)
Backed out changeset 7dae17111210 (bug 1758789)
Backed out changeset cdec8c010960 (bug 1758789)
Backed out changeset a1976aeac84e (bug 1758789)
Backed out changeset 6aac8720ffa5 (bug 1758789)
Backed out changeset 48b798f102e5 (bug 1758789)
Backed out changeset 310e551d433b (bug 1758789)
Backed out changeset b3d6df1153c1 (bug 1758789)
Backed out changeset 61775207f73b (bug 1758789)
Backed out changeset f0c28aea2f4b (bug 1758789)
Backed out changeset 0a65ff00244a (bug 1758789)
Backed out changeset 0b747e748709 (bug 1758789)
Backed out changeset cdf4acea8c87 (bug 1758789)
Backed out changeset 0c4009da7d1e (bug 1758789)
2022-06-30 23:54:23 +03:00
alwu
1368dec887 Bug 1758789 - part18 : disable the media engine feature on MinGW. r=media-playback-reviewers,firefox-build-system-reviewers,jolin,ahochheiden
On MinGW, it lacks of the headers for RunTimeClass and we have trouble to make it work. This patch adds a new config for Media Engine in order not to build related files on MinGW environment.

In addition, MinGW build version of Firefox is only used for Tor browser and it's ok to disable this feature for them for now. If they want to port this feature in the future as well, then we can see if we can fix the build problems at that time.

Differential Revision: https://phabricator.services.mozilla.com/D150660
2022-06-30 18:14:50 +00:00
alwu
68c92222c1 Bug 1758789 - part3 : create the media engine. r=jolin
Create a media engine that would be responsible to play media. We would perform any commands sent from the content process on the media engine, and also notify the content process when the media engine updates its status, notifying some useful events, or encountering any error.

Differential Revision: https://phabricator.services.mozilla.com/D144634
2022-06-30 18:14:45 +00:00
smolnar
a5305169eb Backed out 17 changesets (bug 1758789) for causing build bustages in dom/media/platforms/wmf/MFMediaEngineExtra.h CLOSED TREE
Backed out changeset f79b85886b3d (bug 1758789)
Backed out changeset b88968ae3985 (bug 1758789)
Backed out changeset 57af0b43d880 (bug 1758789)
Backed out changeset 3c325066c27f (bug 1758789)
Backed out changeset 776504da5d7b (bug 1758789)
Backed out changeset b66d3822afd4 (bug 1758789)
Backed out changeset 581fa3820b0e (bug 1758789)
Backed out changeset bdd37867341d (bug 1758789)
Backed out changeset 48c8b7df090a (bug 1758789)
Backed out changeset ec8e4b456e97 (bug 1758789)
Backed out changeset 7160b7ed5c7a (bug 1758789)
Backed out changeset 10fc120f05ae (bug 1758789)
Backed out changeset 4f9f771c22d5 (bug 1758789)
Backed out changeset 52bac96aa2b6 (bug 1758789)
Backed out changeset 7c6bf8ff8b2f (bug 1758789)
Backed out changeset 7ea0b6f1bbd5 (bug 1758789)
Backed out changeset d7485e0cfe18 (bug 1758789)
2022-06-28 10:14:16 +03:00
alwu
de0987c4ce Bug 1758789 - part3 : create the media engine. r=jolin
Create a media engine that would be responsible to play media. We would perform any commands sent from the content process on the media engine, and also notify the content process when the media engine updates its status, notifying some useful events, or encountering any error.

Differential Revision: https://phabricator.services.mozilla.com/D144634
2022-06-28 04:26:42 +00:00
Iulian Moraru
dc5335c732 Backed out 17 changesets (bug 1758789) for causing bp-hybrid bustages on PMFMediaEngineParent. CLOSED TREE
Backed out changeset 0767645af2c8 (bug 1758789)
Backed out changeset 1efbab0fae19 (bug 1758789)
Backed out changeset cc19fd0325a9 (bug 1758789)
Backed out changeset d2e2cede8f91 (bug 1758789)
Backed out changeset 61af881a48c2 (bug 1758789)
Backed out changeset 7ae05a50ed83 (bug 1758789)
Backed out changeset ec672c20e438 (bug 1758789)
Backed out changeset 2da14f2ea6ff (bug 1758789)
Backed out changeset 47078abf3397 (bug 1758789)
Backed out changeset be7148be28c5 (bug 1758789)
Backed out changeset fb5d66b35c57 (bug 1758789)
Backed out changeset e34a13dcc0d6 (bug 1758789)
Backed out changeset 35a3455df1c2 (bug 1758789)
Backed out changeset b1276a27e911 (bug 1758789)
Backed out changeset c5eeb65ed18e (bug 1758789)
Backed out changeset dba7c1ff026e (bug 1758789)
Backed out changeset 443fe9ee49aa (bug 1758789)
2022-06-28 04:41:22 +03:00
alwu
8b3ab67ed0 Bug 1758789 - part3 : create the media engine. r=jolin
Create a media engine that would be responsible to play media. We would perform any commands sent from the content process on the media engine, and also notify the content process when the media engine updates its status, notifying some useful events, or encountering any error.

Differential Revision: https://phabricator.services.mozilla.com/D144634
2022-06-28 01:01:41 +00:00
alwu
ba773486a6 Bug 1756260 - part5 : pass the engine Id via IPC. r=jolin
We need to padd the media engine Id to the remote process in order to create correct remote decoders.

Differential Revision: https://phabricator.services.mozilla.com/D143807
2022-05-11 17:46:13 +00:00
alwu
8f62b3b6f3 Bug 1756260 - part3 : implement a mechanism to communicate with the MediaEngine in the remote process. r=jolin
This patch implements a new IPDL which is used for communicating with the remote media engine. It will be used between the content process and the RDD process.

For each media engine pair, they would share an unique ID, which is used to indentify different engine pairs (if any) and for querying a specific engine via Id, which is implemented in the next patch.

Depends on D140014

Differential Revision: https://phabricator.services.mozilla.com/D139204
2022-05-11 17:46:13 +00:00
Cristian Tuns
df3db4d641 Backed out 10 changesets (bug 1756260) for causing build bustages on ExternalEngineStateMachine.obj CLOSED TREE
Backed out changeset d2339ec8194e (bug 1756260)
Backed out changeset 391201cf338b (bug 1756260)
Backed out changeset 1a9aa3f175d0 (bug 1756260)
Backed out changeset d624c80ba67f (bug 1756260)
Backed out changeset 46e8a8457044 (bug 1756260)
Backed out changeset 93245b0e2118 (bug 1756260)
Backed out changeset b69ee552b64e (bug 1756260)
Backed out changeset 9fc71b8478d5 (bug 1756260)
Backed out changeset 34b10d427f0f (bug 1756260)
Backed out changeset ed9640359f3a (bug 1756260)
2022-05-10 23:32:51 -04:00
alwu
f1a2bf741a Bug 1756260 - part5 : pass the engine Id via IPC. r=jolin
We need to padd the media engine Id to the remote process in order to create correct remote decoders.

Differential Revision: https://phabricator.services.mozilla.com/D143807
2022-05-11 02:57:19 +00:00
alwu
76281d27f2 Bug 1756260 - part3 : implement a mechanism to communicate with the MediaEngine in the remote process. r=jolin
This patch implements a new IPDL which is used for communicating with the remote media engine. It will be used between the content process and the RDD process.

For each media engine pair, they would share an unique ID, which is used to indentify different engine pairs (if any) and for querying a specific engine via Id, which is implemented in the next patch.

Depends on D140014

Differential Revision: https://phabricator.services.mozilla.com/D139204
2022-05-11 02:57:18 +00:00
Nika Layzell
052cba0853 Bug 1738106 - Part 3: Switch to TaskQueue::Create, r=xpcom-reviewers,necko-reviewers,media-playback-reviewers,dragana,alwu,barret
In future parts, TaskQueue will require extra initialization to be performed
which cannot happen in a constructor, as it takes references to the TaskQueue
object itself, which will require the introduction of a helper method. This
patch switches all callers of the TaskQueue constructor to use the new method.

Differential Revision: https://phabricator.services.mozilla.com/D142604
2022-05-02 20:37:34 +00:00
Alexandre Lissy
57f891080f Bug 1755316 - Perform audio decoding on PUtilityAudioDecoder r=alwu,nika,jld,bobowen,haik
Differential Revision: https://phabricator.services.mozilla.com/D139593
2022-04-07 10:04:51 +00:00
stransky
9358067df4 Bug 1756775 Don't disable HW decoding directly on RDD level as we handle RDD crashes by MediaFormatReader r=alwu
Revert changes from Bug 1752493 as we handle RDD crashes on MediaFormatReader level.

Differential Revision: https://phabricator.services.mozilla.com/D139470
2022-02-24 08:54:04 +00:00
stransky
861cc27dcb Bug 1752493 Disable HW decoding in RDD process if we're asked so r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D138000
2022-02-09 07:29:31 +00:00
sotaro
d184dc0218 Bug 1742739 - Remove HasIntermediateBuffer r=gfx-reviewers,jnicol
HasIntermediateBuffer is always false. It could be removed.

Differential Revision: https://phabricator.services.mozilla.com/D131996
2021-11-28 11:40:16 +00:00
Alexandre Lissy
6f829420e7 Bug 1718210 - Release the compositor thread earlier r=mattwoodrow
While running SandboxTest on Windows/Debug setup we can encounter a GPU
process hanging at shutdown. This is due to a destruction race between
GPUParent and VideoBridgeParent, and we end up with one
CompositorThreadHolder reference that is not properly released, making
the GPU process waiting for it.

This change aims at doing the release earlier to prevent such a
destruction race.

Differential Revision: https://phabricator.services.mozilla.com/D121045
2021-07-29 15:07:24 +00:00
Bryce Seager van Dyk
0f87524737 Bug 1693811 - Remove dead blocklisting code. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D105784
2021-02-22 15:37:34 +00:00
Simon Giesecke
ae75be244a Bug 1677466 - Split Endpoint.h and ProtocolMessageUtils.h from ProtocolUtils.h. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D93568

Depends on D93567
2020-11-23 16:06:42 +00:00
Jean-Yves Avenard
6d2df84e41 Bug 1672072 - P8. Create decoder asynchronously. r=mattwoodrow,bryce,padenot,mjf,ipc-reviewers,mccr8
PDMFactory::CreateDecoder is changed to return a MozPromise that will contain the MediaDataDecoder once created.

This will allow to later make RemoteDecoderManager fully asynchronous and no longer require an IPC sync call to start the RDD process.

We also modify the WebrtcMediaDataDecoderCodec to never create a decoder on the main thread, which could cause deadlocks under some circumstances.

Differential Revision: https://phabricator.services.mozilla.com/D96364
2020-11-13 07:46:44 +00:00
Bogdan Tara
266d9ad46c Backed out 13 changesets (bug 1672072) for short.mp4.firstframe.html failures CLOSED TREE
Backed out changeset f093b7969e8b (bug 1672072)
Backed out changeset 28db8276ec2b (bug 1672072)
Backed out changeset ff8fe1b856b3 (bug 1672072)
Backed out changeset 091b9449c786 (bug 1672072)
Backed out changeset 89d9a12c0737 (bug 1672072)
Backed out changeset 9cb71fd4b43b (bug 1672072)
Backed out changeset 09adad7416e1 (bug 1672072)
Backed out changeset 9905650335ef (bug 1672072)
Backed out changeset 6f1d99e9c3a1 (bug 1672072)
Backed out changeset b59655b7a595 (bug 1672072)
Backed out changeset 1ef9d6d10508 (bug 1672072)
Backed out changeset fbf0b5117655 (bug 1672072)
Backed out changeset 65cd3b9de5c6 (bug 1672072)
2020-11-13 06:13:22 +02:00
Jean-Yves Avenard
7a6315ba80 Bug 1672072 - P8. Create decoder asynchronously. r=mattwoodrow,bryce,padenot,mjf,ipc-reviewers,mccr8
PDMFactory::CreateDecoder is changed to return a MozPromise that will contain the MediaDataDecoder once created.

This will allow to later make RemoteDecoderManager fully asynchronous and no longer require an IPC sync call to start the RDD process.

We also modify the WebrtcMediaDataDecoderCodec to never create a decoder on the main thread, which could cause deadlocks under some circumstances.

Differential Revision: https://phabricator.services.mozilla.com/D96364
2020-11-12 22:53:31 +00:00
Jean-Yves Avenard
c938c7416c Bug 1674043 - P6. Remove sync PDecoderMananger::Supports API. r=mattwoodrow,bryce,mjf,ipc-reviewers,nika
In bug 1595994 we attempted to streamline the ability to determine which decoder was available regardless of the process they would be running in. This was subsequently done via the PDMFactory.

As there are several JS API that can query which codec are supported, it requires a synchronous mechanism.
This allowed to make a determination during the PlatformDecoderModule::Supports call, depending on which process it was going to be called frome.

Having a synchronous IPC call to the RemoteDecoderManagerParent has too many caveats to be workable.
So what we do instead is first determine at launch if the required external framework are available and pass this information to each content process.

When checking if a decoder is available, we make a best guess at determining if the PDM would support such codec, without actually loading such framework when running in the content process.

Supports can no longer make a decision based on the process currently running and as such PDM::CreateAudio/VideoDecoder using an optional system framework now need to further check the validity of the CreateDecoderParam argument.

Differential Revision: https://phabricator.services.mozilla.com/D95245
2020-11-04 02:22:33 +00:00
Bryce Seager van Dyk
3b9b491f8b Bug 1669570 - Rename MediaController thread to MediaSupervisor. r=jya
This renames the thread and identifiers derived from the thread's name. This is
to avoid ambiguity over if the thread relates to the MediaController class,
which it does not.

Differential Revision: https://phabricator.services.mozilla.com/D93806
2020-10-26 15:13:37 +00:00
Dan Glastonbury
a70a2c09f1 Bug 1595994 - P7: Add Supports messages to PRemoteDecoderManager. r=kamidphish,nika,ipc-reviewers
Add a synchronous Supports message to the IPDL PRemoteDecoderManager protocol so
decoder modules can query for playback support in the actual process that will
attempt to do the decoding.

Depends on D54878

Differential Revision: https://phabricator.services.mozilla.com/D54879
2020-10-20 23:26:27 +00:00
Dan Glastonbury
7ef0bd86bd Bug 1595994 - P4: Use PDMFactory to create decoders in RDD & GPU process. r=kamidphish
Depends on D54876

Differential Revision: https://phabricator.services.mozilla.com/D54875
2020-10-20 23:24:40 +00:00
Jean-Yves Avenard
298b6203a1 Bug 1653060 - P4. Wait until all MediaRemoteDecoderManagerParent have closed before killing process. r=mattwoodrow.
We unfortunately can't use the AsyncShutdownService in either the GPU or RDD process.

So we add a little utility class AsyncBlockers that will resolve its promise once all services have deregistered from it.

We use it to temporily suspend the RDDParent or GPUParent from killing the process, up to 10s.

This allows for cleaner shutdown as the parent process doesn't guarantee the order in which processes are killed (even though it should).

Differential Revision: https://phabricator.services.mozilla.com/D90487
2020-09-18 11:07:13 +00:00
Brindusan Cristian
73323efa4b Backed out 4 changesets (bug 1653060) for causing mochitest assertion failures. CLOSED TREE
Backed out changeset d143ac59991f (bug 1653060)
Backed out changeset 6943102ffe2a (bug 1653060)
Backed out changeset a38425c96709 (bug 1653060)
Backed out changeset 68c5b2c56f3f (bug 1653060)
2020-09-18 14:03:48 +03:00
Jean-Yves Avenard
747bda5c42 Bug 1653060 - P4. Wait until all MediaRemoteDecoderManagerParent have closed before killing process. r=mattwoodrow.
We unfortunately can't use the AsyncShutdownService in either the GPU or RDD process.

So we add a little utility class AsyncBlockers that will resolve its promise once all services have deregistered from it.

We use it to temporily suspend the RDDParent or GPUParent from killing the process, up to 10s.

This allows for cleaner shutdown as the parent process doesn't guarantee the order in which processes are killed (even though it should).

Differential Revision: https://phabricator.services.mozilla.com/D90487
2020-09-18 02:51:50 +00:00
Jean-Yves Avenard
af2d91d1c6 Bug 1663227 - P3. Have RemoteImageHandler handles image's lifecycle even in the parent. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D90207
2020-09-17 06:30:08 +00:00
Jean-Yves Avenard
c56eb8ef3c Bug 1653638 - P1. Rename thread type and remove unused one. r=mattwoodrow
Historically, the MediaThreadType::PLAYBACK was used just for that; the MediaDecoderReader and exclusively for playback content.

This is no longer the case ; it's used in multiple places, and not just with playback: webrtc, webaudio, benchmark etc.

The primary use of the "PLAYBACK" thread was to distinguish from the "PLATFORM_DECODER" one as they dispatch synchronous tasks from one to the other, and we must ensure they don't share the same threadpool.

CONTROLLER is more fitting here, as this is how it's typically used: a controller thread manage the decoder threads.

Additionally, we remove the MTG_CONTROL one as it's not used.

Differential Revision: https://phabricator.services.mozilla.com/D85543
2020-08-03 08:01:07 +00:00
Jean-Yves Avenard
8d3ffdc6c3 Bug 1649974 - P2. Use a TaskQueue with media threadpool for RemoteDecoderManagerParent. r=mattwoodrow
Sync dispatch are being used; due to how the background taskqueue is setup this could cause a hang if if also called from a background taskqueue.

Differential Revision: https://phabricator.services.mozilla.com/D82500
2020-07-09 10:13:48 +00:00
Razvan Maries
05fa077757 Backed out 5 changesets (bug 1650996, bug 1649974) for perma failures on Android 7.0. CLOSED TREE
Backed out changeset 8f8174ba409d (bug 1650996)
Backed out changeset 374598f9c37a (bug 1650996)
Backed out changeset 236757acc073 (bug 1650996)
Backed out changeset 89d5cabfa2df (bug 1649974)
Backed out changeset 6e475ddbd18c (bug 1649974)
2020-07-09 10:33:45 +03:00
Jean-Yves Avenard
0f9c0d79c6 Bug 1649974 - P2. Use a TaskQueue with media threadpool for RemoteDecoderManagerParent. r=mattwoodrow
Sync dispatch are being used; due to how the background taskqueue is setup this could cause a hang if if also called from a background taskqueue.

Differential Revision: https://phabricator.services.mozilla.com/D82500
2020-07-09 02:46:55 +00:00
Mihai Alexandru Michis
b29ef28dc4 Backed out 2 changesets (bug 1649974) as requested by jyavenard.
CLOSED TREE

Backed out changeset 4d7301e8eeb3 (bug 1649974)
Backed out changeset 69bacb6e8287 (bug 1649974)
2020-07-09 05:43:59 +03:00
Jean-Yves Avenard
16f75a9f90 Bug 1649974 - P2. Use a TaskQueue with media threadpool for RemoteDecoderManagerParent. r=mattwoodrow
Sync dispatch are being used; due to how the background taskqueue is setup this could cause a hang if if also called from a background taskqueue.

Differential Revision: https://phabricator.services.mozilla.com/D82500
2020-07-08 13:15:42 +00:00