From 039658ea285d89cca2776ecdea472f6ec2d92a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Fri, 20 May 2022 09:59:58 +0200 Subject: [PATCH] vaapidecode,vaapipostproc: Disable DMAbuf from caps negotiation. Given the amount of complains about artifacts when negotiating dmabuf given incompatible drm-formats, and that there's no enough bandwidth for a proper and quick fix in gstreamer-vaapi, this patch disables, from decoders and postprocessor, the DMABuf caps feature. For those who needs DMABuf can use the va elements in -bad, increasing their ranking for autoplugging by using the environment variable GST_PLUGIN_FEATURE_RANK=vah264dec:MAX, for example. This can be considered a first step to the deprecation of gstreamer-vaapi in favor of the va plugin in -bad. Fixes: #1137 --- subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c | 9 --------- subprojects/gstreamer-vaapi/gst/vaapi/gstvaapipostproc.c | 3 +-- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c index 2ce31d99303..c60571b631f 100644 --- a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c +++ b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c @@ -71,7 +71,6 @@ char *gst_vaapidecode_sink_caps_str = NULL; static const char gst_vaapidecode_src_caps_str[] = GST_VAAPI_MAKE_SURFACE_CAPS "; " - GST_VIDEO_CAPS_MAKE_WITH_FEATURES(GST_CAPS_FEATURE_MEMORY_DMABUF, GST_VAAPI_FORMATS_ALL) " ;" #if (USE_GLX || USE_EGL) GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS "; " #endif @@ -261,14 +260,6 @@ gst_vaapidecode_ensure_allowed_srcpad_caps (GstVaapiDecode * decode) gst_caps_set_features_simple (va_caps, gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE)); - if (gst_vaapi_mem_type_supports (mem_types, - GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF) || - gst_vaapi_mem_type_supports (mem_types, - GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF2)) { - dma_caps = gst_caps_copy (base_caps); - gst_caps_set_features_simple (dma_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF)); - } #if (USE_GLX || USE_EGL) if (!GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (decode) && gst_vaapi_display_has_opengl (GST_VAAPI_PLUGIN_BASE_DISPLAY (decode))) { diff --git a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapipostproc.c b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapipostproc.c index ec53be25fd1..4fa79e51206 100644 --- a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapipostproc.c +++ b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapipostproc.c @@ -73,8 +73,7 @@ static const char gst_vaapipostproc_src_caps_str[] = GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS "; " #endif GST_VIDEO_CAPS_MAKE (GST_VAAPI_FORMATS_ALL) ", " - GST_CAPS_INTERLACED_MODES "; " - GST_VAAPI_MAKE_DMABUF_CAPS; + GST_CAPS_INTERLACED_MODES; /* *INDENT-ON* */ /* *INDENT-OFF* */ -- GitLab