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

Jan Schmidt thaytan at noraisin.net
Tue Aug 4 11:28:40 CEST 2009


On Fri, 2009-07-31 at 16:25 +0200, 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_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?

Sink elements have to be ready to receive data before it can start
flowing - so in upward state changes, they have to change state before
the sources that produce the data.

The opposite is true when shutting down - data has to stop flowing
before the sinks are shut down.

J.

-- 
Jan Schmidt <thaytan at noraisin.net>





More information about the gstreamer-devel mailing list