From 9ed141734e286f359c65d75b6218c300d1b3d452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Sat, 19 Sep 2020 21:43:24 +0200 Subject: [PATCH] va: utils: use GstObject for GstVaDisplay in context Thus application could fetch the GstVaDisplay through the sync bus without knowning the specific implementation, and sharing it or extract properties. Part-of: --- sys/va/gstvautils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/va/gstvautils.c b/sys/va/gstvautils.c index c7a213506d..3b1b9fe158 100644 --- a/sys/va/gstvautils.c +++ b/sys/va/gstvautils.c @@ -292,7 +292,7 @@ gst_context_get_va_display (GstContext * context, const gchar * type_name, is_devnode = (g_strstr_len (type_name, -1, "renderD") != NULL); s = gst_context_get_structure (context); - if (gst_structure_get (s, "gst-display", GST_TYPE_VA_DISPLAY, &display, NULL)) { + if (gst_structure_get (s, "gst-display", GST_TYPE_OBJECT, &display, NULL)) { gchar *device_path = NULL; gboolean ret; @@ -302,7 +302,7 @@ gst_context_get_va_display (GstContext * context, const gchar * type_name, g_free (device_path); if (ret) goto accept; - } else if (!is_devnode) { + } else if (GST_IS_VA_DISPLAY (display) && !is_devnode) { goto accept; } @@ -346,5 +346,5 @@ gst_context_set_va_display (GstContext * context, GstVaDisplay * display) } s = gst_context_writable_structure (context); - gst_structure_set (s, "gst-display", GST_TYPE_VA_DISPLAY, display, NULL); + gst_structure_set (s, "gst-display", GST_TYPE_OBJECT, display, NULL); }