Qt5, Phonon and Multimedia Kit

I am very new to Qt development and I am using Qt5 Beta1 on MacOSX.

Over the past two days, I read documents and searched for information about the various possibilities that I have in order to implement a widget that displays a video frame that corresponds to a specific point in time. In short, a good old preview. At first, I thought that since I didn’t need anything fantastic, Phonon would be the right choice, as it is designed to be "at a higher level (than QTMultimedia) and in many cases is more suitable for application developers." I read his documentation and even found some discussions that could help me get started, like this; http://www.qtcentre.org/threads/13221-QT-4-4-Phonon-Video-Rendering-a-single-frame . But then, when I tried to do something on my own, I realized that I did not have a Phonon library. Surprised by this, I am learning Phonon and Qt5. And then all the problems began.

I started reading conversations like this one: http://comments.gmane.org/gmane.comp.lib.qt.user/1581 or this one: http://comments.gmane.org/gmane.comp.lib.qt .devel / 3905 or this other link: https://bugreports.qt.io/browse/QTBUG-26471 . And I was really embarrassed, not knowing whether it was nice to download the Phonon library, or after a while it will not be supported on Qt5. So I decided to take a step back and think again about using QTMultimedia instead of Phonon. I looked at their example VideoWidget http://doc.qt.io/qt-4.8/qt-multimedia-videowidget-example.html , and when I tried to start it, it made some errors (I send only the beginning of the output):

In file included from ../VideoExample/videoplayer.cpp:43: In file included from ../VideoExample/videowidget.h:44: ../VideoExample/videowidgetsurface.h:57:11: warning: 'VideoWidgetSurface::isFormatSupported' hides overloaded virtual function [-Woverloaded-virtual] bool isFormatSupported(const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const; ^ ../../Downloads/qt-everywhere-opensource-src-5.0.0-beta1/qtbase/include/QtMultimedia/../../../qtmultimedia/src/multimedia/video/qabstractvideosurface.h:78:18: note: hidden overloaded virtual function 'QAbstractVideoSurface::isFormatSupported' declared here virtual bool isFormatSupported(const QVideoSurfaceFormat &format) const; ^ ../VideoExample/videoplayer.cpp:61:40: error: expected a type QAbstractButton *openButton = new QPushButton(tr("Open...")); ^ ../VideoExample/videoplayer.cpp:62:6: error: no matching member function for call to 'connect' connect(openButton, SIGNAL(clicked()), this, SLOT(openFile())); ^~~~~~~ ../../Downloads/qt-everywhere-opensource-src-5.0.0-beta1/qtbase/include/QtCore/../../src/corelib/kernel/qobject.h:211:36: note: candidate function not viable: cannot convert argument of incomplete type 'QAbstractButton *' to 'const QObject *' static QMetaObject::Connection connect(const QObject *sender, const char *signal, 

And this is the moment when I felt that I had completely lost and wrote here: /

So my current questions are:

  • Does anyone know the actual state of Phonon, and if it is nice to use it for Qt5? So what do I need to make it work? I guess I'm confusing concepts here, but I have terribly lost between what belongs to Qt and what does not, and what are the consequences of both possibilities.
  • Any idea why the example from QTMultimedia is not working?

In general, thoughts on this topic would be greatly appreciated.

+7
source share
2 answers

It is assumed that the Phonon framework is not included in Qt 5 ( Qt and Key Technologies ).

The example you tested only works with Qt 4.7, not Qt 5. The version of Qt 5.0 can be found here . Qt 5.1 version can be found here .

+6
source

Try installing the phonon development kit.

yum install phonon-devel

0
source

All Articles