Drop excessive threading that over-complicates synchronisation.
[profile/ivi/gstreamer-vaapi.git] / gst / vaapidecode / gstvaapidecode.h
1 /*
2  *  gstvaapidecode.h - VA-API video decoder
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_VAAPIDECODE_H
22 #define GST_VAAPIDECODE_H
23
24 #include <gst/gst.h>
25 #include <gst/gsttask.h>
26 #include <gst/vaapi/gstvaapidisplay.h>
27 #include <gst/vaapi/gstvaapidecoder.h>
28
29 G_BEGIN_DECLS
30
31 #define GST_TYPE_VAAPIDECODE \
32     (gst_vaapidecode_get_type())
33
34 #define GST_VAAPIDECODE(obj)                            \
35     (G_TYPE_CHECK_INSTANCE_CAST((obj),                  \
36                                 GST_TYPE_VAAPIDECODE,   \
37                                 GstVaapiDecode))
38
39 #define GST_VAAPIDECODE_CLASS(klass)                    \
40     (G_TYPE_CHECK_CLASS_CAST((klass),                   \
41                              GST_TYPE_VAAPIDECODE,      \
42                              GstVaapiDecodeClass))
43
44 #define GST_IS_VAAPIDECODE(obj) \
45     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_VAAPIDECODE))
46
47 #define GST_IS_VAAPIDECODE_CLASS(klass) \
48     (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VAAPIDECODE))
49
50 #define GST_VAAPIDECODE_GET_CLASS(obj)                  \
51     (G_TYPE_INSTANCE_GET_CLASS((obj),                   \
52                                GST_TYPE_VAAPIDECODE,    \
53                                GstVaapiDecodeClass))
54
55 typedef struct _GstVaapiDecode                  GstVaapiDecode;
56 typedef struct _GstVaapiDecodeClass             GstVaapiDecodeClass;
57
58 struct _GstVaapiDecode {
59     /*< private >*/
60     GstElement          parent_instance;
61
62     GstPad             *sinkpad;
63     GstPad             *srcpad;
64     GstVaapiDisplay    *display;
65     GstVaapiProfile     profile;
66     GstBuffer          *codec_data;
67     GstVaapiDecoder    *decoder;
68     unsigned int        use_ffmpeg      : 1;
69 };
70
71 struct _GstVaapiDecodeClass {
72     /*< private >*/
73     GstElementClass     parent_class;
74 };
75
76 GType
77 gst_vaapidecode_get_type(void);
78
79 G_END_DECLS
80
81 #endif /* GST_VAAPIDECODE_H */