tizen 2.0 init
[framework/multimedia/gst-plugins-good0.10.git] / gst / matroska / matroska-parse.h
1 /* GStreamer Matroska muxer/demuxer
2  * (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
3  * (c) 2011 Debarshi Ray <rishi@gnu.org>
4  *
5  * matroska-parse.h: matroska file/stream parseer definition
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 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  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 #ifndef __GST_MATROSKA_PARSE_H__
24 #define __GST_MATROSKA_PARSE_H__
25
26 #include <gst/gst.h>
27
28 #include "ebml-read.h"
29 #include "matroska-ids.h"
30 #include "matroska-read-common.h"
31
32 G_BEGIN_DECLS
33
34 #define GST_TYPE_MATROSKA_PARSE \
35   (gst_matroska_parse_get_type ())
36 #define GST_MATROSKA_PARSE(obj) \
37   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MATROSKA_PARSE, GstMatroskaParse))
38 #define GST_MATROSKA_PARSE_CLASS(klass) \
39   (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MATROSKA_PARSE, GstMatroskaParseClass))
40 #define GST_IS_MATROSKA_PARSE(obj) \
41   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MATROSKA_PARSE))
42 #define GST_IS_MATROSKA_PARSE_CLASS(klass) \
43   (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MATROSKA_PARSE))
44
45 typedef struct _GstMatroskaParse {
46   GstElement              parent;
47
48   /* < private > */
49
50   GstMatroskaReadCommon    common;
51
52   /* pads */
53   GstPad                  *srcpad;
54   GstClock                *clock;
55   guint                    num_v_streams;
56   guint                    num_a_streams;
57   guint                    num_t_streams;
58
59   GstBuffer *streamheader;
60   gboolean pushed_headers;
61   GstClockTime last_timestamp;
62
63   /* state */
64   //gboolean                 streaming;
65   guint                    level_up;
66   guint64                  seek_block;
67   gboolean                 seek_first;
68
69   /* did we parse cues/tracks/segmentinfo already? */
70   gboolean                 tracks_parsed;
71   GList                   *seek_parsed;
72
73   /* keeping track of playback position */
74   gboolean                 segment_running;
75   GstClockTime             last_stop_end;
76
77   GstEvent                *close_segment;
78   GstEvent                *new_segment;
79
80   /* some state saving */
81   GstClockTime             cluster_time;
82   guint64                  cluster_offset;
83   guint64                  first_cluster_offset;
84   guint64                  next_cluster_offset;
85
86   /* index stuff */
87   gboolean                 seekable;
88   gboolean                 building_index;
89   guint64                  index_offset;
90   GstEvent                *seek_event;
91   gboolean                 need_newsegment;
92
93   /* reverse playback */
94   GArray                  *seek_index;
95   gint                     seek_entry;
96 } GstMatroskaParse;
97
98 typedef struct _GstMatroskaParseClass {
99   GstElementClass parent;
100 } GstMatroskaParseClass;
101
102 gboolean gst_matroska_parse_plugin_init (GstPlugin *plugin);
103
104 G_END_DECLS
105
106 #endif /* __GST_MATROSKA_PARSE_H__ */