Including gl.h from WPEThreadedView.h leads to GST_LEVEL_DEFAULT detected as
redefined. The proposed fix is to include config.h from the CPP implementation
file and disable gl.h inclusion in the header, by using forward declarations.
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "WPEThreadedView.h"
+#include <gst/gl/gl.h>
+#include <gst/gl/egl/gsteglimage.h>
+#include <gst/gl/egl/gstgldisplay_egl.h>
+
#include <cstdio>
#include <mutex>
-#define GST_CAT_DEFAULT wpe_src_debug
+GST_DEBUG_CATEGORY_EXTERN (wpe_src_debug);
// -70 is the GLib priority we use internally in WebKit, for WPE.
#define WPE_GLIB_SOURCE_PRIORITY -70
#include <EGL/egl.h>
#include <glib.h>
-#include <gst/gl/gl.h>
#include <gst/gl/gstglfuncs.h>
-#include <gst/gl/egl/gsteglimage.h>
-#include <gst/gl/egl/gstgldisplay_egl.h>
#include <wpe/fdo.h>
#include <wpe/fdo-egl.h>
#include <wpe/webkit.h>
#include "gstwpesrc.h"
-GST_DEBUG_CATEGORY_EXTERN(wpe_src_debug);
+typedef struct _GstGLContext GstGLContext;
+typedef struct _GstGLDisplay GstGLDisplay;
+typedef struct _GstEGLImage GstEGLImage;
class WPEThreadedView {
public:
#endif
#include "gstwpesrc.h"
-#include <gst/video/video.h>
#include <gst/gl/gl.h>
#include <gst/gl/egl/gstglmemoryegl.h>
#include <gst/gl/wayland/gstgldisplay_wayland.h>
+#include <gst/video/video.h>
#include <xkbcommon/xkbcommon.h>
#include "WPEThreadedView.h"