Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / ext / theora / gsttheoradec.h
1 /* GStreamer
2  * Copyright (C) 2004 Benjamin Otte <in7y118@public.uni-hamburg.de>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __GST_THEORADEC_H__
21 #define __GST_THEORADEC_H__
22
23 #ifdef HAVE_CONFIG_H
24 #  include "config.h"
25 #endif
26
27 #include <gst/gst.h>
28 #include <theora/theoradec.h>
29 #include <string.h>
30
31 G_BEGIN_DECLS
32
33 #define GST_TYPE_THEORA_DEC \
34   (gst_theora_dec_get_type())
35 #define GST_THEORA_DEC(obj) \
36   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_THEORA_DEC,GstTheoraDec))
37 #define GST_THEORA_DEC_CLASS(klass) \
38   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_THEORA_DEC,GstTheoraDecClass))
39 #define GST_IS_THEORA_DEC(obj) \
40   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_THEORA_DEC))
41 #define GST_IS_THEORA_DEC_CLASS(klass) \
42   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_THEORA_DEC))
43
44 typedef struct _GstTheoraDec GstTheoraDec;
45 typedef struct _GstTheoraDecClass GstTheoraDecClass;
46
47 /**
48  * GstTheoraDec:
49  *
50  * Opaque object data structure.
51  */
52 struct _GstTheoraDec
53 {
54   GstElement element;
55
56   /* Pads */
57   GstPad *sinkpad;
58   GstPad *srcpad;
59
60   /* theora decoder state */
61   th_dec_ctx *decoder;
62   //theora_state state;
63   th_setup_info *setup;
64   th_info info;
65   th_comment comment;
66
67   gboolean have_header;
68
69   GstClockTime last_timestamp;
70   guint64 frame_nr;
71   gboolean need_keyframe;
72   gint width, height;
73   gint offset_x, offset_y;
74   gint output_bpp;
75
76   /* telemetry debuging options */
77   gint telemetry_mv;
78   gint telemetry_mbmode;
79   gint telemetry_qi;
80   gint telemetry_bits;
81
82   gboolean crop;
83
84   /* list of buffers that need timestamps */
85   GList *queued;
86   /* list of raw output buffers */
87   GList *output;
88   /* gather/decode queues for reverse playback */
89   GList *gather;
90   GList *decode;
91   GList *pendingevents;
92
93   GstTagList *tags;
94
95   /* segment info */ /* with STREAM_LOCK */
96   GstSegment segment;
97   gboolean discont;
98   guint32 seqnum;
99
100   /* QoS stuff */ /* with LOCK*/
101   gdouble proportion;
102   GstClockTime earliest_time;
103   guint64 processed;
104   guint64 dropped;
105
106   gboolean have_par;
107   gint par_num;
108   gint par_den;
109 };
110
111 struct _GstTheoraDecClass
112 {
113   GstElementClass parent_class;
114 };
115
116 GType gst_theora_dec_get_type (void);
117
118 G_END_DECLS
119
120 #endif /* __GST_THEORADEC_H__ */