mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 22:06:41 +00:00
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
This commit is contained in:
parent
6efce291f6
commit
f3650381c3
1 changed files with 7 additions and 1 deletions
|
@ -680,8 +680,10 @@ cb_sync_values_from_display (GstVaapiSink * sink, GstVaapiDisplay * display)
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (sink->cb_values); i++) {
|
for (i = 0; i < G_N_ELEMENTS (sink->cb_values); i++) {
|
||||||
const guint cb_id = CB_HUE + 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;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
value = 0.0;
|
value = 0.0;
|
||||||
g_object_get (display, cb_map[i].prop_name, &value, NULL);
|
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;
|
const guint cb_id = CB_HUE + i;
|
||||||
if (!(sink->cb_changed & (1U << cb_id)))
|
if (!(sink->cb_changed & (1U << cb_id)))
|
||||||
continue;
|
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,
|
g_object_set_property (G_OBJECT (display), cb_map[i].prop_name,
|
||||||
cb_get_gvalue (sink, cb_id));
|
cb_get_gvalue (sink, cb_id));
|
||||||
|
|
Loading…
Reference in a new issue