summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <j.isorce@samsung.com>2016-10-19 15:33:41 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2016-11-25 10:50:58 +0100
commit8ef142b62848f613a749ec47d59f679de6c1f4e1 (patch)
tree6506c5792d608812fd69fd4da1459386f835fd21
parent3ccf7d615c613066c5ad3c5de836a5a97f78a05d (diff)
vaapipostproc: GLTextureUpload if driver supports OpenGL
Removes GstVideoGLTextureUploadMeta caps feature if the driver doesn't support opengl. Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> https://bugzilla.gnome.org/show_bug.cgi?id=772838
-rw-r--r--gst/vaapi/gstvaapipostproc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c
index 556cb515..3a9ba4aa 100644
--- a/gst/vaapi/gstvaapipostproc.c
+++ b/gst/vaapi/gstvaapipostproc.c
@@ -1029,6 +1029,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;
@@ -1049,8 +1050,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)
@@ -1059,6 +1062,13 @@ expand_allowed_srcpad_caps (GstVaapiPostproc * postproc, GstCaps * caps)
}
g_value_unset (&value);
+ /* remove GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META if
+ * the backend doesn't support opengl */
+ if (!gst_vaapi_display_has_opengl (GST_VAAPI_PLUGIN_BASE_DISPLAY (postproc))
+ && gl_upload_meta_idx > -1) {
+ gst_caps_remove_structure (caps, gl_upload_meta_idx);
+ }
+
cleanup:
return caps;
}