[Solved] QMediaPlayer reporting no service available in latest Qt update
-
The next thing to do is check that you have all Qt plugins installed and that the multimedia plugin gets loaded
-
Everything worked just prior to the last Qt update. I shutdown all running programs, including Qt Creator, ran the update, brought up Qt Creator, recompiled the project and ran it. This resulted in the reported error.
I suspect the plugin may not have loaded, but what is the best way to check? I couldn't find anything in the documentation indicating how to check for this, aside from the call to isAvailable(), which I do make and now returns false.
I could change the call to, isVideoAvailable(), since that is what I want to do with the QMediaPlayer, but the error stated in the first message has already indicated that I shouldn't expect it to work and it did report "no service found".
-
To check which plugin is load set QT_DEBUG_PLUGINS=1
-
Setting the environment variable told me where it was looking. I cannot say what was there before the update, but it appears that the gstreamer plugins are not present in any of the /usr/lib/qt/plugins subdirectories. None of the names indicate they might be part of gstreamer. All gstreamer components are installed on the system. Aside from mng, I do not see any plugins related to video. Though the error is produced prior to selecting any video or even creating a VideoWidget. The only plugin in the mediaservice directory is libqtmedia_audioengine.so.
It is looking in the mediaservice directory when it fails. The message reported is exactly what was originally given,
defaultServiceProvider::requestService(): no service found for – “org.qt-project.qt.mediaplayer”
-
From what it looks the update failed somehow
-
Can you look into the packages content ?
Check if the multimedia package contains all plugins and compare with the previous version ?
-
I have contacted the maintainer of the package. They have verified the issue and submitted a correction. The latest update in Arch has fixed the issue. Something to do with the support being in QtWebKit, not in QtMultimedia. Personally, I would have expected to find it in multimedia as well.
-
QtWebKit needs some multimedia stuff, but indeed, it should depend on QtMultimedia in that case and not the reverse
-
Distro packagers have been known to move things around. For example, Ubuntu moved Qt Multimedia into Qt Mobility back in the Qt 4 days.