Restore the gst_vaapi_{surface,image,subpicture}_get_id() interfaces.
[platform/upstream/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapisubpicture.h
1 /*
2  *  gstvaapisubpicture.h - VA subpicture abstraction
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_SUBPICTURE_H
22 #define GST_VAAPI_SUBPICTURE_H
23
24 #include <gst/vaapi/gstvaapiobject.h>
25 #include <gst/vaapi/gstvaapidisplay.h>
26 #include <gst/vaapi/gstvaapiimage.h>
27
28 G_BEGIN_DECLS
29
30 #define GST_VAAPI_TYPE_SUBPICTURE \
31     (gst_vaapi_subpicture_get_type())
32
33 #define GST_VAAPI_SUBPICTURE(obj)                               \
34     (G_TYPE_CHECK_INSTANCE_CAST((obj),                          \
35                                 GST_VAAPI_TYPE_SUBPICTURE,      \
36                                 GstVaapiSubpicture))
37
38 #define GST_VAAPI_SUBPICTURE_CLASS(klass)                       \
39     (G_TYPE_CHECK_CLASS_CAST((klass),                           \
40                              GST_VAAPI_TYPE_SUBPICTURE,         \
41                              GstVaapiSubpictureClass))
42
43 #define GST_VAAPI_IS_SUBPICTURE(obj) \
44     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_SUBPICTURE))
45
46 #define GST_VAAPI_IS_SUBPICTURE_CLASS(klass) \
47     (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_SUBPICTURE))
48
49 #define GST_VAAPI_SUBPICTURE_GET_CLASS(obj)                     \
50     (G_TYPE_INSTANCE_GET_CLASS((obj),                           \
51                                GST_VAAPI_TYPE_SUBPICTURE,       \
52                                GstVaapiSubpictureClass))
53
54 typedef struct _GstVaapiSubpicture              GstVaapiSubpicture;
55 typedef struct _GstVaapiSubpicturePrivate       GstVaapiSubpicturePrivate;
56 typedef struct _GstVaapiSubpictureClass         GstVaapiSubpictureClass;
57
58 /**
59  * GstVaapiSubpicture:
60  *
61  * A VA subpicture wrapper
62  */
63 struct _GstVaapiSubpicture {
64     /*< private >*/
65     GstVaapiObject parent_instance;
66
67     GstVaapiSubpicturePrivate *priv;
68 };
69
70 /**
71  * GstVaapiSubpictureClass:
72  *
73  * A VA subpicture wrapper class
74  */
75 struct _GstVaapiSubpictureClass {
76     /*< private >*/
77     GstVaapiObjectClass parent_class;
78 };
79
80 GType
81 gst_vaapi_subpicture_get_type(void);
82
83 GstVaapiSubpicture *
84 gst_vaapi_subpicture_new(GstVaapiImage *image);
85
86 VASubpictureID
87 gst_vaapi_subpicture_get_id(GstVaapiSubpicture *subpicture);
88
89 GstVaapiImage *
90 gst_vaapi_subpicture_get_image(GstVaapiSubpicture *subpicture);
91
92 void
93 gst_vaapi_subpicture_set_image(
94     GstVaapiSubpicture *subpicture,
95     GstVaapiImage      *image
96 );
97
98 G_END_DECLS
99
100 #endif /* GST_VAAPI_SUBPICTURE_H */