va: Use MEMORY_DMABUF definition to replace "memory:DMABuf" strings.

GST_CAPS_FEATURE_MEMORY_DMABUF is already a common definition, we should
just use it rather than use the "memory:DMABuf" strings by ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2466>
This commit is contained in:
He Junyan 2021-08-16 13:32:51 +08:00
parent a917648be3
commit d14e8055ad
2 changed files with 2 additions and 2 deletions

View file

@ -216,7 +216,7 @@ gst_va_create_raw_caps_from_config (GstVaDisplay * display, VAConfigID config)
if (mem_type & VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME
|| mem_type & VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2) {
feature_caps = gst_caps_copy (base_caps);
features = gst_caps_features_from_string ("memory:DMABuf");
features = gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF);
gst_caps_set_features_simple (feature_caps, features);
caps = gst_caps_merge (caps, feature_caps);
}

View file

@ -945,7 +945,7 @@ gst_va_filter_get_caps (GstVaFilter * self)
if (mem_types & VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME
|| mem_types & VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2) {
feature_caps = gst_caps_copy (base_caps);
features = gst_caps_features_from_string ("memory:DMABuf");
features = gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF);
gst_caps_set_features_simple (feature_caps, features);
caps = gst_caps_merge (caps, feature_caps);
}