Fix broken GObject macros
[platform/upstream/gst-plugins-good.git] / gst / matroska / ebml-read.h
1 /* GStreamer EBML I/O
2  * (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
3  *
4  * ebml-read.c: read EBML data from file/stream
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library 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 GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __GST_EBML_READ_H__
23 #define __GST_EBML_READ_H__
24
25 #include <gst/gst.h>
26
27 G_BEGIN_DECLS
28
29 #define GST_TYPE_EBML_READ \
30   (gst_ebml_read_get_type ())
31 #define GST_EBML_READ(obj) \
32   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_EBML_READ, GstEbmlRead))
33 #define GST_EBML_READ_CLASS(klass) \
34   (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_EBML_READ, GstEbmlReadClass))
35 #define GST_IS_EBML_READ(obj) \
36   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_EBML_READ))
37 #define GST_IS_EBML_READ_CLASS(klass) \
38   (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_EBML_READ))
39 #define GST_EBML_READ_GET_CLASS(obj) \
40   (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_EBML_READ, GstEbmlReadClass))
41
42 typedef struct _GstEbmlLevel {
43   guint64 start;
44   guint64 length;
45 } GstEbmlLevel;
46
47 typedef struct _GstEbmlRead {
48   GstElement parent;
49
50   GstBuffer *cached_buffer;
51
52   GstPad *sinkpad;
53   guint64 offset;
54
55   GList *level;
56 } GstEbmlRead;
57
58 typedef struct _GstEbmlReadClass {
59   GstElementClass parent;
60 } GstEbmlReadClass;
61
62 GType    gst_ebml_read_get_type     (void);
63
64 gboolean gst_ebml_peek_id           (GstEbmlRead *ebml,
65                                      guint       *level_up,
66                                      guint32     *id);
67
68 gboolean gst_ebml_read_seek         (GstEbmlRead *ebml,
69                                      guint64      offset);
70
71 gint64   gst_ebml_read_get_length   (GstEbmlRead *ebml);
72
73 gboolean gst_ebml_read_skip         (GstEbmlRead *ebml);
74
75 gboolean gst_ebml_read_buffer       (GstEbmlRead *ebml,
76                                      guint32     *id,
77                                      GstBuffer  **buf);
78
79 gboolean gst_ebml_read_uint         (GstEbmlRead *ebml,
80                                      guint32     *id,
81                                      guint64     *num);
82
83 gboolean gst_ebml_read_sint         (GstEbmlRead *ebml,
84                                      guint32     *id,
85                                      gint64      *num);
86
87 gboolean gst_ebml_read_float        (GstEbmlRead *ebml,
88                                      guint32     *id,
89                                      gdouble     *num);
90
91 gboolean gst_ebml_read_ascii        (GstEbmlRead *ebml,
92                                      guint32     *id,
93                                      gchar      **str);
94
95 gboolean gst_ebml_read_utf8         (GstEbmlRead *ebml,
96                                      guint32     *id,
97                                      gchar      **str);
98
99 gboolean gst_ebml_read_date         (GstEbmlRead *ebml,
100                                      guint32     *id,
101                                      gint64      *date);
102
103 gboolean gst_ebml_read_master       (GstEbmlRead *ebml,
104                                      guint32     *id);
105
106 gboolean gst_ebml_read_binary       (GstEbmlRead *ebml,
107                                      guint32     *id,
108                                      guint8     **binary,
109                                      guint64     *length);
110
111 gboolean gst_ebml_read_header       (GstEbmlRead *read,
112                                      gchar      **doctype,
113                                      guint       *version);
114
115 G_END_DECLS
116
117 #endif /* __GST_EBML_READ_H__ */