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., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __FLV_DEMUX_H__
21 #define __FLV_DEMUX_H__
24 #include <gst/base/gstadapter.h>
27 #define GST_TYPE_FLV_DEMUX \
28 (gst_flv_demux_get_type())
29 #define GST_FLV_DEMUX(obj) \
30 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FLV_DEMUX,GstFlvDemux))
31 #define GST_FLV_DEMUX_CLASS(klass) \
32 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FLV_DEMUX,GstFlvDemuxClass))
33 #define GST_IS_FLV_DEMUX(obj) \
34 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FLV_DEMUX))
35 #define GST_IS_FLV_DEMUX_CLASS(klass) \
36 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FLV_DEMUX))
37 typedef struct _GstFlvDemux GstFlvDemux;
38 typedef struct _GstFlvDemuxClass GstFlvDemuxClass;
68 GArray * filepositions;
74 GstEvent *close_seg_event;
75 GstEvent *new_seg_event;
79 GstFlvDemuxState state;
82 guint64 cur_tag_offset;
83 GstClockTime duration;
85 guint64 tag_data_size;
91 guint16 audio_codec_tag;
93 gboolean audio_need_discont;
94 gboolean audio_need_segment;
95 gboolean audio_linked;
96 GstBuffer * audio_codec_data;
97 GstClockTime audio_start;
98 guint32 last_audio_pts;
99 GstClockTime audio_time_offset;
106 guint16 video_codec_tag;
107 guint64 video_offset;
108 gboolean video_need_discont;
109 gboolean video_need_segment;
110 gboolean video_linked;
112 GstBuffer * video_codec_data;
113 GstClockTime video_start;
114 guint32 last_video_pts;
115 GstClockTime video_time_offset;
118 gboolean random_access;
119 gboolean need_header;
126 gboolean no_more_pads;
129 gboolean building_index;
130 gboolean indexed; /* TRUE if index is completely built */
131 gboolean upstream_seekable; /* TRUE if upstream is seekable */
133 GstEvent *seek_event;
136 GstClockTime index_max_time;
137 gint64 index_max_pos;
139 /* reverse playback */
140 GstClockTime video_first_ts;
141 GstClockTime audio_first_ts;
148 struct _GstFlvDemuxClass
150 GstElementClass parent_class;
153 GType gst_flv_demux_get_type (void);
156 #endif /* __FLV_DEMUX_H__ */