<div>Hi Michael,</div>
<div>&nbsp;</div>
<div>After using your idea, the result has become even more unpredictable than before for even the MPEG-2 movie.</div>
<div>&nbsp;</div>
<div>My code now is:</div>
<div>&nbsp;</div>
<div>gint64 cur;</div>
<div>GstFormat fmt;</div>
<div>&nbsp;</div>
<div>gst_element_set_state(pipeline, GST_STATE_PAUSED);</div>
<div>gst_element_query_position(pipeline, &amp;fmt, &amp;cur);</div>
<div>&nbsp;</div>
<div>cur = cur + GST_SECOND;&nbsp;&nbsp;&nbsp; /*****Note this line****/</div>
<div>event = gst_event_new_seek(1.0, GST_FORMAT_TIME,<br>&nbsp;GstSeekFlags(GST_SEEK_FLAG_FLUSH | GST_SEK_FLAG_ACCURATE),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GST_SEEK_TYPE_SET,<br>cur, GST_SEEK_TYPE_NONE, 0);<br>gst_element_send_event(pipeline, event);
</div>
<div>gst_element_set_state(pipeline, GST_STATE_PLAYING);</div>
<div><br>I want to seek forward by 1 second, but irrespective of what I add to cur, (I tried GST_SECOND, GST_MSECOND, 1, 1000, 1000000, 1000000000), I cannot get the desired behaviour. The advancement is about 10 mins for the first time I try, and the next time I reach the end of the movie (which is over 2 hours long).
</div>
<div>&nbsp;</div>
<div>Am I doing anything wrong?<br>&nbsp;</div>
<div><span class="gmail_quote">On 10/19/06, <b class="gmail_sendername">Michael Smith</b> &lt;<a href="mailto:msmith@fluendo.com">msmith@fluendo.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">...<br>GST_SEEK_TYPE_CUR does not seek from the current position. You want to<br>use GST_SEEK_TYPE_SET, and you almost certainly want to use
<br>GST_SEEK_TYPE_NONE for the second (end) time.<br><br>I wouldn't be at all suprised if many plugins implement<br>GST_SEEK_TYPE_CUR incorrectly; there aren't many things that use it.<br><br>You probably want to issue a position query (to get the current
<br>position), then seek to a specific location by adding/subtracting from<br>that.<br><br>Mike<br><br>&gt;<br><br></blockquote></div><br>