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 332045 - API: GstPipeline needs API to disable flushing of its bus when going from READY to NULL state
API: GstPipeline needs API to disable flushing of its bus when going from RE...
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2006-02-21 15:18 UTC by Tim-Philipp Müller
Modified: 2006-03-09 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---

proposed addition (3.79 KB, patch)
2006-03-07 19:55 UTC, Tim-Philipp Müller
none Details | Review
second attempt (4.01 KB, patch)
2006-03-09 15:41 UTC, Tim-Philipp Müller
committed Details | Review

Description Tim-Philipp Müller 2006-02-21 15:18:26 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.
Comment 1 Wim Taymans 2006-03-07 15:02:57 UTC
sounds like a good idea. Care to make a patch?
Comment 2 Tim-Philipp Müller 2006-03-07 19:55:25 UTC
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)
Comment 3 Wim Taymans 2006-03-09 14:28:14 UTC
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).  
Comment 4 Tim-Philipp Müller 2006-03-09 15:41:13 UTC
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?
Comment 5 Tim-Philipp Müller 2006-03-09 16:53:49 UTC
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/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).