[Bug 739661] GL example doesn't work on Raspberry Pi (Embedded)

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Nov 21 00:01:53 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=739661
  GStreamer | gst-plugins-bad | git

--- Comment #5 from Julien Isorce <julien.isorce at gmail.com> 2014-11-21 08:01:49 UTC ---
Review of attachment 291097:
 --> (https://bugzilla.gnome.org/review?bug=739661&attachment=291097)

Thx for submitting, see remarks. This example should be renamed (rectangle ?
instead of cube), so change directory or something and make it available for
both gles2 and big GL

::: tests/examples/gl/generic/gles2/gles2generic.c
@@ +4,3 @@
+ * Modified for Raspberry Pi/GLES2 by Arnaud Loonstra <arnaud at sphaero.org>
+ * Orginal by Julien Isorce <julien.isorce at gmail.com>
+ *

Just put names like done here
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstgldisplay.c

@@ +30,3 @@
+ -L/opt/vc/lib/ -lgstreamer-1.0 -lgobject-2.0 \
+ -lglib-2.0 -lGLESv2 -lEGL
+*/

Remove this and just modify gl/generic/Makefile.am + add
gl/generic/rectangle/Makefile.am and modify here
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/configure.ac#n3314
as well
Also modify
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/tests/examples/gl/Makefile.am
adding a   case for USE_GLES2 somewhere.

@@ +33,3 @@
+
+#include <GLES/gl.h>
+#include <GLES2/gl2.h>

to remove

@@ +34,3 @@
+#include <GLES/gl.h>
+#include <GLES2/gl2.h>
+#include <gst/gst.h>

just add #include <gst/gl/gl.h>

@@ +94,3 @@
+    return 0;
+  }
+  return shader;

I think you should just use GstGLShader api, see
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstglshader.h
There are various examples gl elements in ext/gl/

@@ +132,3 @@
+    return GL_FALSE;
+  }
+  return GL_TRUE;

Same for all of this

@@ +202,3 @@
+
+  glClear (GL_COLOR_BUFFER_BIT);
+  glUseProgram (programObject);

It would be "gst_gl_shader_use" using GstGLShader api

@@ +225,3 @@
+
+//gst-launch-1.0 videotestsrc num_buffers=400 ! video/x-raw, width=320,
height=240 !
+//glgraphicmaker ! glfiltercube ! video/x-raw, width=800, height=600 !
glimagesink

you can drop this

@@ +307,3 @@
+  gst_object_unref (pipeline);
+  glDeleteShader (vertexShader);
+  glDeleteShader (fragmentShader);

It will be gst_object_unref (shader) but in any case this is wrong place to
call here because no gl context is present in this thread.

This is where these to signals client-reshape and client-draw are limited.
There is no proper place to init or deinit. Here you could do like init, so
just counting 400 frames (ref num-buffers), and call deinit on the 400th ...

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list