Add initial VA display abstraction.
[profile/ivi/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapidisplay_x11.h
1 /*
2  *  gstvaapidisplay_x11.h - VA/X11 display abstraction
3  *
4  *  gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program 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
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
19  */
20
21 #ifndef GST_VAAPI_DISPLAY_X11_H
22 #define GST_VAAPI_DISPLAY_X11_H
23
24 #include "gstvaapidisplay.h"
25 #include <va/va_x11.h>
26
27 G_BEGIN_DECLS
28
29 #define GST_VAAPI_TYPE_DISPLAY_X11 \
30     (gst_vaapi_display_x11_get_type())
31
32 #define GST_VAAPI_DISPLAY_X11(obj)                              \
33     (G_TYPE_CHECK_INSTANCE_CAST((obj),                          \
34                                 GST_VAAPI_TYPE_DISPLAY_X11,     \
35                                 GstVaapiDisplayX11))
36
37 #define GST_VAAPI_DISPLAY_X11_CLASS(klass)                      \
38     (G_TYPE_CHECK_CLASS_CAST((klass),                           \
39                              GST_VAAPI_TYPE_DISPLAY_X11,        \
40                              GstVaapiDisplayX11Class))
41
42 #define GST_VAAPI_IS_DISPLAY_X11(obj) \
43     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_DISPLAY_X11))
44
45 #define GST_VAAPI_IS_DISPLAY_X11_CLASS(klass) \
46     (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_DISPLAY_X11))
47
48 #define GST_VAAPI_DISPLAY_X11_GET_CLASS(obj)                    \
49     (G_TYPE_INSTANCE_GET_CLASS((obj),                           \
50                                GST_VAAPI_TYPE_DISPLAY_X11,      \
51                                GstVaapiDisplayX11))
52
53 typedef struct _GstVaapiDisplayX11              GstVaapiDisplayX11;
54 typedef struct _GstVaapiDisplayX11Private       GstVaapiDisplayX11Private;
55 typedef struct _GstVaapiDisplayX11Class         GstVaapiDisplayX11Class;
56
57 struct _GstVaapiDisplayX11 {
58     /*< private >*/
59     GstVaapiDisplay parent_instance;
60
61     GstVaapiDisplayX11Private *priv;
62 };
63
64 struct _GstVaapiDisplayX11Class {
65     /*< private >*/
66     GstVaapiDisplayClass parent_class;
67 };
68
69 GType
70 gst_vaapi_display_x11_get_type(void);
71
72 GstVaapiDisplay *
73 gst_vaapi_display_x11_new(Display *x11_display);
74
75 Display *
76 gst_vaapi_display_x11_get_display(GstVaapiDisplayX11 *display);
77
78 G_END_DECLS
79
80 #endif /* GST_VAAPI_DISPLAY_X11_H */