Raspberry Pi QT 5.3.2 - qt.camera not working (no service found for - "org.qt-project.qt.camera"



  • Hey Everyone,

    I'm really stuck on a project in which I am trying to use QT 5.3.2 on. I am using a Raspberry Pi 2 (Armv7) and I have successfully compiled QT from source. I followed this tutorial: http://wiki.qt.io/Native_Build_of_Qt5_on_a_Raspberry_Pi.

    Two issues I am facing:

    1. I get a defaultServiceProvider::requestService(): no service forund for - "org.qt-project.qt.camera"
    2. I get a defaultServiceProvider::requestService(): no service forund for - "org.qt-project.qt.mediaplayer"

    For #1 I am just trying to run the camera example application. I know the camera is plugged in and working.

    I've been doing a ton of research and I noticed that my /usr/local/qt5/plugins/mediaservice only contains libqtmedia_audioengine.so while my QT5.3.2 on my mac contains libqavfcamera.dylib and libqavfcamera_debug.dylib. I feel that this is really important and the absence of these packages is causing the problem.

    For #2, it's the same deal. my ../qt5/plugins/mediaservice doesn't contain libqavfmediaplayer_debug.dylib or libqavfmediaplayer.dylib.

    So where are these packages and why didn't running configure, make, make install, install them? Is it maybe to do with a missing ./configure option? Here is my configure command:

    ./configure -v -opengl es2 -device linux-rasp-pi-g''+ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs -prefix /usr/local/qt5

    Also here is the output of my configure command if it helps:

    Build options:
    Configuration .......... accessibility accessibility-atspi-bridge alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile cups dbus egl eglfs evdev eventfd freetype full-config getaddrinfo getifaddrs iconv icu inotify ipv6ifname large-config largefile libudev linuxfb medium-config minimal-config mremap nis no-harfbuzz no-pkg-config opengl opengles2 openssl pcre png posix_fallocate precompile_header pulseaudio qpa qpa reduce_exports release rpath shared small-config system-jpeg system-png system-zlib xcb xcb-glx xcb-plugin xcb-render xcb-xlib xinput2 xkbcommon-qt xlib xrender
    Build parts ............ libs
    Mode ................... release
    Using C++11 ............ yes
    Using PCH .............. yes
    Target compiler supports:
    iWMMXt/Neon .......... no/auto

    Qt modules and options:
    Qt D-Bus ............... yes (loading dbus-1 at runtime)
    Qt Concurrent .......... yes
    Qt GUI ................. yes
    Qt Widgets ............. yes
    Large File ............. yes
    QML debugging .......... yes
    Use system proxies ..... no

    Support enabled for:
    Accessibility .......... yes
    ALSA ................... yes
    CUPS ................... yes
    Evdev .................. yes
    FontConfig ............. no
    FreeType ............... yes (bundled copy)
    Glib ................... no
    GTK theme .............. no
    HarfBuzz ............... no
    Iconv .................. yes
    ICU .................... yes
    Image formats:
    GIF .................. yes (plugin, using bundled copy)
    JPEG ................. yes (plugin, using system library)
    PNG .................. yes (in QtGui, using system library)
    journald ............... no
    mtdev .................. no
    Networking:
    getaddrinfo .......... yes
    getifaddrs ........... yes
    IPv6 ifname .......... yes
    OpenSSL .............. yes (loading libraries at run-time)
    NIS .................... yes
    OpenGL / OpenVG:
    EGL .................. yes
    OpenGL ............... yes (OpenGL ES 2.x)
    OpenVG ............... no
    PCRE ................... yes (bundled copy)
    pkg-config ............. no
    PulseAudio ............. yes
    QPA backends:
    DirectFB ............. no
    EGLFS ................ yes
    KMS .................. no
    LinuxFB .............. yes
    XCB .................. yes (system library)
    EGL on X ........... no
    GLX ................ yes
    MIT-SHM ............ yes
    Xcb-Xlib ........... yes
    Xcursor ............ yes (loaded at runtime)
    Xfixes ............. yes (loaded at runtime)
    Xi ................. no
    Xi2 ................ yes
    Xinerama ........... yes (loaded at runtime)
    Xrandr ............. yes (loaded at runtime)
    Xrender ............ yes
    XKB ................ no
    XShape ............. yes
    XSync .............. yes
    XVideo ............. yes
    Session management ..... yes
    SQL drivers:
    DB2 .................. no
    InterBase ............ no
    MySQL ................ yes (plugin)
    OCI .................. no
    ODBC ................. yes (plugin)
    PostgreSQL ........... yes (plugin)
    SQLite 2 ............. yes (plugin)
    SQLite ............... yes (plugin, using bundled copy)
    TDS .................. yes (plugin)
    udev ................... yes
    xkbcommon .............. yes (bundled copy, XKB config root: /usr/share/X11/xkb)
    zlib ................... yes (system library)

    Any help would be appreciated!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    It seems you are missing the gstreamer dev package



  • @SGaist Right, so I installed every package that the tutorial say to :

    sudo apt-get install libfontconfig1-dev libdbus-1-dev libfreetype6-dev libudev-dev libicu-dev libsqlite3-dev libxslt1-dev libssl-dev libasound2-dev libavcodec-dev libavformat-dev libswscale-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev gstreamer-tools gstreamer0.10-plugins-good gstreamer0.10-plugins-bad libraspberrypi-dev libpulse-dev libx11-dev libglib2.0-dev libcups2-dev freetds-dev libsqlite0-dev libpq-dev libiodbc2-dev libmysqlclient-dev firebird-dev libpng12-dev libjpeg62-dev libgst-dev libxext-dev libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync0 libxcb-sync0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-glx0-dev libxi-dev libdrm-dev

    Then I went and installed every apt-get gstreamer object I could. And ran make again - still did not build those packages. Do you know what could be wrong?


  • Lifetime Qt Champion

    The gstreamer dev package ?

    And did you re-run configure from clean sources ?



  • @SGaist Yup, I deleted everything and started from a clean QT5.3.2 folder. The gstreamer dev (libgstreamer0.10-dev) package is installed along with all of the extra gstreamer-plugins, gstreamer-tools, etc.

    However, it is still unable to locate it. Here is the config log from ../qtmultimedia/config.log:

    executing config test gstreamer
    + cd /home/pi/opt/qt-everywhere-opensource-src-5.3.2/qtmultimedia/config.tests/gstreamer && /home/pi/opt/qt-everywhere-opensource-src-5.3.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" /home/pi/opt/qt-everywhere-opensource-src-5.3.2/qtmultimedia/config.tests/gstreamer
    Project ERROR: gstreamer-0.10 development package not found
    test gstreamer FAILED

    I am thinking that gstreamer is not being linked by pkg-config for some reason. I did an echo $PKG_CONFIG_PATH and received nothing in my terminal. So I did a export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig/ and I'm spinning up ./configure again.

    I also ran pkg-config --exists --print-errors gstreamer-0.10 along with the other dependencies, and they all check out.

    EDIT: None of that is working. The config.tests are still failing on gstreamer.


  • Lifetime Qt Champion

    Call configure with -v, you should have some more details on what fails



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