GNOME Bugzilla – Bug 631019
Gst Plugins GL no longer OpenGL ES 2.0 friendly
Last modified: 2012-02-18 20:02:59 UTC
Created attachment 171435 [details] Compilation error log Even after successfully detecting OpenGL ES 2.0 the file gst-libs/gst/gl/gstglfilter.c has instructions that are not part of the OpenGL ES 2.0 specification. It looks like this instructions were added in the following commit: http://cgit.freedesktop.org/gstreamer/gst-plugins-gl/commit/?id=6184670652af5f378eec42fae84971b0754855cd Trying to find a temporary fix disabling the those parts of the code makes at least the plugins glfilterblur and glfiltersobel unusable. Additionally some code in the tests folder has non OpenGL ES 2.0 code too. Attached there is a compilation error log.
Sorry, it appears to be my fault. With the current ifdef based setup it's quite easy to hit those kind of issues without a nembedded system to test the code in. Could you please submit a patch that ifdefs the faulting code (see other part that do it as a model)? I would do it but I have no system to test it on. If I recall correctly filterblur and filtersobel (and probably most of the filters in gleffects) were never ported to work with GLES, if you want to contribute some patch for it, it would be more than welcome. About the tests, either don't worry about faulting ones or, please, report which ones are failing and we'll add a configure check to disable them if GLES is detected.
Created attachment 171436 [details] [review] Patch to disable the parts of the code non OpenGL ES 2.0 compatible This patch does not correct, though, the disable any code in the tests/examples folder. mMost if not all the the examples there, are not openGL ES compatible as they use for instance GLEW that needs GLUT.
The following filters are comptible to opengl ES: (see Makefile.am in gst-plugins-gl/gst/gl: gstglimagesink.c \ gstglimagesink.h \ gstglupload.c \ gstglupload.h \ gstgldownload.c \ gstgldownload.h \ gstglfiltercube.c \ gstglfiltercube.h \ gstgleffects.c \ gstgleffects.h \ effects/gstgleffectssources.c \ effects/gstgleffectssources.h \ effects/gstgleffectidentity.c \ effects/gstgleffectmirror.c \ effects/gstgleffectsqueeze.c \ Or see "#ifndef OPENGL_ES2" in gst-plugins-gl/gst/gl/gstopengl.c So no problem about your patch because glfilterblur and glfiltersobel are not built if ES is detected. Anyway, you you can also totally disable declaration and definition of those functions if ES (instead of just disable the content) Then about the tests, please disable building them on ES and add the change to your patch. SUBDIRS var from gst-plugins-gl/tests/examples/Makefile.am should be empty on ES. (Until we make them compatible. They are not unit tests, only examples)
Created attachment 171472 [details] [review] New patch for this issue Ok, I updated the patch with the changes you told me. Now the declaration of those functions in the gstglfilter.c is completely disabled even in the header file and I changed the Makefile.am in tests/examples to not compile anything when opengl ES2 is detected.
Created attachment 171474 [details] [review] Another change to the patch to not include Clutter examples in OpenGL ES Sorry, just after uploading the patch I realized that when I changed the Makefile.am I did not exclude the Clutter examples which for instance also link to GLEW (In my setting this worked before because I don't have clutter installed in the first place). I changed it now to exclude the following folders: generic, clutter and sdl And the configuration includes the following folders when their respective libs are available: gtk wx qt and cocoa QT and WX currently do not have any code so as of now they work for sure, I have GTK in my environment and compiles well, and finally about cocoa I did could not find any only regular OpenGL instruction so I also left it there.
Created attachment 186642 [details] [review] Patch to the latest gst-plugins-gl version When I compile the latest package, I found an error at gst-libs/gst/gl/gstgles2.h which G_BEGIN_DECLS is not defined. The gstglfilter patch and the tests Makefile patch is just mentioned as Antoni Silvestre.
commit 36147f226f7a62ba79d2bddfc634ac523b2d8075 Author: Antoni Silvestre <antoni.silvestre@gmail.com> Date: Fri Nov 18 17:26:35 2011 +0100 OpenGL ES 2.0: fix build and disable some examples Fix bug #631019
commit 613344bb0760ce24efff0cef157065dc026c41fb Author: Wei Feng <wei.feng.wayne@gmail.com> Date: Fri Nov 18 17:32:05 2011 +0100 OpenGL ES 2.0: include glib.h to use G_BEGIN_DECLS in gstgles2.h Fix bug #631019