Zombie bins

Paddy pat.blanchon at gmail.com
Mon Feb 18 06:01:07 PST 2013


Hi,

I have some most interesting behaviour ...

Using gstreamer0.10 - I have many pipelines that look like:

  rtspsrc --> h264depay --> h264parse --> q --> matroskamux --> filesink

where I'm periodically changing the file location by blocking the queue,
unlinking the mux & sending an EOS down it, then linking a new mux & sink
then unblocking. The mux & filesink are in their own bin for ease of
handling.

When the EOS is received in the old bins message handler I delete the bin
by:
1) gst_element_set_state(GST_ELEMENT(bin), GST_STATE_NULL) from a function
invoked thru' g_idle_add()
2) I wait for the bin to get to the NULL state. I do this as (surprisingly
to me) the state transition from PLAYING to NULL is asynchronous - I have
seen it happen many seconds later.
3) then I call gst_bin_remove(parent, bin), again from a function invoked
thru' g_idle_add() & I print out a message saying it's deleted after
gst_bin_remove() has returned.

Now this is where the unexpected behaviour happens - some time later the
message handler for the deleted bin is triggered again & tells me that the
bin has moved from the NULL to the READY state, AFAIK I'm not doing anything
to stimulate this. It's a problem as the filesink opens the file & seeks to
0 (emptying the file) during this state transition. After this no more
messages are received from the zombie bin.

This happens about 10% of the time.

Anyone got any ideas ??

Cheers

Paddy




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Zombie-bins-tp4658588.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list