--- /dev/null
+/*
+ * GStreamer
+ * Copyright (C) 2020 Matthew Waters <matthew@centricular.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <gst/gl/gstglconfig.h>
+
+/* The glext.h guard was renamed in 2018, but some software which
+ * includes their own copy of the GL headers (such as qt) might have
+ * older version which use the old guard. This would result in the
+ * header being included again (and symbols redefined).
+ *
+ * To avoid this, we define the "old" guard if the "new" guard is
+ * defined.*/
+#if GST_GL_HAVE_OPENGL
+#ifdef __gl_glext_h_
+#ifndef __glext_h_
+#define __glext_h_ 1
+#endif
+#endif
+#endif
# FIXME: other platforms
libgl = cc.find_library ('GL', required : false)
+qt_cxx_warn_less = cxx.get_supported_arguments(['-Wno-aggregate-return'])
+
if qt5gui_dep.found()
subdir('videooverlay')
if libgl.found()
moc_files = qt5_mod.preprocess(moc_headers : moc_headers)
executable('mousevideoverlay', sources, moc_files,
- cpp_args : [gst_plugins_base_args],
+ cpp_args : [gst_plugins_base_args] + qt_cxx_warn_less,
include_directories: [configinc, libsinc],
dependencies : [qt5core_dep, qt5gui_dep, gst_dep, video_dep, gstgl_dep, libgl],
install: false)
#include <gst/video/videooverlay.h>
#include <gst/video/video.h>
#include <GL/gl.h>
+#include "../gl-compat-defines.h"
#include "pipeline.h"
#define GST_MAP_GL (GST_MAP_FLAG_LAST << 1)
Q_OBJECT
public:
- QRenderer(const QString videoLocation, QWidget *parent = 0, Qt::WindowFlags flags = 0);
+ QRenderer(const QString videoLocation, QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
~QRenderer();
void paintEvent(QPaintEvent* event);
void mouseMoveEvent(QMouseEvent* event);
moc_files = qt5_mod.preprocess(moc_headers : moc_headers)
executable('qglwidgetvideoverlay', sources, moc_files,
- cpp_args : [gst_plugins_base_args],
+ cpp_args : [gst_plugins_base_args] + qt_cxx_warn_less,
include_directories: [configinc, libsinc],
dependencies : [qt5core_dep, qt5gui_dep, qt5opengl_dep, gst_dep, video_dep, gstgl_dep, libgl],
install: false)
#include <gst/video/videooverlay.h>
#include <gst/video/video.h>
#include <GL/gl.h>
+#include "../gl-compat-defines.h"
#include "pipeline.h"
#define GST_MAP_GL (GST_MAP_FLAG_LAST << 1)
Q_OBJECT
public:
- QGLRenderer(const QString videoLocation, QWidget *parent = 0);
+ QGLRenderer(const QString videoLocation, QWidget *parent = nullptr);
~QGLRenderer();
void paintEvent(QPaintEvent* event);
void closeEvent (QCloseEvent* event);
moc_files = qt5_mod.preprocess(moc_headers : moc_headers)
executable('qglwtextureshare', sources, moc_files,
- cpp_args : [gst_plugins_base_args],
+ cpp_args : [gst_plugins_base_args] + qt_cxx_warn_less,
include_directories: [configinc, libsinc],
dependencies : [qt5core_dep, qt5gui_dep, qt5opengl_dep, qtwinsys_deps, gst_dep, video_dep, gstgl_dep, libgl],
install: false)
* Boston, MA 02110-1301, USA.
*/
-#include "pipeline.h"
#include <gst/gl/gl.h>
-
+#include "../gl-compat-defines.h"
+#include "pipeline.h"
Pipeline::Pipeline (GstGLDisplay *display,
GstGLContext * context, const QString & videoLocation, QObject * parent)
Q_OBJECT
public:
- QGLRenderer(const QString &videoLocation, QWidget *parent = 0);
+ QGLRenderer(const QString &videoLocation, QWidget *parent = nullptr);
~QGLRenderer();
void closeEvent(QCloseEvent* event);