QT.no service found for - “org.qt-project.qt.media

2019-02-15 16:27发布

问题:

Hello in order to build static QT for Windows, I followed the next article.

http://qt-project.org/wiki/How-to-build-a-static-Qt-for-Windows-MinGW

Using QT vesion – 5.2.0. Operating System- Windows7. The problem is that it says – no service found for – “org.qt-project.qt.mediaplayer” on building the project.

I searched the net, but no solution was useful. May be I’m not using them correctly because of some lack of knowledge of QT infrustructure, but anyway If someone could give me some intructions of solving of this problem, I would really appreciate that.

回答1:

I'm using statically Qt 5.2.1 OpenGL MinGW and had same problem (video wasn't playing with same "no service found"). In my case I solved the problem linking the static mediaplayer plugin (dsengine) in project. To do this I had to:

1) add in .pro file:

CONFIG += static
static:{
QTPLUGIN += dsengine
CONFIG += release
LIBS += -ldsengine
}

dsengine plugin is located in %QTDIR%/plugins/mediaservice/libdsengine.a

2) add somewhere in the code (around main.cpp):

#ifdef QT_STATIC
#include <QtCore/QtPlugin>
Q_IMPORT_PLUGIN(DSServicePlugin)
#endif


标签: qt qt5.2