GNOME Bugzilla – Bug 332045
API: GstPipeline needs API to disable flushing of its bus when going from READY to NULL state
Last modified: 2006-03-09 16:53:49 UTC
We need some kind of API like gst_bus_set_auto_flushing (bus, FALSE); to disable an element's bus from flushing all messages when going READY => NULL. The flushing when going to NULL is a big pain for all applications that keep state and update their state via state-changed messages on the bus. For example, such an application can't just do gst_element_set_state (playbin, NULL); but needs to first go to READY, wait for that to finish, then parse all messages on the bus (to update state correctly) and then finally go to NULL.
sounds like a good idea. Care to make a patch?
Created attachment 60862 [details] [review] proposed addition Something like this? (Arguably, we could just as well only add API for GstPipeline instead, but IMHO adding it to GstBus is more natural/intuitive)
This is a feature of the pipeline, since it decides when to flush. Now it looks silly as the variable defining the behaviour of pipeline is kept in the GstBus object (which does not use it).
Created attachment 60982 [details] [review] second attempt Agreed. Chatter on IRC was always about gst_bus_*(), that's why I added it there. New patch adds 'auto-flush-bus' property to GstPipeline instead. Do we want setter and getter functions as well?
Committed, including getter and setter function and documentation: 2006-03-09 Tim-Philipp Müller <tim at centricular dot net> * docs/gst/gstreamer-sections.txt: * gst/gstpipeline.c: (gst_pipeline_class_init), (gst_pipeline_init), (gst_pipeline_set_property), (gst_pipeline_get_property), (gst_pipeline_change_state), (gst_pipeline_set_auto_flush_bus), (gst_pipeline_get_auto_flush_bus): * gst/gstpipeline.h: Add new API: gst_pipeline_set_auto_flush_bus() and gst_pipeline_get_auto_flush_bus() to disable automatic flushing of the pipeline's GstBus when going from READY to NULL state (#332045).