Reduce the scope of set_state?
Adrian Pardini
listas at tangopardo.com.ar
Wed Nov 6 07:56:40 PST 2013
On 6 November 2013 12:31, Lautaro Woites <lauchapc87 at gmail.com> wrote:
> I've seen the logs and the state changes are propagated to all the elements
> in the pipeline.
>
> This is a problem for me because sometimes I've had a filesrc/decoder on
> NULL state and
> I dont want to set it to PLAYING state when I've changed the state of
> another filesrc/decoder.
> (This happens for example when I want to change two inputs at the same time)
>
> I've tried using a bin with the filesrc and decoder, but the state
> propagates the same way.
>
> How can I limit the scope of a state change?
Hi Lautaro,
normally you would block the pads, unlink the element and then put it
on another pipeline (or just remove it from the main until it's needed
again) so it is not affected by the state changes on the main pipeline
of your program. Something like what is shown here:
http://groakat.wordpress.com/2012/12/05/gstreamer-stream-h264-webcam-data-to-series-of-files/
(but that use case is a bit different). Keep in mind that some
elements don't really like to be reused so perhaps removing and adding
a fresh one is the way to go. Let me know if you need a hand.
Best regards.
More information about the gstreamer-devel
mailing list