Tizen 2.0 Release
[framework/multimedia/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapidisplay_glx.h
1 /*
2  *  gstvaapidisplay_glx.h - VA/GLX 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_GLX_H
23 #define GST_VAAPI_DISPLAY_GLX_H
24
25 #include <GL/gl.h>
26 #include <GL/glx.h>
27 #include <gst/vaapi/gstvaapidisplay_x11.h>
28
29 G_BEGIN_DECLS
30
31 #define GST_VAAPI_TYPE_DISPLAY_GLX \
32     (gst_vaapi_display_glx_get_type())
33
34 #define GST_VAAPI_DISPLAY_GLX(obj)                              \
35     (G_TYPE_CHECK_INSTANCE_CAST((obj),                          \
36                                 GST_VAAPI_TYPE_DISPLAY_GLX,     \
37                                 GstVaapiDisplayGLX))
38
39 #define GST_VAAPI_DISPLAY_GLX_CLASS(klass)                      \
40     (G_TYPE_CHECK_CLASS_CAST((klass),                           \
41                              GST_VAAPI_TYPE_DISPLAY_GLX,        \
42                              GstVaapiDisplayGLXClass))
43
44 #define GST_VAAPI_IS_DISPLAY_GLX(obj) \
45     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_DISPLAY_GLX))
46
47 #define GST_VAAPI_IS_DISPLAY_GLX_CLASS(klass) \
48     (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_DISPLAY_GLX))
49
50 #define GST_VAAPI_DISPLAY_GLX_GET_CLASS(obj)                    \
51     (G_TYPE_INSTANCE_GET_CLASS((obj),                           \
52                                GST_VAAPI_TYPE_DISPLAY_GLX,      \
53                                GstVaapiDisplayGLXClass))
54
55 typedef struct _GstVaapiDisplayGLX              GstVaapiDisplayGLX;
56 typedef struct _GstVaapiDisplayGLXClass         GstVaapiDisplayGLXClass;
57
58 /**
59  * GstVaapiDisplayGLX:
60  *
61  * VA/GLX display wrapper.
62  */
63 struct _GstVaapiDisplayGLX {
64     /*< private >*/
65     GstVaapiDisplayX11 parent_instance;
66 };
67
68
69 /**
70  * GstVaapiDisplayGLXClass:
71  *
72  * VA/GLX display wrapper clas.
73  */
74 struct _GstVaapiDisplayGLXClass {
75     /*< private >*/
76     GstVaapiDisplayX11Class parent_class;
77 };
78
79 GType
80 gst_vaapi_display_glx_get_type(void) G_GNUC_CONST;
81
82 GstVaapiDisplay *
83 gst_vaapi_display_glx_new(const gchar *display_name);
84
85 GstVaapiDisplay *
86 gst_vaapi_display_glx_new_with_display(Display *x11_display);
87
88 G_END_DECLS
89
90 #endif /* GST_VAAPI_DISPLAY_GLX_H */