Commit 915cef5e authored by Gwenole Beauchesne's avatar Gwenole Beauchesne

libs: use GstVaapiMiniObject for display objects.

parent 3cc7b269
......@@ -465,7 +465,7 @@ gst_vaapi_decoder_finalize(GstVaapiDecoder *decoder)
gst_vaapi_object_replace(&decoder->context, NULL);
decoder->va_context = VA_INVALID_ID;
g_clear_object(&decoder->display);
gst_vaapi_display_replace(&decoder->display, NULL);
decoder->va_display = NULL;
}
......@@ -485,7 +485,7 @@ gst_vaapi_decoder_init(GstVaapiDecoder *decoder, GstVaapiDisplay *display,
gst_video_info_init(&codec_state->info);
decoder->user_data = NULL;
decoder->display = g_object_ref(display);
decoder->display = gst_vaapi_display_ref(display);
decoder->va_display = GST_VAAPI_DISPLAY_VADISPLAY(display);
decoder->context = NULL;
decoder->va_context = VA_INVALID_ID;
......
This diff is collapsed.
......@@ -31,34 +31,14 @@
G_BEGIN_DECLS
#define GST_VAAPI_TYPE_DISPLAY \
(gst_vaapi_display_get_type())
#define GST_VAAPI_DISPLAY(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
GST_VAAPI_TYPE_DISPLAY, \
GstVaapiDisplay))
#define GST_VAAPI_DISPLAY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), \
GST_VAAPI_TYPE_DISPLAY, \
GstVaapiDisplayClass))
#define GST_VAAPI_DISPLAY(obj) \
((GstVaapiDisplay *)(obj))
#define GST_VAAPI_IS_DISPLAY(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_DISPLAY))
#define GST_VAAPI_IS_DISPLAY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_DISPLAY))
#define GST_VAAPI_DISPLAY_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), \
GST_VAAPI_TYPE_DISPLAY, \
GstVaapiDisplayClass))
((obj) != NULL)
typedef struct _GstVaapiDisplayInfo GstVaapiDisplayInfo;
typedef struct _GstVaapiDisplay GstVaapiDisplay;
typedef struct _GstVaapiDisplayPrivate GstVaapiDisplayPrivate;
typedef struct _GstVaapiDisplayClass GstVaapiDisplayClass;
/**
* GstVaapiDisplayType:
......@@ -111,56 +91,18 @@ struct _GstVaapiDisplayInfo {
#define GST_VAAPI_DISPLAY_PROP_BRIGHTNESS "brightness"
#define GST_VAAPI_DISPLAY_PROP_CONTRAST "contrast"
/**
* GstVaapiDisplay:
*
* Base class for VA displays.
*/
struct _GstVaapiDisplay {
/*< private >*/
GObject parent_instance;
GstVaapiDisplayPrivate *priv;
};
GstVaapiDisplay *
gst_vaapi_display_new_with_display(VADisplay va_display);
/**
* GstVaapiDisplayClass:
* @open_display: virtual function to open a display
* @close_display: virtual function to close a display
* @lock: (optional) virtual function to lock a display
* @unlock: (optional) virtual function to unlock a display
* @sync: (optional) virtual function to sync a display
* @flush: (optional) virtual function to flush pending requests of a display
* @get_display: virtual function to retrieve the #GstVaapiDisplayInfo
* @get_size: virtual function to retrieve the display dimensions, in pixels
* @get_size_mm: virtual function to retrieve the display dimensions, in millimeters
*
* Base class for VA displays.
*/
struct _GstVaapiDisplayClass {
/*< private >*/
GObjectClass parent_class;
/*< public >*/
gboolean (*open_display) (GstVaapiDisplay *display);
void (*close_display) (GstVaapiDisplay *display);
void (*lock) (GstVaapiDisplay *display);
void (*unlock) (GstVaapiDisplay *display);
void (*sync) (GstVaapiDisplay *display);
void (*flush) (GstVaapiDisplay *display);
gboolean (*get_display) (GstVaapiDisplay *display,
GstVaapiDisplayInfo *info);
void (*get_size) (GstVaapiDisplay *display,
guint *pwidth, guint *pheight);
void (*get_size_mm) (GstVaapiDisplay *display,
guint *pwidth, guint *pheight);
};
GstVaapiDisplay *
gst_vaapi_display_ref(GstVaapiDisplay *display);
GType
gst_vaapi_display_get_type(void) G_GNUC_CONST;
void
gst_vaapi_display_unref(GstVaapiDisplay *display);
GstVaapiDisplay *
gst_vaapi_display_new_with_display(VADisplay va_display);
void
gst_vaapi_display_replace(GstVaapiDisplay **old_display_ptr,
GstVaapiDisplay *new_display);
void
gst_vaapi_display_lock(GstVaapiDisplay *display);
......@@ -238,6 +180,14 @@ gst_vaapi_display_has_subpicture_format(
gboolean
gst_vaapi_display_has_property(GstVaapiDisplay *display, const gchar *name);
gboolean
gst_vaapi_display_get_property(GstVaapiDisplay *display, const gchar *name,
GValue *out_value);
gboolean
gst_vaapi_display_set_property(GstVaapiDisplay *display, const gchar *name,
const GValue *value);
gboolean
gst_vaapi_display_get_render_mode(
GstVaapiDisplay *display,
......
This diff is collapsed.
......@@ -26,59 +26,13 @@
G_BEGIN_DECLS
#define GST_VAAPI_TYPE_DISPLAY_DRM \
(gst_vaapi_display_drm_get_type())
#define GST_VAAPI_DISPLAY_DRM(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
GST_VAAPI_TYPE_DISPLAY_DRM, \
GstVaapiDisplayDRM))
#define GST_VAAPI_DISPLAY_DRM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), \
GST_VAAPI_TYPE_DISPLAY_DRM, \
GstVaapiDisplayDRMClass))
#define GST_VAAPI_DISPLAY_DRM(obj) \
((GstVaapiDisplayDRM *)(obj))
#define GST_VAAPI_IS_DISPLAY_DRM(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_DISPLAY_DRM))
#define GST_VAAPI_IS_DISPLAY_DRM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_DISPLAY_DRM))
#define GST_VAAPI_DISPLAY_DRM_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), \
GST_VAAPI_TYPE_DISPLAY_DRM, \
GstVaapiDisplayDRMClass))
((obj) != NULL)
typedef struct _GstVaapiDisplayDRM GstVaapiDisplayDRM;
typedef struct _GstVaapiDisplayDRMPrivate GstVaapiDisplayDRMPrivate;
typedef struct _GstVaapiDisplayDRMClass GstVaapiDisplayDRMClass;
/**
* GstVaapiDisplayDRM:
*
* VA/DRM display wrapper.
*/
struct _GstVaapiDisplayDRM {
/*< private >*/
GstVaapiDisplay parent_instance;
GstVaapiDisplayDRMPrivate *priv;
};
/**
* GstVaapiDisplayDRMClass:
*
* VA/DRM display wrapper clas.
*/
struct _GstVaapiDisplayDRMClass {
/*< private >*/
GstVaapiDisplayClass parent_class;
};
GType
gst_vaapi_display_drm_get_type(void) G_GNUC_CONST;
GstVaapiDisplay *
gst_vaapi_display_drm_new(const gchar *device_path);
......
......@@ -26,12 +26,14 @@
G_BEGIN_DECLS
#define GST_VAAPI_DISPLAY_DRM_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), \
GST_VAAPI_TYPE_DISPLAY_DRM, \
GstVaapiDisplayDRMPrivate))
#define GST_VAAPI_DISPLAY_DRM_CAST(display) \
((GstVaapiDisplayDRM *)(display))
#define GST_VAAPI_DISPLAY_DRM_CAST(display) ((GstVaapiDisplayDRM *)(display))
#define GST_VAAPI_DISPLAY_DRM_PRIVATE(display) \
(&GST_VAAPI_DISPLAY_DRM_CAST(display)->priv)
typedef struct _GstVaapiDisplayDRMPrivate GstVaapiDisplayDRMPrivate;
typedef struct _GstVaapiDisplayDRMClass GstVaapiDisplayDRMClass;
/**
* GST_VAAPI_DISPLAY_DRM_DEVICE:
......@@ -41,13 +43,35 @@ G_BEGIN_DECLS
*/
#undef GST_VAAPI_DISPLAY_DRM_DEVICE
#define GST_VAAPI_DISPLAY_DRM_DEVICE(display) \
GST_VAAPI_DISPLAY_DRM_CAST(display)->priv->drm_device
GST_VAAPI_DISPLAY_DRM_PRIVATE(display)->drm_device
struct _GstVaapiDisplayDRMPrivate {
gchar *device_path_default;
gchar *device_path;
gint drm_device;
guint create_display : 1;
gchar *device_path_default;
gchar *device_path;
gint drm_device;
guint use_foreign_display : 1; // Foreign native_display?
};
/**
* GstVaapiDisplayDRM:
*
* VA/DRM display wrapper.
*/
struct _GstVaapiDisplayDRM {
/*< private >*/
GstVaapiDisplay parent_instance;
GstVaapiDisplayDRMPrivate priv;
};
/**
* GstVaapiDisplayDRMClass:
*
* VA/DRM display wrapper clas.
*/
struct _GstVaapiDisplayDRMClass {
/*< private >*/
GstVaapiDisplayClass parent_class;
};
G_END_DECLS
......
......@@ -37,45 +37,47 @@
#define DEBUG 1
#include "gstvaapidebug.h"
G_DEFINE_TYPE(GstVaapiDisplayGLX,
gst_vaapi_display_glx,
GST_VAAPI_TYPE_DISPLAY_X11)
static void
gst_vaapi_display_glx_finalize(GObject *object)
{
G_OBJECT_CLASS(gst_vaapi_display_glx_parent_class)->finalize(object);
}
static gboolean
gst_vaapi_display_glx_get_display_info(
GstVaapiDisplay *display,
GstVaapiDisplayInfo *info
)
{
GstVaapiDisplayClass * const dpy_class =
GST_VAAPI_DISPLAY_CLASS(gst_vaapi_display_glx_parent_class);
const GstVaapiDisplayGLXClass * const klass =
GST_VAAPI_DISPLAY_GLX_GET_CLASS(display);
info->va_display = vaGetDisplayGLX(GST_VAAPI_DISPLAY_XDISPLAY(display));
if (!info->va_display)
return FALSE;
info->display_type = GST_VAAPI_DISPLAY_TYPE_GLX;
return dpy_class->get_display(display, info);
return klass->parent_get_display(display, info);
}
static void
gst_vaapi_display_glx_class_init(GstVaapiDisplayGLXClass *klass)
{
GObjectClass * const object_class = G_OBJECT_CLASS(klass);
GstVaapiMiniObjectClass * const object_class =
GST_VAAPI_MINI_OBJECT_CLASS(klass);
GstVaapiDisplayClass * const dpy_class = GST_VAAPI_DISPLAY_CLASS(klass);
object_class->finalize = gst_vaapi_display_glx_finalize;
gst_vaapi_display_x11_class_init(&klass->parent_class);
object_class->size = sizeof(GstVaapiDisplayGLX);
klass->parent_get_display = dpy_class->get_display;
dpy_class->get_display = gst_vaapi_display_glx_get_display_info;
}
static void
gst_vaapi_display_glx_init(GstVaapiDisplayGLX *display)
static inline const GstVaapiDisplayClass *
gst_vaapi_display_glx_class(void)
{
static GstVaapiDisplayGLXClass g_class;
static gsize g_class_init = FALSE;
if (g_once_init_enter(&g_class_init)) {
gst_vaapi_display_glx_class_init(&g_class);
g_once_init_leave(&g_class_init, TRUE);
}
return GST_VAAPI_DISPLAY_CLASS(&g_class);
}
/**
......@@ -91,9 +93,8 @@ gst_vaapi_display_glx_init(GstVaapiDisplayGLX *display)
GstVaapiDisplay *
gst_vaapi_display_glx_new(const gchar *display_name)
{
return g_object_new(GST_VAAPI_TYPE_DISPLAY_GLX,
"display-name", display_name,
NULL);
return gst_vaapi_display_new(gst_vaapi_display_glx_class(),
GST_VAAPI_DISPLAY_INIT_FROM_DISPLAY_NAME, (gpointer)display_name);
}
/**
......@@ -110,7 +111,8 @@ gst_vaapi_display_glx_new(const gchar *display_name)
GstVaapiDisplay *
gst_vaapi_display_glx_new_with_display(Display *x11_display)
{
return g_object_new(GST_VAAPI_TYPE_DISPLAY_GLX,
"x11-display", x11_display,
NULL);
g_return_val_if_fail(x11_display != NULL, NULL);
return gst_vaapi_display_new(gst_vaapi_display_glx_class(),
GST_VAAPI_DISPLAY_INIT_FROM_NATIVE_DISPLAY, x11_display);
}
......@@ -29,56 +29,13 @@
G_BEGIN_DECLS
#define GST_VAAPI_TYPE_DISPLAY_GLX \
(gst_vaapi_display_glx_get_type())
#define GST_VAAPI_DISPLAY_GLX(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
GST_VAAPI_TYPE_DISPLAY_GLX, \
GstVaapiDisplayGLX))
#define GST_VAAPI_DISPLAY_GLX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), \
GST_VAAPI_TYPE_DISPLAY_GLX, \
GstVaapiDisplayGLXClass))
#define GST_VAAPI_DISPLAY_GLX(obj) \
((GstVaapiDisplayGLX *)(obj))
#define GST_VAAPI_IS_DISPLAY_GLX(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_DISPLAY_GLX))
#define GST_VAAPI_IS_DISPLAY_GLX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_DISPLAY_GLX))
#define GST_VAAPI_DISPLAY_GLX_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), \
GST_VAAPI_TYPE_DISPLAY_GLX, \
GstVaapiDisplayGLXClass))
((obj) != NULL)
typedef struct _GstVaapiDisplayGLX GstVaapiDisplayGLX;
typedef struct _GstVaapiDisplayGLXClass GstVaapiDisplayGLXClass;
/**
* GstVaapiDisplayGLX:
*
* VA/GLX display wrapper.
*/
struct _GstVaapiDisplayGLX {
/*< private >*/
GstVaapiDisplayX11 parent_instance;
};
/**
* GstVaapiDisplayGLXClass:
*
* VA/GLX display wrapper clas.
*/
struct _GstVaapiDisplayGLXClass {
/*< private >*/
GstVaapiDisplayX11Class parent_class;
};
GType
gst_vaapi_display_glx_get_type(void) G_GNUC_CONST;
GstVaapiDisplay *
gst_vaapi_display_glx_new(const gchar *display_name);
......
......@@ -24,10 +24,42 @@
#include <gst/vaapi/gstvaapiutils_glx.h>
#include <gst/vaapi/gstvaapidisplay_glx.h>
#include "gstvaapidisplay_x11_priv.h"
G_BEGIN_DECLS
#define GST_VAAPI_DISPLAY_GLX_CAST(display) ((GstVaapiDisplayGLX *)(display))
#define GST_VAAPI_DISPLAY_GLX_CAST(display) \
((GstVaapiDisplayGLX *)(display))
#define GST_VAAPI_DISPLAY_GLX_CLASS(klass) \
((GstVaapiDisplayGLXClass *)(klass))
#define GST_VAAPI_DISPLAY_GLX_GET_CLASS(obj) \
GST_VAAPI_DISPLAY_GLX_CLASS(GST_VAAPI_MINI_OBJECT_GET_CLASS(obj))
typedef struct _GstVaapiDisplayGLXClass GstVaapiDisplayGLXClass;
/**
* GstVaapiDisplayGLX:
*
* VA/GLX display wrapper.
*/
struct _GstVaapiDisplayGLX {
/*< private >*/
GstVaapiDisplayX11 parent_instance;
};
/**
* GstVaapiDisplayGLXClass:
*
* VA/GLX display wrapper clas.
*/
struct _GstVaapiDisplayGLXClass {
/*< private >*/
GstVaapiDisplayX11Class parent_class;
GstVaapiDisplayGetInfoFunc parent_get_display;
};
G_END_DECLS
......
......@@ -25,15 +25,45 @@
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/gstvaapidisplaycache.h>
#include "gstvaapiminiobject.h"
G_BEGIN_DECLS
#define GST_VAAPI_DISPLAY_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), \
GST_VAAPI_TYPE_DISPLAY, \
GstVaapiDisplayPrivate))
#define GST_VAAPI_DISPLAY_CAST(display) \
((GstVaapiDisplay *)(display))
#define GST_VAAPI_DISPLAY_CAST(display) ((GstVaapiDisplay *)(display))
#define GST_VAAPI_DISPLAY_GET_PRIVATE(display) \
(&GST_VAAPI_DISPLAY_CAST(display)->priv)
#define GST_VAAPI_DISPLAY_CLASS(klass) \
((GstVaapiDisplayClass *)(klass))
#define GST_VAAPI_IS_DISPLAY_CLASS(klass) \
((klass) != NULL)
#define GST_VAAPI_DISPLAY_GET_CLASS(obj) \
GST_VAAPI_DISPLAY_CLASS(GST_VAAPI_MINI_OBJECT_GET_CLASS(obj))
typedef struct _GstVaapiDisplayPrivate GstVaapiDisplayPrivate;
typedef struct _GstVaapiDisplayClass GstVaapiDisplayClass;
typedef enum _GstVaapiDisplayInitType GstVaapiDisplayInitType;
typedef void (*GstVaapiDisplayInitFunc) (GstVaapiDisplay *display);
typedef gboolean (*GstVaapiDisplayBindFunc) (GstVaapiDisplay *display,
gpointer native_dpy);
typedef gboolean (*GstVaapiDisplayOpenFunc) (GstVaapiDisplay *display,
const gchar *name);
typedef void (*GstVaapiDisplayCloseFunc) (GstVaapiDisplay *display);
typedef void (*GstVaapiDisplayLockFunc) (GstVaapiDisplay *display);
typedef void (*GstVaapiDisplayUnlockFunc) (GstVaapiDisplay *display);
typedef void (*GstVaapiDisplaySyncFunc) (GstVaapiDisplay *display);
typedef void (*GstVaapiDisplayFlushFunc) (GstVaapiDisplay *display);
typedef gboolean (*GstVaapiDisplayGetInfoFunc) (GstVaapiDisplay *display,
GstVaapiDisplayInfo *info);
typedef void (*GstVaapiDisplayGetSizeFunc) (GstVaapiDisplay *display,
guint *pwidth, guint *pheight);
typedef void (*GstVaapiDisplayGetSizeMFunc)(GstVaapiDisplay *display,
guint *pwidth, guint *pheight);
/**
* GST_VAAPI_DISPLAY_VADISPLAY:
......@@ -44,7 +74,7 @@ G_BEGIN_DECLS
*/
#undef GST_VAAPI_DISPLAY_VADISPLAY
#define GST_VAAPI_DISPLAY_VADISPLAY(display_) \
GST_VAAPI_DISPLAY_CAST(display_)->priv->display
GST_VAAPI_DISPLAY_GET_PRIVATE(display_)->display
/**
* GST_VAAPI_DISPLAY_LOCK:
......@@ -66,11 +96,6 @@ G_BEGIN_DECLS
#define GST_VAAPI_DISPLAY_UNLOCK(display) \
gst_vaapi_display_unlock(GST_VAAPI_DISPLAY_CAST(display))
/**
* GstVaapiDisplayPrivate:
*
* Base class for VA displays.
*/
struct _GstVaapiDisplayPrivate {
GstVaapiDisplay *parent;
GRecMutex mutex;
......@@ -87,12 +112,95 @@ struct _GstVaapiDisplayPrivate {
GArray *image_formats;
GArray *subpicture_formats;
GArray *properties;
guint create_display : 1;
guint use_foreign_display : 1;
};
/**
* GstVaapiDisplay:
*
* Base class for VA displays.
*/
struct _GstVaapiDisplay {
/*< private >*/
GstVaapiMiniObject parent_instance;
GstVaapiDisplayPrivate priv;
};
/**
* GstVaapiDisplayClass:
* @open_display: virtual function to open a display
* @close_display: virtual function to close a display
* @lock: (optional) virtual function to lock a display
* @unlock: (optional) virtual function to unlock a display
* @sync: (optional) virtual function to sync a display
* @flush: (optional) virtual function to flush pending requests of a display
* @get_display: virtual function to retrieve the #GstVaapiDisplayInfo
* @get_size: virtual function to retrieve the display dimensions, in pixels
* @get_size_mm: virtual function to retrieve the display dimensions, in millimeters
*
* Base class for VA displays.
*/
struct _GstVaapiDisplayClass {
/*< private >*/
GstVaapiMiniObjectClass parent_class;
/*< public >*/
GstVaapiDisplayInitFunc init;
GstVaapiDisplayBindFunc bind_display;
GstVaapiDisplayOpenFunc open_display;
GstVaapiDisplayCloseFunc close_display;
GstVaapiDisplayLockFunc lock;
GstVaapiDisplayUnlockFunc unlock;
GstVaapiDisplaySyncFunc sync;
GstVaapiDisplayFlushFunc flush;
GstVaapiDisplayGetInfoFunc get_display;
GstVaapiDisplayGetSizeFunc get_size;
GstVaapiDisplayGetSizeMFunc get_size_mm;
};
/* Initialization types */
enum _GstVaapiDisplayInitType {
GST_VAAPI_DISPLAY_INIT_FROM_DISPLAY_NAME = 1,
GST_VAAPI_DISPLAY_INIT_FROM_NATIVE_DISPLAY,
GST_VAAPI_DISPLAY_INIT_FROM_VA_DISPLAY
};
void
gst_vaapi_display_class_init(GstVaapiDisplayClass *klass);
GstVaapiDisplay *
gst_vaapi_display_new(const GstVaapiDisplayClass *klass,
GstVaapiDisplayInitType init_type, gpointer init_value);
GstVaapiDisplayCache *
gst_vaapi_display_get_cache(void);
/* Inline reference counting for core libgstvaapi library */
#ifdef GST_VAAPI_CORE
#define gst_vaapi_display_ref_internal(display) \
((gpointer)gst_vaapi_mini_object_ref(GST_VAAPI_MINI_OBJECT(display)))
#define gst_vaapi_display_unref_internal(display) \
gst_vaapi_mini_object_unref(GST_VAAPI_MINI_OBJECT(display))
#define gst_vaapi_display_replace_internal(old_display_ptr, new_display) \
gst_vaapi_mini_object_replace((GstVaapiMiniObject **)(old_display_ptr), \
GST_VAAPI_MINI_OBJECT(new_display))
#undef gst_vaapi_display_ref
#define gst_vaapi_display_ref(display) \
gst_vaapi_display_ref_internal((display))
#undef gst_vaapi_display_unref
#define gst_vaapi_display_unref(display) \
gst_vaapi_display_unref_internal((display))
#undef gst_vaapi_display_replace
#define gst_vaapi_display_replace(old_display_ptr, new_display) \
gst_vaapi_display_replace_internal((old_display_ptr), (new_display))
#endif
G_END_DECLS
#endif /* GST_VAAPI_DISPLAY_PRIV_H */
......@@ -27,58 +27,13 @@
G_BEGIN_DECLS
#define GST_VAAPI_TYPE_DISPLAY_WAYLAND \
(gst_vaapi_display_wayland_get_type())
#define GST_VAAPI_DISPLAY_WAYLAND(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
GST_VAAPI_TYPE_DISPLAY_WAYLAND, \
GstVaapiDisplayWayland))
#define GST_VAAPI_DISPLAY_WAYLAND_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), \
GST_VAAPI_TYPE_DISPLAY_WAYLAND, \
GstVaapiDisplayWaylandClass))
#define GST_VAAPI_DISPLAY_WAYLAND(obj) \
((GstVaapiDisplayWayland *)(obj))
#define GST_VAAPI_IS_DISPLAY_WAYLAND(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_DISPLAY_WAYLAND))
#define GST_VAAPI_IS_DISPLAY_WAYLAND_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_DISPLAY_WAYLAND))
#define GST_VAAPI_DISPLAY_WAYLAND_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), \
GST_VAAPI_TYPE_DISPLAY_WAYLAND, \
GstVaapiDisplayWaylandClass))
((obj) != NULL)
typedef struct _GstVaapiDisplayWayland GstVaapiDisplayWayland;
typedef struct _GstVaapiDisplayWaylandPrivate GstVaapiDisplayWaylandPrivate;
typedef struct _GstVaapiDisplayWaylandClass GstVaapiDisplayWaylandClass;
/**
* GstVaapiDisplayWayland:
*
* VA/Wayland display wrapper.
*/
struct _GstVaapiDisplayWayland {
/*< private >*/
GstVaapiDisplay parent_instance;
GstVaapiDisplayWaylandPrivate *priv;
};
/**
* GstVaapiDisplayWaylandClass:
*
* VA/Wayland display wrapper clas.
*/
struct _GstVaapiDisplayWaylandClass {
/*< private >*/
GstVaapiDisplayClass parent_class;
};
GType
gst_vaapi_display_wayland_get_type(void) G_GNUC_CONST;
GstVaapiDisplay *
gst_vaapi_display_wayland_new(const gchar *display_name);
......