title: Debugging Gstreamer pipeline with tee and a filesink in C
body: <p>There is an excellent example on how to construct a C program using GStreamer and its <code>tee</code> and <code>filesink</code> elements on <a href="https://gist.github.com/crearo/a49a8805857f1237c401be14ba6d3b03" rel="nofollow noreferrer">https://gist.github.com/crearo/a49a8805857f1237c401be14ba6d3b03</a>.
  (Another one can be found on <a href="https://gstreamer.freedesktop.org/documentation/tutorials/basic/multithreading-and-pad-availability.html?gi-language=c" rel="nofollow noreferrer">https://gstreamer.freedesktop.org/documentation/tutorials/basic/multithreading-and-pad-availability.html?gi-language=c</a>).</p>
  <p>The idea of the <code>tee</code> element in a <em>pipeline</em> is similar like the <code>tee</code> program in <em>Unix</em>: Like a T-shaped tube, it allows to add a bifurcation to a pipeline, which is in my case used to display a video stream to the screen (which works perfectly) and writing it at the same time to a file (which doesn't work - the file is created but stays empty, i.e. has a size of 0 bytes after closing the program).</p>
  <p>I deviated from the examples mentioned above by neither having a queue element for recording (because I also don't have one for displaying, which works) as well as neither having an encoder nor a muxer. Although this might be a problem for what gets written to the file in the end, I would expect that there <strong>is</strong> written something to the file at all.</p>
  <p>The program does compile. What additional diagnostics could I run in order to pin down the problem?</p>