title: Pausing a gstreamer thread made with tee
body: <p>I have a gstreamer pipeline that takes video from the webcam and splits it into two threads:<br>
  1) use appsink so I can programmatically edit the captured frames<br>
  2) saves the video to a file  </p>
  
  <p>The pipeline looks like this:</p>
  
  <pre><code>gst-launch-1.0 v4l2src device=/dev/video0 \
  ! tee name=t ! queue ! videoconvert ! videoscale ! appsink name=sink caps="video/x-raw,format=RGB,width=800,framerate=15/1" t. \
  ! queue ! video/x-raw,width=800,framerate=15/1 ! jpegenc ! avimux ! filesink location=/tmp/output.avi
  </code></pre>
  
  <p>I'm using this inside a C++ app.</p>
  
  <p>My problem is that in most of the time I don't need the two threads running simultaneously, but only one of them. And in rare cases - need both.<br>
  So I need some way to temporarily pause/stop either the appsink or the video saving - in order to save CPU.</p>
  
  <p>The way I do it now is to destroy the pipeline and recreate it again with only one thread when needed, but that seems quite ugly.</p>
  
  <p>I've been looking for a better solution, but no luck so far - is there any way to do that?</p>
  
  <p>Thanks in advance!</p>