After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
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)
Decodebin is not reusable within a single pipeline (as in you can't use a dec...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-18 14:27 UTC by Milosz Derezynski
Modified: 2006-05-15 17:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase that demonstrates the described problem (please see comment #2 on usage of this, disregard comment #1 please, full of typos :P) (2.56 KB, text/plain)
2006-02-18 14:32 UTC, Milosz Derezynski
  Details
First draft of a reusable decodebin (7.04 KB, patch)
2006-02-20 14:41 UTC, Julien MOUTTE
none Details | Review
Testcase #2 (2.74 KB, text/x-python)
2006-04-28 22:25 UTC, Milosz Derezynski
  Details
And here is the patch to make decodebin reusable by just setting it to READY. (1.06 KB, patch)
2006-05-13 16:53 UTC, Julien MOUTTE
none Details | Review

Description Milosz Derezynski 2006-02-18 14:27:00 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):
  • File "./decoder-test.py", line 25 in on_decoder_new_pad
    pad.link (sink.get_pad ('sink'))
gst.LinkError: <enum GST_PAD_LINK_WAS_LINKED of type GstPadLinkReturn>
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).
Comment 1 Milosz Derezynski 2006-02-18 14:28:24 UTC
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

Comment 2 Milosz Derezynski 2006-02-18 14:30:34 UTC
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.
Comment 3 Milosz Derezynski 2006-02-18 14:32:02 UTC
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)
Comment 4 Milosz Derezynski 2006-02-18 14:33:41 UTC
"[...] to point to a PATH containing [...]" of course. erh.
Comment 5 Julien MOUTTE 2006-02-20 14:41:20 UTC
Created attachment 59774 [details] [review]
First draft of a reusable decodebin
Comment 6 Edward Hervey 2006-02-22 09:58:56 UTC
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)
  	 
Comment 7 Milosz Derezynski 2006-02-22 10:02:34 UTC
@ 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.
Comment 8 Milosz Derezynski 2006-04-28 22:25:21 UTC
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)
Comment 9 Milosz Derezynski 2006-04-28 22:27:55 UTC
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).
Comment 10 Milosz Derezynski 2006-04-28 22:29:59 UTC
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 :)
Comment 11 Julien MOUTTE 2006-05-13 16:53:10 UTC
Created attachment 65392 [details] [review]
And here is the patch to make decodebin reusable by just setting it to READY.
Comment 12 Milosz Derezynski 2006-05-13 19:04:09 UTC
Works very nice, thank you Julien
Comment 13 Julien MOUTTE 2006-05-15 17:02:05 UTC
Commited to cvs.