[gst-devel] Linking/Unlinking elements at runtime

Itay Kirshenbaum ikirsh at gmail.com
Sun May 27 18:59:12 CEST 2007


Hi,

I've got the following pipeline in my application:

source bin -> tee -> sink bin

Where the source bin is essentially: v4l2src -> mpeg4_encoder
And the sink bin is: queue -> filesink (with or without a muxer in between)

The purpose of this app is to have a recorder, that upon receiving a
command, records a few seconds of video and stops.
This alone should be pretty simple, however there are a few constraints:

1. The main pipeline should always be playing (otherwise i'd just pause and
play the whole thing each time).
This is because the source bin can be connected to other sinks through the
tee.

2. The sink bin should always be linked to the tee.
This is because I'd like to be able to do the recording action from the
context of the recorder module (sink bin), and not from the context
of the main application.

My first idea was starting out with only a queue in the sink bin, and link
it to the tee.
When a 'record' command is given, create a filesink, link to the queue, and
set the sink bin to playing.
This partly works, but from time to time GStreamer can't complete the state
change for the sink bin.

Is there any proper way to do this, under the above constraints?

Thanks,
Itay.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070527/d321cb60/attachment.htm>


More information about the gstreamer-devel mailing list