how to create a simple "on/off" element in the pipeline ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to create a simple "on/off" element in the pipeline ?

lisowicz
Following pipeline is equivalent to mine:
gst-launch filesrc location=foobar.mp3 ! decodebin ! tee name=a a. ! queue !
audioconvert ! audioresample ! autoaudiosink a. ! queue ! fakesink

Short summary: I have a mp3 player, which sends the data to tee element. Tee
element copies the data to two audio sinks. So instead of stereo sound, I
have 2x stereo sound.

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?