Phonon and MinGW: a story about true Windows love

As you might know we introduced Phonon, a new multimedia layer in Qt 4.4. From the beginning the problem was that we couldn't support mingw, the only free compiler we support on Windows.
The reality is more the other way around: mingw doesn't support us, or more precisely, it doesn't support DirectShow.

So people have been trying and trying to make Phonon build with mingw. A few months ago, I sat down and decided to write the necessary headers to handle Phonon. I succeeded and decided to post this to sourceforge. You can find the item here. Unfortunately it's been sitting there since then. I hope that it will be picked up in the next iteration of mingw's win32 API package.

And then, a few weeks ago, a new mingw was *finally* released based on gcc 4.4. That is truly great news for windows users. So I tested it and it works great. I had to fix some stuff but now Qt trunk (future 4.6) builds fine with it.

Back to Phonon, if you follow the link above you'll find a patch at the end. You can download it and apply it to you own mingw.
To do that it is very simple. First dezip the file and copy the .h in c:mingwinclude and then apply the patch like this (I use patch.exe provided with msys-git):

cd /D c:mingwinclude
patch < dshow.patch

Now if you upgrade to Qt trunk and re-run configure.exe it should even auto-detect that your mingw has Phonon support and it will build it.

So in short, you can now have a decent/recent compiler based on gcc 4.4 + Phonon on Windows.

Blog Topics: