<div dir="ltr">I'd say there's something else wrong there. You can certainly send a seek event to set the position whilst the pipeline is PLAYING, and I can't see why changing the speed should make any difference.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 16 February 2015 at 13:42, Nikos Chantziaras <span dir="ltr"><<a href="mailto:realnc@gmail.com" target="_blank">realnc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 13/02/15 23:17, Nikos Chantziaras wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm trying to send a seek event to a pipeline to make the video play at<br>
half speed with:<br>
<br>
   QGst::SeekEventPtr seekEv = QGst::SeekEvent::create(<br>
     0.5,<br>
     QGst::FormatTime,<br>
     QGst::SeekFlagSegment,<br>
     QGst::SeekTypeSet, 0,<br>
     QGst::SeekTypeEnd, 0);<br>
<br>
   pipeline->sendEvent(seekEv);<br>
   pipeline->setState(QGst::<u></u>StatePlaying);<br>
<br>
But it gets ignored. The video plays at 100% speed. In fact, my bus<br>
message handler doesn't even receive a single QGst::MessageSegmentDone<br>
message.<br>
</blockquote>
<br></span>
OK, figured it out. For anyone who comes across the same problem, it is crucial to:<br>
<br>
  a. Set the SeekFlagFlush flag on the event<br>
  b. Put the pipeline into the paused state before sending the event<br>
  c. Wait for the state change to complete before sending the event<br>
<br>
Although not crucial, using SeekTypeNone for the stop type and GST_CLOCK_TIME_NONE for the stop time seems to be a good idea.<br>
<br>
So:<span class=""><br>
<br>
  QGst::SeekEventPtr seekEv = QGst::SeekEvent::create(<br>
      0.5,<br>
      QGst::FormatTime,<br></span>
      QGst::SeekFlagFlush,<br>
      QGst::SeekTypeSet, 0,<br>
      QGst::SeekTypeNone, GST_CLOCK_TIME_NONE);<br>
<br>
  pipeline->setState(QGst::<u></u>StatePaused);<br>
  pipeline->getState(0, 0, GST_CLOCK_TIME_NONE); // wait for pause state<span class=""><br>
  pipeline->sendEvent(seekEv);<br>
  pipeline->setState(QGst::<u></u>StatePlaying);<br>
<br></span>
This worked correctly.<div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>devel</a><br>
</div></div></blockquote></div><br></div>