Get VA image & subpicture formats as GstCaps.
[vaapi:gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapidisplay.h
1 /*
2  *  gstvaapidisplay.h - VA display 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_DISPLAY_H
22 #define GST_VAAPI_DISPLAY_H
23
24 #include <va/va.h>
25 #include <gst/gst.h>
26 #include <gst/vaapi/gstvaapiimageformat.h>
27
28 G_BEGIN_DECLS
29
30 #define GST_VAAPI_TYPE_DISPLAY \
31     (gst_vaapi_display_get_type())
32
33 #define GST_VAAPI_DISPLAY(obj)                          \
34     (G_TYPE_CHECK_INSTANCE_CAST((obj),                  \
35                                 GST_VAAPI_TYPE_DISPLAY, \
36                                 GstVaapiDisplay))
37
38 #define GST_VAAPI_DISPLAY_CLASS(klass)                  \
39     (G_TYPE_CHECK_CLASS_CAST((klass),                   \
40                              GST_VAAPI_TYPE_DISPLAY,    \
41                              GstVaapiDisplayClass))
42
43 #define GST_VAAPI_IS_DISPLAY(obj) \
44     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_DISPLAY))
45
46 #define GST_VAAPI_IS_DISPLAY_CLASS(klass) \
47     (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_DISPLAY))
48
49 #define GST_VAAPI_DISPLAY_GET_CLASS(obj)                \
50     (G_TYPE_INSTANCE_GET_CLASS((obj),                   \
51                                GST_VAAPI_TYPE_DISPLAY,  \
52                                GstVaapiDisplay))
53
54 typedef struct _GstVaapiDisplay                 GstVaapiDisplay;
55 typedef struct _GstVaapiDisplayPrivate          GstVaapiDisplayPrivate;
56 typedef struct _GstVaapiDisplayClass            GstVaapiDisplayClass;
57
58 struct _GstVaapiDisplay {
59     /*< private >*/
60     GObject parent_instance;
61
62     GstVaapiDisplayPrivate *priv;
63 };
64
65 struct _GstVaapiDisplayClass {
66     /*< private >*/
67     GObjectClass parent_class;
68 };
69
70 GType
71 gst_vaapi_display_get_type(void);
72
73 VADisplay
74 gst_vaapi_display_get_display(GstVaapiDisplay *display);
75
76 gboolean
77 gst_vaapi_display_has_profile(GstVaapiDisplay *display, VAProfile profile);
78
79 GstCaps *
80 gst_vaapi_display_get_image_caps(GstVaapiDisplay *display);
81
82 gboolean
83 gst_vaapi_display_has_image_format(
84     GstVaapiDisplay    *display,
85     GstVaapiImageFormat format
86 );
87
88 GstCaps *
89 gst_vaapi_display_get_subpicture_caps(GstVaapiDisplay *display);
90
91 gboolean
92 gst_vaapi_display_has_subpicture_format(
93     GstVaapiDisplay    *display,
94     GstVaapiImageFormat format
95 );
96
97 G_END_DECLS
98
99 #endif /* GST_VAAPI_DISPLAY_H */