mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 07:38:16 +00:00
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.
This commit is contained in:
parent
1bdec4d055
commit
0de89c0dbe
1 changed files with 9 additions and 10 deletions
|
@ -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 <gst/gl/gstglconfig.h>
|
||||
#include <gst/gl/gstglfuncs.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
|
||||
#include <QtGui/qtgui-config.h>
|
||||
|
@ -46,8 +38,15 @@
|
|||
#endif
|
||||
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
#define GLsync gst_qt_GLsync
|
||||
#include <QtGui/QOpenGLContext>
|
||||
#include <QtGui/QOpenGLFunctions>
|
||||
#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 <gst/gl/gstglconfig.h>
|
||||
#undef GST_GL_HAVE_GLSYNC
|
||||
#define GST_GL_HAVE_GLSYNC 1
|
||||
#include <gst/gl/gstglfuncs.h>
|
||||
|
|
Loading…
Reference in a new issue