This patch would
- introduce new methods `SetEnableFullScreen()` and `SetEnablePictureInPictureMode()` on `MediaControlKeySource`
- notify the change of enabling/disabling the fullscreen and picture-in-picture mode to `MediaControlKeySource`
The advantage of doing this is
- to allow the key source to do corresponding operations when media enters/leaves the fullscreen/picture-in-picture
eg. GeckoView would use them to implement its API, `onFullscreen()` and `onPictureInPicture()`
Differential Revision: https://phabricator.services.mozilla.com/D79785
This patch would
- active the controller when it enters fullscreen or picture-in-picture mode
The advantage of doing this is
- allow to control media even if media doesn't start
Differential Revision: https://phabricator.services.mozilla.com/D79766
This patch would
- notify media controller when media enters/leaves fullscreen
The advantage of doing this is
- prework of being able to control media when media enters fullscreen
Differential Revision: https://phabricator.services.mozilla.com/D79765
This patch would
- stop notifying media key to media in content process is the controller is inactive
The advantage of doing this is
- to prevent unexpectedly controlling an inactive controller
Differential Revision: https://phabricator.services.mozilla.com/D79235
This patch would
- move the mechanism of creating a stop timer from media element to media controller
The advantage of doing this is
- to remove redundant timers in the content process, because we only need to maintain one global timer for a whole tab
Differential Revision: https://phabricator.services.mozilla.com/D79233
If XPCOM has been shutdown, then we should not access the `BrowsingContext::Get()` because `sBrowsingContexts` has also been destroyed.
Differential Revision: https://phabricator.services.mozilla.com/D80559
This patch changes the type of mAudioThreadId because `std:🧵:id` is
non-memovable and AudioThreadRegistry uses an nsTArray, that needs elements to
be memovable.
Differential Revision: https://phabricator.services.mozilla.com/D80466
This keeps track of how many users of an audio thread there is, and takes care
of registring or unregistring those threads to the Gecko Profiler.
Differential Revision: https://phabricator.services.mozilla.com/D80464
All changes in these files are a result of code formatting being applied.
When these files were under webrtc, they were treated as third party code and
not formatting. By moving them, formatting is now applied.
Differential Revision: https://phabricator.services.mozilla.com/D80544
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.
This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget
Differential Revision: https://phabricator.services.mozilla.com/D80354
When the default sink (sink-id equal to an empty string) has been requested, null device-id is returned. The device-id is propagated all the way down to cubeb. When cubeb is configured with null device-id the default device is chosen. In addition to that, on default device change the new default will be followed. This aligns with the expected behavior for the default sink.
Differential Revision: https://phabricator.services.mozilla.com/D77810
A new method has been added in AudioStreamTrack to allow the change of the output device. Also, the methods that add/remove the AudioOutput or Volume have been enhanced to use the CrossGraphManager, when available, in order to set the AudioOutput or volume to the correct MediaTrack.
Differential Revision: https://phabricator.services.mozilla.com/D77808
The name of the two new tracks is CrossGraphTransmitter and CrossGraphReceiver. They are used together to transfer the audio data of the transmitter to the receiver which belongs to different MTG. In addition to that a CrossGraphManager class has been created that creates the connection between the transmitter and the receiver and can redirect to the correct track some operations like the volume change etc.
Differential Revision: https://phabricator.services.mozilla.com/D77807
Prepare ffmpeg decoding module to X11 dmabuf implementation. In order to cover both X11 and Wayland backend do:
- Use DMABUFSurfaceImage instead of WaylandDMABUFSurfaceImage
- Use DMABufSurface instead of WaylandDMABufSurface
- Rename former DMABufSurface to DMABufSurfaceWrapper to state it actually wraps the DMABufSurface.
- Use DMABufSurfaceYUV instead of WaylandDMABufSurfaceNV12
Differential Revision: https://phabricator.services.mozilla.com/D79638
The FetchImageHelp doesn't need to decode the fetched image before
handing the image to its caller since the decoded raw data won't be used
in the caller. The ImagePromise can be resolved upon image is fetched
(ready) instead.
Differential Revision: https://phabricator.services.mozilla.com/D79736
This patch does the following things:
1. Use `FetchImageHelper` to fetch the MediaImage defined in
media-session
2. Upon the above image is fetched, set it to the SMTC's thumbnail
Differential Revision: https://phabricator.services.mozilla.com/D77893
Still can not figure out how did we enable the same action twice, because we would only update the action change when the action handler is set from `null` to `something` or from `something` to `nothing` [1]. In addition, the browsing context Id for a media session is always unchanged, so it's guarantee to set the action on the correct `MediaSessionInfo`.
However, in order to avoid having more crashes, I have to change the assertions to early returns and add logs to help us be aware of this issue if it happens again.
[1] https://searchfox.org/mozilla-central/rev/fac90408bcf52ca88a3dcd2ef30a379b68ab24e2/dom/media/mediasession/MediaSession.cpp#71-75
Differential Revision: https://phabricator.services.mozilla.com/D78947
- Use WaylandDMABufSurface for SW decoded frames when they can be converted to NV12 format.
- Rename VAAPIFrameHolder to DMABufSurface and use it as general placeholder for WaylandDMABufSurface surface.
It's used for VA-API/SW video playback and holds decoded video images until thery are used by gecko rendering engine.
- Implmenet a linked list of DMABufSurface where recently used frames are stored. The frames are recycled by ffmpeg
decoder for VA-API and SW video playback.
Differential Revision: https://phabricator.services.mozilla.com/D78292
The AAC MFT has a latency of one packet (1024 frames); when we drain the decoder to retrieve that last data, it sets the the decoded data start time to the time of the end of the previous data.
this is the right thing to do under most cases; however when dealing with content with broken timestamps it can lead to bad A/V sync.
Differential Revision: https://phabricator.services.mozilla.com/D79456