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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1586>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-09-19 21:43:24 +02:00 committed by GStreamer Merge Bot
parent ed80aa5d6b
commit 9ed141734e

View file

@ -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);
}