From a9769f95378d1cf20d6f6105eb90df7a3fe3f8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Sun, 14 Apr 2024 15:47:14 +0200 Subject: [PATCH] gst-plugin: sink: Stop preferring GL over GLES with GStreamer 1.24+ GStreamer 1.24 have implemented DRM modifiers negotiation that its lack of we were working around with using GL on unpatched GStreamer (non-Flatpak builds). Since GStreamer 1.24 does this and moreover it has disabled DMABuf codepath for non-GLES we should start preferring GLES with this version always. --- .../gst/plugin/handlers/gl/gstclapperglcontexthandler.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/gst/plugin/handlers/gl/gstclapperglcontexthandler.c b/src/lib/gst/plugin/handlers/gl/gstclapperglcontexthandler.c index 5e864895..57b21fdb 100644 --- a/src/lib/gst/plugin/handlers/gl/gstclapperglcontexthandler.c +++ b/src/lib/gst/plugin/handlers/gl/gstclapperglcontexthandler.c @@ -152,7 +152,13 @@ _gl_context_handler_context_realize (GstClapperGLContextHandler *self, GdkGLCont * See: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1236 */ #if GST_CLAPPER_GL_CONTEXT_HANDLER_HAVE_WAYLAND || GST_CLAPPER_GL_CONTEXT_HANDLER_HAVE_X11_EGL #if !defined(HAVE_GST_PATCHES) && (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)) - preferred_api = GDK_GL_API_GL; + { + guint major = 0, minor = 0, micro = 0, nano = 0; + + gst_version (&major, &minor, µ, &nano); + if (major == 1 && minor < 24) + preferred_api = GDK_GL_API_GL; + } #endif #endif