问题
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:
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.
来源:https://stackoverflow.com/questions/18480727/how-to-port-qt4-6-phonon-based-media-application-to-qt-5-1