2 * gstvaapidecode.h - VA-API video decoder
4 * Copyright (C) 2010-2011 Splitted-Desktop Systems
5 * Copyright (C) 2011 Intel Corporation
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.
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.
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
23 #ifndef GST_VAAPIDECODE_H
24 #define GST_VAAPIDECODE_H
27 #include <gst/gsttask.h>
28 #include <gst/vaapi/gstvaapidisplay.h>
29 #include <gst/vaapi/gstvaapidecoder.h>
33 #define GST_TYPE_VAAPIDECODE \
34 (gst_vaapidecode_get_type())
36 #define GST_VAAPIDECODE(obj) \
37 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
38 GST_TYPE_VAAPIDECODE, \
41 #define GST_VAAPIDECODE_CLASS(klass) \
42 (G_TYPE_CHECK_CLASS_CAST((klass), \
43 GST_TYPE_VAAPIDECODE, \
46 #define GST_IS_VAAPIDECODE(obj) \
47 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_VAAPIDECODE))
49 #define GST_IS_VAAPIDECODE_CLASS(klass) \
50 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VAAPIDECODE))
52 #define GST_VAAPIDECODE_GET_CLASS(obj) \
53 (G_TYPE_INSTANCE_GET_CLASS((obj), \
54 GST_TYPE_VAAPIDECODE, \
57 typedef struct _GstVaapiDecode GstVaapiDecode;
58 typedef struct _GstVaapiDecodeClass GstVaapiDecodeClass;
60 struct _GstVaapiDecode {
62 GstElement parent_instance;
65 GstCaps *sinkpad_caps;
68 GstVaapiDisplay *display;
69 GstVaapiDecoder *decoder;
72 GstCaps *decoder_caps;
73 GstCaps *allowed_caps;
74 GstEvent *delayed_new_seg;
76 gint64 render_time_base;
77 GstClockTime last_buffer_time;
78 unsigned int is_ready : 1;
79 // escape decoding (blocked by hw resource) when there is _flush event, usually happens during seek.
80 unsigned int escape_decoding : 1;
83 struct _GstVaapiDecodeClass {
85 GstElementClass parent_class;
89 gst_vaapidecode_get_type(void) G_GNUC_CONST;
93 #endif /* GST_VAAPIDECODE_H */