summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapiwindow_x11.h
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-12-22 18:02:38 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-12-24 12:20:00 +0000
commit6c364cb9a7580442054ec6b9f4f1b2e03274a93d (patch)
tree59855f2da8ab13361fcdc656f55862c2da20e12c /gst-libs/gst/vaapi/gstvaapiwindow_x11.h
parent7b782be5ddc0aa2ae26674fe16059e914e20b840 (diff)
libs: window: refactor as gobject
This is another step in the gobjectification of the internal library of gstreamer-vaapi. Now it is the turn of GstVaapiWindow and its derivates. The idea is to minimize the changeset keeping the same design as much as possible. GstVaapiWindow is defined as an abstract class with two properties: the GstVaapiDisplay and the native ID. Thus, many of the GstVaapiObject macros were copied as GstVaapiWindow macros. The function gst_vaapi_window_new_internal() is kept as a decorator of for calling gst_vaapi_window_create() and the possibility of failure. The descendant classes, such as glx, still use the private structures, but through the gobject mechanism.
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapiwindow_x11.h')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_x11.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_x11.h b/gst-libs/gst/vaapi/gstvaapiwindow_x11.h
index 8b32e33b..095a267d 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow_x11.h
+++ b/gst-libs/gst/vaapi/gstvaapiwindow_x11.h
@@ -26,13 +26,17 @@
#define GST_VAAPI_WINDOW_X11_H
#include <X11/Xlib.h>
+#include <gst/gst.h>
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/gstvaapiwindow.h>
G_BEGIN_DECLS
+#define GST_TYPE_VAAPI_WINDOW_X11 (gst_vaapi_window_x11_get_type ())
#define GST_VAAPI_WINDOW_X11(obj) \
- ((GstVaapiWindowX11 *)(obj))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_WINDOW_X11, GstVaapiWindowX11))
+#define GST_VAAPI_IS_WINDOW_X11(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_WINDOW_X11))
/**
* GST_VAAPI_WINDOW_XWINDOW:
@@ -41,10 +45,13 @@ G_BEGIN_DECLS
* Macro that evaluates to the underlying X11 #Window of @window
*/
#define GST_VAAPI_WINDOW_XWINDOW(window) \
- gst_vaapi_window_x11_get_xid(GST_VAAPI_WINDOW_X11(window))
+ gst_vaapi_window_x11_get_xid (GST_VAAPI_WINDOW_X11 (window))
typedef struct _GstVaapiWindowX11 GstVaapiWindowX11;
+GType
+gst_vaapi_window_x11_get_type (void) G_GNUC_CONST;
+
GstVaapiWindow *
gst_vaapi_window_x11_new (GstVaapiDisplay * display, guint width, guint height);