State changes to GST_STATE_NULL never return GST_STATE_CHANGE_ASYNC

Paddy pat.blanchon at gmail.com
Tue Feb 12 01:56:23 PST 2013


Hi,

I have a pipeline writing to files of fixed period that looks a bit like
    rtspsrc ---> h264depay ---> h264parse ---> matroskamux ---> filesink

I'm periodically changing the file by linking in a new "matroskamux --->
filesink" bin & removing the old one with
gst_element_set_state(GST_ELEMENT(bin), GST_STATE_NULL);
gst_bin_remove(GST_BIN(parent), GST_ELEMENT(bin));
called in a wrapper fn from g_idle_add()

however sometimes I get critical errors about only being able to remove
elements in the NULL state & that my bin is not in the NULL state.

As an experiment I changed to code to perform the gst_bin_remove() after I
received the messages that the matroskamux & filesink elements had changed
state to NULL - sometimes I'm getting these messages 40+ seconds after
gst_element_set_state() has returned. Stranger still is that I'm still
getting the messages that I cannot remove the element because it's not in
GST_STATE_NULL.

The frequency of these error messages is made worse the higher the data rate
- barely ever seen at 640x480 at 10fps to pretty much 100% at 1920x1080 at 30fps.

What am I doing wrong - any ideas as to how I can remove my bin cleanly ??

Also - was I wrong in interpreting "State changes to GST_STATE_READY or
GST_STATE_NULL never return GST_STATE_CHANGE_ASYNC. " as meaning that the
state transition is synchronous, or is this a bug.

Cheers,

Paddy




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/State-changes-to-GST-STATE-NULL-never-return-GST-STATE-CHANGE-ASYNC-tp4658480.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list