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

左心房为你撑大大i 提交于 2020-01-02 07:10:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!