Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] QMediaPlayer reporting no service available in latest Qt update
Forum Updated to NodeBB v4.3 + New Features

[Solved] QMediaPlayer reporting no service available in latest Qt update

Scheduled Pinned Locked Moved General and Desktop
15 Posts 3 Posters 8.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CDaymon
    wrote on last edited by
    #1

    I'm using Qt5.2.1 on Arch Linux. I have been developing an application that uses the QMediaPlayer class to play a video file. Everything was working fine, then about a week ago there was an update to Qt. After which I can no longer play videos and QMediaPlayer reports that no service is available. The output to the console is as follows:

    defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

    There is nothing clear in the documentation to indicate a way to determine exactly which service it is attempting to utilize. I have the latest vlc, gstreamer and gstreamer 0.10 installed.

    The documentation on multimedia appears to still refer to developing with Qt4.

    The excellent documentation was one of the main reasons I began using Qt years ago. I'd like to see Qt continue to grow and succeed.

    To add, the Qt VideoPlayer example produces the same result.

    Fixed in recent update, Qt5.2.1-4.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      There's something not clear, do you mean an update of Arch Linux broke your application ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • C Offline
        C Offline
        CDaymon
        wrote on last edited by
        #3

        It was an Arch update that updated Qt from 5.2.1-2 to 5.2.1-3.

        If, what you are about to propose is that this is a subject for the associated Arch maintainer rather than for Qt, the issue still remains that when such an issue occurs, it is very difficult, if not impossible, to query enough information from the associated methods to lead one to a solution.

        Is gstreamer the only supported plugin for Linux? (I would like this to be crossplatform. VLC appears to be available on virtually all platforms.) I believe the documentation, which seems to be more relevant to Qt4, also mentions support for VLC.

        What is the procedure to insure that you have the correct components installed and properly configured? If more than one viable plugin is available, how does one designate which one should be used? I would think that if the compile of Qt is designated for Linux and multimedia (code containing multimedia classes all compile) support is included in the compile and gstreamer or VLC is required to make that functional, then the compile of Qt should have failed when at least one of these components were not present.

        Is this a bug in the general rules for compiling Qt that would allow Qt to be compiled with multimedia support without having the required code to do anything with those classes?

        As stated in the original post, everything was working prior to that last Qt update. This is indicative of the proper plugins being present on the system.

        I did not compile Qt from source.

        I tend to be verbose. Please don't take my lengthy reply as anything more than that.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          It was not what I had in mind, just to determine if it was a Distro vs User install. However, it would indeed be useful to know what has changed between both version to help determine why it's falling now.

          AFAIK, gstreamer is the official multimedia backend on linux. If someone has a VLC version, it has not been submitted yet.

          As a user of a distro Qt install, the checks should have been done for you. What might happen is that you have some leftovers, did you do a complete clean build ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • C Offline
            C Offline
            CDaymon
            wrote on last edited by
            #5

            Yes. I did a rebuild all, several times. I believe I also did a clean prior to one of those to make absolutely sure everything was rebuilt.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              The next thing to do is check that you have all Qt plugins installed and that the multimedia plugin gets loaded

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • C Offline
                C Offline
                CDaymon
                wrote on last edited by
                #7

                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".

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  To check which plugin is load set QT_DEBUG_PLUGINS=1

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    CDaymon
                    wrote on last edited by
                    #9

                    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”

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      From what it looks the update failed somehow

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        CDaymon
                        wrote on last edited by
                        #11

                        I've done reinstalls on all the key components, but it hasn't made any difference. No indication from pacman that any issues were encountered.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          Can you look into the packages content ?

                          Check if the multimedia package contains all plugins and compare with the previous version ?

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • C Offline
                            C Offline
                            CDaymon
                            wrote on last edited by
                            #13

                            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.

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              QtWebKit needs some multimedia stuff, but indeed, it should depend on QtMultimedia in that case and not the reverse

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • JKSHJ Offline
                                JKSHJ Offline
                                JKSH
                                Moderators
                                wrote on last edited by
                                #15

                                Distro packagers have been known to move things around. For example, Ubuntu moved Qt Multimedia into Qt Mobility back in the Qt 4 days.

                                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                1 Reply Last reply
                                0

                                • Login

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Search
                                • Get Qt Extensions
                                • Unsolved