2 * gstvaapiwindow_x11.h - VA/X11 window abstraction
4 * Copyright (C) 2010-2011 Splitted-Desktop Systems
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 2.1
9 * of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
22 #ifndef GST_VAAPI_WINDOW_X11_H
23 #define GST_VAAPI_WINDOW_X11_H
26 #include <gst/vaapi/gstvaapidisplay.h>
27 #include <gst/vaapi/gstvaapiwindow.h>
31 #define GST_VAAPI_TYPE_WINDOW_X11 \
32 (gst_vaapi_window_x11_get_type())
34 #define GST_VAAPI_WINDOW_X11(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
36 GST_VAAPI_TYPE_WINDOW_X11, \
39 #define GST_VAAPI_WINDOW_X11_CLASS(klass) \
40 (G_TYPE_CHECK_CLASS_CAST((klass), \
41 GST_VAAPI_TYPE_WINDOW_X11, \
42 GstVaapiWindowX11Class))
44 #define GST_VAAPI_IS_WINDOW_X11(obj) \
45 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_WINDOW_X11))
47 #define GST_VAAPI_IS_WINDOW_X11_CLASS(klass) \
48 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_WINDOW_X11))
50 #define GST_VAAPI_WINDOW_X11_GET_CLASS(obj) \
51 (G_TYPE_INSTANCE_GET_CLASS((obj), \
52 GST_VAAPI_TYPE_WINDOW_X11, \
53 GstVaapiWindowX11Class))
56 * GST_VAAPI_WINDOW_XWINDOW:
57 * @window: a #GstVaapiWindow
59 * Macro that evaluates to the underlying X11 #Window of @window
61 #define GST_VAAPI_WINDOW_XWINDOW(window) \
62 gst_vaapi_window_x11_get_xid(GST_VAAPI_WINDOW_X11(window))
64 typedef struct _GstVaapiWindowX11 GstVaapiWindowX11;
65 typedef struct _GstVaapiWindowX11Private GstVaapiWindowX11Private;
66 typedef struct _GstVaapiWindowX11Class GstVaapiWindowX11Class;
71 * An X11 #Window wrapper.
73 struct _GstVaapiWindowX11 {
75 GstVaapiWindow parent_instance;
77 GstVaapiWindowX11Private *priv;
81 * GstVaapiWindowX11Class:
82 * @get_visual: virtual function to get the desired visual used to
84 * @get_colormap: virtual function to get the desired colormap used to
87 * An X11 #Window wrapper class.
89 struct _GstVaapiWindowX11Class {
91 GstVaapiWindowClass parent_class;
93 Visual * (*get_visual) (GstVaapiWindow *window);
94 Colormap (*get_colormap) (GstVaapiWindow *window);
98 gst_vaapi_window_x11_get_type(void) G_GNUC_CONST;
101 gst_vaapi_window_x11_new(GstVaapiDisplay *display, guint width, guint height);
104 gst_vaapi_window_x11_new_with_xid(GstVaapiDisplay *display, Window xid, gboolean is_pixmap);
107 gst_vaapi_window_x11_get_xid(GstVaapiWindowX11 *window);
110 gst_vaapi_window_x11_is_foreign_xid(GstVaapiWindowX11 *window);
114 #endif /* GST_VAAPI_WINDOW_X11_H */