2 * Copyright (C) <2007> Julien Moutte <julien@moutte.net>
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., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef __FLV_DEMUX_H__
21 #define __FLV_DEMUX_H__
24 #include <gst/base/gstadapter.h>
25 #include <gst/base/gstflowcombiner.h>
29 #define GST_TYPE_FLV_DEMUX \
30 (gst_flv_demux_get_type())
31 #define GST_FLV_DEMUX(obj) \
32 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FLV_DEMUX,GstFlvDemux))
33 #define GST_FLV_DEMUX_CLASS(klass) \
34 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FLV_DEMUX,GstFlvDemuxClass))
35 #define GST_IS_FLV_DEMUX(obj) \
36 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FLV_DEMUX))
37 #define GST_IS_FLV_DEMUX_CLASS(klass) \
38 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FLV_DEMUX))
39 typedef struct _GstFlvDemux GstFlvDemux;
40 typedef struct _GstFlvDemuxClass GstFlvDemuxClass;
64 gboolean have_group_id;
74 GArray * filepositions;
78 GstFlowCombiner *flowcombiner;
82 GstEvent *new_seg_event;
85 GstTagList *audio_tags;
86 GstTagList *video_tags;
88 GstFlvDemuxState state;
91 guint64 cur_tag_offset;
92 GstClockTime duration;
94 guint64 tag_data_size;
100 guint16 audio_codec_tag;
101 guint64 audio_offset;
102 gboolean audio_need_discont;
103 gboolean audio_need_segment;
104 gboolean audio_linked;
105 GstBuffer * audio_codec_data;
106 GstClockTime audio_start;
107 guint32 last_audio_pts;
108 GstClockTime audio_time_offset;
115 guint16 video_codec_tag;
116 guint64 video_offset;
117 gboolean video_need_discont;
118 gboolean video_need_segment;
119 gboolean video_linked;
121 GstBuffer * video_codec_data;
122 GstClockTime video_start;
123 guint32 last_video_dts;
124 GstClockTime video_time_offset;
127 gboolean random_access;
128 gboolean need_header;
134 gboolean no_more_pads;
136 #ifndef GST_DISABLE_DEBUG
137 gboolean no_audio_warned;
138 gboolean no_video_warned;
142 gboolean building_index;
143 gboolean indexed; /* TRUE if index is completely built */
144 gboolean upstream_seekable; /* TRUE if upstream is seekable */
146 GstEvent *seek_event;
149 GstClockTime index_max_time;
150 gint64 index_max_pos;
152 /* reverse playback */
153 GstClockTime video_first_ts;
154 GstClockTime audio_first_ts;
161 struct _GstFlvDemuxClass
163 GstElementClass parent_class;
166 GType gst_flv_demux_get_type (void);
169 #endif /* __FLV_DEMUX_H__ */