From 79ec3d00ef9938b3799d3cb29983d703411467db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Mon, 18 Apr 2016 17:17:58 +0200 Subject: [PATCH] vaapidecode: warns if driver will do color conversions If the downstream feature is system memory, the surface has to be mapped, hence a warning message is logged saying that the driver has to do color conversions. This might be troublesome because not all the color conversion combinations are supported by the VA-API drivers, and there is not a reliable way to know them before hand. https://bugzilla.gnome.org/show_bug.cgi?id=765223 --- gst/vaapi/gstvaapidecode.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index fd2ca111d7..27ff0626eb 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -259,6 +259,14 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode) if (feature == GST_VAAPI_CAPS_FEATURE_NOT_NEGOTIATED) return FALSE; + if ((feature == GST_VAAPI_CAPS_FEATURE_SYSTEM_MEMORY || + feature == GST_VAAPI_CAPS_FEATURE_VAAPI_SURFACE) + && format != GST_VIDEO_INFO_FORMAT (&decode->decoded_info)) { + GST_FIXME_OBJECT (decode, "validate if driver can convert from %s to %s", + gst_video_format_to_string (GST_VIDEO_INFO_FORMAT + (&decode->decoded_info)), gst_video_format_to_string (format)); + } + switch (feature) { #if (USE_GLX || USE_EGL) case GST_VAAPI_CAPS_FEATURE_GL_TEXTURE_UPLOAD_META: