From 413ceb060f31f504d9f0beb484c470bfe729cc25 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Mon, 28 Nov 2022 09:00:27 -0500 Subject: [PATCH] waylandsink: Add a comment about dmabuf without feature The code does not make it obvious that dmabuf is still supported without the feature. This documents that it is supported, but only for formats that are also support by SHM interface. Part-of: --- subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c | 3 +++ subprojects/gst-plugins-bad/ext/wayland/gstwaylandsink.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c b/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c index f93c481ef7..18d29d398e 100644 --- a/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c +++ b/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c @@ -958,6 +958,9 @@ gst_gtk_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) if (!gst_wl_display_check_format_for_dmabuf (priv->display, format)) goto unsupported_format; } else if (!gst_wl_display_check_format_for_shm (priv->display, format)) { + /* Note: we still support dmabuf in this case, but formats must also be + * supported on SHM interface to ensure a fallback is possible as we are + * not guarantied we'll get dmabuf in the buffers. */ goto unsupported_format; } diff --git a/subprojects/gst-plugins-bad/ext/wayland/gstwaylandsink.c b/subprojects/gst-plugins-bad/ext/wayland/gstwaylandsink.c index 44f989507c..13800fd639 100644 --- a/subprojects/gst-plugins-bad/ext/wayland/gstwaylandsink.c +++ b/subprojects/gst-plugins-bad/ext/wayland/gstwaylandsink.c @@ -717,6 +717,9 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) if (!gst_wl_display_check_format_for_dmabuf (self->display, format)) goto unsupported_format; } else if (!gst_wl_display_check_format_for_shm (self->display, format)) { + /* Note: we still support dmabuf in this case, but formats must also be + * supported on SHM interface to ensure a fallback is possible as we are + * not guarantied we'll get dmabuf in the buffers. */ goto unsupported_format; }