msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.22k stars 1.19k forks source link

qtwebkit alpha-2 Video playback not working #2655

Open bagong opened 7 years ago

bagong commented 7 years ago

Hi,

currently video-playback on pages using the qtwebkit-engine distributed via msys2 (alpha2, combined with qt5.9) does not work. This is kind of a known issue, but also a shame (imagine a browser that cannot play Youtube). Qtwebkit-versions built with msvc by default use Windows MediaFoundation and video playback works, but mingw built qtwebkit uses QtMultimedia, the video playback of which still uses DirectX. This interface is known not to support video playback in default system setups. Installing codec-packs, as is occasionally suggested, seems to have no effect in practice. Even if it could be configured to work, it would have to be considered a dubious and hacky "solution" likely to conflict with configurations on many Windows installs.

A suggested, but not yet implemented/published solution is to patch qtwebkit to use MediaFoundation in mingw-builds as well. Providing this falls into a grey area between package/distribution and project maintenance. Maybe the distribution maintainers and the qtwebkit maintainer (@annulen) could cooperate to enable video playback, without which a webengine is pretty useless if thought of as a general purpose engine.

Thanks.

bagong commented 7 years ago

Initial research using patches from @annulen points to the following:

annulen commented 7 years ago

Clarification about MediaFoundation support: strmbase is not actually needed. Problem is that headers are missing interfaces and other identifiers that I've collected in file https://0x0.st/04H.h (copied parts from MS headers). Other side of the problem is that IID's of these interfaces are missing in mfuuid library and I don't know how to fix these unresolved symbols.

I've reported bug about missing interfaces to https://sourceforge.net/p/mingw-w64/bugs/603/, but I'm not sure if it's the right place as there was no reaction yet

bagong commented 7 years ago

I've created a PR that enables the gstreamer backend:

https://github.com/Alexpux/MINGW-packages/pull/2672

Tested in 32- and 64-bit builds to support video playback in the QtTestBrowser