On 5/17/07, <b class="gmail_sendername">Jan Schmidt</b> <<a href="mailto:thaytan@noraisin.net">thaytan@noraisin.net</a>> 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>> Hi,<br>><br>><br>> If you only want to change the rate without changing the seek<br>> positions, use GST_SEEK_TYPE_NONE/GST_CLOCK_TIME_NONE for the start<br>> 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 < 0 won'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 '$file ocean.divx'):<br>"ocean.divx: RIFF (little-endian) data, AVI, 704 x 396,
25.00 fps, video: DivX 5, audio: MPEG-1 Layer 3 (mono, 48000 Hz)"<br>I am using the following piece of code for seeking:<br>-------------<br> GstFormat fmt = GST_FORMAT_TIME;<br> gint64 pos;<br> gst_element_query_position (pipeline, &fmt, &pos);
<br> gst_element_seek (pipeline, 2.0, GST_FORMAT_TIME,<br> GST_SEEK_FLAG_FLUSH,<br> GST_SEEK_TYPE_SET, pos,<br> GST_SEEK_TYPE_NONE,
<br> GST_CLOCK_TIME_NONE);<br>-------------------<br>Thanks in advance for any suggestion on this problem.<br>Regards,<br>Sanjay<br>