Tizen 2.0 Release
[framework/multimedia/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapidisplay_x11.h
1 /*
2  *  gstvaapidisplay_x11.h - VA/X11 display abstraction
3  *
4  *  Copyright (C) 2010-2011 Splitted-Desktop Systems
5  *
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.
10  *
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.
15  *
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
20  */
21
22 #ifndef GST_VAAPI_DISPLAY_X11_H
23 #define GST_VAAPI_DISPLAY_X11_H
24
25 #include <va/va_x11.h>
26 #include <gst/vaapi/gstvaapidisplay.h>
27
28 G_BEGIN_DECLS
29
30 #define GST_VAAPI_TYPE_DISPLAY_X11 \
31     (gst_vaapi_display_x11_get_type())
32
33 #define GST_VAAPI_DISPLAY_X11(obj)                              \
34     (G_TYPE_CHECK_INSTANCE_CAST((obj),                          \
35                                 GST_VAAPI_TYPE_DISPLAY_X11,     \
36                                 GstVaapiDisplayX11))
37
38 #define GST_VAAPI_DISPLAY_X11_CLASS(klass)                      \
39     (G_TYPE_CHECK_CLASS_CAST((klass),                           \
40                              GST_VAAPI_TYPE_DISPLAY_X11,        \
41                              GstVaapiDisplayX11Class))
42
43 #define GST_VAAPI_IS_DISPLAY_X11(obj) \
44     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_DISPLAY_X11))
45
46 #define GST_VAAPI_IS_DISPLAY_X11_CLASS(klass) \
47     (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_DISPLAY_X11))
48
49 #define GST_VAAPI_DISPLAY_X11_GET_CLASS(obj)                    \
50     (G_TYPE_INSTANCE_GET_CLASS((obj),                           \
51                                GST_VAAPI_TYPE_DISPLAY_X11,      \
52                                GstVaapiDisplayX11Class))
53
54 typedef struct _GstVaapiDisplayX11              GstVaapiDisplayX11;
55 typedef struct _GstVaapiDisplayX11Private       GstVaapiDisplayX11Private;
56 typedef struct _GstVaapiDisplayX11Class         GstVaapiDisplayX11Class;
57
58 /**
59  * GstVaapiDisplayX11:
60  *
61  * VA/X11 display wrapper.
62  */
63 struct _GstVaapiDisplayX11 {
64     /*< private >*/
65     GstVaapiDisplay parent_instance;
66
67     GstVaapiDisplayX11Private *priv;
68 };
69
70
71 /**
72  * GstVaapiDisplayX11Class:
73  *
74  * VA/X11 display wrapper clas.
75  */
76 struct _GstVaapiDisplayX11Class {
77     /*< private >*/
78     GstVaapiDisplayClass parent_class;
79 };
80
81 GType
82 gst_vaapi_display_x11_get_type(void) G_GNUC_CONST;
83
84 GstVaapiDisplay *
85 gst_vaapi_display_x11_new(const gchar *display_name);
86
87 GstVaapiDisplay *
88 gst_vaapi_display_x11_new_with_display(Display *x11_display);
89
90 Display *
91 gst_vaapi_display_x11_get_display(GstVaapiDisplayX11 *display);
92
93 int
94 gst_vaapi_display_x11_get_screen(GstVaapiDisplayX11 *display);
95
96 G_END_DECLS
97
98 #endif /* GST_VAAPI_DISPLAY_X11_H */