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. gentoo linux: QtCreator, QMediaPlayer fails (can't play audio)

gentoo linux: QtCreator, QMediaPlayer fails (can't play audio)

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.5k 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.
  • yczoY Offline
    yczoY Offline
    yczo
    wrote on last edited by
    #1

    Hello all,

    I'm trying to make an app that uses audio:
    After enable "QT += multimedia" in *.pro, I try to use the QMediaPlayer to reproduce background sounds in the app., but sadly does not work.

    I think that is a configuration problem. The qtcreator console reports:

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

    the "gstreamer" varible from qtmultimedia is disable, but after enable and recompile it, the console reports :

    Warning: "No decoder available for type 'application/x-id3'."
    

    On the other hand, can I play mp3 with qmmp

    Here is the program code:

      //play background Music
      QMediaPlayer *music = new QMediaPlayer();
      music->setMedia(QUrl("qrc:/sounds/gOh.mp3"));
      qDebug() << "Audio: " << music->isAudioAvailable();
      music->play();
    

    Please, any help will be wellcome.
    Thanks in advance.

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

      Hi,

      Maybe a silly question but do you have the GStreamer plugins installed ?

      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
      • yczoY Offline
        yczoY Offline
        yczo
        wrote on last edited by yczo
        #3

        Hello, first, thank you very much.
        Is not a silly question.

        you mean some QtCreator plugins or from Linux system?
        In Linux system I have the next:

        [U] media-libs/gst-plugins-bad
             Available versions:  
             (0.10) 0.10.23-r3   <- I have this version
             (1.0)  1.4.5 1.6.3
        
        [I] media-libs/gst-plugins-base
        

        gentoo offers more gst plugins: http://pastebin.com/fC0cxKzT

        Greetings

        1 Reply Last reply
        0
        • yczoY Offline
          yczoY Offline
          yczo
          wrote on last edited by
          #4

          Solved!

          reinstalling qmultimedia with gstreamer flag and installing the media-plugins/gst-plugins-libav plugin

          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