PDA

View Full Version : Force using the phone-xine-backend (Xine backends works but gstreamer is default)



davidonlaptop
6th August 2010, 08:31
I'm trying to play a simple wav file using the following code :



Phonon::MediaObject *music =
Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource("/usr/lib/openoffice/basis3.1/share/gallery/sounds/drama.wav"));
music->play();


and i'm getting this error :


(<unknown>:17501): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion `gst_uri_is_valid (uri)' failed


I got Amarok working with the xine backend, but NOT with gstreamer backend.

Unfortunatly, even if xine is default for Amarok, it appears that my application is trying to use GStreamer. How do I set the backend in the code?

davidonlaptop
6th August 2010, 11:24
I found a workaround :


sudo apt-get remove phonon-backend-gstreamer

Although now my app can play files on my computer, that is not a very elegant solution for distributing my app.

Anyone knows how Amarok does to prompt a phonon backend list dialog and set the default backend ?