After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 631019 - Gst Plugins GL no longer OpenGL ES 2.0 friendly
Gst Plugins GL no longer OpenGL ES 2.0 friendly
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-gl
unspecified
Other Linux
: Normal major
: 0.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-30 15:15 UTC by Antoni Silvestre
Modified: 2012-02-18 20:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Compilation error log (1.68 KB, application/octet-stream)
2010-09-30 15:15 UTC, Antoni Silvestre
  Details
Patch to disable the parts of the code non OpenGL ES 2.0 compatible (1.17 KB, patch)
2010-09-30 15:45 UTC, Antoni Silvestre
none Details | Review
New patch for this issue (1.41 KB, patch)
2010-10-01 08:46 UTC, Antoni Silvestre
none Details | Review
Another change to the patch to not include Clutter examples in OpenGL ES (1.58 KB, patch)
2010-10-01 09:21 UTC, Antoni Silvestre
none Details | Review
Patch to the latest gst-plugins-gl version (1.82 KB, patch)
2011-04-26 09:03 UTC, Wei.Feng
none Details | Review

Description Antoni Silvestre 2010-09-30 15:15:50 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.
Comment 1 Filippo Argiolas 2010-09-30 15:26:08 UTC
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.
Comment 2 Antoni Silvestre 2010-09-30 15:45:01 UTC
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.
Comment 3 Julien Isorce 2010-09-30 18:24:19 UTC
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)
Comment 4 Antoni Silvestre 2010-10-01 08:46:12 UTC
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.
Comment 5 Antoni Silvestre 2010-10-01 09:21:49 UTC
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.
Comment 6 Wei.Feng 2011-04-26 09:03:34 UTC
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.
Comment 7 Julien Isorce 2011-11-18 16:34:18 UTC
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
Comment 8 Julien Isorce 2011-11-18 16:34:29 UTC
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