[Development] The dark side of QtMultimedia

Kevin Kofler kevin.kofler at chello.at
Sat Nov 15 14:03:56 CET 2014


Massimo Callegari wrote:
> Hello again,I'm glad that the topic I raised is somehow of interest, but I
> noticed that, as usually good technicians do, you guys went straight into
> techy bits, forgetting what the original post spotted.

Because the "techy bits" are the (essential) first part of solving the 
problem.

> For example, what sounds a good plan to me is something like: we'll
> dedicate the necessary resources to close all the JIRA issues for version
> 5.5.

Well, I don't have any "resources" to "dedicate" (other than my limited free 
time). That's something that only Digia (or some other company involved with 
Qt) can decide. So I'll rather focus on the "how" (i.e. the "techy bits").

> Random notes on the various replies:- 2 years ago, Phonon was exactly the
> reason why I decided to write my own implementations on Qt4.

Please do note that Phonon has improved in the last 2 years, and that, if 
the "Phonon" you were using was the one bundled with Qt 4, that's a several 
years (!) old version, so if that was the case, Phonon had already improved 
back then, you were just using an obsolete version. But even if you were 
using the (then) current upstream Phonon, there have been improvements in 
those 2 years, such as the port of the GStreamer backend to GStreamer 1, the 
maturation of the VLC backend (to the point where it is now the "preferred" 
backend according to the Phonon developers, but the GStreamer backend is 
also fine) and many bugfixes.

This whole "bundled Phonon in Qt" story really proved to be a big disaster 
in hindsight. It started with perfectly good intentions: ensuring this KDE-
developed technology becomes an integral part of Qt, delivered to Qt 
customers (while keeping its LGPL license) and included in downloadable Qt 
binaries. Unfortunately, what happened instead is that, shortly after 
accepting the contribution with much press release fanfare, Qt decided to 
reinvent the wheel by starting QtMultimedia, advertise that as the 
"replacement" to the "deprecated" Phonon, and just stopping to update the 
bundled copy of Phonon, despite the upstream Phonon project having long 
moved on. That painted an image of Phonon being old and deprecated, when 
that only applied to Qt's ancient bundled copy (which has become pure dead 
weight, no sane distributor ships that version).

> I was scared of the consequences of deploying on 3 platforms with it (IF
> that was ever possible).

It has always been possible. Early versions (such as the one Qt 4 STILL 
bundles, after all these years) had native DirectShow (Windows) and 
QuickTime (Mac OS X) backends, next to first Xine and then GStreamer 0.10 
for GNU/Linux. In later versions, the focus shifted to portable multimedia 
frameworks: VLC support was added to Phonon, and GStreamer has been ported 
to many platforms by the GStreamer developers. This change of focus happened 
because of the quirks in the native proprietary multimedia frameworks that 
are hard to work around, and because working with the same backend(s) on all 
platforms results in significantly reduced maintenance work. (An additional, 
non-technical reason for the switch was that the native backends had been 
written by Trolltech for Qt 4's bundled Phonon, so when Trolltech stopped 
maintaining them, interest faded. The only Trolltech-developed backend that 
survived, with major refactoring, is the GStreamer one.) It also solves one 
of the problems described in this thread, the one of different capabilities 
of QtMultimedia (and old versions of Phonon) on different platforms.

> Maybe now the situation is different, but there's Android and iOS

Both GStreamer and VLC have been ported to those mobile platforms, so the 
hard work has already been done. It just takes somebody to compile and test 
Phonon for them.

> Why can't you Phonon guys help on QtMultimedia (you could have joined in
> 2012...)

Two things here:
1. I am not a Phonon developer. I am a KDE developer and a Fedora packager,
   and as such I also help package Phonon for Fedora, but I am not directly
   involved in Phonon development.
2. You are getting the history wrong. Phonon was there first! It's the
   QtMultimedia folks who decided to not join Phonon, but reinvent the wheel
   instead. Why should the Phonon developers have dropped their hard work to
   join a pointless "Not Invented Here" project (which, at least back in
   2012, was clearly inferior, and this thread shows that it's still of
   dubious quality)?

> instead of advertising a module by telling people which flags they need to
> use to build it ?

I'm just trying to be helpful.

> Are you aware of how difficult it is to build ANYTHING with MinGW on
> Windows ?

For anything using CMake (and that includes Phonon), you just run the CMake 
installer, and then:

cmake -G "MinGW Makefiles" (add any other options here) .
mingw32-make

or if you prefer MSYS:

cmake -G "MSYS Makefiles" (add any other options here) .
make

It's much less of a PITA than the dreaded autocrap (that even annoys me on 
GNU/Linux more often than not).

There is also some tooling by the kdewin project (kdewin emerge) that can be 
used to compile things. They also have prebuilt binaries, but not of Qt 5 
stuff yet (they're still working on it).

        Kevin Kofler




More information about the Development mailing list