Make more helpers internal, thus reducing .text size further. Add gst_vaapi_display_x...
[profile/ivi/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapidisplay_priv.h
1 /*
2  *  gstvaapidisplay_priv.h - Base VA display (private definitions)
3  *
4  *  gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program 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
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
19  */
20
21 #ifndef GST_VAAPI_DISPLAY_PRIV_H
22 #define GST_VAAPI_DISPLAY_PRIV_H
23
24 #include <gst/vaapi/gstvaapidisplay.h>
25
26 G_BEGIN_DECLS
27
28 #define GST_VAAPI_DISPLAY_GET_PRIVATE(obj)                      \
29     (G_TYPE_INSTANCE_GET_PRIVATE((obj),                         \
30                                  GST_VAAPI_TYPE_DISPLAY,        \
31                                  GstVaapiDisplayPrivate))
32
33 #define GST_VAAPI_DISPLAY_CAST(display) ((GstVaapiDisplay *)(display))
34
35 /**
36  * GST_VAAPI_DISPLAY_VADISPLAY:
37  * @display_: a #GstVaapiDisplay
38  *
39  * Macro that evaluates to the #VADisplay of @display.
40  * This is an internal macro that does not do any run-time type check.
41  */
42 #undef  GST_VAAPI_DISPLAY_VADISPLAY
43 #define GST_VAAPI_DISPLAY_VADISPLAY(display_) \
44     GST_VAAPI_DISPLAY_CAST(display_)->priv->display
45
46 /**
47  * GST_VAAPI_DISPLAY_LOCK:
48  * @display: a #GstVaapiDisplay
49  *
50  * Locks @display
51  */
52 #undef  GST_VAAPI_DISPLAY_LOCK
53 #define GST_VAAPI_DISPLAY_LOCK(display) \
54     gst_vaapi_display_lock(GST_VAAPI_DISPLAY_CAST(display))
55
56 /**
57  * GST_VAAPI_DISPLAY_UNLOCK:
58  * @display: a #GstVaapiDisplay
59  *
60  * Unlocks @display
61  */
62 #undef  GST_VAAPI_DISPLAY_UNLOCK
63 #define GST_VAAPI_DISPLAY_UNLOCK(display) \
64     gst_vaapi_display_unlock(GST_VAAPI_DISPLAY_CAST(display))
65
66 /**
67  * GstVaapiDisplayPrivate:
68  *
69  * Base class for VA displays.
70  */
71 struct _GstVaapiDisplayPrivate {
72     GStaticMutex        mutex;
73     VADisplay           display;
74     guint               width;
75     guint               height;
76     guint               width_mm;
77     guint               height_mm;
78     guint               par_n;
79     guint               par_d;
80     GArray             *profiles;
81     GArray             *image_formats;
82     GArray             *subpicture_formats;
83     guint               create_display  : 1;
84 };
85
86 G_END_DECLS
87
88 #endif /* GST_VAAPI_DISPLAY_PRIV_H */