vaapidecode: don't GLTextureUpload if dmabuf

Do not add the meta:GstVideoGLTextureUploadMeta feature if the render
element can handle dmabuf-based buffers, avoiding its negotiation.
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-10-16 01:04:09 +01:00
parent 25e8309567
commit b0016e336b

View file

@ -213,15 +213,18 @@ gst_vaapidecode_ensure_allowed_srcpad_caps (GstVaapiDecode * decode)
return FALSE; return FALSE;
/* Create VA caps */ /* Create VA caps */
out_caps = gst_caps_from_string (GST_VAAPI_MAKE_SURFACE_CAPS out_caps = gst_caps_from_string (GST_VAAPI_MAKE_SURFACE_CAPS);
#if (USE_GLX || USE_EGL)
";" GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS
#endif
);
if (!out_caps) { if (!out_caps) {
GST_WARNING_OBJECT (decode, "failed to create VA/GL source caps"); GST_WARNING_OBJECT (decode, "failed to create VA/GL source caps");
return FALSE; return FALSE;
} }
#if (USE_GLX || USE_EGL)
if (!GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (decode)) {
out_caps = gst_caps_make_writable (out_caps);
gst_caps_append (out_caps,
gst_caps_from_string (GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS));
}
#endif
raw_caps = gst_vaapi_plugin_base_get_allowed_raw_caps raw_caps = gst_vaapi_plugin_base_get_allowed_raw_caps
(GST_VAAPI_PLUGIN_BASE (decode)); (GST_VAAPI_PLUGIN_BASE (decode));