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>
28 #define GST_TYPE_FLV_DEMUX \
29 (gst_flv_demux_get_type())
30 #define GST_FLV_DEMUX(obj) \
31 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FLV_DEMUX,GstFlvDemux))
32 #define GST_FLV_DEMUX_CLASS(klass) \
33 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FLV_DEMUX,GstFlvDemuxClass))
34 #define GST_IS_FLV_DEMUX(obj) \
35 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FLV_DEMUX))
36 #define GST_IS_FLV_DEMUX_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FLV_DEMUX))
38 typedef struct _GstFlvDemux GstFlvDemux;
39 typedef struct _GstFlvDemuxClass GstFlvDemuxClass;
63 gboolean have_group_id;
73 GArray * filepositions;
79 GstEvent *new_seg_event;
83 GstFlvDemuxState state;
86 guint64 cur_tag_offset;
87 GstClockTime duration;
89 guint64 tag_data_size;
95 guint16 audio_codec_tag;
97 gboolean audio_need_discont;
98 gboolean audio_need_segment;
99 gboolean audio_linked;
100 GstBuffer * audio_codec_data;
101 GstClockTime audio_start;
102 guint32 last_audio_pts;
103 GstClockTime audio_time_offset;
110 guint16 video_codec_tag;
111 guint64 video_offset;
112 gboolean video_need_discont;
113 gboolean video_need_segment;
114 gboolean video_linked;
116 GstBuffer * video_codec_data;
117 GstClockTime video_start;
118 guint32 last_video_pts;
119 GstClockTime video_time_offset;
122 gboolean random_access;
123 gboolean need_header;
130 gboolean no_more_pads;
133 gboolean building_index;
134 gboolean indexed; /* TRUE if index is completely built */
135 gboolean upstream_seekable; /* TRUE if upstream is seekable */
137 GstEvent *seek_event;
140 GstClockTime index_max_time;
141 gint64 index_max_pos;
143 /* reverse playback */
144 GstClockTime video_first_ts;
145 GstClockTime audio_first_ts;
152 struct _GstFlvDemuxClass
154 GstElementClass parent_class;
157 GType gst_flv_demux_get_type (void);
160 #endif /* __FLV_DEMUX_H__ */