Tizen 2.0 Release
[framework/multimedia/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapisubpicture.h
1 /*
2  *  gstvaapisubpicture.h - VA subpicture abstraction
3  *
4  *  Copyright (C) 2010-2011 Splitted-Desktop Systems
5  *  Copyright (C) 2011 Intel Corporation
6  *
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.
11  *
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.
16  *
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
21  */
22
23 #ifndef GST_VAAPI_SUBPICTURE_H
24 #define GST_VAAPI_SUBPICTURE_H
25
26 #include <gst/vaapi/gstvaapiobject.h>
27 #include <gst/vaapi/gstvaapidisplay.h>
28 #include <gst/vaapi/gstvaapiimage.h>
29 #include <gst/video/video-overlay-composition.h>
30
31 G_BEGIN_DECLS
32
33 #define GST_VAAPI_TYPE_SUBPICTURE \
34     (gst_vaapi_subpicture_get_type())
35
36 #define GST_VAAPI_SUBPICTURE(obj)                               \
37     (G_TYPE_CHECK_INSTANCE_CAST((obj),                          \
38                                 GST_VAAPI_TYPE_SUBPICTURE,      \
39                                 GstVaapiSubpicture))
40
41 #define GST_VAAPI_SUBPICTURE_CLASS(klass)                       \
42     (G_TYPE_CHECK_CLASS_CAST((klass),                           \
43                              GST_VAAPI_TYPE_SUBPICTURE,         \
44                              GstVaapiSubpictureClass))
45
46 #define GST_VAAPI_IS_SUBPICTURE(obj) \
47     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_SUBPICTURE))
48
49 #define GST_VAAPI_IS_SUBPICTURE_CLASS(klass) \
50     (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_SUBPICTURE))
51
52 #define GST_VAAPI_SUBPICTURE_GET_CLASS(obj)                     \
53     (G_TYPE_INSTANCE_GET_CLASS((obj),                           \
54                                GST_VAAPI_TYPE_SUBPICTURE,       \
55                                GstVaapiSubpictureClass))
56
57 typedef struct _GstVaapiSubpicture              GstVaapiSubpicture;
58 typedef struct _GstVaapiSubpicturePrivate       GstVaapiSubpicturePrivate;
59 typedef struct _GstVaapiSubpictureClass         GstVaapiSubpictureClass;
60
61 /**
62  * GstVaapiSubpicture:
63  *
64  * A VA subpicture wrapper
65  */
66 struct _GstVaapiSubpicture {
67     /*< private >*/
68     GstVaapiObject parent_instance;
69
70     GstVaapiSubpicturePrivate *priv;
71 };
72
73 /**
74  * GstVaapiSubpictureClass:
75  *
76  * A VA subpicture wrapper class
77  */
78 struct _GstVaapiSubpictureClass {
79     /*< private >*/
80     GstVaapiObjectClass parent_class;
81 };
82
83 GType
84 gst_vaapi_subpicture_get_type(void) G_GNUC_CONST;
85
86 GstVaapiSubpicture *
87 gst_vaapi_subpicture_new(GstVaapiImage *image);
88
89 GstVaapiSubpicture *
90 gst_vaapi_subpicture_new_from_overlay_rectangle(
91     GstVaapiDisplay          *display,
92     GstVideoOverlayRectangle *rect
93 );
94
95 GstVaapiID
96 gst_vaapi_subpicture_get_id(GstVaapiSubpicture *subpicture);
97
98 GstVaapiImage *
99 gst_vaapi_subpicture_get_image(GstVaapiSubpicture *subpicture);
100
101 void
102 gst_vaapi_subpicture_set_image(
103     GstVaapiSubpicture *subpicture,
104     GstVaapiImage      *image
105 );
106
107 G_END_DECLS
108
109 #endif /* GST_VAAPI_SUBPICTURE_H */