mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +00:00
gldownload: remove texture-target field from dmabuf/sysmem caps
https://bugzilla.gnome.org/show_bug.cgi?id=792342
This commit is contained in:
parent
5b970a75fa
commit
0d69b9d3cc
1 changed files with 14 additions and 0 deletions
|
@ -159,6 +159,18 @@ _set_caps_features (const GstCaps * caps, const gchar * feature_name)
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_remove_field (GstCaps * caps, const gchar * field)
|
||||||
|
{
|
||||||
|
guint n = gst_caps_get_size (caps);
|
||||||
|
guint i = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < n; i++) {
|
||||||
|
GstStructure *s = gst_caps_get_structure (caps, i);
|
||||||
|
gst_structure_remove_field (s, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
gst_gl_download_element_transform_caps (GstBaseTransform * bt,
|
gst_gl_download_element_transform_caps (GstBaseTransform * bt,
|
||||||
GstPadDirection direction, GstCaps * caps, GstCaps * filter)
|
GstPadDirection direction, GstCaps * caps, GstCaps * filter)
|
||||||
|
@ -174,10 +186,12 @@ gst_gl_download_element_transform_caps (GstBaseTransform * bt,
|
||||||
|
|
||||||
#if GST_GL_HAVE_PLATFORM_EGL && GST_GL_HAVE_DMABUF
|
#if GST_GL_HAVE_PLATFORM_EGL && GST_GL_HAVE_DMABUF
|
||||||
newcaps = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_DMABUF);
|
newcaps = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_DMABUF);
|
||||||
|
_remove_field (newcaps, "texture-target");
|
||||||
tmp = gst_caps_merge (tmp, newcaps);
|
tmp = gst_caps_merge (tmp, newcaps);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
newcaps = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY);
|
newcaps = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY);
|
||||||
|
_remove_field (newcaps, "texture-target");
|
||||||
tmp = gst_caps_merge (tmp, newcaps);
|
tmp = gst_caps_merge (tmp, newcaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue