QT - KDE raise device error using Phonon



  • My application need to play mp3. I'm not familiar with QT (learning from half year). I started from QT 5.0.2 which worked perfect except that it can't use oxygen on my KDE enviromnent. So due to this cosmetic problem (I will use this app too :P ) I tried to use QT 4.8. Theme is now ok but it uses Phonon library for audio output (QT5 is using something new). QT 4.8 also doesn't provide binaries for linux unlike QT 5.0.2, so I needed to compile it by my self (first time). After 3 hours of compiling I finally get my QT binaries. MediaPlayer examples run but when try to play music I get few errors about phonon backends, music doesn't play. I googled a lot, finally installed depended packages (like gstreamer, gstreamer-plugins-base etc) and recompiled QT with flags ./configure -glib -phonon -phonon-backend (I did make confclean if someone ask). After 3 hours of compiling (again) I finally see some phonon libs. Running MediaPlayer demo, at start I get KDE info in task manager:

    bq. The audio playback device doesn't work. Falling back to default

    and error in log output (but this time only one)

    bq. Music Player(29292)/phonon (KDE plugin): Can not create backend object from factory for "GStreamer" , "phonon_gstreamer" : "Could not find plugin 'GStreamer' for application 'Music Player'"

    But music is playing. Anyone can help me? What did I miss? I don't want to lose another 3 hours of compiling.


  • Lifetime Qt Champion

    Hi,

    Since you are using KDE, I suppose you are running linux. Why don't you install the Qt development libraries from your distribution ? They will already be compiled to use the Phonon installation of your system.


  • Lifetime Qt Champion

    Edit: removed, post got doubled



  • Yes, I finally did this and work fine now. But can I deploy my application with QT compiled for ubuntu? License agree with that? I want deploy my app for non-KDE linux too. I have sh script which export my own QT lib so user don't need install enything, but don't know if I can use QT libs from ubuntu.


  • Lifetime Qt Champion

    Most linux distribution I know includes Qt either optionally or installed by default. Depending on what distribution you are targeting, the best is to prepare i.e a deb package for Debian based distro, or rpm for Red Hat derivate etc... Making your package depend on Qt will make the package manager install them automagically.


Log in to reply
 

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