summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-01-18 13:10:59 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-01-18 13:18:27 +0100
commitf3650381c356885b6150fd9b0c8a97363b880c13 (patch)
treee8211c2e366c662ff72dcd1bf07abf19f92dd48a
parent6efce291f681e4984eff1fbe6cf9ac5a5e167970 (diff)
vaapisink: check for display's color-balance properties
Check for display's color-balance properties, available by the VA-API driver, before setting them. Also logs an info message of those unavailable properties. https://bugzilla.gnome.org/show_bug.cgi?id=792638
-rw-r--r--gst/vaapi/gstvaapisink.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c
index a4bea494..8bd83030 100644
--- a/gst/vaapi/gstvaapisink.c
+++ b/gst/vaapi/gstvaapisink.c
@@ -680,8 +680,10 @@ cb_sync_values_from_display (GstVaapiSink * sink, GstVaapiDisplay * display)
for (i = 0; i < G_N_ELEMENTS (sink->cb_values); i++) {
const guint cb_id = CB_HUE + i;
- if (!gst_vaapi_display_has_property (display, cb_map[i].prop_name))
+ if (!gst_vaapi_display_has_property (display, cb_map[i].prop_name)) {
+ GST_INFO_OBJECT (sink, "backend does not handle %s", cb_map[i].prop_name);
continue;
+ }
value = 0.0;
g_object_get (display, cb_map[i].prop_name, &value, NULL);
@@ -700,6 +702,10 @@ cb_sync_values_to_display (GstVaapiSink * sink, GstVaapiDisplay * display)
const guint cb_id = CB_HUE + i;
if (!(sink->cb_changed & (1U << cb_id)))
continue;
+ if (!gst_vaapi_display_has_property (display, cb_map[i].prop_name)) {
+ GST_INFO_OBJECT (sink, "backend does not handle %s", cb_map[i].prop_name);
+ continue;
+ }
g_object_set_property (G_OBJECT (display), cb_map[i].prop_name,
cb_get_gvalue (sink, cb_id));