From 0de89c0dbe77f6f2bc5553f25b1796fe644706b3 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 1 Feb 2019 14:27:11 +0530 Subject: [PATCH] qt: Don't define GLsync inside gstglfuncs.h This was originally added for fixing conflicting definitions between Android and Qt, but times have changed and now this breaks the build on iOS: [...]/OpenGLES.framework/Headers/ES3/gl.h:1006:48: error: unknown type name 'gst_qt_GLsync' GL_API void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) OPENGLES_DEPRECATED(ios(7.0, 12.0), tvos(9.0, 12.0)); ^ ../ext/qt/gstqtgl.h:49:16: note: expanded from macro 'GLsync' #define GLsync gst_qt_GLsync ^ 6 errors generated. Instead, we simply avoid defining GLsync ourselves if we're using Qt. --- ext/qt/gstqtgl.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ext/qt/gstqtgl.h b/ext/qt/gstqtgl.h index 339f318..6bf8ea6 100644 --- a/ext/qt/gstqtgl.h +++ b/ext/qt/gstqtgl.h @@ -17,14 +17,6 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ - -/* qt uses the same trick as us to typedef GLsync on gles2 but to a different - * type which confuses the preprocessor. As it's never actually used by qt - * public headers, define it to something else to avoid redefinition - * warnings/errors */ - -#include -#include #include #if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) #include @@ -46,8 +38,15 @@ #endif #if defined(QT_OPENGL_ES_2) -#define GLsync gst_qt_GLsync #include #include -#undef GLsync #endif /* defined(QT_OPENGL_ES_2) */ + +/* qt uses the same trick as us to typedef GLsync on GLES2 but to a different + * type which confuses the preprocessor. Instead of trying to reconcile the + * two, we instead use the GLsync definition from Qt from above, and ensure + * that we don't typedef GLsync in gstglfuncs.h */ +#include +#undef GST_GL_HAVE_GLSYNC +#define GST_GL_HAVE_GLSYNC 1 +#include -- 2.7.4