2 * gstvaapiobject_priv.h - Base VA object (private definitions)
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_OBJECT_PRIV_H
23 #define GST_VAAPI_OBJECT_PRIV_H
25 #include <gst/vaapi/gstvaapiobject.h>
29 #define GST_VAAPI_OBJECT_GET_PRIVATE(obj) \
30 (G_TYPE_INSTANCE_GET_PRIVATE((obj), \
31 GST_VAAPI_TYPE_OBJECT, \
32 GstVaapiObjectPrivate))
34 #define GST_VAAPI_OBJECT_CAST(object) ((GstVaapiObject *)(object))
37 * GST_VAAPI_OBJECT_DISPLAY:
38 * @object: a #GstVaapiObject
40 * Macro that evaluates to the #GstVaapiDisplay the @object is bound to.
41 * This is an internal macro that does not do any run-time type check.
43 #define GST_VAAPI_OBJECT_DISPLAY(object) \
44 GST_VAAPI_OBJECT_CAST(object)->priv->display
47 * GST_VAAPI_OBJECT_ID:
48 * @object: a #GstVaapiObject
50 * Macro that evaluates to the #GstVaapiID contained in @object.
51 * This is an internal macro that does not do any run-time type checks.
53 #define GST_VAAPI_OBJECT_ID(object) \
54 GST_VAAPI_OBJECT_CAST(object)->priv->id
57 * GST_VAAPI_OBJECT_DISPLAY_X11:
58 * @object: a #GstVaapiObject
60 * Macro that evaluates to the #GstVaapiDisplayX11 the @object is bound to.
61 * This is an internal macro that does not do any run-time type check
62 * and requires #include "gstvaapidisplay_x11_priv.h"
64 #define GST_VAAPI_OBJECT_DISPLAY_X11(object) \
65 GST_VAAPI_DISPLAY_X11_CAST(GST_VAAPI_OBJECT_DISPLAY(object))
68 * GST_VAAPI_OBJECT_DISPLAY_GLX:
69 * @object: a #GstVaapiObject
71 * Macro that evaluates to the #GstVaapiDisplayGLX the @object is bound to.
72 * This is an internal macro that does not do any run-time type check
73 * and requires #include "gstvaapidisplay_glx_priv.h".
75 #define GST_VAAPI_OBJECT_DISPLAY_GLX(object) \
76 GST_VAAPI_DISPLAY_GLX_CAST(GST_VAAPI_OBJECT_DISPLAY(object))
79 * GST_VAAPI_OBJECT_DISPLAY_WAYLAND:
80 * @object: a #GstVaapiObject
82 * Macro that evaluates to the #GstVaapiDisplayWayland the @object is
83 * bound to. This is an internal macro that does not do any run-time
84 * type check and requires #include "gstvaapidisplay_wayland_priv.h"
86 #define GST_VAAPI_OBJECT_DISPLAY_WAYLAND(object) \
87 GST_VAAPI_DISPLAY_WAYLAND_CAST(GST_VAAPI_OBJECT_DISPLAY(object))
90 * GST_VAAPI_OBJECT_VADISPLAY:
91 * @object: a #GstVaapiObject
93 * Macro that evaluates to the #VADisplay of @display.
94 * This is an internal macro that does not do any run-time type check
95 * and requires #include "gstvaapidisplay_priv.h".
97 #define GST_VAAPI_OBJECT_VADISPLAY(object) \
98 GST_VAAPI_DISPLAY_VADISPLAY(GST_VAAPI_OBJECT_DISPLAY(object))
101 * GST_VAAPI_OBJECT_XDISPLAY:
102 * @object: a #GstVaapiObject
104 * Macro that evaluates to the underlying X11 #Display of @display.
105 * This is an internal macro that does not do any run-time type check
106 * and requires #include "gstvaapidisplay_x11_priv.h".
108 #define GST_VAAPI_OBJECT_XDISPLAY(object) \
109 GST_VAAPI_DISPLAY_XDISPLAY(GST_VAAPI_OBJECT_DISPLAY(object))
112 * GST_VAAPI_OBJECT_XSCREEN:
113 * @object: a #GstVaapiObject
115 * Macro that evaluates to the underlying X11 screen of @display.
116 * This is an internal macro that does not do any run-time type check
117 * and requires #include "gstvaapidisplay_x11_priv.h".
119 #define GST_VAAPI_OBJECT_XSCREEN(object) \
120 GST_VAAPI_DISPLAY_XSCREEN(GST_VAAPI_OBJECT_DISPLAY(object))
123 * GST_VAAPI_OBJECT_WL_DISPLAY:
124 * @object: a #GstVaapiObject
126 * Macro that evaluates to the underlying #wl_display of @display.
127 * This is an internal macro that does not do any run-time type check
128 * and requires #include "gstvaapidisplay_wayland_priv.h".
130 #define GST_VAAPI_OBJECT_WL_DISPLAY(object) \
131 GST_VAAPI_DISPLAY_WL_DISPLAY(GST_VAAPI_OBJECT_DISPLAY(object))
134 * GST_VAAPI_OBJECT_LOCK_DISPLAY:
135 * @object: a #GstVaapiObject
137 * Macro that locks the #GstVaapiDisplay contained in the @object.
138 * This is an internal macro that does not do any run-time type check.
140 #define GST_VAAPI_OBJECT_LOCK_DISPLAY(object) \
141 GST_VAAPI_DISPLAY_LOCK(GST_VAAPI_OBJECT_DISPLAY(object))
144 * GST_VAAPI_OBJECT_UNLOCK_DISPLAY:
145 * @object: a #GstVaapiObject
147 * Macro that unlocks the #GstVaapiDisplay contained in the @object.
148 * This is an internal macro that does not do any run-time type check.
150 #define GST_VAAPI_OBJECT_UNLOCK_DISPLAY(object) \
151 GST_VAAPI_DISPLAY_UNLOCK(GST_VAAPI_OBJECT_DISPLAY(object))
154 * GstVaapiObjectPrivate:
158 struct _GstVaapiObjectPrivate {
159 GstVaapiDisplay *display;
161 guint is_destroying : 1;
166 #endif /* GST_VAAPI_OBJECT_PRIV_H */