mmm, your tips works well but there&#39;s something that I don&#39;t understand: the gst_util_uint64_scale_int could be in this way :<br><br>ts = gst_util_uint64_scale_int (frame_num * GST_SECOND, FPS_NUM,&nbsp; FPS_DEN);<br><br>
and not:<br><br>ts = gst_util_uint64_scale_int (frame_num * GST_SECOND, FPS_DEN,&nbsp; FPS_NUM);<br><br>But if I use the first form the gst-app doesn&#39;t works (the image are freeze).<br>Someone can explain why?<br><br><div>
<span class="gmail_quote">2007/6/15, Riccardo Corona &lt;<a href="mailto:coronariccardo@gmail.com">coronariccardo@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
YES!It works!Now the example about fakesrc in the manual could be change with a new one that not lead the cpu to 100% and that give a fps choice.<br>Moreover it seems to works also with ffdec_mpeg for my problem but it&#39;s too early to scream like a child...
<br>Anyway, thank you!<br><br><br><div><span class="gmail_quote">2007/6/15, Tim Muller &lt;<a href="mailto:t.i.m@zen.co.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">t.i.m@zen.co.uk</a>&gt;:</span>
<div><span class="e" id="q_1132ee7119121e8c_1"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Riccardo Corona &lt;<a href="mailto:coronariccardo@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">coronariccardo@gmail.com</a>&gt; wrote :<br><br>&gt; How can I set the duration on the buffer?
<br><br>For testing purposes, try something like this for timestamps and durations (and get rid of the GstClock/currenttime stuff):
<br><br>/* framerate (assumed to be fixed) */<br>#define FPS_NUM 25<br>#define FPS_DEN 1<br><br>static guint frame_num = 0;<br><br>GstClockTime ts, next_ts;<br><br>ts = gst_util_uint64_scale_int (frame_num * GST_SECOND, FPS_DEN, FPS_NUM);
<br>next_ts = gst_util_uint64_scale_int ((frame_num + 1) * GST_SECOND, FPS_DEN, FPS_NUM);<br><br>GST_BUFFER_TIMESTAMP (buf) = ts;<br>GST_BUFFER_DURATION (buf) = next_ts - ts;<br><br>++frame_num;<br><br>This assumes a fixed framerate.
<br><br> Cheers<br>&nbsp;&nbsp;-Tim<br><br><br><br><br><br></blockquote></span></div></div><br><br clear="all"><br>-- <br><span class="sg">Riccardo Corona
</span></blockquote></div><br><br clear="all"><br>-- <br>Riccardo Corona