[gst-devel] Managing single buffers (snapshot functionality)

Robin Gareus robin at gareus.org
Tue Apr 3 23:39:45 CEST 2007



Olivier Aubert wrote:
> On Tue, 2007-01-16 at 15:09 +0100, Olivier Aubert wrote:
>> The problem I am facing is the snapshot functionality. The playbin
>> plugin offers a 'frame' property which points a gstBuffer containing the
>> last decoded frame, in whatever format has been negociated in the
>> pipeline. Now, I need this frame in PNG.
> 
> Just replying to myself... As I did not get any answer, but in the end
> figured out how to do it, I am posting the solution I use. It may be of
> use to someone else. It defines a conversion pipeline, that can take a
> single gst.Buffer (obtained from the 'frame' property of the playbin
> element) and convert it to png. In addition, some locking is used to
> obtain a synchronous behaviour (the snapshot method returns the PNG
> snapshot).
> 

that's great news! can you /reliably/ seek a video-file and snapshot the
same frame?  - i guess id depends on the codec..

It does not seem that gstreamer itself can sync video playback to an
external time source, but a few lines of python could! however
pre-buffering snapshots introduces some latency.. let's see how small it
gets..

robin




More information about the gstreamer-devel mailing list