2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
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.
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.
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.
20 #ifndef __GST_AVI_DEMUX_H__
21 #define __GST_AVI_DEMUX_H__
25 #include "gst/riff/riff-ids.h"
26 #include "gst/riff/riff-read.h"
29 #define GST_TYPE_AVI_DEMUX \
30 (gst_avi_demux_get_type ())
31 #define GST_AVI_DEMUX(obj) \
32 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_AVI_DEMUX, GstAviDemux))
33 #define GST_AVI_DEMUX_CLASS(klass) \
34 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_AVI_DEMUX, GstAviDemux))
35 #define GST_IS_AVI_DEMUX(obj) \
36 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_AVI_DEMUX))
37 #define GST_IS_AVI_DEMUX_CLASS(obj) \
38 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_AVI_DEMUX))
39 #define GST_AVI_DEMUX_MAX_STREAMS 16
40 #define CHUNKID_TO_STREAMNR(chunkid) \
41 ((((chunkid) & 0xff) - '0') * 10 + \
42 (((chunkid) >> 8) & 0xff) - '0')
52 guint32 frames_before;
53 } gst_avi_index_entry;
57 /* index of this streamcontext */
65 /* current position (byte, frame, time) */
70 /* delay in time (init_frames) */
87 typedef struct _GstAviDemux
94 /* AVI decoding state */
95 GstAviDemuxState state;
99 gst_avi_index_entry *index_entries;
101 guint64 index_offset;
107 avi_stream_context stream[GST_AVI_DEMUX_MAX_STREAMS];
109 /* some stream info for length */
110 guint32 us_per_frame;
121 typedef struct _GstAviDemuxClass
123 GstRiffReadClass parent_class;
126 GType gst_avi_demux_get_type (void);
129 #endif /* __GST_AVI_DEMUX_H__ */