GNOME Bugzilla – Bug 331678
Decodebin is not reusable within a single pipeline (as in you can't use a decodebin-based pipeline to play several songs subsequently)
Last modified: 2006-05-15 17:02:05 UTC
Here's the debug output from the python testcase attached to the bug report: [mderezynski@core ~]$ ./decoder-test.py INFO (0x933b728 - 0:00:00.776574000) python(26422) decoder-test.p y(39):set_input_file: Changing track to /music/Genaside II/New Life IV The Hunte d/track01.cdda.ogg INFO (0x933b728 - 0:00:00.795239000) python(26422) decoder-test.p y(75):select_next_track: Time taken: 1140270748.778443 DEBUG (0x94ba928 - 0:00:00.835542000) python(26422) decoder-test.p y(24):on_decoder_new_pad: Pad added DEBUG (0x933b728 - 0:06:56.863493000) python(26422) decoder-test.p y(79):bus_watch: EOS received on bus watch DEBUG (0x933b728 - 0:06:56.873241000) python(26422) decoder-test.p y(34):check_file_end: Event probe received EOS INFO (0x933b728 - 0:06:56.874935000) python(26422) decoder-test.p y(39):set_input_file: Changing track to /music/Genaside II/New Life IV The Hunte d/track02.cdda.ogg DEBUG (0x954efc0 - 0:06:56.892788000) python(26422) decoder-test.p y(24):on_decoder_new_pad: Pad added Traceback (most recent call last):
+ Trace 66296
pad.link (sink.get_pad ('sink'))
INFO (0x933b728 - 0:06:56.895520000) python(26422) decoder-test.p y(75):select_next_track: Time taken: 0.022255 Traceback (most recent call last): File "./decoder-test.py", line 103, in ? main (sys.argv) File "./decoder-test.py", line 100, in main main_loop.run () KeyboardInterrupt Think that says everything given the testcase code for gst developers (not sure what else i'd have to explain anyway).
How to use the testcase app: Open it in some editorm, and at the top change the path to some path containing music; the string MUST ENED IN A SLASH ("/"), i.e. /music/something/, not /music/something
How to use the testcase app: Open it in some editor, and at the top change the variable VOICE_TRACK_PATH (nvm the variable name, it comes from somewhere else) to point to a containing music files; the string MUST END IN A SLASH ("/"), i.e. /music/something/, not /music/something Also make sure you change the glob in the line below from ogg to mp3 or whatever other kind of files reside in that directory.
Created attachment 59651 [details] Testcase that demonstrates the described problem (please see comment #2 on usage of this, disregard comment #1 please, full of typos :P)
"[...] to point to a PATH containing [...]" of course. erh.
Created attachment 59774 [details] [review] First draft of a reusable decodebin
Julien fixed this, but forgot to close the bug... 2006-02-20 Julien MOUTTE <julien@moutte.net> * gst/playback/gstdecodebin.c: (get_our_ghost_pad), (remove_element_chain), (cleanup_decodebin), (gst_decode_bin_change_state): Make decodebin reusable by fixing remove_element_chain first and then introduce a cleaner in state change to ->NULL. (Closes #331678)
@ Julien: All issues seem to be fixed now, if you don't have to do anything more code-wise wrg to this problem feel free to close this bug.
Created attachment 64492 [details] Testcase #2 Slightly modified testcase, please use with the 2 files you can find at: http://futurepast.free.fr/gst-test/ (but it should work (or, well, NOT work) with any mp3/ogg file when played in the order ogg, then mp3 file)
Playing first an ogg, then an mp3, results in the following error (here in python, but same thing happens using GST with C): [mderezynski@core ~]$ ./gstpy.py error Could not demultiplex stream.: gstoggdemux.c(2599): gst_ogg_demux_loop (): /pipeline/input/decoder/oggdemux0: could not read chains error GStreamer encountered a general stream error.: gstoggdemux.c(2611): gst_ogg_demux_loop (): /pipeline/input/decoder/oggdemux0: stream stopped, reason error It first plays the ogg, and when it should play the mp3, it errors with the above. I don't know if this is an ogg, or a vorbis issue, but the error comes from oggdemux, and in any case i believe this is (still) a decodebin issue anyway, hence i am reopening this bug. Please try with the 2 files you can find at: http://futurepast.free.fr/gst-test/ or some other mp3/ogg files (please adapt the source code in this case), but make sure you play an ogg _FIRST_, and _THEN_ an mp3 file (the error doesn't happen if the sequence is the other way around).
Erm just in case this sort of went under, the testcase for the 2 files is here: http://bugzilla.gnome.org/attachment.cgi?id=64492&action=view (stated in Comment #8 as well, but i'm just trying to avoid the unneccessary :)
Created attachment 65392 [details] [review] And here is the patch to make decodebin reusable by just setting it to READY.
Works very nice, thank you Julien
Commited to cvs.