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

17568 Коммитов

Автор SHA1 Сообщение Дата
Chun-Min Chang 10ce81180f Bug 1634190 - P5: Update supported media keys once keys is being monitored r=alwu
Set supported-media-keys once the key-event-source is open.

Differential Revision: https://phabricator.services.mozilla.com/D85947
2020-08-15 03:28:45 +00:00
Mihai Alexandru Michis fb644eda26 Backed out changeset 5838f8b581ed (bug 1647536) for causing failures in browser_active_mediasession_among_tabs.js
CLOSED TREE
2020-08-14 19:42:51 +03:00
Chris Fronk 8770c8a332 Bug 1647536 - Support ref counted pointers in nsDeque r=froydnj
Adds a new specialization of nsDeque, nsRefPtrDeque for use with
reference counted pointers.

Differential Revision: https://phabricator.services.mozilla.com/D84766
2020-08-14 15:19:48 +00:00
alwu 5a98feea06 Bug 1658075 - part2 : use testing functions from 'MediaControlService'. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D86621
2020-08-14 01:31:49 +00:00
alwu 923ecc4e6a Bug 1658075 - part1 : move testing functions to new namespace 'MediaControlService'. r=smaug,chunmin
Create a new namespace `MediaControlService` to use those helper functions which is used to get the main controller related status.

Then, move those functions from `ChromeUtils` to `MediaControlService`, which give us two benefit. The first is that we can remove redudant test-only enum `MediaSessionPlaybackTestState`, the second is a pref-required work for bug1656398, to fix the build order error when exposing `MediaSessionPlaybackState` in the media controller's webidl.

Differential Revision: https://phabricator.services.mozilla.com/D86620
2020-08-14 01:32:10 +00:00
alwu 324562e846 Bug 1657682 - part3 : add a test case for page with empty title. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D86248
2020-08-14 01:32:11 +00:00
alwu fa8a664764 Bug 1657682 - part2 : use a fixed sentence for default title. r=chunmin
Considering the possibility to have l10n, the default title should be fixed.

Differential Revision: https://phabricator.services.mozilla.com/D86247
2020-08-13 18:44:22 +00:00
alwu a86c49b257 Bug 1657682 - part1 : default title should not be empty. r=chunmin
When document's title is empty, we would use the default title as well in order to prevent showing nothing on the virtual control interface.

Differential Revision: https://phabricator.services.mozilla.com/D86246
2020-08-14 01:44:28 +00:00
alwu 4b67a9b41d Bug 1656642 - part1 : add test to ensure no src media and media with error won't activate media controller even if they enters PIP or fullscreen. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D85784
2020-08-07 05:17:35 +00:00
alwu 9fd2c32518 Bug 1654657 - part8 : add test cases to ensure non-eligible media can be controlled when it enters fullscreen or PIP mode. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D85640
2020-08-06 21:37:07 +00:00
alwu 31d53cc484 Bug 1654657 - part7 : add test cases for choosing main controller. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D85639
2020-08-07 05:07:07 +00:00
alwu ddc630d8b2 Bug 1654657 - part6 : refine the logic of requesting main controller. r=chunmin
Implement `ForceToBecomeMainControllerIfNeeded()` to refine the process of activating controller and requesting to become a main controller.

Differential Revision: https://phabricator.services.mozilla.com/D85518
2020-08-06 21:37:02 +00:00
alwu b57d06ab50 Bug 1654657 - part5 : request to become a main controller when controller enters fullscreen. r=chunmin
Rename `NotifyControllerBeingUsedInPictureInPictureMode()` to `RequestUpdateMainController()` and call that method when a controller enters fullscreen.

Differential Revision: https://phabricator.services.mozilla.com/D85517
2020-08-06 21:37:00 +00:00
alwu a731020d84 Bug 1654657 - part4 : test 'NotifyMediaFullScreenState()' in gTest. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D85516
2020-08-06 21:36:53 +00:00
alwu 1355eeaea6 Bug 1654657 - part3 : remove unused function 'IsInPictureInPictureMode()'. r=chunmin
After applying D85514, no one is using this function, so we can remove it.

Differential Revision: https://phabricator.services.mozilla.com/D85515
2020-08-06 21:36:50 +00:00
alwu 1fac39ad53 Bug 1654657 - part2 : treat media controller being used in fullscreen as same as the one being used in PIP mode. r=chunmin
Treat media controller being used in fullscreen as same as the one being used in PIP mode, so it won't be replaced by other normal controller if it's already a main controller.

Comparing with a normal controller, a controller being used in PIP/fullscreen should have a higher priority to become a main controller.

In addition, renaming `IsMediaBeingUsedInPIPModeOrFullScreen()` to `IsBeingUsedInPIPModeOrFullscreen()`.

Differential Revision: https://phabricator.services.mozilla.com/D85514
2020-08-13 22:13:53 +00:00
Jean-Yves Avenard d955b4dd6f Bug 1657521 - P6. Attempt to create a decoder via the PDMFactory as fallback. r=jolin
The MediaChangeMonitor would always use the selected PDM in order to create a decoder; this only worked if the Decode method returned an error if the format was unsupported and this is how the WMF decoder worked.

However, the AppleVTDecoder fails on creation instead.
Now that the VP9 profile is known at creation time, we should move the WMF decoder to do the same.

Differential Revision: https://phabricator.services.mozilla.com/D86545
2020-08-13 02:15:58 +00:00
Jean-Yves Avenard f3562546bb Bug 1657521 - P5. Add VP9 HW decoder support on macOS 11 (Big Sur). r=jolin
To create a VP9 decoder, the VideoToolbox requires a vppC atom similar to how the H264 one requires an avcC one.

That information is typically not available in the webm container and is found in the VP9 bytestream with each keyframe.

In order to minimise the extent of the changes, we move the task of retrieving the vpcC content in the MediaChangeMonitor as it already performs a similar task in order to detect if the format has changed.

The VPXChangeMonitor will now only instantiate a VP9 decoder once a keyframe is seen.

Differential Revision: https://phabricator.services.mozilla.com/D86544
2020-08-13 02:16:19 +00:00
Jean-Yves Avenard 86a3cf7457 Bug 1657521 - P3. Have the RemoteDecoderManagerChild use its own dedicated thread. r=mattwoodrow
This is a partial revert of "Bug 1650996 - P3. Have RemoteDecoderManagerChild use a TaskQueue over a media threadpool."

The RemoteDecoderManagerChild dispatch tasks synchronously, right now it is doing so on the media controller's thread pool ; however in the following patch it will change the creation to the decoder's thread pool.

If we attempt to instantiate too many decoders at once, we run out of available threads and dead-lock in the sync dispatch.

This issue has bitten us in various places already and the solution was always assuming that the decoder will always be created on the controller's thread and used on the decoder's thread.
This assumption won't hold any longer and was difficult to keep anyway.

So we have the RemoteDecoderManagerChild uses a dedicated thread so that we can guarantee there will always be an available thread to create the decoder.

Depends on D86543

Differential Revision: https://phabricator.services.mozilla.com/D86895
2020-08-13 03:19:36 +00:00
Jean-Yves Avenard 6d550ab425 Bug 1657521 - P2. Attempt to use Apple VT decoder before FFmpeg. r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D86543
2020-08-13 02:16:20 +00:00
Jean-Yves Avenard 7255c5ff5c Bug 1657521 - P1. Add method to generate a vpcC box from the VP9 bitstream. r=jolin
The mac VP9 decoder; like the H264 requires some out of band settings before it can be created.

This information is only found in the mp4 container, we can create it from the vp9 bitstream.

For now we ignore the colors information as we can't handle it properly yet in our compositor and this is not available in the bytestream.

Differential Revision: https://phabricator.services.mozilla.com/D86542
2020-08-13 02:14:11 +00:00
Lee Salzman 8326780f95 Bug 1652894 - add SWGL RenderTextureHosts. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D86340
2020-08-12 21:25:17 +00:00
Dan Minor a6e858b6ff Bug 1657449 - Add "Show tab" button to about:webrtc; r=ng
This adds the current browserId to the internal stats report. The peer
connections are sorted by browserId, and a "Show tab" button is added that will
select the tab associated with the peer connection to make it easier to keep
track of which peerconnection is associated with a tab.

Differential Revision: https://phabricator.services.mozilla.com/D86699
2020-08-12 18:48:21 +00:00
Emilio Cobos Álvarez 0c03ba166c Bug 1658471 - Remove dom.security.featurePolicy.enabled. r=baku
We've shipped it on by default since 74 (bug 1617219).

Differential Revision: https://phabricator.services.mozilla.com/D86665
2020-08-12 10:57:04 +00:00
Bogdan Tara 98b30d23bf Backed out 5 changesets (bug 1657521) for assertion failure at Refs.h CLOSED TREE
Backed out changeset a0f450666c5b (bug 1657521)
Backed out changeset e97937bf5e3a (bug 1657521)
Backed out changeset 8d70f3cb5e3b (bug 1657521)
Backed out changeset 5c3c1ec039d2 (bug 1657521)
Backed out changeset 132eb437fdda (bug 1657521)
2020-08-12 11:14:44 +03:00
Jean-Yves Avenard e3c3ef9f35 Bug 1657521 - P4. Attempt to create a decoder via the PDMFactory as fallback. r=jolin
The MediaChangeMonitor would always use the selected PDM in order to create a decoder; this only worked if the Decode method returned an error if the format was unsupported and this is how the WMF decoder worked.

However, the AppleVTDecoder fails on creation instead.
Now that the VP9 profile is known at creation time, we should move the WMF decoder to do the same.

Differential Revision: https://phabricator.services.mozilla.com/D86545
2020-08-12 05:39:19 +00:00
Jean-Yves Avenard 49824e9d32 Bug 1657521 - P3. Add VP9 HW decoder support on macOS 11 (Big Sur). r=jolin
To create a VP9 decoder, the VideoToolbox requires a vppC atom similar to how the H264 one requires an avcC one.

That information is typically not available in the webm container and is found in the VP9 bytestream with each keyframe.

In order to minimise the extent of the changes, we move the task of retrieving the vpcC content in the MediaChangeMonitor as it already performs a similar task in order to detect if the format has changed.

The VPXChangeMonitor will now only instantiate a VP9 decoder once a keyframe is seen.

Differential Revision: https://phabricator.services.mozilla.com/D86544
2020-08-12 04:08:43 +00:00
Jean-Yves Avenard 5c63496f40 Bug 1657521 - P2. Attempt to use Apple VT decoder before FFmpeg. r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D86543
2020-08-12 04:08:30 +00:00
Jean-Yves Avenard 51652bcded Bug 1657521 - P1. Add method to generate a vpcC box from the VP9 bitstream. r=jolin
The mac VP9 decoder; like the H264 requires some out of band settings before it can be created.

This information is only found in the mp4 container, we can create it from the vp9 bitstream.

For now we ignore the colors information as we can't handle it properly yet in our compositor and this is not available in the bytestream.

Differential Revision: https://phabricator.services.mozilla.com/D86542
2020-08-12 04:08:23 +00:00
Mihai Alexandru Michis f44ab317a5 Backed out 4 changesets (bug 1652894) for causing multiple reftest failures.
CLOSED TREE

Backed out changeset d6786fcf717b (bug 1652894)
Backed out changeset 97df16d3b738 (bug 1652894)
Backed out changeset 8a1f8b9e2524 (bug 1652894)
Backed out changeset 96bca5729430 (bug 1652894)
2020-08-12 02:08:28 +03:00
Lee Salzman 75d072859c Bug 1652894 - add SWGL RenderTextureHosts. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D86340
2020-08-11 15:53:15 +00:00
Csoregi Natalia cc057fb442 Backed out 4 changesets (bug 1652894) for texture related crashes. CLOSED TREE
Backed out changeset 714ad1b01cb2 (bug 1652894)
Backed out changeset e3b4753fd09c (bug 1652894)
Backed out changeset 8abaf47071d8 (bug 1652894)
Backed out changeset 175df7659c3f (bug 1652894)
2020-08-11 15:50:07 +03:00
Dan Minor 3f683f4b28 Bug 1653219 - Remove old crashtest for tab sharing; r=ng
The window opened by the crashtests does not show up in the list
maintained by BrowserWindowTracker, so we never end up with any tabs to
share, causing the test to hang. I don't like to remove a test, but this
was written for the old version of tab sharing which has been completely
removed, and there doesn't seem to be a clear path ahead which would
make this test pass without adding special case code in tab sharing that
would work with crashtests.

Depends on D84593

Differential Revision: https://phabricator.services.mozilla.com/D86564
2020-08-10 22:06:53 +00:00
Dan Minor 271809cdc5 Bug 1653219 - Enumerate browser tabs before entire screen; r=ng
A lot of tests assume that the screen will be the last thing enumerated.
It is also the "scariest" option, so having it last makes sense.

Differential Revision: https://phabricator.services.mozilla.com/D84593
2020-08-10 15:58:23 +00:00
Dan Minor 2db7834f68 Bug 1653219 - Use BrowserTabEnumerator to enumerate tabs; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D84592
2020-08-10 15:57:59 +00:00
Lee Salzman 6b4a081f33 Bug 1652894 - add SWGL RenderTextureHosts. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D86340
2020-08-11 07:38:10 +00:00
Martin Stransky 0532b8492a Bug 1657845 [Linux] Set AV_CODEC_FLAG_LOW_DELAY to low-latency vaapi decoder, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D86326
2020-08-11 05:55:06 +00:00
Csoregi Natalia 555c643104 Backed out 4 changesets (bug 1652894) for bustages on RenderThread.cpp. CLOSED TREE
Backed out changeset 0e0107226c9e (bug 1652894)
Backed out changeset ff5e4bffb497 (bug 1652894)
Backed out changeset 2e4c7cced692 (bug 1652894)
Backed out changeset a8b850455c90 (bug 1652894)
2020-08-11 08:52:47 +03:00
Lee Salzman 385e5cc6c6 Bug 1652894 - add SWGL RenderTextureHosts. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D86340
2020-08-11 05:24:04 +00:00
Noemi Erli ae3ec2e8a0 Backed out 3 changesets (bug 1653219) for causing crashtest failures CLOSED TREE
Backed out changeset 8950f3e98862 (bug 1653219)
Backed out changeset 7376606a9f7f (bug 1653219)
Backed out changeset aa2016ee81c8 (bug 1653219)
2020-08-07 19:55:02 +03:00
Dan Minor 0dfb5d0444 Bug 1653219 - Enumerate browser tabs before entire screen; r=ng
A lot of tests assume that the screen will be the last thing enumerated.
It is also the "scariest" option, so having it last makes sense.

Differential Revision: https://phabricator.services.mozilla.com/D84593
2020-08-06 20:09:25 +00:00
Dan Minor 8bce06db95 Bug 1653219 - Use BrowserTabEnumerator to enumerate tabs; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D84592
2020-08-06 20:08:57 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Simon Giesecke dea5b543db Bug 1653335 - Remove uses of MakeSpan in return statements. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83812
2020-08-07 07:42:50 +00:00
Matt Woodrow a679ee84cf Bug 1657107 - Use YUV22 format for uploading videos to IOSurfaces instead of NV12. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D86081
2020-08-06 21:27:46 +00:00
Csoregi Natalia 8fa5e9e957 Backed out 3 changesets (bug 1648887, bug 1611961) for assertion failures on WindowContext.cpp. CLOSED TREE
Backed out changeset 3719f7db339d (bug 1648887)
Backed out changeset b7c7fcb5df37 (bug 1648887)
Backed out changeset ab82a9c613f8 (bug 1611961)
2020-08-06 17:43:51 +03:00
Martin Stransky 9dba843992 Bug 1656436 [Linux/VAAPI] Release VAAPI surface data before we re-use them, r=jya
VAAPI HW surfaces are released at ReleaseUnusedVAAPIFrames() and we use DMABufSurface::IsUsed() flag
to detect unused surfaces. Then we call GetUnusedDMABufSurfaceWrapper() to get unused surfaces to
re-use them for decoding.

Because DMABufSurface::IsUsed() flag is updated asynchronously it may change
between ReleaseUnusedVAAPIFrames() and GetUnusedDMABufSurfaceWrapper() calls.

In that case GetUnusedDMABufSurfaceWrapper() may return unused but also unreleased surface
as it was marked as used in time of ReleaseUnusedVAAPIFrames() call.

In this patch explicitly release VAAPI data of any surface before we re-use it.
Also fail when we try to upload data to already used DMABufSurfaceYUV surface.

Differential Revision: https://phabricator.services.mozilla.com/D85842
2020-08-06 11:12:45 +00:00
Edgar Chen d2c2f39bd2 Bug 1611961 - Move UserActivationState from BrowsingContext to WindowContext; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83126
2020-08-06 10:25:00 +00:00
Karl Tomlinson 1637fad094 Bug 1634200 add crashtest with AudioWorkletNode after unload r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D85974
2020-08-06 01:12:43 +00:00
alwu 96afc7c19e Bug 1657224 - add a pref to control stopping media after media reaches to the end. r=chunmin
In bug1654045, we would stop controlling media once media reaches to the end. Considering some user might still want to control media by pressing media keys even if it has ended, so adding a pref to control this abilitiy.

Differential Revision: https://phabricator.services.mozilla.com/D85930
2020-08-05 23:12:16 +00:00