pipeline doesn't send send GST_MESSAGE_STATE_CHANGED when changing to NULL

Sebastian Dröge sebastian at centricular.com
Tue Feb 23 22:13:53 UTC 2016


On Di, 2016-02-23 at 12:37 -0800, gyunaev wrote:
> > You shouldn't get READY->NULL state change messages, at least not
> > from the pipeline itself.
> 
> But waiting for the state change to NULL for elements should be fine,
> right?

Sure, but how do you want to wait?

> > How to solve this properly depends on the design of your
> > application.
> > You probably also don't want to use gst_bus_timed_pop_filtered()
> > but
> > integrate the bus with some kind of main/event loop. 
> 
> I'm using Qt, so I'm not confident starting glib event loop as I do not know
> what the hidden issues could be (and none of the Qt apps I've seen starts
> it).

See this example for how to integrate GstBus into the Qt event loop:
https://github.com/sdroege/gst-snippets/blob/master/qt5-eventloop/gst-qt-example.cc

> I considered an APPLICATION message, but if I can use the already handled
> messages, this is better.
> 
> So probably the question now should be, are there any negative consequences
> if I consider sink state change to NULL as pipeline objects being destroyed?

Not really if you mean that you'll just always destroy the pipeline
objects together with setting them to NULL state.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160224/163741c8/attachment-0001.sig>


More information about the gstreamer-devel mailing list