When both desktop GL and GLES2 are enabled in gst-plugins-bad, and when GSTREAMER_GL is enabled, the build of the GStreamer media backend fails with the errors below. In file included from /home/blino/WebKit/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:43:0, from /home/blino/WebKit/Source/WebCore/platform/graphics/GraphicsContext3D.h:29, from /home/blino/WebKit/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h:29, from /home/blino/WebKit/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:38, from /home/blino/WebKit/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:25: /home/blino/WebKit/Source/WebCore/platform/graphics/OpenGLShims.h:257:67: error: expected type-specifier before 'glActiveTexture' #define glActiveTexture LOOKUP_GL_FUNCTION(glActiveTexture) ^ /home/blino/WebKit/Source/WebCore/platform/graphics/OpenGLShims.h:257:67: error: expected initializer before 'glActiveTexture' ... many more errors with GL functions ... /home/blino/WebKit/Source/WebCore/platform/graphics/OpenGLShims.h:312:67: error: 'openGLFunctionTable' function with trailing return type not declared with 'auto' type specifier In file included from /usr/include/gstreamer-1.0/gst/gl/gstglapi.h:43:0, from /usr/include/gstreamer-1.0/gst/gl/gstgl_fwd.h:26, from /usr/include/gstreamer-1.0/gst/gl/gl.h:29, from /home/blino/WebKit/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:49: /usr/include/GLES2/gl2ext.h:740:59: error: expected ')' before 'n' GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); ...
For reference, my build command is: ./Tools/Scripts/build-webkit --gtk --cmakeargs="-DUSE_GSTREAMER_GL=ON"
I think Yoon had a similar issue, which was solved by changing the #include order of some files, IIRC.
Created attachment 284017 [details] Patch
Comment on attachment 284017 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=284017&action=review > Source/WebCore/ChangeLog:11 > + OpenGLShims.h redefines GL functions. How is OpenGLShims.h pulled in? Not sure I like the #include move to the Base.h header, we try to keep our headers free of #includes as much as possible.
(In reply to comment #4) > Comment on attachment 284017 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=284017&action=review > > > Source/WebCore/ChangeLog:11 > > + OpenGLShims.h redefines GL functions. > > How is OpenGLShims.h pulled in? > > Not sure I like the #include move to the Base.h header, we try to keep our > headers free of #includes as much as possible. I don't like it either, it would be easy to forget and break. Here is the include flow: MediaPlayerPrivateGStreamerBase.cpp MediaPlayerPrivateGStreamerBase.h TextureMapperGL.h (for TextureMapperGL::Flags m_textureMapperRotationFlag) GraphicsContext3D.h ANGLEWebKitBridge.h OpenGLShims.h
And the enum can't be forward-declared. Maybe we should refactor the rotation flag code so that a member variable isn't needed?
Comment on attachment 284017 [details] Patch (Removing from request queue based on comments above.)
Created attachment 289344 [details] Patch
Comment on attachment 289344 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=289344&action=review > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:117 > + return 0; ASSERT_NOT_REACHED() ?
Created attachment 289348 [details] Patch
(In reply to comment #10) > Created attachment 289348 [details] > Patch I can confirm this fixes the build, thanks!
Comment on attachment 289348 [details] Patch Clearing flags on attachment: 289348 Committed r206202: <http://trac.webkit.org/changeset/206202>
All reviewed patches have been landed. Closing bug.