简体   繁体   English

无法将多媒体窗口小部件添加到Qt Creator C ++项目

[英]Cannot add Multimedia Widgets to Qt Creator C++ project

I am trying to compile and run the official Media Player Example in Qt: http://doc.qt.io/qt-5/qtmultimediawidgets-player-example.html for a Raspberry Pi running Raspbian Jessie. 我正在尝试为运行Raspbian Jessie的Raspberry Pi编译并运行Qt中的官方Media Player示例: http ://doc.qt.io/qt-5/qtmultimediawidgets-player-example.html。 I still have no success: when I build the project, the following error appears: 我仍然没有成功:构建项目时,出现以下错误:

:-1: error: Unknown module(s) in QT: multimedia multimediawidgets

This is referred to the .pro code: 这是指.pro代码:

QT += multimedia \

My Qt should be up to date, and I don't know where the problem can be. 我的Qt应该是最新的,而且我不知道问题出在哪里。 Could anyone help please? 有人可以帮忙吗? Thanks! 谢谢!

EDIT: I installed "sudo apt-get install qtmultimedia5-dev" but without success. 编辑:我安装了“ sudo apt-get install qtmultimedia5-dev”,但是没有成功。 Is it the right module to install? 它是安装正确的模块吗?

EDIT 2: the qtmultimedia5 packet seems to be well installed, but the "Unknown module(s)" error in Qt remains! 编辑2:qtmultimedia5数据包似乎已正确安装,但Qt中的“未知模块”错误仍然存​​在! Perhaps after its installation the library has to be added manually in some way? 也许在安装后必须以某种方式手动添加库? Please help! 请帮忙!

I have a raspberry 1 model B, and the first thing I wanted to do was a media center from scratch. 我有一个Raspberry 1 B型,我想做的第一件事是从头开始一个媒体中心。 Of course, in Qt. 当然,在Qt中。

Sadly, I struggled a lot before giving up and falling back on a omxplayer wrapper which I am still developing. 可悲的是,在放弃并继续使用我仍在开发的omxplayer包装器之前,我付出了很多努力。

However, a few weeks ago gstreamer still did not support omx backend (so you cannot play decently any kind of media). 但是,几周前,gstreamer仍然不支持omx后端(因此,您无法正常播放任何类型的媒体)。

Note that you need to buy MPEG-2 and VC-1 licences to gain hardware accelaration for media, otherwise you can easily get very low fps (and bad audio) while playing mpegs and so on. 请注意,您需要购买MPEG-2和VC-1许可证才能获得媒体的硬件加速,否则在播放mpeg等时,很容易获得非常低的fps(和不良音频)。

Take a look at this page for a recent Qt version. 此页面上查看最新的Qt版本。

Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM