[gst-devel] How to make playbin to redraw frames on seek?

Andoni Morales ylatuya at gmail.com
Tue Dec 22 12:10:41 CET 2009


2009/12/22 wl2776 <wl2776 at gmail.com>:
>
>
> Julien Moutte-2 wrote:
>>
>> What video sink are you using ? It does not appear in your code sample.
>>
> Video sink was generated automatically.
> I've dumped an image using GST_DEBUG_BIN_TO_DOT_FILE, it appeared
> "videosink-actual-sink-dshowvideo".
>
>
> Julien Moutte-2 wrote:
>>
>> 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.
>>
> This is a condition to my application, imposed by a client. The player has
> to pause playback when the slider is clicked.
> Anyway, this doesn't matter. The player also has a play/pause button, and
> when I pause playback with the button, it doesn't redraw frames on seeking
> in paused state.
I'm actually using the directdraw sink for that in longomatch (I need
it for framestepping), as it implements the XOverlay expose() method,
whilst the directshow one doesn't (I filled a bug for
that:https://bugzilla.gnome.org/show_bug.cgi?id=579926)
Anyway you should keep using the directshow sink instead of the
directdraw one for performance reasons. For your problem you can use a
hackish workarround to update frames while seeking which consist in
setting the pipeline to GST_STATE_PLAY before calling the seek
function and reset it to GST_STATE_PAUSE. It's a very ugly hack but
worked for me (don't blame me for the indentation, it's an old
revision ;)):
http://git.gnome.org/browse/longomatch/tree/libcesarplayer/src/bacon-video-widget-gst-0.10.c?id=18a08c71abca5d2f5ec194fb6f86196e0ddd68fc#n2302
Andoni
>
> I've downloaded the GStreamer-Winbuild from here:
> http://www.gstreamer-winbuild.ylatuya.es/
> --
> View this message in context: http://n4.nabble.com/How-to-make-playbin-to-redraw-frames-on-seek-tp976820p976860.html
> 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 easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>



-- 
Andoni Morales Alastruey

LongoMatch:The Digital Coach
http://www.longomatch.ylatuya.es




More information about the gstreamer-devel mailing list