2 * gstvaapidisplay_x11_priv.h - Internal VA/X11 interface
4 * Copyright (C) 2010-2011 Splitted-Desktop Systems
5 * Copyright (C) 2012 Intel Corporation
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * as published by the Free Software Foundation; either version 2.1
10 * of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301 USA
23 #ifndef GST_VAAPI_DISPLAY_X11_PRIV_H
24 #define GST_VAAPI_DISPLAY_X11_PRIV_H
26 #include <gst/vaapi/gstvaapiutils_x11.h>
27 #include <gst/vaapi/gstvaapidisplay_x11.h>
28 #include "gstvaapidisplay_priv.h"
32 #define GST_VAAPI_IS_DISPLAY_X11(display) \
33 ((display) != NULL && \
34 (GST_VAAPI_DISPLAY_TYPE(display) == GST_VAAPI_DISPLAY_TYPE_X11 || \
35 GST_VAAPI_DISPLAY_TYPE(display) == GST_VAAPI_DISPLAY_TYPE_GLX))
37 #define GST_VAAPI_DISPLAY_X11_CAST(display) \
38 ((GstVaapiDisplayX11 *)(display))
40 #define GST_VAAPI_DISPLAY_X11_PRIVATE(display) \
41 (&GST_VAAPI_DISPLAY_X11_CAST(display)->priv)
43 typedef struct _GstVaapiDisplayX11Private GstVaapiDisplayX11Private;
44 typedef struct _GstVaapiDisplayX11Class GstVaapiDisplayX11Class;
47 * GST_VAAPI_DISPLAY_XDISPLAY:
48 * @display: a #GstVaapiDisplay
50 * Macro that evaluates to the underlying X11 #Display of @display
52 #undef GST_VAAPI_DISPLAY_XDISPLAY
53 #define GST_VAAPI_DISPLAY_XDISPLAY(display) \
54 GST_VAAPI_DISPLAY_X11_PRIVATE(display)->x11_display
57 * GST_VAAPI_DISPLAY_XSCREEN:
58 * @display: a #GstVaapiDisplay
60 * Macro that evaluates to the underlying X11 screen of @display
62 #undef GST_VAAPI_DISPLAY_XSCREEN
63 #define GST_VAAPI_DISPLAY_XSCREEN(display) \
64 GST_VAAPI_DISPLAY_X11_PRIVATE(display)->x11_screen
66 struct _GstVaapiDisplayX11Private {
70 GArray *pixmap_formats;
71 guint use_foreign_display : 1; // Foreign native_display?
73 guint synchronous : 1;
79 * VA/X11 display wrapper.
81 struct _GstVaapiDisplayX11 {
83 GstVaapiDisplay parent_instance;
85 GstVaapiDisplayX11Private priv;
89 * GstVaapiDisplayX11Class:
91 * VA/X11 display wrapper clas.
93 struct _GstVaapiDisplayX11Class {
95 GstVaapiDisplayClass parent_class;
99 gst_vaapi_display_x11_class_init(GstVaapiDisplayX11Class *klass);
103 gst_vaapi_display_x11_get_pixmap_format(GstVaapiDisplayX11 *display,
108 gst_vaapi_display_x11_get_pixmap_depth(GstVaapiDisplayX11 *display,
109 GstVideoFormat format);
113 #endif /* GST_VAAPI_DISPLAY_X11_PRIV_H */