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">t.i.m@zen.co.uk</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;">
Riccardo Corona &lt;<a href="mailto:coronariccardo@gmail.com">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></div><br><br clear="all"><br>-- <br>Riccardo Corona