<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div>Hi Andoni,</div><div>thanks for the tip. In fact, the seek itself is running fine, once it is active. My issue is that the pipeline starts playing from 0 before the seek really occurs, thus displaying a few frames before it moves to expected position. I've tried to seek before setting the pipeline to <span class="Apple-style-span" style="font-family: arial; font-size: 13px; ">GST_STATE_PLAYING (put the pipe in GST_STATE_PAUSED, then seek, then set to GST_STATE_PLAYING) but it doesn't work. Is there a way to position the stream to a given seek pos before it actually starts to play?</span></div><div><font class="Apple-style-span" face="arial" size="3"><span class="Apple-style-span" style="font-size: 13px;">Al</span></font></div><div style="font-family:times new roman, new
york, times, serif;font-size:12pt"><br><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">De :</span></b> Andoni Morales <ylatuya@gmail.com><br><b><span style="font-weight: bold;">À :</span></b> Discussion of the development of GStreamer <gstreamer-devel@lists.sourceforge.net><br><b><span style="font-weight: bold;">Envoyé le :</span></b> Mercredi, 8 Avril 2009, 12h27mn 41s<br><b><span style="font-weight: bold;">Objet :</span></b> Re: [gst-devel] question on seek<br></font><br>2009/4/8 Albert Costa <<a ymailto="mailto:costa_albert@yahoo.fr" href="mailto:costa_albert@yahoo.fr">costa_albert@yahoo.fr</a>>:<br>> Hi All,<br>> I have a simple question: I have an application where I want to display only<br>> a subset of a video. My pipeline can be resumed to 'filesrc ! decodebin !<br>> ffmegcolorspace ! queue ! directdrawsink'. To
see only a part of the video,<br>> I use following :<br>> GstEvent* seek_event;<br>> seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,<br>> (GstSeekFlags) (GST_SEEK_FLAG_SEGMENT |<br>> GST_SEEK_FLAG_FLUSH),<br>> GST_SEEK_TYPE_SET, start_time,<br>> GST_SEEK_TYPE_SET, stop_time);<br>> gst_element_set_state(m_pipeline, GST_STATE_PLAYING);<br>> gst_element_get_state(m_pipeline, NULL, NULL,<br>> GST_CLOCK_TIME_NONE);<br>> gst_element_send_event(m_pipeline, seek_event);<br>> where start/stop_time are values for the start and end positions in my file.<br>> Everything works fine,
except for the fact that just before displaying the<br>> video at position start (and then playing up to stop position), I do see the<br>> first (0) frame of the video.<br>> Is there a way to avoid this and have the pipeline really starting from the<br>> position I want?<br><br>Maybe using this method is simpler:<br><br>gst_element_seek (m_pipeline, 1.0,<br> GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE,<br> GST_SEEK_TYPE_SET, start_time,<br> GST_SEEK_TYPE_SET, stop_time);<br><br>If you want accuracy in the seek, you should use the flag<br>GST_SEEK_FLAG_ACCURATE. The seek is slower but much more accurate.<br><br>Andoni<br><br>> Regards,<br>> Al<br>><br>> ------------------------------------------------------------------------------<br>> This SF.net email is sponsored by:<br>> High
Quality Requirements in a Collaborative Environment.<br>> Download a free trial of Rational Requirements Composer Now!<br>> <a href="http://p..sf.net/sfu/www-ibm-com" target="_blank">http://p.sf.net/sfu/www-ibm-com</a><br>> _______________________________________________<br>> gstreamer-devel mailing list<br>> <a ymailto="mailto:gstreamer-devel@lists.sourceforge.net" href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>><br>><br><br>------------------------------------------------------------------------------<br>This SF.net email is sponsored by:<br>High Quality Requirements in a Collaborative Environment.<br>Download a free trial of Rational Requirements Composer Now!<br><a href="http://p.sf.net/sfu/www-ibm-com"
target="_blank">http://p.sf.net/sfu/www-ibm-com</a><br>_______________________________________________<br>gstreamer-devel mailing list<br><a ymailto="mailto:gstreamer-devel@lists.sourceforge.net" href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br></div></div><div style="position:fixed"></div></div><br>
</body></html>