[gst-devel] why/when are state changes needed in dynamically modified pipelines?
Andy Wingo
wingo at pobox.com
Thu Sep 13 00:35:58 CEST 2007
Hi,
On Wed 12 Sep 2007 15:47, "Daniel Lenski" <dlenski at gmail.com> writes:
> When and why are state changes needed in dynamic pipeline creation?
You want points at which you know what the status of dataflow is.
In READY you know that no data is flowing; you can always link things
then.
For some pipelines, however, all of the state is not ready in READY, as
with decodebin. However you know that within a pad-added signal that
the signal is coming from the streaming thread, so you know what the
state of dataflow is (blocked in the callback for the signal).
You can know what the dataflow status is in PLAYING if you block pads,
either synchronously or asynchronously and wait for the callback. In
that case you can link/unlink in PLAYING.
Linking/unlinking without blocking, in PLAYING, is racy, and you
shouldn't do it; it might work sometimes, or the pipeline might error
out. It should not crash GStreamer, however.
HTH,
Andy.
--
http://wingolog.org/
More information about the gstreamer-devel
mailing list