mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
libs: display: wayland: add gst_vaapi_display_wayland_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=705821
This commit is contained in:
parent
1f71b5a57d
commit
1825d939e7
2 changed files with 33 additions and 0 deletions
|
@ -350,6 +350,35 @@ gst_vaapi_display_wayland_new_with_display (struct wl_display * wl_display)
|
|||
NULL), GST_VAAPI_DISPLAY_INIT_FROM_NATIVE_DISPLAY, wl_display);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_display_wayland_new_with_va_display:
|
||||
* @va_display: a VADisplay #va_display
|
||||
* @wl_display: an Wayland #wl_display
|
||||
*
|
||||
* Creates a #GstVaapiDisplay based on the VADisplay @va_display and
|
||||
* the Wayland @wl_display display.
|
||||
* The caller still owns the display and must call
|
||||
* wl_display_disconnect() when all #GstVaapiDisplay references are
|
||||
* released.
|
||||
*
|
||||
* Return value: a newly allocated #GstVaapiDisplay object
|
||||
*/
|
||||
|
||||
GstVaapiDisplay *
|
||||
gst_vaapi_display_wayland_new_with_va_display (VADisplay va_display,
|
||||
struct wl_display * wl_display)
|
||||
{
|
||||
GstVaapiDisplayInfo info = {
|
||||
.va_display = va_display,
|
||||
.native_display = wl_display,
|
||||
};
|
||||
|
||||
g_return_val_if_fail (wl_display, NULL);
|
||||
|
||||
return gst_vaapi_display_new (g_object_new (GST_TYPE_VAAPI_DISPLAY_WAYLAND,
|
||||
NULL), GST_VAAPI_DISPLAY_INIT_FROM_VA_DISPLAY, &info);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_display_wayland_get_display:
|
||||
* @display: a #GstVaapiDisplayWayland
|
||||
|
|
|
@ -41,6 +41,10 @@ gst_vaapi_display_wayland_new (const gchar * display_name);
|
|||
GstVaapiDisplay *
|
||||
gst_vaapi_display_wayland_new_with_display (struct wl_display * wl_display);
|
||||
|
||||
GstVaapiDisplay *
|
||||
gst_vaapi_display_wayland_new_with_va_display (VADisplay va_display,
|
||||
struct wl_display * wl_display);
|
||||
|
||||
struct wl_display *
|
||||
gst_vaapi_display_wayland_get_display (GstVaapiDisplayWayland * display);
|
||||
|
||||
|
|
Loading…
Reference in a new issue