glcontext: egl: Unrestrict the support base DRM formats
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 18 Oct 2024 18:41:44 +0000 (14:41 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sun, 20 Oct 2024 10:37:49 +0000 (10:37 +0000)
There is no requirement for a base DRM format to be supported by libgstvideo
in order to be uploaded to. Don't limite to DRM fourcc that have a libgstvideo
format mapping. This notably enabled AFBC support, which uses an opaque based
format that does not have a linear definition. This also adds R8/RG88 and
simimlar other formats that are not yet mapped in libgstvideo.

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

subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gstglcontext_egl.c

index a919014cca8417aeede36ebc570e2f45cfc1cb06..e7f767ec6a5cbe490b3e990d95d34e659c8b64b1 100644 (file)
@@ -1699,13 +1699,8 @@ gst_gl_context_egl_fetch_dma_formats (GstGLContext * context)
 
   for (i = 0; i < num_formats; i++) {
     EGLint num_mods = 0;
-    GstVideoFormat gst_format;
     GstGLDmaFormat dma_frmt;
 
-    gst_format = gst_video_dma_drm_fourcc_to_format (formats[i]);
-    if (gst_format == GST_VIDEO_FORMAT_UNKNOWN)
-      continue;
-
     dma_frmt.fourcc = formats[i];
     dma_frmt.modifiers = NULL;