#include <gst/gl/egl/gstgldisplay_egl.h>
#endif
+#ifdef GDK_WINDOWING_MACOS
+#include <gdk/macos/gdkmacos.h>
+#endif
+
#include <gst/gl/gstglfuncs.h>
enum {
}
else
#endif
+#if defined(GST_GL_HAVE_PLATFORM_CGL) && defined(GDK_WINDOWING_MACOS)
+ if (GDK_IS_MACOS_DISPLAY (display))
+ {
+ platform = GST_GL_PLATFORM_CGL;
+
+ GST_DEBUG_OBJECT (self, "got CGL on macOS!");
+
+ gl_api = gst_gl_context_get_current_gl_api (platform, NULL, NULL);
+ gl_handle = gst_gl_context_get_current_gl_context (platform);
+
+ if (gl_handle)
+ {
+ self->gst_display = gst_gl_display_new ();
+ self->gst_app_context = gst_gl_context_new_wrapped (self->gst_display, gl_handle, platform, gl_api);
+ }
+ else
+ {
+ GST_ERROR_OBJECT (self, "Failed to get handle from GdkGLContext, not using macOS CGL");
+ return FALSE;
+ }
+ }
+ else
+#endif
#if GST_GL_HAVE_WINDOW_WIN32 && (GST_GL_HAVE_PLATFORM_WGL || GST_GL_HAVE_PLATFORM_EGL) && defined (GDK_WINDOWING_WIN32)
if (GDK_IS_WIN32_DISPLAY (display))
{