mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
vaapipostproc: don't GLTextureUpload if dmabuf
Do not add the meta:GstVideoGLTextureUploadMeta feature if the render element can handle dmabuf-based buffers, avoiding its negotiation. Similar as "vaapidecode: do not add meta:GstVideoGLTextureUploadMeta feature if can dmabuf" https://bugzilla.gnome.org/show_bug.cgi?id=755072
This commit is contained in:
parent
aa20508bcf
commit
bc97987ffb
1 changed files with 9 additions and 1 deletions
|
@ -1032,6 +1032,7 @@ expand_allowed_srcpad_caps (GstVaapiPostproc * postproc, GstCaps * caps)
|
|||
{
|
||||
GValue value = G_VALUE_INIT, v_format = G_VALUE_INIT;
|
||||
guint i, num_structures;
|
||||
gint gl_upload_meta_idx = -1;
|
||||
|
||||
if (postproc->filter == NULL)
|
||||
goto cleanup;
|
||||
|
@ -1052,8 +1053,10 @@ expand_allowed_srcpad_caps (GstVaapiPostproc * postproc, GstCaps * caps)
|
|||
GstStructure *structure;
|
||||
|
||||
if (gst_caps_features_contains (features,
|
||||
GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META))
|
||||
GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META)) {
|
||||
gl_upload_meta_idx = i;
|
||||
continue;
|
||||
}
|
||||
|
||||
structure = gst_caps_get_structure (caps, i);
|
||||
if (!structure)
|
||||
|
@ -1062,6 +1065,11 @@ expand_allowed_srcpad_caps (GstVaapiPostproc * postproc, GstCaps * caps)
|
|||
}
|
||||
g_value_unset (&value);
|
||||
|
||||
if (GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (postproc)
|
||||
&& gl_upload_meta_idx > -1) {
|
||||
gst_caps_remove_structure (caps, gl_upload_meta_idx);
|
||||
}
|
||||
|
||||
cleanup:
|
||||
return caps;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue