title: Gstreamer: Pausing/resuming video in RTP streams
body: <p>I'm constructing a gstreamer pipeline that receives two RTP streams from an networked source:</p>
  
  <ol>
  <li>ILBC Audio stream + corresponding RTCP stream</li>
  <li>H263 Video stream + corresponding RTCP stream</li>
  </ol>
  
  <p>Everything is put into one gstreamer pipeline so it will use the RTCP from both streams to synchronize audio/video. So far I've come up with this (using gst-launch for prototyping):</p>
  
  <pre><code>gst-launch -vvv  gstrtpbin name=rtpbin
    udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-2000" port=40000 ! rtpbin.recv_rtp_sink_0
    rtpbin. ! rtph263pdepay ! ffdec_h263 ! xvimagesink
    udpsrc port=40001 ! rtpbin.recv_rtcp_sink_0
    rtpbin.send_rtcp_src_0 ! udpsink port=40002 sync=false async=false
  
    udpsrc caps="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMU,encoding-params=(string)1,octet-align=(string)1" port=60000 rtpbin.recv_rtp_sink_1
    rtpbin. ! rtppcmudepay ! autoaudiosink
    udpsrc port=60001 ! rtpbin.recv_rtcp_sink_1 
    rtpbin.send_rtcp_src_1 ! udpsink port=60002 sync=false async=false
  </code></pre>
  
  <p>This pipeline works well if the networked source starts out with sending both video and audio. If the videostream is paused later on, gstreamer will still playback audio and even will start playing back the video when the networked source resumes the video stream.</p>
  
  <p>My problem is however that if the networked source starts out with only an audio stream (video might be added later on), the pipeline seems to pause/freeze until the video stream starts as well. </p>
  
  <p>Since video is optional (and can be added/removed at will by the user) in my application, is there any way I can hook up for instance an 'videotestsrc' that will provide some kind of fallback video data to keep the pipeline running when there is no networked video data? </p>
  
  <p>I've tried experimenting with 'videotestsrc' and a thing called 'videomixer' but I think that mixer still requires both streams to be alive. Any feedback is greatly appreciated!</p>