[gst-devel] how to create a simple "on/off" element in the pipeline ?
t.i.m at zen.co.uk
Tue Oct 19 17:32:33 CEST 2010
On Tue, 2010-10-19 at 17:11 +0200, Wiktor Lisowicz wrote:
> I would like to ocasionally switch off/on data flow to one of the two
> audiosinks. This should be doable independent of the pipeline state
> (could be PAUSED, READY, PLAYING - does not matter).
> Which existing element could I add between <queue> and <audio sink>,
> to be able to turn on / turn off data flow to audiosink?? Is there an
> element like Identity
> (http://www.gstreamer.net/data/doc/gstreamer/0.10.3/gstreamer-plugins/html/gstreamer-plugins-identity.html), but with additional feature of stopping the data flow?
You could use identity drop-probability=1.0, or the 'valve' element from
gst-plugins-bad (to be moved to core, -base or good soon hopefully). You
would probably also want to set the "async" property of the actual
audiosink element to false then.
More information about the gstreamer-devel