Adding pixel shader + overlay on Raspberry Pi with eglglessink/glimagesink
Matthew Waters
waters.matthew00 at gmail.com
Tue May 13 07:39:42 PDT 2014
On 11/05/14 21:46, Michael Tyson wrote:
> Hi folks,
>
> I'm building some stuff based on GStreamer on Raspberry Pi. I'm
> wanting to (a) display an overlay on top of the video feed and (b)
> split and possibly distort the incoming video for display on the
> Oculus Rift. I have been using eglglessink with GST 1.2.3 so far,
> although I see that that seems to have been superseded recently by
> glimagesink - it's a bit hard to keep up!
>
> (a) seems to be quite doable, and I've already built some stuff that
> interacts with the dispmanx API to create display contexts for
> eglglessink
> <https://github.com/monsieurpod/raspifpv/blob/master/src/gstreamer_renderer.c> and
> my own overlay
> <https://github.com/monsieurpod/raspifpv/blob/master/src/egl_telemetry_renderer.c> and
> it appears to function adequately.
>
> I'm not sure how to go about (b), however, particularly given recent
> developments. Seems like glshader/glimagesink would be perfect for
> this (there's even a _tutorial_ on it!), but gst-plugins-bad 1.3.1's
> source package isn't in the Raspbian repository yet and given that
> it's only 8 days old, I wasn't sure if it'd be fully operational yet
> anyway, on RasPi.
>
> So: Any chance of a pointer, to save me a bit of messing about? Should
> I be starting to use glimagesink, with a glshader? Is it likely to
> work with gst_video_overlay_set_window_handle (in order to provide my
> own graphical context) in a similar way as eglglessink, so I can still
> use an overlay?
Sure, glimagesink is the way forward for a GL-based video sink however
it does not seem to have support for the GstVideoOverlay API on the RPI
[1]. glshader is a little finicky in that it expects a couple of things
in order to integrate with the video pipeline. Most notably would be the
texture parameter in order to access the frame data, which is a NPOT 2D
texture represented by "sampler2D tex" in GLSL.
> Many thanks, and cheers for your ongoing work.
> Michael
[1]
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c#n224
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140514/a9c92b58/attachment.html>
More information about the gstreamer-devel
mailing list