Search code examples
linuxqtubuntu-16.04gstreamerqtmultimedia

How to use gstreamer1.0 instead of 0.10 with Qt5.5?


I have a laptop and a computer and I want to test the Media Player example of Qt.
On my laptop, everything is working, but on my computer I have this message:

no service found for - "org.qt-project.qt.mediaplayer"

I have installed the Multimedia Dependencies but it's change nothing.
So I have try to find the missing packet by using synaptic and on the both computer, I have the same result by searching Gstreamer:
gstreamer synaptic I have also create two file to compare with this command:

apt list | grep inst > apt_list.txt
# and
apt list | grep inst > apt_list_laptop.txt
tkdiff apt_list.txt apt_list_laptop.txt

I can't find what's missing, I ask your help to find it.

Edit:
I run the program with QT_DEBUG_PLUGINS=1 and on the computer I have: "QLibraryPrivate::loadPlugin failed on "/home/.../libgstmediaplayer.so"
It's also said that it can't open libgstaudio-0.10.so.0 but on the laptop it use the 1.0 version.
And effectively, when I write:

ldd libgstmediaplayer.so

It's linked with gstreamer0.10 on my computer, and with 1.0 on my laptop


Solution

  • I found the reason, it's because QtCreator use the library located in /home/user/Qt/5.5/gcc_64/plugins/mediaservice/ but these libraries use the 0.10 version of gstreamer:

    Qt Multimedia Module: Added GStreamer 1.0 support. Note that the default is still 0.10.

    The library in the libqt5multimedia5-plugins package use the 1.0 version. So, to launch the media player without "no service" message, I have compile by using command line:

    qmake player.pro && make
    

    By this way, qmake use the system library and not the libraries locate in the Qt folder.