For media engine playback, we would like to let ExternalStateMachine
being aware of the CDM proxy, so that it can pass the the Id of MFCDM
actor to the remote media engine via MFMediaEngineChild in following
patches.
Differential Revision: https://phabricator.services.mozilla.com/D171800
For media engine playback, we would like to let ExternalStateMachine
being aware of the CDM proxy, so that it can pass the the Id of MFCDM
actor to the remote media engine via MFMediaEngineChild in following
patches.
Differential Revision: https://phabricator.services.mozilla.com/D171800
This patch makes the external state machine be able to recover playback
when the MF CDM process crash.
In addition, one of the important thing is that, the external state
machine would need to recreate the MFMediaEngineParent/Child actor
first, before the media format reader recreate the remote decoder.
Otherwise, the new created remote decoder won't be able to find the
correct media engine stream, which would be created after finishing
the initializtion of the engine parent actor and the media source.
Differential Revision: https://phabricator.services.mozilla.com/D166411
As now the video stream would only return an image when the dcomp image
is ready, we should also delay sending first frame ready event and
notify next frame status correctly based on whether we've received the
decoded data.
Otherwise, it would cause the ready state in the media element in
incorrect status.
Differential Revision: https://phabricator.services.mozilla.com/D161551
In this patch, we ask the media engine to return a handle for shareable
dcomp surface, which will then be packaged into a new texture data type
and being shared with the GPU process via the video bridge.
DcompSurfaceImage is the image which contains the handle texture data,
which doesn't support being accessed in the content process. When the
compositor uploads the image to the GPU process, the corresponding
texture host will be created.
The render texture host will be created by that texture host, and it
will be used in DCLayerTree. In DCLayerTree, we create a new type of
surface for our dcomp handle. DCSurfaceHandle will ask the render
texture host to reconstruct the surface by the handle shared from the
remote process (the handle is actually duplicated to the parent process
first due to the sandbox policy, and then be duplicated to the GPU
process later)
DCSurfaceHandle will attach that surface to its visual in order to
display the video frame directly. In the whole process, it's not
possible for Gecko to access any decoded video data which is protected by the
media engine itself.
Depends on D149941
Differential Revision: https://phabricator.services.mozilla.com/D151019
We should request new data after finishing seeking on the reader,
otherwise it would send incorrect data to the remote media engine.
Differential Revision: https://phabricator.services.mozilla.com/D151584
During seeking, the current position might still be the wrong value and
hasn't been updated yet. Therefore, we should use the time of seek
target in order to avoid incorrectly discarding video frame due to the
wrong threshold time.
Differential Revision: https://phabricator.services.mozilla.com/D150988
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
If we already know the type in unsupported, we can switch back to the normal state machine earlier without waiting the error from the media engine.
Differential Revision: https://phabricator.services.mozilla.com/D145403
This is important for testing because the media foundation doesn't support all the formats Firefox supports, we would need to fallback to the normal state machine in order to keep tests running without breaking them.
Differential Revision: https://phabricator.services.mozilla.com/D145402
Before implmenting DCOMP video output, let's set blank image to the video container temporarily. This will result in a white image showing during a playback.
Differential Revision: https://phabricator.services.mozilla.com/D145155
It's possible that a new seeking happens while the previous seeking hasn't finished yet. So multiple seeked events would be sent from the media engine.
We should wait for the finish of the last seeking to make sure the current time has changed to the target time in the last seek target.
Differential Revision: https://phabricator.services.mozilla.com/D145154
We should let the decoder to determine when the state machine should be shutdown. As there might be some reader tasks still running, shutdowning it too early would result in some crashes.
Differential Revision: https://phabricator.services.mozilla.com/D144769
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
If we already know the type in unsupported, we can switch back to the normal state machine earlier without waiting the error from the media engine.
Differential Revision: https://phabricator.services.mozilla.com/D145403
This is important for testing because the media foundation doesn't support all the formats Firefox supports, we would need to fallback to the normal state machine in order to keep tests running without breaking them.
Differential Revision: https://phabricator.services.mozilla.com/D145402
Before implmenting DCOMP video output, let's set blank image to the video container temporarily. This will result in a white image showing during a playback.
Differential Revision: https://phabricator.services.mozilla.com/D145155
It's possible that a new seeking happens while the previous seeking hasn't finished yet. So multiple seeked events would be sent from the media engine.
We should wait for the finish of the last seeking to make sure the current time has changed to the target time in the last seek target.
Differential Revision: https://phabricator.services.mozilla.com/D145154
We should let the decoder to determine when the state machine should be shutdown. As there might be some reader tasks still running, shutdowning it too early would result in some crashes.
Differential Revision: https://phabricator.services.mozilla.com/D144769
If we already know the type in unsupported, we can switch back to the normal state machine earlier without waiting the error from the media engine.
Differential Revision: https://phabricator.services.mozilla.com/D145403
This is important for testing because the media foundation doesn't support all the formats Firefox supports, we would need to fallback to the normal state machine in order to keep tests running without breaking them.
Differential Revision: https://phabricator.services.mozilla.com/D145402
Before implmenting DCOMP video output, let's set blank image to the video container temporarily. This will result in a white image showing during a playback.
Differential Revision: https://phabricator.services.mozilla.com/D145155