GNOME Bugzilla – Bug 637056
playbin2/playsink: doesn't propagate errors properly
Last modified: 2013-08-16 11:43:54 UTC
$ gst-launch-0.10 playbin2 uri=file:///usr/share/sounds/email.wav audio-sink='alsasink device=foobar' ERROR: from element /GstPlayBin2:playbin20/GstPlaySink:playsink0: Configured audiosink bin0 is not working. Additional debug info: gstplaysink.c(1869): gen_audio_chain (): /GstPlayBin2:playbin20/GstPlaySink:playsink0 vs. GST_ERROR_SYSTEM gstelement.c:1828:gst_element_message_full:<alsasink0> posting message: Could not open audio device for playback. ----- or ---- GST_ERROR_SYSTEM gstelement.c:1828:gst_element_message_full:<alsasink0> posting message: Could not open audio device for playback. Device is being used by another application.
That probably happens because the audio sink opens the device when going to READY but the audio sink is only added to playsink after it successfully changed the state to READY. Maybe we could set a custom bus for the sinks to provide better error messages
*** Bug 586430 has been marked as a duplicate of this bug. ***
That works much better now as the errors of explicitly set sinks are now propagated to the application: $ gst-launch-1.0 playbin uri=file://(pwd)/test1.flac audio-sink="alsasink device=foobar" Setting pipeline to PAUSED ... 0:00:00.063848908 7445 0x11b8520 ERROR playbin gstplaybin2.c:5081:activate_group:<playbin0> failed to activate sinks ERROR: Pipeline doesn't want to pause. ERROR: from element /GstBin:bin0/GstAlsaSink:alsasink0: Could not open audio device for playback. Additional debug info: gstalsasink.c(851): gst_alsasink_open (): /GstBin:bin0/GstAlsaSink:alsasink0: Playback open error on device 'foobar': No such file or directory Setting pipeline to NULL ... Freeing pipeline ...