QMediaPlayer doesn't play anything on Ubuntu 16.04 / Qt 5.6

后端 未结 1 586
野性不改
野性不改 2020-12-21 09:03

I\'m using the official Qt 5.6 SDK on Ubuntu 16.04 and when I try to play an mp3 file I just get:

defaultServiceProvider::requestService(): no service found          


        
相关标签:
1条回答
  • 2020-12-21 09:27

    First, run your application with QT_DEBUG_PLUGINS=1 to see plugin errors.

    If you see errors about "libgstaudio-0.10.so.0", it's a GStreamer version problem. The official Qt binaries seems to need GStreamer 0.10.

    Solutions I found :

    • Use the libqt shipped with your distribution, using your package manager : It's the best solution I found, since it's built with the right GStreamer version. I use different chroot to make packages for distributions that embed different GStreamer versions.
    • Compile Qt from source to enable Gstreamer 1.0 : Not tested
    • Install Gstreamer 0.10 : I don't recommend this option, or use a chroot with an older distribution if you need it.
    0 讨论(0)
提交回复
热议问题