GNOME Bugzilla – Bug 308193
switch plugin inside a bin doesn't make the bin go EOS if itself goes to EOS
Last modified: 2005-07-02 10:47:52 UTC
if a switch element inside a bin goes to EOS, the bin containing the switch element still thinks there's room for iteration. omitting the switch element will make the bin stop appropriately.
Created attachment 47957 [details] sample code demonstrating the problem see the sample code demonstrating the problem. it will set the switch element inside the bin to EOS after 2 seconds of playing - but the bin itself will not stop. removing the switch element from the chain, and setting say the decoder element to EOS will make the bin stop propery. to see this effect, #undef HAVE_SWITCH in the source file...
Ah, right. That's not what gst_element_set_eos() is supposed to be used for. I use managers for this purpose, which works better. See http://gstreamer.freedesktop.org/data/doc/gstreamer/stable/pwg/html/chapter-other-manager.html for a short description of the problem, and sample code is available on http://cvs.gnome.org/viewcvs/gnome-media/grecord/src/gst/ and http://cvs.gnome.org/viewcvs/gnome-media/grecord/src/gst/ (assistant.[ch] and manager.[ch] only). Applications are not supposed to call gst_element_set_eos() on elements, this is a function that only elements may call on themselves. I udnerstands that the API docs do not reflect this, so this may need to be cleared up (possibly by separating the docs in three sections: "anyone ...", "only apps ..." and "only elements may use this function").
I see. I wanted to create a manager myself, but the sample code is missing from the documentation, so I couldn't. I'll look into the sample of grecord above. as for documenting which call is legal by whom - basically we're talking about function accessibility (close to private / protected / package / public). it would be nice to clear this issue up. also see the other bug, http://bugzilla.gnome.org/show_bug.cgi?id=308619, where a seemingly correct, public API call can break an element. that's way way bad...