summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunjun Ko <zzoon@igalia.com>2017-11-08 13:27:06 +0900
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-04-18 18:01:06 +0200
commitbfac678e9ad6d17c6a8f1a4e493bb97619a569fc (patch)
treefc249b6e10f6e555f075ffa0b21dd02a77a9b550
parent1825d939e79af722dea7506855c8575c29d73ea5 (diff)
videocontext: support wl-display in "gst.vaapi.app.Display"
Through "gst.vaapi.app.Display" context, users can set their own VADisplay and native display of their backend. So far we support only X11 display, from now we also support Wayland display. Attributes: - wl-display : pointer of struct wl_display . https://bugzilla.gnome.org/show_bug.cgi?id=705821
-rw-r--r--gst/vaapi/gstvaapivideocontext.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gst/vaapi/gstvaapivideocontext.c b/gst/vaapi/gstvaapivideocontext.c
index 4c5a1d3c..afc52681 100644
--- a/gst/vaapi/gstvaapivideocontext.c
+++ b/gst/vaapi/gstvaapivideocontext.c
@@ -31,6 +31,9 @@
#if USE_X11
#include <gst/vaapi/gstvaapidisplay_x11.h>
#endif
+#if USE_WAYLAND
+#include <gst/vaapi/gstvaapidisplay_wayland.h>
+#endif
GST_DEBUG_CATEGORY_STATIC (GST_CAT_CONTEXT);
@@ -103,6 +106,17 @@ gst_vaapi_video_context_get_display (GstContext * context, gboolean app_context,
gst_vaapi_display_x11_new_with_va_display (va_display, x11_display);
}
#endif
+#if USE_WAYLAND
+ if (!display) {
+ struct wl_display *wl_display = NULL;
+ if (gst_structure_get (structure, "wl-display", G_TYPE_POINTER,
+ &wl_display, NULL)) {
+ display =
+ gst_vaapi_display_wayland_new_with_va_display (va_display,
+ wl_display);
+ }
+ }
+#endif
_init_context_debug ();