[gst-devel] Sequence of calling statechanges of elements in a pipeline

Michael Smith msmith at xiph.org
Fri Jul 31 17:08:59 CEST 2009


On Fri, Jul 31, 2009 at 7:25 AM, <M.Purushotham at nokia.com> wrote:
> Hi,
>
> I have a pipeline as gst_bin_add_many (GST_BIN (bin), source, decoder, sink,
> NULL);, when I call gst_element_set_state (bin, GST_STATE_PLAYING); then
> state change sequence is
>
> gst_element_set_state (sink, GST_STATE_READY);
> gst_element_set_state (decoder, GST_STATE_READY);
> gst_element_set_state (source, GST_STATE_READY);
>
> gst_element_set_state (sink, GST_STATE_PAUSED);
> gst_element_set_state (decoder, GST_STATE_PAUSED);
> gst_element_set_state (source, GST_STATE_PAUSED );
>
> gst_element_set_state (sink, GST_STATE_PLAYING);
> gst_element_set_state (decoder, GST_STATE_PLAYING);
> gst_element_set_state (source, GST_STATE_PLAYING);
>
> In my pipeline source is the first element, sink is the last element but
> state change calling sequence is in reverse order, Anybody knows why this is
> happening?

That's how gstreamer state changes work - it's correct behaviour. The
bin iterates from sources to sinks and changes states of contained
elements in that iteration order.

Mike




More information about the gstreamer-devel mailing list