title: Add some OpenCV processing to a gstreamer video stream
body: <p>I'm trying to have OpenCV process a frame in the middle of a gstreamer pipe.</p>
  
  <p>I have one gstreamer pipe generating the stream, sending it to appsink for OpenCV code to receive:</p>
  
  <pre><code>v4l2src ! ffmpegcolorspace ! jpegenc ! appsink name=sink
  </code></pre>
  
  <p>And another pipe getting it from appsrc (to which OpenCV sends data) and outputting it on the screen:</p>
  
  <pre><code>appsrc name=src ! jpegdec ! xvimagesink
  </code></pre>
  
  <p>I open every frame with a pull-buffer request on sink and process it with OpenCV, then use push-buffer on src. I am doing all that in Python.</p>
  
  <p>For some reason, that does not seem to work (segmentation fault). </p>
  
  <p>But I'm not really trying to fix it; it's terribly inefficient anyway. I am just wondering whether there any better way to have OpenCV process the frame before it reaches an output sink? </p>