如何将基于Qt4.6 Phonon的媒体应用程序移植到Qt 5.1? [英] How to port Qt4.6 Phonon based media-application to Qt 5.1?

查看:503
本文介绍了如何将基于Qt4.6 Phonon的媒体应用程序移植到Qt 5.1?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于Qt 4.6的应用程序,它使用QtWebView加载带有标签的HTML页面,以在Windows平台上播放网络多媒体源。我没有使用默认的PHONON播放引擎,而是构建另一个PHONON后端引擎来处理媒体下载,解复用器,解码器,渲染等。它运行良好。

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.

但是我需要更新到Qt 5.1以获得最新QtWebView中的改进和错误修复。从Qt 4.8开始,PHONON被丢弃,当移植到Qt 5.1时,我自己实现的回放引擎对于QtWebView是未知的,我的应用根本不起作用。
是否有人知道如何构建媒体播放引擎并注册到Qt5.1 QtWebView?

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?

推荐答案

我知道这是一个老帖子,但从那以后Qt 5.2和Qt 5.3都出来了!无论如何,你可以用Phonon和Qt Multimedia取代几乎所有东西:

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>

看看 QMediaPlayer :你可以做很多事情,Qt Framework附带很好的例子。

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

这篇关于如何将基于Qt4.6 Phonon的媒体应用程序移植到Qt 5.1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆