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

451 Коммитов

Автор SHA1 Сообщение Дата
Jean-Yves Avenard 6f1544075f Bug 1681043 - P5. Recalculate decoder capabilities if CanUseHardwareVideoDecoding changes. r=alwu,bryce
Not the most elegant, but reworking the PDMFactory to be fully re-initialized would be a significant change, as only the WMFDecoderModule requires it we take some shortcuts.

Differential Revision: https://phabricator.services.mozilla.com/D100308
2021-01-06 08:33:28 +00:00
Jean-Yves Avenard dfb40277e0 Bug 1681043 - P3. Retrieve decoding capabilities in GPU or RDD process and pass it to content. r=alwu,bryce
Upon starting the RDD and GPU process; we check their decoding capabilities and send it to the parent process. It will then broadcast this information to all content children so that RemodeDecoderModule::Supports can return if a codec is supported or not.

Differential Revision: https://phabricator.services.mozilla.com/D100306
2021-01-06 09:05:31 +00:00
Jean-Yves Avenard db79f94d4f Bug 1681043 - P1. Create method to launch RDD process early. r=alwu
We can launch the RDD process early now that it is a fully asynchronous process and doesn't block anything.

This will allow to retrieve the decoding capabilities of the RDD process right away.

Calling this method will actually be handled in bug 1684991 once blockers are sorted (tests and sandbox)

Differential Revision: https://phabricator.services.mozilla.com/D100304
2021-01-06 08:53:38 +00:00
Mihai Alexandru Michis f8a41209af Backed out 6 changesets (bug 1681043) for causing multiple failures.
CLOSED TREE

Backed out changeset ea075101dc94 (bug 1681043)
Backed out changeset 64d8abe2104d (bug 1681043)
Backed out changeset 5ecb208a85d3 (bug 1681043)
Backed out changeset 9319fdd0389c (bug 1681043)
Backed out changeset 25a015e84cc4 (bug 1681043)
Backed out changeset e8fac91d4012 (bug 1681043)
2021-01-04 07:43:08 +02:00
Jean-Yves Avenard 19f9c7de4d Bug 1681043 - P5. Recalculate decoder capabilities if CanUseHardwareVideoDecoding changes. r=alwu,bryce
Not the most elegant, but reworking the PDMFactory to be fully re-initialized would be a significant change, as only the WMFDecoderModule requires it we take some shortcuts.

Differential Revision: https://phabricator.services.mozilla.com/D100308
2021-01-03 23:24:07 +00:00
Jean-Yves Avenard ff614fdaa3 Bug 1681043 - P3. Retrieve decoding capabilities in GPU or RDD process and pass it to content. r=alwu,bryce
Upon starting the RDD and GPU process; we check their decoding capabilities and send it to the parent process. It will then broadcast this information to all content children so that RemodeDecoderModule::Supports can return if a codec is supported or not.

Differential Revision: https://phabricator.services.mozilla.com/D100306
2021-01-03 23:21:54 +00:00
Jean-Yves Avenard a68d444ad0 Bug 1681043 - P1. Launch RDD process early. r=alwu
We can launch the RDD process early now that it is a fully asynchronous process and doesn't block anything.

This will allow to retrieve the decoding capabilities of the RDD process right away.

Ideally, we should have been able to start the RDD process at the same time as the GPU process; however setting up the RDD sandbox is dependent of having mozilla::SandboxBroker::GeckoDependentInitialize() called first ; and it is called in the most awkward of places; so finding a place suitable for all platforms gets affected.
For now we will ensure it's been started around the time the first content process is started.

Differential Revision: https://phabricator.services.mozilla.com/D100304
2021-01-03 23:20:38 +00:00
Bryce Seager van Dyk 0f3a7c7723 Bug 1680310 - Gracefully handle functions running after we Shutdown in RemoteDecoderManagerChild. r=jya
RemoteDecoderManagerChild has a number of functions that may be called
asynchronously. Many such functions assert that they can get the manager thread
and that they are on that thread. However, if we've already shutdown, the thread
they fetch will be null. Since we can enter shutdown while async executions of
these functions are pending, we may fail our asserts.

To avoid this, we instead check if the manager thread is null in these
functions, if so, we assume we're in shutdown and bail. If the thread is not
null, we continue as before and assert we are running on the thread as expected.

Differential Revision: https://phabricator.services.mozilla.com/D99824
2020-12-21 15:03:01 +00:00
Jean-Yves Avenard 945923fe99 Bug 1637658 - P1. Only use ImageRect if explicitly set. r=mattwoodrow,pehrsons
The concept of ImageRect only exists with the WebM container. It defines a rectangle that will be used to crop the decoded image.

Initially (and as still indicated in the comment for VideoInfo.mImageRect) that field was only ever initialised by the WebMDemuxer.
So we now make this an optional value that needs to be explicitly initialised to be active, and only do so in the WebMDemuxer.

Differential Revision: https://phabricator.services.mozilla.com/D99601
2020-12-14 08:16:23 +00:00
Simon Giesecke 4cab6ac723 Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8
This moves parts of IPCMessageUtils.h to two new header files and adapts
the include directives as necessary. The new header files are:
- EnumSerializer.h, which defines the templates for enum serializers
- IPCMessageUtilsSpecializations.h, which defines template specializations
  of ParamTraits with extra dependencies (building upon both IPCMessageUtils.h
  and EnumSerializer.h)

This should minimize the dependencies pulled in by every consumer of
IPCMessageUtils.h

Differential Revision: https://phabricator.services.mozilla.com/D94459
2020-12-10 11:09:21 +00:00
Jean-Yves Avenard 771993d760 Bug 1672087 - P2. Recreate remote decoder when parent dies. r=mattwoodrow,bryce
The RDD process startup being asynchronous make the operation trivial. Unlike with the GPU process, we can immediately tell the MediaFormatDecoder that a new decoder is needed when the RDD died.

Recovery will immediately occur with little visible interruption.

Differential Revision: https://phabricator.services.mozilla.com/D98571
2020-12-08 06:42:51 +00:00
Jean-Yves Avenard 9cf6c54ce4 Bug 1672087 - P1. Remove unused value. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D98570
2020-12-04 00:59:04 +00:00
Sylvestre Ledru bbb5f8a339 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D98301
2020-12-07 10:17:57 +00:00
Jean-Yves Avenard 77767c56aa Bug 1676999 - P2. Disable windows hardware acceleration if the RDD crashed. r=mattwoodrow,mjf
Depends on D97753

Differential Revision: https://phabricator.services.mozilla.com/D97754
2020-11-24 06:38:29 +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
Simon Giesecke 93dd261db8 Bug 1660470 - Include C++ header files only from cpp file. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93233

Depends on D87865
2020-11-23 16:03:32 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Jean-Yves Avenard 0e897d1e55 Bug 1518344 - P4. Don't attempt to use the RDD process if we failed to start it earlier. r=mjf,bryce,padenot
Now that launching the RDD process is fully asynchronous and no longer block the parent main thread, we can enable it on all platforms.

If we did fail to start it, we will not attempt again unless on Nightly.

Re-enable the RDD on Windows for ARM seeing that even if it did fail, it won't inconvenience the user anymore (other than the first video/audio element will take longer than usual to start)

Differential Revision: https://phabricator.services.mozilla.com/D96669
2020-11-16 17:42:55 +00:00
Jean-Yves Avenard 5318ef7bab Bug 1518344 - P3. Launch the RDD process fully asynchronously. r=jld,mjf,bryce
And clarify which thread a method is called from, ensure all members are only ever accessed on the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D96668
2020-11-19 01:21:05 +00:00
Matt Woodrow 560f6df526 Bug 1664831. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D94549
2020-11-16 22:41:08 +00:00
Cristina Coroiu 625f0008fd Merge autoland to mozilla-central a=merge 2020-11-13 18:20:41 +02:00
Dorel Luca 44e6dfd7e0 Merge autoland to mozilla-central. a=merge 2020-11-13 11:58:20 +02:00
Jean-Yves Avenard 96a9f35dcd Bug 1672072 - P10. Promisify launch of RDD process and remove sync dispatch. r=mattwoodrow,bryce,mjf,padenot
Differential Revision: https://phabricator.services.mozilla.com/D96366
2020-11-13 04:21:16 +00:00
Jean-Yves Avenard 44ad5e249a Bug 1672072 - P9. Make EnsureRDDProcessAndCreateBridge an async API. r=mattwoodrow,bryce,mjf,padenot,ipc-reviewers,mccr8
We can now chaincreation of the decoder to the launch of the RDD process as needed and setting up the PRemoteDecoderManager

Differential Revision: https://phabricator.services.mozilla.com/D96365
2020-11-13 04:21:16 +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
Jean-Yves Avenard d05265e239 Bug 1672072 - P6. Don't attempt to create a video decoder if we don't have a KnowsCompositor set. r=mattwoodrow,bryce,mjf,padenot
Differential Revision: https://phabricator.services.mozilla.com/D96362
2020-11-13 04:21:15 +00:00
Jean-Yves Avenard 98c87940d6 Bug 1672072 - P3. Remove IRemoteDecoderChild.h class. r=mattwoodrow,padenot,mjf,bryce
There's no longer have a GpuDecoderModule and RemoteGpuDecoder.

So we no longer need the IRemoteDecoderChild abstraction layer.

Differential Revision: https://phabricator.services.mozilla.com/D96359
2020-11-13 04:21:14 +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 4cbbb3b157 Bug 1672072 - P10. Promisify launch of RDD process and remove sync dispatch. r=mattwoodrow,bryce,mjf,padenot
Differential Revision: https://phabricator.services.mozilla.com/D96366
2020-11-12 22:53:59 +00:00
Jean-Yves Avenard 8ffdd4eaef Bug 1672072 - P9. Make EnsureRDDProcessAndCreateBridge an async API. r=mattwoodrow,bryce,mjf,padenot,ipc-reviewers,mccr8
We can now chaincreation of the decoder to the launch of the RDD process as needed and setting up the PRemoteDecoderManager

Differential Revision: https://phabricator.services.mozilla.com/D96365
2020-11-12 22:53:49 +00: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 9cc5491a92 Bug 1672072 - P6. Don't attempt to create a video decoder if we don't have a KnowsCompositor set. r=mattwoodrow,bryce,mjf,padenot
Differential Revision: https://phabricator.services.mozilla.com/D96362
2020-11-12 22:52:23 +00:00
Jean-Yves Avenard 520136022c Bug 1672072 - P3. Remove IRemoteDecoderChild.h class. r=mattwoodrow,padenot,mjf,bryce
There's no longer have a GpuDecoderModule and RemoteGpuDecoder.

So we no longer need the IRemoteDecoderChild abstraction layer.

Differential Revision: https://phabricator.services.mozilla.com/D96359
2020-11-12 22:51:47 +00:00
Jean-Yves Avenard 2b16f18761 Bug 1675061 - Only reject promise if it hasn't already. r=alwu
With a GPU remote decoder, the rejection code will only run once the GPU process has been been restarted. It is possible that once this happens, that Shutdown has been called before which would have rejected any pending promise.

Differential Revision: https://phabricator.services.mozilla.com/D96757
2020-11-12 04:55:10 +00:00
Jean-Yves Avenard bd9b1e07c0 Bug 1673192 - Don't attempt to launch the RDD process when it's not needed. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D96147
2020-11-06 00:45:34 +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
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +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
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Jean-Yves Avenard 6307ec0451 Bug 1595994 - P26. Simplify and rename RecvLaunchRDDProcess. r=mattwoodrow,nika,ipc-reviewers
And we remove unnecessary checks, BackgroundParent only run in the parent process and if e10s is on. Also RecvLauchRDDProcess will only ever be called if the rdd pref is on already.

By streamlining the call we also reduce the number of sync dispatch to 1.

Depends on D93317

Differential Revision: https://phabricator.services.mozilla.com/D93476
2020-10-20 23:32:57 +00:00
Jean-Yves Avenard d06384295b Bug 1595994 - P25. Have launch rdd be signalled over the PBackground channel. r=mattwoodrow,nika,ipc-reviewers
This remove the need for a sync dispatch to the main thread, that lead to deadlocks.

Depends on D93316

Differential Revision: https://phabricator.services.mozilla.com/D93317
2020-10-20 23:32:54 +00:00
Jean-Yves Avenard 1be0cb8c2c Bug 1595994 - P24. Always initialize Remote Decoder Manager thread early. r=mattwoodrow
Some cleanup on how we create the RemoteDecoderChild object, simplifying and clarifying.

Depends on D92362

Differential Revision: https://phabricator.services.mozilla.com/D93316
2020-10-20 23:31:11 +00:00
Jean-Yves Avenard 30f42deea0 Bug 1595994 - P22. Show in which process decoding occurs in media devtools. r=mattwoodrow
Depends on D92745

Differential Revision: https://phabricator.services.mozilla.com/D92863
2020-10-20 23:30:50 +00:00
Jean-Yves Avenard 37ed37a0fe Bug 1595994 - P1F. Additional checks to ensure we always abort decode if shutdown. r=mattwoodrow
Depends on D92342

Differential Revision: https://phabricator.services.mozilla.com/D92345
2020-10-20 23:30:26 +00:00
Jean-Yves Avenard 5de404e405 Bug 1595994 - P1D. Properly serialize display size when sending image over IPC. r=mattwoodrow
The code always assumed that the size of the image with the Y plane dimensions, which, while often the case, isn't correct.
We remove the assertions that the display offset was always (0,0) and properly carry the actual data over IPC.

Remoting the theora decoder and enabling fast video copy exposed several other related issues in the various D3D11 image types.
Various WPT uses theora YUV44 images (because we do not support YUV444 H264 ones). Those images are made of 32 pixels planes with a display size set to 20 pixels. Prior P1D the backend image was a ShareYCbCrPlanar image which correctly handled the size settings.

Like the image serializer, the various D3D11 images always assumed that the Y plane size was the image size.

This however expose existing issues where the offset position of the display is completely ignored for some image type. See bug 1669054

All those problems explain why sometimes we displayed more pixels than we should have.

Depends on D91914

Differential Revision: https://phabricator.services.mozilla.com/D92233
2020-10-20 23:30:04 +00:00
Jean-Yves Avenard 25887bb634 Bug 1595994 - P1B. Make WMF DXVA decoding work in the RDD process. r=mattwoodrow
Depends on D91698

Differential Revision: https://phabricator.services.mozilla.com/D91700
2020-10-20 23:29:23 +00:00
Jean-Yves Avenard 38bf12582e Bug 1595994 - P1A. Don't assume the RDD process launch always succeeded. r=mattwoodrow
Depends on D91696

Differential Revision: https://phabricator.services.mozilla.com/D91698
2020-10-20 23:29:09 +00:00