diff options
author | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2016-10-25 17:48:47 +0200 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2016-11-25 10:50:39 +0100 |
commit | 3ccf7d615c613066c5ad3c5de836a5a97f78a05d (patch) | |
tree | a802017f9c6825b90cff8f0f110933911bd4f85a | |
parent | 2fe2bc55b96c4089bf4af272757190c1e122d6e6 (diff) |
vaapidecode: GLTextureUpload if driver supports OpenGL
When the allowed source pad caps are generated, the GLTextureUpload caps are
only inserted if the driver support OpenGL.
https://bugzilla.gnome.org/show_bug.cgi?id=772838
-rw-r--r-- | gst/vaapi/gstvaapidecode.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index 94e5eca28b..2cc4a1d35d 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -212,15 +212,14 @@ gst_vaapidecode_ensure_allowed_srcpad_caps (GstVaapiDecode * decode) return FALSE; /* 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); + out_caps = gst_caps_make_writable (out_caps); #if (USE_GLX || USE_EGL) - ";" GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS -#endif - ); - if (!out_caps) { - GST_WARNING_OBJECT (decode, "failed to create VA/GL source caps"); - return FALSE; + if (gst_vaapi_display_has_opengl (GST_VAAPI_PLUGIN_BASE_DISPLAY (decode))) { + 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)); @@ -230,7 +229,6 @@ gst_vaapidecode_ensure_allowed_srcpad_caps (GstVaapiDecode * decode) return FALSE; } - out_caps = gst_caps_make_writable (out_caps); gst_caps_append (out_caps, gst_caps_copy (raw_caps)); decode->allowed_srcpad_caps = out_caps; |