diff options
author | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2016-10-16 01:04:09 +0100 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2017-02-03 17:11:56 +0100 |
commit | b0016e336bba268e4eb9968ff7847932711e07db (patch) | |
tree | ad01b1422702424905851f2889b50b640d0f1eab | |
parent | 25e8309567167321b1a596235f1114bc4a9da960 (diff) |
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.
-rw-r--r-- | gst/vaapi/gstvaapidecode.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index 1d84a8fd..80993d5c 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -213,15 +213,18 @@ gst_vaapidecode_ensure_allowed_srcpad_caps (GstVaapiDecode * decode) return FALSE; /* Create VA caps */ - out_caps = gst_caps_from_string (GST_VAAPI_MAKE_SURFACE_CAPS -#if (USE_GLX || USE_EGL) - ";" GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS -#endif - ); + out_caps = gst_caps_from_string (GST_VAAPI_MAKE_SURFACE_CAPS); if (!out_caps) { GST_WARNING_OBJECT (decode, "failed to create VA/GL source caps"); 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 (GST_VAAPI_PLUGIN_BASE (decode)); |