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



  • Hi ,I am a newbie and I have been cross compiled qt 5.10.1 for raspberry pi 3 using the link : https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/.
    Now , I tried to run an application that uses QMediaPlayer class and it works fine when i run it on my computer (Ubuntu 18.04). On the application I push a button and it plays an mp3 but when i run the application in for raspberry pi and when i pushed the button it says : defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer" .

    I have installed gstreamer libraries with these commands :

    sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad libgstreamer-plugins-bad1.0-dev gstreamer1.0-pulseaudio gstreamer1.0-tools gstreamer1.0-alsa

    sudo apt-get install gstreamer1.0-plugins-* gstreamer1.0-libav ffmpeg

    sudo apt-get install gstreamer1.0-plugins-* gstreamer1.0-libav gstreamer1.0-ffmpeg

    sudo apt-get install libqt5multimedia5-plugins
    But it still gives the same error . I would appreciate any help .


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you install all these packages on your target sysroot ?



  • I installed them on raspberry pi. I have looked my config summary.

    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

    Then I have installed gstreamer dev packages both in my computer and raspberry pi and configure again with multimedia options and terminal error says like below :
    WARNING: host pkg-config not found

    ERROR: Feature 'alsa' was enabled, but the pre-condition 'config.unix && !config.qnx && libs.alsa' failed.

    ERROR: Feature 'gstreamer_1_0' was enabled, but the pre-condition 'libs.gstreamer_1_0' failed.

    ERROR: Feature 'pulseaudio' was enabled, but the pre-condition 'libs.pulseaudio' failed.
    And this is my config command :
    ./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -skip qtwayland -skip qtscript -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v -no-gbm -gstreamer 1.0 -alsa -pulseaudio


  • Lifetime Qt Champion

    Do you have pkg-config installed on your host ?



  • Yes , it is installed.


  • Lifetime Qt Champion

    Can you generate the list of package installed on the sysroot you are using to cross-compile Qt ?



  • This post is deleted!


  • This post is deleted!



  • Lifetime Qt Champion

    How many versions of Qt do you have on that device ?
    If you build your application directly on the Pi, does it behave correctly ?



  • 0_1568024286357_2019-09-09 13-17-33 ekran görüntüsü.png
    I have these versions . It does not work when i build directly on raspberry pi .



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.