On 5/17/07, <b class="gmail_sendername">Jan Schmidt</b> &lt;<a href="mailto:thaytan@noraisin.net">thaytan@noraisin.net</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Edward Hervey wrote:<br>&gt; Hi,<br>&gt;<br>&gt;<br>&gt; If you only want to change the rate without changing the seek<br>&gt; positions, use GST_SEEK_TYPE_NONE/GST_CLOCK_TIME_NONE for the start<br>&gt; position also.<br>
<br>Actually, this will generally cause some strangeness in the seeking,<br>because the fast-forward will begin from the position that the SOURCE of<br>the pipeline has reached. Due to buffering after the decoders, this is
<br>not the position that the user is seeing on the screen, so their<br>trick-mode operation will commence with a jump in the position.<br><br>What you want to do is query the current position of the playback, and<br>use that with GST_SEEK_TYPE_SET to begin the trickmode from the exact
<br>position you want.<br><br>Also bear in mind that almost no decoders and demuxers currently support<br>backwards playback, so rate &lt; 0 won&#39;t work in general. Fast forward and<br>forward slow-motion should always succeed, however.
<br><br>Regards,<br>Jan.<br></blockquote></div>Hi, Thanks a lot to you all for your valueable suggestion. It is working fine now <br>using GST_SEEK_TYPE_SET and position as suggested by Jan.<br>I have one more issue during fast-farward of video playback of .divx file format.
<br> When I called gst_element_seek() function for seeking with this .divx file format file then it is failing. <br>.divx file property is as follows (output of command &#39;$file ocean.divx&#39;):<br>&quot;ocean.divx: RIFF (little-endian) data, AVI, 704 x 396, 
25.00 fps, video: DivX 5, audio: MPEG-1 Layer 3 (mono, 48000 Hz)&quot;<br>I am using the following piece of code for seeking:<br>-------------<br>&nbsp;GstFormat fmt = GST_FORMAT_TIME;<br>&nbsp;gint64 pos;<br>&nbsp;gst_element_query_position (pipeline, &amp;fmt, &amp;pos);
<br>&nbsp;gst_element_seek (pipeline, 2.0, GST_FORMAT_TIME,<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; GST_SEEK_FLAG_FLUSH,<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; GST_SEEK_TYPE_SET, pos,<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; GST_SEEK_TYPE_NONE,
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GST_CLOCK_TIME_NONE);<br>-------------------<br>Thanks in advance for any suggestion on this problem.<br>Regards,<br>Sanjay<br>