GL plugin generic example on RPI

Arnaud Loonstra arnaud at sphaero.org
Tue Nov 4 15:06:54 PST 2014


I hadn't noticed the properties were changed for the glimagesink callbacks:
Element Signals:
   "client-draw" :  gboolean user_function (GstElement* object,
                                            GstGLContext* arg0,
                                            guint arg1,
                                            guint arg2,
                                            guint arg3,
                                            gpointer user_data);
   "client-reshape" :  gboolean user_function (GstElement* object,
                                               GstGLContext* arg0,
                                               guint arg1,
                                               guint arg2,
                                               gpointer user_data);

So I updated those, I'm now getting more sane data. :)
Anyway I still haven't been able to draw on screen but at least now I 
know I should be using a shader. I'll continue a bit more and I'll file 
a bug when I know more about what the code should look like...

Meanwhile I updated the gist which is *not* compiling in its current state.

Arnaud


On 11/04/2014 11:44 PM, Julien Isorce wrote:
> Indeed this example is not currently working on embedded.
>
> You need to use gles version 2. So include headers from GLES2 dir and
> not GLES. To match gstgl api version that gstgl will select (I can see
> gles2 in your log).
> Then in the reshape callback you will only need to call glViewport.
> Then you will need to setup a vertex shader and a fragment shader in the
> draw callback. Initializing it only for the first call. (To do it during
> pipeline setup we would need to provide another callback triggered from
> the gl thread as well)
>
> Actually looking at glimagesink code I can see a possible improvement
> which is to initialize the shader at setup time, instead of doing it in
> the first call to show_frame.
>
> Please open a bug if you wish to continue making this example working on
> RPI.
>
>
> On 4 November 2014 20:16, Arnaud Loonstra <arnaud at sphaero.org
> <mailto:arnaud at sphaero.org>> wrote:
>
>     Hi all,
>
>     I'm trying to port the generic gl example:
>
>     http://cgit.freedesktop.org/__gstreamer/gst-plugins-bad/__tree/tests/examples/gl/__generic/cube/main.cpp
>     <http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/tests/examples/gl/generic/cube/main.cpp>
>
>     to the Raspberry Pi.
>
>     I've managed to run it with a few adaptions
>     - no GLU
>     - changed the quad draw method
>
>     It runs, it outputs the fps, I think it displays one (corrupt)frame
>     before going black. But that's it. I thought I'd draw on red
>     background to see if I at least have control over the display
>     context using glClearColor(1.0f, 0.0f, 0.0f, 0.0f); (l122) But no
>     red unfortunately.
>
>     Are there any different other things I should do to control the GLES
>     context? Or any tips?
>
>     source:
>     https://gist.github.com/__sphaero/eac4d01013bd2b0e2205
>     <https://gist.github.com/sphaero/eac4d01013bd2b0e2205>
>
>     debug log:
>     http://paste.debian.net/__130308/ <http://paste.debian.net/130308/>
>
>     Running latest (last weekend) gst from git.
>
>     Rg,
>
>     Arnaud
>     --
>     w: http://www.sphaero.org
>     t: http://twitter.com/sphaero
>     g: http://github.com/sphaero
>     i: freenode: sphaero_z25
>     _________________________________________________
>     gstreamer-devel mailing list
>     gstreamer-devel at lists.__freedesktop.org
>     <mailto:gstreamer-devel at lists.freedesktop.org>
>     http://lists.freedesktop.org/__mailman/listinfo/gstreamer-__devel
>     <http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel>
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>


-- 
w: http://www.sphaero.org
t: http://twitter.com/sphaero
g: http://github.com/sphaero
i: freenode: sphaero_z25


More information about the gstreamer-devel mailing list