mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 15:22:11 +02:00
plugin: Temporarily try to avoid direct DMABuf import on desktop
This tries to avoid "scrambled" image on Linux with Intel GPUs that are mostly used together with x86 CPUs at the expense of using slightly slower non-direct DMABuf import, by not going with GLES by default on EGL. The "GST_GL_API" env can still be used to force one or another context type. We need for GStreamer to be aware of currently used DRM modifier first. On the other hand forcing GL everywhere would break most embedded systems that only work with GLES, so do it for x86 processors only... and pray for it to work. See: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1236
This commit is contained in:
@@ -504,6 +504,16 @@ gst_clapper_gl_base_importer_gdk_context_realize (GstClapperGLBaseImporter *self
|
||||
preferred_api = GDK_GL_API_GLES;
|
||||
#endif
|
||||
|
||||
/* FIXME: Remove once GStreamer can handle DRM modifiers. This tries to avoid
|
||||
* "scrambled" image on Linux with Intel GPUs that are mostly used together with
|
||||
* x86 CPUs at the expense of using slightly slower non-direct DMABuf import.
|
||||
* See: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1236 */
|
||||
#if GST_CLAPPER_GL_BASE_IMPORTER_HAVE_WAYLAND || GST_CLAPPER_GL_BASE_IMPORTER_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;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (!(success = _realize_gdk_context_with_api (gdk_context, preferred_api))) {
|
||||
GdkGLAPI fallback_api;
|
||||
|
||||
|
Reference in New Issue
Block a user