2 * gstvaapiwindow_glx.h - VA/GLX 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_GLX_H
23 #define GST_VAAPI_WINDOW_GLX_H
26 #include <gst/vaapi/gstvaapidisplay.h>
27 #include <gst/vaapi/gstvaapiwindow_x11.h>
28 #include <gst/vaapi/gstvaapitexture.h>
32 #define GST_VAAPI_TYPE_WINDOW_GLX \
33 (gst_vaapi_window_glx_get_type())
35 #define GST_VAAPI_WINDOW_GLX(obj) \
36 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
37 GST_VAAPI_TYPE_WINDOW_GLX, \
40 #define GST_VAAPI_WINDOW_GLX_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_CAST((klass), \
42 GST_VAAPI_TYPE_WINDOW_GLX, \
43 GstVaapiWindowGLXClass))
45 #define GST_VAAPI_IS_WINDOW_GLX(obj) \
46 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_WINDOW_GLX))
48 #define GST_VAAPI_IS_WINDOW_GLX_CLASS(klass) \
49 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_WINDOW_GLX))
51 #define GST_VAAPI_WINDOW_GLX_GET_CLASS(obj) \
52 (G_TYPE_INSTANCE_GET_CLASS((obj), \
53 GST_VAAPI_TYPE_WINDOW_GLX, \
54 GstVaapiWindowGLXClass))
56 typedef struct _GstVaapiWindowGLX GstVaapiWindowGLX;
57 typedef struct _GstVaapiWindowGLXPrivate GstVaapiWindowGLXPrivate;
58 typedef struct _GstVaapiWindowGLXClass GstVaapiWindowGLXClass;
63 * An X11 #Window suitable for GLX rendering.
65 struct _GstVaapiWindowGLX {
67 GstVaapiWindowX11 parent_instance;
69 GstVaapiWindowGLXPrivate *priv;
73 * GstVaapiWindowGLXClass:
75 * An X11 #Window suitable for GLX rendering.
77 struct _GstVaapiWindowGLXClass {
79 GstVaapiWindowX11Class parent_class;
83 gst_vaapi_window_glx_get_type(void) G_GNUC_CONST;
86 gst_vaapi_window_glx_new(GstVaapiDisplay *display, guint width, guint height);
89 gst_vaapi_window_glx_new_with_xid(GstVaapiDisplay *display, Window xid);
92 gst_vaapi_window_glx_get_context(GstVaapiWindowGLX *window);
95 gst_vaapi_window_glx_set_context(GstVaapiWindowGLX *window, GLXContext ctx);
98 gst_vaapi_window_glx_make_current(GstVaapiWindowGLX *window);
101 gst_vaapi_window_glx_swap_buffers(GstVaapiWindowGLX *window);
104 gst_vaapi_window_glx_put_texture(
105 GstVaapiWindowGLX *window,
106 GstVaapiTexture *texture,
107 const GstVaapiRectangle *src_rect,
108 const GstVaapiRectangle *dst_rect
113 #endif /* GST_VAAPI_WINDOW_GLX_H */