opengl: gldownload: Restore DMABuf support

The download element relied on a fuzzy translation from GStreamer format to a
DRM fourcc, and then all supported modifiers for that fourcc. Since !9306 this
was fixed to only enumerate that way when direct import is used.

Flag direct upload to the transform caps helper, so that we now enumerate all
non-external formats again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9339>
This commit is contained in:
Nicolas Dufresne 2025-07-07 11:19:04 -04:00 committed by Tim-Philipp Müller
parent d45864d77c
commit d18dd3fa61

View File

@ -960,7 +960,9 @@ _convert_dma_drm (GstGLContext * context, GstStructure * s)
GValue newfmtval = G_VALUE_INIT;
if (context && gst_gl_dma_buf_transform_drm_formats_to_gst_formats (context,
drmval, GST_GL_DRM_FORMAT_INCLUDE_EMULATED, &newfmtval)) {
drmval,
GST_GL_DRM_FORMAT_INCLUDE_EMULATED |
GST_GL_DRM_FORMAT_DIRECT_IMPORT, &newfmtval)) {
gst_structure_set_value (s, "format", &newfmtval);
gst_structure_remove_field (s, "drm-format");
g_value_unset (&newfmtval);
@ -974,7 +976,7 @@ _convert_dma_drm (GstGLContext * context, GstStructure * s)
if (!context) {
gst_structure_remove_field (s, "drm-format");
} else if (gst_gl_dma_buf_transform_gst_formats_to_drm_formats (context,
fmtval, 0, &drmfmtval)) {
fmtval, GST_GL_DRM_FORMAT_DIRECT_IMPORT, &drmfmtval)) {
gst_structure_set_value (s, "drm-format", &drmfmtval);
g_value_unset (&drmfmtval);
} else {