glupload: allow system memory for dmabuf in transform_caps

This should not be necessary, but currently not all plugins that provide
dmabuf memory announce this with caps features, e.g. v4l2.
The static caps already contain the system memory. It didn't break before
because other upload methods provide the necessary transformation.

https://bugzilla.gnome.org/show_bug.cgi?id=783521
This commit is contained in:
Michael Olbrich 2018-07-05 15:17:30 +02:00 committed by Nicolas Dufresne
parent b1299c179b
commit d7eb48cce7

View file

@ -533,10 +533,16 @@ _dma_buf_upload_transform_caps (gpointer impl, GstGLContext * context,
ret = tmp; ret = tmp;
} else { } else {
gint i, n; gint i, n;
GstCaps *tmp;
ret = ret =
_set_caps_features_with_passthrough (caps, _set_caps_features_with_passthrough (caps,
GST_CAPS_FEATURE_MEMORY_DMABUF, passthrough); GST_CAPS_FEATURE_MEMORY_DMABUF, passthrough);
tmp =
_set_caps_features_with_passthrough (caps,
GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY, passthrough);
gst_caps_append (ret, tmp);
n = gst_caps_get_size (ret); n = gst_caps_get_size (ret);
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {