[gst-devel] Newbie question - how to get video frames from pipeline
Tim-Philipp Müller
t.i.m at zen.co.uk
Mon Mar 30 00:36:52 CEST 2009
On Sun, 2009-03-29 at 23:02 +0200, Štěpán wrote:
> I am trying to code get video frames from gstreamer pipeline, so I
> can do additional processing with them and draw each frame on screen via
> Irrlicht engine. I was able to do it using ffmpeg, but I am not able to
> get this done in gstreamer. The problem I am facing (and I am sure that
> this problem is very trivial) is that I cannot find a way how to get
> each (video)frame from gstreamer pipeline.
> Nevertheless, I found two ways, how this could be done. The first is use
> of appsink, and the second is to write my own (video)sink.
These are both good methods. There is also gdkpixbufsink which
essentially gives you RGB data (in a GdkPixbuf structure), and then
there is also the possibility to just use fakesink and the "handoff"
signal (but that's been replaced by appsink really).
> Unfortunately, I was not able to do it in neither way, mainly due to the
> lack of example code, or my poor experience with gstreamer. So, my
> question is, which way should I go (use appsink, or extend (video)sink)
> and where to start with learning of how to accomplish this.
Here's a simple example demonstrating how to extract raw RGB video
frames with appsink:
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/tests/examples/snapshot/snapshot.c
Hope this helps.
Cheers
-Tim
More information about the gstreamer-devel
mailing list