How to port Qt4.6 Phonon based media-application to Qt 5.1?

675 views Asked by At

I have a Qt 4.6 based application which use QtWebView to load a HTML page with tag inside to play a network multimedia source on Windows platform. Instead of using the default PHONON playback engine i build another PHONON back-end engine to handle the media download, demuxer,decoder, rendering etc. It works pretty well.

However i need to update to Qt 5.1 to benefit the improvement and bug fix in latest QtWebView. From Qt 4.8 PHONON was dropped and when porting to Qt 5.1 my self implemented playback engine is unknown to QtWebView and my app doesn't work at all. Does any body have an idea how to build a media playback engine and register to Qt5.1 QtWebView?

1

There are 1 answers

0
MBach On

Well I know this is an old post, but since then Qt 5.2 and Qt 5.3 are out! Anyway, you can replace almost everything from Phonon with Qt Multimedia:

QT += core gui multimedia

#include <QMediaPlayer>

Have a look at QMediaPlayer: you can do a lot of things, and Qt Framework comes with great examples.