Fix the typecast warnings:
[vaapi:sree-gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapiimagepool.h
1 /*
2  *  gstvaapiimagepool.h - Gst VA image pool
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_IMAGE_POOL_H
23 #define GST_VAAPI_IMAGE_POOL_H
24
25 #include <gst/vaapi/gstvaapiimage.h>
26 #include <gst/vaapi/gstvaapivideopool.h>
27
28 G_BEGIN_DECLS
29
30 typedef struct _GstVaapiImageMeta GstVaapiImageMeta;
31
32 GType gst_vaapi_image_meta_api_get_type (void);
33 #define GST_VAAPI_IMAGE_META_API_TYPE  (gst_vaapi_image_meta_api_get_type())
34 const GstMetaInfo * gst_vaapi_image_meta_get_info (void);
35 #define GST_VAAPI_IMAGE_META_INFO  (gst_vaapi_image_meta_get_info())
36
37 #define gst_buffer_get_vaapi_image_meta(b) ((GstVaapiImageMeta*)gst_buffer_get_meta((b),GST_VAAPI_IMAGE_META_API_TYPE))
38
39 struct _GstVaapiImageMeta {
40    GstMeta meta;
41
42    GstVaapiDisplay *display;
43    gint width, height;
44    guint render_flags;
45 };
46
47 #define GST_VAAPI_TYPE_IMAGE_POOL \
48     (gst_vaapi_image_pool_get_type())
49
50 #define GST_VAAPI_IMAGE_POOL(obj)                               \
51     (G_TYPE_CHECK_INSTANCE_CAST((obj),                          \
52                                 GST_VAAPI_TYPE_IMAGE_POOL,      \
53                                 GstVaapiImagePool))
54
55 #define GST_VAAPI_IMAGE_POOL_CLASS(klass)                       \
56     (G_TYPE_CHECK_CLASS_CAST((klass),                           \
57                              GST_VAAPI_TYPE_IMAGE_POOL,         \
58                              GstVaapiImagePoolClass))
59
60 #define GST_VAAPI_IS_IMAGE_POOL(obj) \
61     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_IMAGE_POOL))
62
63 #define GST_VAAPI_IS_IMAGE_POOL_CLASS(klass) \
64     (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_IMAGE_POOL))
65
66 #define GST_VAAPI_IMAGE_POOL_GET_CLASS(obj)                     \
67     (G_TYPE_INSTANCE_GET_CLASS((obj),                           \
68                                GST_VAAPI_TYPE_IMAGE_POOL,       \
69                                GstVaapiImagePoolClass))
70
71 typedef struct _GstVaapiImagePool               GstVaapiImagePool;
72 typedef struct _GstVaapiImagePoolPrivate        GstVaapiImagePoolPrivate;
73 typedef struct _GstVaapiImagePoolClass          GstVaapiImagePoolClass;
74
75 /**
76  * GstVaapiImagePool:
77  *
78  * A pool of lazily allocated #GstVaapiImage objects.
79  */
80 struct _GstVaapiImagePool {
81     /*< private >*/
82     GstVaapiVideoPool parent_instance;
83
84     GstVaapiImagePoolPrivate *priv;
85 };
86
87 /**
88  * GstVaapiImagePoolClass:
89  *
90  * A pool of lazily allocated #GstVaapiImage objects.
91  */
92 struct _GstVaapiImagePoolClass {
93     /*< private >*/
94     GstVaapiVideoPoolClass parent_class;
95 };
96
97 GType
98 gst_vaapi_image_pool_get_type(void) G_GNUC_CONST;
99
100 GstBufferPool *
101 gst_vaapi_image_pool_new(GstVaapiDisplay *display, GstCaps *caps);
102
103 G_END_DECLS
104
105 #endif /* GST_VAAPI_IMAGE_POOL_H */