summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHyunjun Ko <zzoon@igalia.com>2017-07-05 14:33:38 +0900
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-07-18 18:50:39 +0200
commitd78e094fd4bc112b40872de07b078455989292cc (patch)
tree7f17191f9af6e2b19d4d1ea833db6ddbb1120006 /gst-libs
parent356212214b76722417325625529a91509d1fa94f (diff)
libs: display: x11: add gst_vaapi_display_x11_new_with_va_display()
Implements new API function so that users could create GstVaapiDisplay with their own VADisplay within a native display as backend. https://bugzilla.gnome.org/show_bug.cgi?id=766704
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay_x11.c16
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay_x11.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_x11.c b/gst-libs/gst/vaapi/gstvaapidisplay_x11.c
index ca7fa5c5..ee360095 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay_x11.c
+++ b/gst-libs/gst/vaapi/gstvaapidisplay_x11.c
@@ -373,6 +373,22 @@ gst_vaapi_display_x11_new_with_display (Display * x11_display)
GST_VAAPI_DISPLAY_INIT_FROM_NATIVE_DISPLAY, x11_display);
}
+GstVaapiDisplay *
+gst_vaapi_display_x11_new_with_va_display (VADisplay va_display,
+ Display * x11_display)
+{
+ GstVaapiDisplayInfo info = {
+ .va_display = va_display,
+ .native_display = x11_display,
+ .display_type = GST_VAAPI_DISPLAY_TYPE_X11,
+ };
+
+ g_return_val_if_fail (x11_display, NULL);
+
+ return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_X11, NULL),
+ GST_VAAPI_DISPLAY_INIT_FROM_VA_DISPLAY, &info);
+}
+
/**
* gst_vaapi_display_x11_get_display:
* @display: a #GstVaapiDisplayX11
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_x11.h b/gst-libs/gst/vaapi/gstvaapidisplay_x11.h
index 70354592..1458ea7a 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay_x11.h
+++ b/gst-libs/gst/vaapi/gstvaapidisplay_x11.h
@@ -42,6 +42,9 @@ gst_vaapi_display_x11_new (const gchar * display_name);
GstVaapiDisplay *
gst_vaapi_display_x11_new_with_display (Display * x11_display);
+GstVaapiDisplay *
+gst_vaapi_display_x11_new_with_va_display (VADisplay va_display, Display * x11_display);
+
Display *
gst_vaapi_display_x11_get_display (GstVaapiDisplayX11 * display);