Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Mediaplayer - defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
14 Posts 2 Posters 5.4k 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.
  • R Ronak5

    Hello,

    I'm trying to build a Qt mediaplayer application on Qt to play few audio files.
    But on running the application, I find this warning:

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

    player = new QMediaPlayer(this);
    player->setMedia(QUrl::fromLocalFile("/home/Music/bensound-anewbeginning.mp3"));
    player->setVolume(80);
    qDebug() << "AudioStatus: " << player->isAudioAvailable();
    player->play();
    qDebug()<<"Player Error:" << player->errorString();
    qDebug()<<player->mediaStatus();

    Could you please help if i'm missing something here? Thank you.

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @Ronak5 Did you install GStreamer plug-in? Also you can set QT_DEBUG_PLUGINS http://doc.qt.io/qt-5/debug.html before starting your app to see which plug-ins are loaded.

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    R 1 Reply Last reply
    1
    • jsulmJ jsulm

      @Ronak5 Did you install GStreamer plug-in? Also you can set QT_DEBUG_PLUGINS http://doc.qt.io/qt-5/debug.html before starting your app to see which plug-ins are loaded.

      R Offline
      R Offline
      Ronak5
      wrote on last edited by
      #3

      @jsulm
      hi, Thanks for help.
      i've installed few gstreamer plugins via commands:
      sudo apt-get install gstreamer1.0-plugins-ugly
      sudo apt-get install gstreamer1.0-alsa

      But still it's not working.

      Also, I've set QT_DEBUG_PLUGINS =1. What exactly to look for in the debug logs for qt multimedia?

      jsulmJ 1 Reply Last reply
      0
      • R Ronak5

        @jsulm
        hi, Thanks for help.
        i've installed few gstreamer plugins via commands:
        sudo apt-get install gstreamer1.0-plugins-ugly
        sudo apt-get install gstreamer1.0-alsa

        But still it's not working.

        Also, I've set QT_DEBUG_PLUGINS =1. What exactly to look for in the debug logs for qt multimedia?

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @Ronak5 After setting QT_DEBUG_PLUGINS run your app and see the output in the console. It should show which plug-ins are loaded and which are not loaded because of errors. Check everything related to multimedia plug-ins.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        R 1 Reply Last reply
        0
        • jsulmJ jsulm

          @Ronak5 After setting QT_DEBUG_PLUGINS run your app and see the output in the console. It should show which plug-ins are loaded and which are not loaded because of errors. Check everything related to multimedia plug-ins.

          R Offline
          R Offline
          Ronak5
          wrote on last edited by
          #5

          @jsulm
          Yes I ran my app with that.

          I can see some of these errors below.

          QFactoryLoader::QFactoryLoader() looking at "/home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstaudiodecoder.so.debug"
          "The shared library was not found."
          not a plugin

          QFactoryLoader::QFactoryLoader() looking at "/home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstcamerabin.so.debug"
          "The shared library was not found."
          not a plugin

          QFactoryLoader::QFactoryLoader() looking at "/home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediacapture.so.debug"
          "The shared library was not found."
          not a plugin

          QFactoryLoader::QFactoryLoader() looking at "/home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so.debug"
          "The shared library was not found."
          not a plugin

          Cannot load library /home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so: (/home/Qt/5.11.1/gcc_64/lib/libQt5MultimediaGstTools.so.5: undefined symbol: _gst_value_list_type)

          Is there any specific plugins/ commands for plaugins to run?

          jsulmJ 1 Reply Last reply
          0
          • R Ronak5

            @jsulm
            Yes I ran my app with that.

            I can see some of these errors below.

            QFactoryLoader::QFactoryLoader() looking at "/home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstaudiodecoder.so.debug"
            "The shared library was not found."
            not a plugin

            QFactoryLoader::QFactoryLoader() looking at "/home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstcamerabin.so.debug"
            "The shared library was not found."
            not a plugin

            QFactoryLoader::QFactoryLoader() looking at "/home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediacapture.so.debug"
            "The shared library was not found."
            not a plugin

            QFactoryLoader::QFactoryLoader() looking at "/home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so.debug"
            "The shared library was not found."
            not a plugin

            Cannot load library /home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so: (/home/Qt/5.11.1/gcc_64/lib/libQt5MultimediaGstTools.so.5: undefined symbol: _gst_value_list_type)

            Is there any specific plugins/ commands for plaugins to run?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #6

            @Ronak5 said in Qt Mediaplayer - defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer":

            libgstaudiodecoder.so.debug

            This looks strange!
            It should be libgstaudiodecoder.so
            How did you install Qt?
            Are you starting a debug build? It shouldn't make any difference, but you could try to start a release build and see how it behaves then.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            R 1 Reply Last reply
            0
            • jsulmJ jsulm

              @Ronak5 said in Qt Mediaplayer - defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer":

              libgstaudiodecoder.so.debug

              This looks strange!
              It should be libgstaudiodecoder.so
              How did you install Qt?
              Are you starting a debug build? It shouldn't make any difference, but you could try to start a release build and see how it behaves then.

              R Offline
              R Offline
              Ronak5
              wrote on last edited by Ronak5
              #7

              @jsulm
              Hey, yea i was building in debug mode. But I couldn't understand why it won't work with debug.
              I had built and run in release mode. it isn't working ,but now I don't find above errors.
              But I do see error:

              Got keys from plugin meta data ("gstreamermediaplayer")
              QFactoryLoader::QFactoryLoader() checking directory path "/home/build-cluster-Desktop_Qt_5_11_1_GCC_64bit-Release/mediaservice" ...
              Cannot load library /home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so: (/home/Qt/5.11.1/gcc_64/lib/libQt5MultimediaGstTools.so.5: undefined symbol: _gst_value_list_type)
              QLibraryPrivate::loadPlugin failed on "/home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so" : "Cannot load library /home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so: (/home/Qt/5.11.1/gcc_64/lib/libQt5MultimediaGstTools.so.5: undefined symbol: _gst_value_list_type)"
              defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

              jsulmJ 1 Reply Last reply
              0
              • R Ronak5

                @jsulm
                Hey, yea i was building in debug mode. But I couldn't understand why it won't work with debug.
                I had built and run in release mode. it isn't working ,but now I don't find above errors.
                But I do see error:

                Got keys from plugin meta data ("gstreamermediaplayer")
                QFactoryLoader::QFactoryLoader() checking directory path "/home/build-cluster-Desktop_Qt_5_11_1_GCC_64bit-Release/mediaservice" ...
                Cannot load library /home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so: (/home/Qt/5.11.1/gcc_64/lib/libQt5MultimediaGstTools.so.5: undefined symbol: _gst_value_list_type)
                QLibraryPrivate::loadPlugin failed on "/home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so" : "Cannot load library /home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so: (/home/Qt/5.11.1/gcc_64/lib/libQt5MultimediaGstTools.so.5: undefined symbol: _gst_value_list_type)"
                defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #8

                @Ronak5 I really have no idea what happens if you run a debug build, it should actually work same way.
                What I'm wondering about is this path: /home/Qt - is it correct? /home directory contains user home directories. Do you have a user with user name Qt?
                Regarding undefined symbol: _gst_value_list_type: do

                ldd /home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so
                

                in a terminal and see whether everything was founf.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                R 1 Reply Last reply
                1
                • jsulmJ jsulm

                  @Ronak5 I really have no idea what happens if you run a debug build, it should actually work same way.
                  What I'm wondering about is this path: /home/Qt - is it correct? /home directory contains user home directories. Do you have a user with user name Qt?
                  Regarding undefined symbol: _gst_value_list_type: do

                  ldd /home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so
                  

                  in a terminal and see whether everything was founf.

                  R Offline
                  R Offline
                  Ronak5
                  wrote on last edited by
                  #9

                  @jsulm
                  Hey, yes the path is correct. It's in one of the user home directories. It's just edited by me.

                  Also, regarding ldd /home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so command,

                  I see all the libs and nothing is not found there.
                  Also, I just ran config summary for my Qt. What i found is this:

                  Qt Multimedia:
                  ALSA ................................... no
                  GStreamer 1.0 .......................... no
                  GStreamer 0.10 ......................... no
                  Video for Linux ........................ yes
                  OpenAL ................................. no
                  PulseAudio ............................. no
                  Resource Policy (libresourceqt5) ....... no
                  Windows Audio Services ................. no
                  DirectShow ............................. no
                  Windows Media Foundation ............... no

                  Is this a problem?

                  jsulmJ 1 Reply Last reply
                  0
                  • R Ronak5

                    @jsulm
                    Hey, yes the path is correct. It's in one of the user home directories. It's just edited by me.

                    Also, regarding ldd /home/Qt/5.11.1/gcc_64/plugins/mediaservice/libgstmediaplayer.so command,

                    I see all the libs and nothing is not found there.
                    Also, I just ran config summary for my Qt. What i found is this:

                    Qt Multimedia:
                    ALSA ................................... no
                    GStreamer 1.0 .......................... no
                    GStreamer 0.10 ......................... no
                    Video for Linux ........................ yes
                    OpenAL ................................. no
                    PulseAudio ............................. no
                    Resource Policy (libresourceqt5) ....... no
                    Windows Audio Services ................. no
                    DirectShow ............................. no
                    Windows Media Foundation ............... no

                    Is this a problem?

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by jsulm
                    #10

                    @Ronak5 said in Qt Mediaplayer - defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer":

                    GStreamer 1.0 .......................... no
                    GStreamer 0.10 ......................... no

                    This is bad. You do not have GStreamer support in your Qt.
                    You need to install needed GStreamer dev packages, run configure again and build.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    R 1 Reply Last reply
                    1
                    • jsulmJ jsulm

                      @Ronak5 said in Qt Mediaplayer - defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer":

                      GStreamer 1.0 .......................... no
                      GStreamer 0.10 ......................... no

                      This is bad. You do not have GStreamer support in your Qt.
                      You need to install needed GStreamer dev packages, run configure again and build.

                      R Offline
                      R Offline
                      Ronak5
                      wrote on last edited by
                      #11

                      @jsulm
                      Oh. I had installed Gstreamer packages using sudo apt-get commands.
                      But what command should i run for configure again ? And by build do you mean Qmake/build complete Qt app?
                      Sorry I'm new to Qt so have to ask basics.

                      jsulmJ 1 Reply Last reply
                      0
                      • R Ronak5

                        @jsulm
                        Oh. I had installed Gstreamer packages using sudo apt-get commands.
                        But what command should i run for configure again ? And by build do you mean Qmake/build complete Qt app?
                        Sorry I'm new to Qt so have to ask basics.

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #12

                        @Ronak5 You need to install GStreamer -dev packages using apt-get.
                        I think you can then run configure in the same way you did it before, but only build qtmultimedia modules (qmake, make, make install).

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        R 1 Reply Last reply
                        1
                        • jsulmJ jsulm

                          @Ronak5 You need to install GStreamer -dev packages using apt-get.
                          I think you can then run configure in the same way you did it before, but only build qtmultimedia modules (qmake, make, make install).

                          R Offline
                          R Offline
                          Ronak5
                          wrote on last edited by Ronak5
                          #13

                          @jsulm
                          hey, yes i've updated my ubuntu from 14.04 LTS to 16.04 now. And installed gstreamer related packages.
                          But now I'm not able to build/make qtmultimedia. Could you please help on it?
                          Thanks a lot for your support here. Thank you.

                          jsulmJ 1 Reply Last reply
                          0
                          • R Ronak5

                            @jsulm
                            hey, yes i've updated my ubuntu from 14.04 LTS to 16.04 now. And installed gstreamer related packages.
                            But now I'm not able to build/make qtmultimedia. Could you please help on it?
                            Thanks a lot for your support here. Thank you.

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #14

                            @Ronak5 You should say what is not working.

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            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