gl/eagl: fix eagl display creation
authorMatthew Waters <matthew@centricular.com>
Tue, 19 Oct 2021 08:46:48 +0000 (19:46 +1100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 19 Oct 2021 09:34:43 +0000 (09:34 +0000)
The GstGLDisplayType of the display was win32 instead of the required eagl.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1188>

subprojects/gst-plugins-base/gst-libs/gst/gl/eagl/gstglcontext_eagl.m
subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c

index ec18a0e..02238d9 100644 (file)
@@ -105,7 +105,7 @@ gst_gl_context_eagl_new (GstGLDisplay * display)
 
   if ((gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_EAGL)
       == GST_GL_DISPLAY_TYPE_NONE) {
-    GST_INFO ("Wrong display type %u for this window type %u", display->type,
+    GST_INFO ("Wrong display type %u for this context type %u", display->type,
         GST_GL_DISPLAY_TYPE_EAGL);
     return NULL;
   }
index 9af985d..ca721f0 100644 (file)
@@ -408,12 +408,16 @@ gst_gl_display_new_with_type (GstGLDisplayType type)
 #if GST_GL_HAVE_WINDOW_WIN32 || GST_GL_HAVE_WINDOW_EAGL
   if (!display) {
     GstGLDisplayType create_type = 0;
+#if GST_GL_HAVE_WINDOW_WIN32
     if (type & GST_GL_DISPLAY_TYPE_WIN32)
       create_type = GST_GL_DISPLAY_TYPE_WIN32;
-    else if (type & GST_GL_DISPLAY_TYPE_EAGL)
+#endif
+#if GST_GL_HAVE_WINDOW_EAGL
+    if (type & GST_GL_DISPLAY_TYPE_EAGL)
       create_type = GST_GL_DISPLAY_TYPE_EAGL;
+#endif
     if (create_type) {
-      GST_INFO_OBJECT (display, "Creating display with type %u(0x%x)",
+      GST_INFO ("Creating display with type %u(0x%x)",
           create_type, create_type);
       display = create_dummy_display ();
       display->type = create_type;