What video sink are you using ? It does not appear in your code sample.<br><br>You should not have to set the pipeline to PAUSED state after you issued the seek, but that can depend on the exact use case of your application though.<br>
<br>Best regards,<br><br clear="all">Julien Moutte,<br>FLUENDO S.A.<br>
<br><br><div class="gmail_quote">On Tue, Dec 22, 2009 at 10:51 AM, wl2776 <span dir="ltr">&lt;<a href="mailto:wl2776@gmail.com">wl2776@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi all.<br>
My problem is that the playbin doesn&#39;t redraw video frames, when I try to<br>
seek in paused state.<br>
I tried both playbin and playbin2 with the same result.<br>
<br>
I am using the following code to play a video file.<br>
player = gst_element_factory_make(&quot;playbin&quot;,&quot;playbin0&quot;);<br>
GstElement *bus = (GstElement *)gst_pipeline_get_bus(GST_PIPELINE(player));<br>
gst_bus_set_sync_handler (GST_BUS(bus),<br>
(GstBusSyncHandler)gst_bus_sync_handler, this);<br>
gst_bus_add_watch (GST_BUS(bus), bus_call, this);<br>
gst_object_unref(bus);<br>
<br>
[ ... ]<br>
// open and play a media file<br>
g_object_set(G_OBJECT(player),&quot;uri&quot;,<br>
g_locale_to_utf8(input-&gt;filename,-1,NULL,NULL,NULL),NULL);<br>
gst_element_set_state(GST_ELEMENT(player),GST_STATE_PLAYING);<br>
[ ... ]<br>
<br>
I also have a slider in my application, which shows an overall playing<br>
progress and allows seeking. My condition is to pause the playback when a<br>
user clicks on it. Here is the function, processing events from that slider.<br>
<br>
void CControlMainDialog::OnMarkerCtrlPosChange(LONG nPos)<br>
{<br>
  if(!player || !GST_CLOCK_TIME_IS_VALID(stream_duration)) return;<br>
  gint64 nLLPos = (gint64)(stream_duration * nPos/MARKER_CTRL_SCALE) ;<br>
  gst_element_seek_simple(GST_ELEMENT(player),GST_FORMAT_TIME,<br>
                                    (GstSeekFlags)(GST_SEEK_FLAG_FLUSH |<br>
GST_SEEK_FLAG_KEY_UNIT),<br>
                                    nLLPos);<br>
  gst_element_get_state(GST_ELEMENT(player),NULL,NULL,100 * GST_MSECOND);<br>
  gst_element_set_state(GST_ELEMENT(player),GST_STATE_PAUSED);<br>
  UpdateToolbarState();<br>
  repaint_video();<br>
}<br>
<br>
void CControlMainDialog::repaint_video()<br>
{<br>
  gst_x_overlay_expose(GST_X_OVERLAY(videosink));<br>
}<br>
<br>
<br>
The repaint_video method is called, I&#39;ve added calls to OutputDebugString<br>
and seen the messages in the debug window.<br>
However, it displays always the last displayed frame, not the frame the<br>
playbin is currently positioned on.<br>
I tried digging the totem, however, it didn&#39;t help<br>
--<br>
View this message in context: <a href="http://n4.nabble.com/How-to-make-playbin-to-redraw-frames-on-seek-tp976820p976820.html" target="_blank">http://n4.nabble.com/How-to-make-playbin-to-redraw-frames-on-seek-tp976820p976820.html</a><br>

Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
<br>
------------------------------------------------------------------------------<br>
This SF.Net email is sponsored by the Verizon Developer Community<br>
Take advantage of Verizon&#39;s best-in-class app development support<br>
A streamlined, 14 day to market process makes app distribution fast and easy<br>
Join now and get one step closer to millions of Verizon customers<br>
<a href="http://p.sf.net/sfu/verizon-dev2dev" target="_blank">http://p.sf.net/sfu/verizon-dev2dev</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a 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>
</blockquote></div><br>