Problems with GStreamer- video player (with phonon) on embedded Linux (Qt 4.8.4)



  • Hey,

    First of all English isn't my mother language, so sorry if my English isn't perfect.

    I tried to develop a videoplayer for an ARM device (works with embedded linux). But I have some problems with GStreamer. I don't know exactly how to install the GStreamer on the ARM device. My steps so far:

    1. I crosscompiled the libraries for phonon (see http://qt-project.org/faq/answer/how_can_i_cross_compile_qt_embedded_with_phonon_support ).
    2. I crosscompild Qt 4.8.4 embedded Qt for arm (also with phonon, glib etc. ).
    3. I installed the nessasary Qt libraries on my ARM device (projects without phonon haven*t any problems).
    4. I installed all crosscompiled Qt plugins.
    5. I wrote (I’m using QtCreator) the videoplayer (works on ubuntu) and crosscompild the project.
    6. I didn’t' installed all crosscompiled Phonon libraries (not enough space on my arm device).
    7. But I installed the libraries (same path they are on my development system (ubuntu)) libffi and libgstreamer-0.10, because they were needed during crosscompilation of my application.

    Is there a possibility to crosscompiled my application with all dependency ( static ? ); so there is no need to install all phonon libraries on my arm device?
    Or has someone any other idea?

    Thank you all

    error:

    "Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabled"
    Phonon::GStreamer::Backend: Failed to initialize GStreamer
    GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed
    GStreamer-CRITICAL **: gst_object_sink: assertion 'GST_IS_OBJECT (object)' failed
    [...]
    WARNING: Phonon::createPath: Cannot connect Phonon::MediaObject ( no objectName ) to Phonon::VideoWidget ( VideoWidget ).



  • anybody? It would be great to get some ideas, they doesn't need to solve my problem - right now I haven't the faintest idea what could be my next stept to solve the problem...



  • Seems like it is not able to find the libraries.

    Can you confirm that all necessary libraries are copied? if you have ldd for the target you can run it on your binary to check what libraries are not found


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    If your device can boot on the network you could use a NFS as root filesystem. That will give you enough space for you current development.

    In a second phase you can build Qt statically but beware of the licensing issues. You can also copy only the Qt libraries you are using i.e. if you don't make use of Sql you can avoid install it.



  • Thank you very much

    I checked with ldd and all the libraries are linked - thats fine. I copied all nessasrry Qt libs too.

    But right now I am not sure if the gstreamer plugin ( libphonon_gstreamer.so) can find or has all needed libraries - during compilation I had to include libffi.a and libgstreamer-0.10.a but I installed them on the device at the same path like on my developsystem. Any Idea how I can check that or where I have to install them- As mentioned I can't install all libs I crosscompiled for the phonon framework on the device

    Thanks again


  • Lifetime Qt Champion

    You can try to run ldd on the plugins/libraries on your device to see if something is missing



  • Have you ensured that you have following packages installed?
    libgstreamer0.10-dev
    libgstreamer-plugins-base0.10-dev
    gstreamer0.10-plugins-good
    gstreamer0.10-plugins-bad



  • Thanks again

    But I didn't solve my problem yet.

    I tried ldd on my plugin ( libphonon_gstreamer.so): look okay right? libphonon.so.4 => /lib/libphonon.so.4 (0x4036c000)
    libQtGui.so.4 => /lib/libQtGui.so.4 (0x403bb000)
    libQtNetwork.so.4 => /lib/libQtNetwork.so.4 (0x40d05000)
    libQtCore.so.4 => /lib/libQtCore.so.4 (0x40dfb000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x41150000)
    libstdc++.so.6 => /lib/libstdc++.so.6 (0x41172000)
    libm.so.6 => /lib/libm.so.6 (0x41244000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x412e7000)
    libc.so.6 => /lib/libc.so.6 (0x41310000)
    libdl.so.2 => /lib/libdl.so.2 (0x4144d000)
    librt.so.1 => /lib/librt.so.1 (0x4145b000)
    /lib/ld-linux.so.3 (0x2a000000)

    Btw in included the plugin, libffi and libgstreamer-0.10 like this , is that okay?

    LIBS += -L/usr/local/Trolltech/QtEmbedded-4.8.4-arm/plugins/phonon_backend/ -lphonon_gstreamer

    LIBS += -L/opt/x/lib/ -lffi -lgstreamer-0.10 -lgstbase-0.10

    I also included after i read shrikantds post libgstbase (good and bad are optional for the gstreamer aren't they?) but sadly nothing...

    I am really sorry I didn't figured it out yet...


  • Lifetime Qt Champion

    You should rather have copied your QtEmbedded in the same folders on your arm device (libs and plugins and fonts). Meaning in /usr/local/Trolltech/QtEmbbeded-4.8.4.



  • thank your I copied my libs to /usr/local/Trolltech/QtEmbedded-4.8.4/lib but my application still isn't able to find the gstreamer plugin...


  • Lifetime Qt Champion

    You also have to copy the plugins dir (at least the content that you use)



  • thanks but i already copied the complied plugin folder, the folder /usr/local/Trolltech/QtEmbedded-4.8.4/plugin I found on my development PC to my device.


  • Lifetime Qt Champion

    Just to be sure: did you made a typo here with "plugin" ? Otherwise it's "plugins"



  • jep I'm sorry that's a typo, so for examle the libphonon_gstreamer.so is copied at:
    /usr/local/Trolltech/QtEmbedded-4.8.4-arm/plugins/phonon_backend


  • Lifetime Qt Champion

    Ok, then next step:
    set this
    @QT_DEBUG_PLUGINS=1@
    on your command line before starting your application, that should give you the plugin loading error



  • First of all thank you very much for your help SGaist, that's really great and very nice :)

    But I tried export QT_DEBUG_PLUGINS=1 befor starting my application, but nothing special happens (i also tried on my deveopment system, nothing, too)

    QT_DEBUG_PLUGINS=1

    ./phon -qws

    If I check that enviroment variable, it's set ...
    echo $QT_DEBUG_PLUGINS
    1


  • Lifetime Qt Champion

    Are you running a debug or release build of your application (Right now i'm not sure whether this could change the output when using QT_DEBUG_PLUGIN) ?



  • mh I had release build but i changed to debug (CONFIG += debug) but QT_DEBUG_PLUGINS dosen't work..


  • Lifetime Qt Champion

    Do you also have the debug lib from Qt on your target ?



  • I wan't in town yesterday so I couldn't test that yesterday - sorry for that

    I'm sorry but I can't find the debug lib...I crosscompild my Qt again and added the option - debug... but no debug lib was created- and also with the libs I compiled with the debug options, the QT_DEBUG_PLUGINS dosn't work

    BTW I also set the PluginPath with QT_PLUGIN_PATH=... but that wasn't successful neither.

    Also included: qDebug()<<QLibraryInfo::location(QLibraryInfo::PluginsPath);
    It shows the correct Path("/usr/local/Trolltech/QtEmbedded-4.8.4-arm/plugins"
    ), where the plugin is installed...


  • Lifetime Qt Champion

    Did you do a clean build ?



  • Yes I did...


  • Lifetime Qt Champion

    Just to be on the safe side, did you check the output of the configure script to see if it was a debug or release build ?



  • If i checked the right file ist says DEBUG=auto, however the libs I compiled with the debug options are pretty big so I think they are build during debug build


  • Lifetime Qt Champion

    so if you call

    @QT_DEBUG_PLUGINS=1 ./myApplication -qws@

    You don't have any output ?



  • mhh I compiled everthing again und copied all libs und plugins on USB.-now the application aborted.. but may thats because of the USB and not gstreamer??

    (process:673): GLib-GObject-WARNING **: cannot register existing type 'gchar'
    **
    GLib-GObject:ERROR:gvaluetypes.c:457:_g_value_types_init: assertion failed: (type == G_TYPE_CHAR)
    Aborted

    And thanks again for helping me :)


  • Lifetime Qt Champion

    It's getting strange...

    What do you mean by "because of the USB" ? What do you have exactly there ?



  • SGaist I follow this post and I have a trouble
    This is my first time working with phonon and gstreamer module actually Im triying play a simple music file.
    I use your args QT_DEBUG_PLUGINS=1 followed of my app and all it works my app is launching but no audio output. When I close the app an error is showed in the terminal

    Cannot connect to server socket err= No such file or directory
    Cannot connect to server request channel
    Jack server is not running or cannot be started


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Do you have the Jack audio server up and running ?



  • i've installed the Jack audio but a message error appears:
    needs connect to X server
    actually im working in ubuntu armhf 12.10 without desktop environment or X-server i don't know if there another way to use phonon without Jack Audio


Log in to reply
 

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