Debian Codegraph @

gst/realmedia/rademux.h

raw
1 /* GStreamer RealAudio demuxer
2 * Copyright (C) 2006 Tim-Philipp Müller <tim centricular net>
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., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifndef __GST_REAL_AUDIO_DEMUX_H__
21 #define __GST_REAL_AUDIO_DEMUX_H__
22
23 #include <gst/gst.h>
24 #include <gst/base/gstadapter.h>
25
26 G_BEGIN_DECLS
27
28 #define GST_TYPE_REAL_AUDIO_DEMUX \
29 (gst_real_audio_demux_get_type())
30 #define GST_REAL_AUDIO_DEMUX(obj) \
31 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REAL_AUDIO_DEMUX,GstRealAudioDemux))
32 #define GST_REAL_AUDIO_DEMUX_CLASS(klass) \
33 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REAL_AUDIO_DEMUX,GstRealAudioDemuxClass))
34 #define GST_IS_REAL_AUDIO_DEMUX(obj) \
35 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_REAL_AUDIO_DEMUX))
36 #define GST_IS_REAL_AUDIO_DEMUX_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_REAL_AUDIO_DEMUX))
38
39 typedef enum
40 {
41 REAL_AUDIO_DEMUX_STATE_MARKER,
42 REAL_AUDIO_DEMUX_STATE_HEADER,
43 REAL_AUDIO_DEMUX_STATE_DATA
44 } GstRealAudioDemuxState;
45
46 typedef struct _GstRealAudioDemux GstRealAudioDemux;
47 typedef struct _GstRealAudioDemuxClass GstRealAudioDemuxClass;
48
49 struct _GstRealAudioDemux {
50 GstElement element;
51
52 GstPad *sinkpad;
53 GstPad *srcpad;
54
55 gboolean have_group_id;
56 guint group_id;
57
58 GstAdapter *adapter;
59 GstRealAudioDemuxState state;
60
61 guint ra_version;
62 guint data_offset;
63
64 guint packet_size;
65 guint leaf_size;
66 guint height;
67 guint flavour;
68
69 guint sample_rate;
70 guint sample_width;
71 guint channels;
72 guint32 fourcc;
73
74 gboolean segment_running;
75
76 gboolean need_newsegment;
77 GstTagList *pending_tags;
78
79 guint byterate_num; /* bytes per second */
80 guint byterate_denom;
81
82 gint64 duration;
83 gint64 upstream_size;
84
85 guint64 offset; /* current read byte offset for
86 * pull_range-based mode */
87
88 /* playback start/stop positions */
89 GstSegment segment;
90
91 gboolean seekable;
92 };
93
94 struct _GstRealAudioDemuxClass {
95 GstElementClass element_class;
96 };
97
98 GType gst_real_audio_demux_get_type (void);
99
100 GST_ELEMENT_REGISTER_DECLARE (rademux);
101
102 G_END_DECLS
103
104 #endif /* __GST_REAL_AUDIO_DEMUX_H__ */