From d4951540683a735c9e97fa2bb51db5d675e805c6 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 19 Oct 2021 19:46:48 +1100 Subject: [PATCH] gl/eagl: fix eagl display creation The GstGLDisplayType of the display was win32 instead of the required eagl. Part-of: --- .../gst-libs/gst/gl/eagl/gstglcontext_eagl.m | 2 +- .../gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/eagl/gstglcontext_eagl.m b/subprojects/gst-plugins-base/gst-libs/gst/gl/eagl/gstglcontext_eagl.m index ec18a0e748..02238d9583 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/eagl/gstglcontext_eagl.m +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/eagl/gstglcontext_eagl.m @@ -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; } diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c index 9af985d4e9..ca721f07d6 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c @@ -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;