[gstreamer-bugs] [Bug 574160] collectpads does not reliably eos when last pad is removed

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Thu Mar 5 03:44:19 PST 2009


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=574160

  GStreamer | gstreamer (core) | Ver: git

Wim Taymans changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wim.taymans at gmail.com
 Attachment #130054|none                        |rejected
               Flag|                            |
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|HEAD                        |0.10.23




------- Comment #4 from Wim Taymans  2009-03-05 11:45 UTC -------
I don't think we should automatically EOS collectpads when all pads are removed
because it might be possible that you request a new pad later and simply
continue pushing data. We should not make this use case impossible.

There is a hidden feature in sprinkle.c that your other examples (sprinkle2.c
by accident, though..) failed to capture: when shutting down the source
element, it will push out an EOS event, which makes adder push EOS when needed.
I've updated the docs in the code to make this more clear.

sprinkle2.c fails to perform the state change of the source and the effect
correctly. State changes should always be done from sink to source. Failure to
do so might cause a deadlock. In this case it does not cause a deadlock but
since the source is shut down before the effect, the EOS event manages to reach
the adder sinkpad, making it EOS eventually. If you make it correct and change
the state of the effect before the source, sprinkle2 also fails to EOS.

sprinkle3 uses a bin that contains the effect and the source. In this case the
bin will do the correct state change order and the effect is the same as
sprinkle2.

The right solution in all cases is to always send EOS to the adder sinkpad
before releasing it.

I've commited fixed versions with added comments to git.

commit 44574b0ca64be7f28084f5a63cc3d198a7d357c2
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Thu Mar 5 12:43:02 2009 +0100

    examples: add some more sprinkle examples

    Add some more sprinle examples and add some more comments.
    See #574160.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=574160.




More information about the Gstreamer-bugs mailing list