[gst-devel] How to make playbin to redraw frames on seek?
julien at moutte.net
Tue Dec 22 11:08:54 CET 2009
What video sink are you using ? It does not appear in your code sample.
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.
On Tue, Dec 22, 2009 at 10:51 AM, wl2776 <wl2776 at gmail.com> wrote:
> Hi all.
> My problem is that the playbin doesn't redraw video frames, when I try to
> seek in paused state.
> I tried both playbin and playbin2 with the same result.
> I am using the following code to play a video file.
> player = gst_element_factory_make("playbin","playbin0");
> GstElement *bus = (GstElement *)gst_pipeline_get_bus(GST_PIPELINE(player));
> gst_bus_set_sync_handler (GST_BUS(bus),
> (GstBusSyncHandler)gst_bus_sync_handler, this);
> gst_bus_add_watch (GST_BUS(bus), bus_call, this);
> [ ... ]
> // open and play a media file
> [ ... ]
> I also have a slider in my application, which shows an overall playing
> progress and allows seeking. My condition is to pause the playback when a
> user clicks on it. Here is the function, processing events from that
> void CControlMainDialog::OnMarkerCtrlPosChange(LONG nPos)
> if(!player || !GST_CLOCK_TIME_IS_VALID(stream_duration)) return;
> gint64 nLLPos = (gint64)(stream_duration * nPos/MARKER_CTRL_SCALE) ;
> (GstSeekFlags)(GST_SEEK_FLAG_FLUSH |
> gst_element_get_state(GST_ELEMENT(player),NULL,NULL,100 * GST_MSECOND);
> void CControlMainDialog::repaint_video()
> The repaint_video method is called, I've added calls to OutputDebugString
> and seen the messages in the debug window.
> However, it displays always the last displayed frame, not the frame the
> playbin is currently positioned on.
> I tried digging the totem, however, it didn't help
> View this message in context:
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and
> Join now and get one step closer to millions of Verizon customers
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel