We'll probably want to do something more accurate in the future with a
custom clang static analysis pass which validates that XPIDL interfaces
have the expected vtable and struct layout, however doing so would be
more involved than the string matching done in this patch.
In addition to checking for extra virtual methods, we'll likely also
want to check for data members on interfaces, and reject them unless the
class is marked as `[builtinclass]` in addition to some other attribute
which we'll need to add to prevent them from being implemented in Rust
(as c++ data members will not be reflected by the rust macro).
There were 2 instances of a comment which contained the word 'virtual'
within a CDATA block. These comments were moved out of the CDATA block
to avoid triggering the error.
Differential Revision: https://phabricator.services.mozilla.com/D151068
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
For AAC, we need to setup a special attribute `MF_MT_USER_DATA` on the stream's media type. Otherwise, the media engine would return type-not-supported error.
Differential Revision: https://phabricator.services.mozilla.com/D145286
There are still some weird bugs about the media engine inside when enabling the video playback. So use a pref to switch the video playback for testing.
The pref should be removed after we finish implementing video playback on via the media engine.
Differential Revision: https://phabricator.services.mozilla.com/D145156
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
Media engine would handle the decoded data inside its pipeline, so we can't access them. Return fakes data instead, which helps the format reader stops sending endless data for the media engine. (because the format reader expects getting output data)
Differential Revision: https://phabricator.services.mozilla.com/D145153
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
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
Currently, we build with WINVER=0x601 (Win7), which means newer declarations in
mfmediaengine.h will not be visible. Also, we don't yet have the Fall Creators
Update SDK available on build machines, so even with updated WINVER, some of
the interfaces we need would not be present.
To work around this, until the build environment is updated, we include copies
of the relevant classes/interfaces we need.
Differential Revision: https://phabricator.services.mozilla.com/D144630
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