<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi All,
<div><br>
</div>
<div>Just had a question about how to use the queue2 in ring-buffer mode to support time shifting during playback of an h264 encoded mpegts stream. (Haven't found any thing on google or the mailing list that matches exactly what I am trying to achieve). </div>
<div><br>
</div>
<div>My pipeline is as follows:</div>
<div><br>
</div>
<div>udpsrc address=xxx.xxx.xxx.xxx port=xxxx ! tsdemux ! queue2 ring-buffer-max-size=10240000 ! h264parse ! capsfilter ! video/x-h264,stream-format=byte-stream ! avdec_h264 ! videoconvert ! autovideosink</div>
<div><br>
</div>
<div>The pipeline itself seems to be working, if I specify temp-template and temp-remove false I can see a file being written to up to the max-size I have specified. But I wasn't sure if I have the queue2 element at the right spot in the pipeline for it to
 keep all the information that is needed to allow seeking.</div>
<div><br>
</div>
<div>My goal is to be able to store the last 5-10 seconds of a stream and then seek to the beginning of that point and allow the user to play back from there. Unfortunately with the above if I try to seek nothing seems to change. If I query the pipeline for
 duration it always returns 00:00:00. I thought that the queue2 element with the ring-buffer property would allow me to do that.</div>
<div><br>
</div>
<div>Is the Queue2 element the right one to do what I am trying to do? If so any thoughts on what I might be doing wrong?</div>
<div><br>
</div>
<div>Otherwise I was thinking maybe I could somehow use the downloadbuffer element and keep overwriting the file for every 5-10 seconds and when user wants to timeshift it just loads the downloaded file, but that would be less ideal.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Piyush</div>
<div><br>
</div>
<div><br>
</div>
</div>
</body>
</html>