<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
I am having trouble writing a C application to put video to screen and to file at the same time. I have a command line pipeline that works:<br>
<pre class="line-pre"><div class="line" id="file-command-line-pipeline-LC1">gst-launch-1.0 videotestsrc num-buffers=100 ! tee name=t ! queue ! videoconvert ! <br>xvimagesink sync=false t. ! queue ! videorate ! video/x-raw,framerate=25/1 ! <br>videoconvert ! avenc_mpeg2video bitrate=3000000 ! avimux ! <br>filesink location=test_file.avi async=0</div></pre>
but in code this does not work. I always end up with an empty file (0 bytes).<br>
<br>
I have reduce the code down and put it on github:<br>
<a href="https://gist.github.com/paulbarber/7d2e43d1e3365b2042aa" target="_blank">https://gist.github.com/paulbarber/7d2e43d1e3365b2042aa</a><br>
<br>
All the action is in play_camera() in play.c.<br>
<br>
I would be really grateful if anyone has any clue as to what is wrong.<br>
<br>
Cheers,<br>
Paul.<br>
</div>
</body>
</html>