glupload: only try the glmemory upload for sysmem/glmemory caps features
authorMatthew Waters <matthew@centricular.com>
Mon, 2 Feb 2015 13:35:26 +0000 (00:35 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:54 +0000 (19:31 +0000)
Allows selecting/testing the upload path with explicit caps features.

gst-libs/gst/gl/gstglupload.c

index 0eb54fc..2be2f6a 100644 (file)
@@ -155,6 +155,12 @@ _gl_memory_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps,
   if (!gst_caps_features_is_equal (features, gl_features))
     ret = FALSE;
 
+  features = gst_caps_get_features (in_caps, 0);
+  if (!gst_caps_features_is_equal (features, gl_features)
+      && !gst_caps_features_is_equal (features,
+          GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY))
+    ret = FALSE;
+
   gst_caps_features_free (gl_features);
 
   if (!ret)