title: Gstreamer - Convert command line gst-launch to C code
body: <p>I have been making a few experiments with GStreamer by using the gst-launch utility. However, ultimately, the aim is to implement this same functionality on my own application using GStreamer libraries.</p>
  
  <p>The problem is that it's ultimately difficult (at least for someone that is not used to the GStreamer API) to "port" what I test on the command line to C/C++ code.</p>
  
  <p>An example of a command that I may need to port is:</p>
  
  <pre><code>gst-launch filesrc location="CLIP8.mp4" ! decodebin2 ! jpegenc ! multifilesink location="test%d.jpg"
  </code></pre>
  
  <p>What's the most "straight forward" way/approach to take such command and write it in C on my own app.</p>
  
  <p>Also, as a side question, how could I replace the multifilesink with the possibility of doing this work on memory (I'm using OpenCV to perform a few calculation on a given image that should be extracted from the video). Is it possible to decode directly to memory and use it right away without first saving to the filesystem? It could (and should) be sequential, I mean that would only move on to the next frame after I'm done with processing the current one so that I wouldn't have to keep thousands of frames in memory.</p>
  
  <p>What do you say?</p>