summaryrefslogtreecommitdiffstats
path: root/gst/flv/gstflvdemux.h
diff options
context:
space:
mode:
authorJulien Moutte <julien@moutte.net>2007-07-25 13:29:04 +0000
committerJulien Moutte <julien@moutte.net>2007-07-25 13:29:04 +0000
commit0a10191772eecb23d31c1ac7442a2efc22eff074 (patch)
treef9b4b3b017236426639e71183351f7d17245c339 /gst/flv/gstflvdemux.h
parent3ff914844181a756f4c27ddd6241edb24f860704 (diff)
downloadgst-plugins-bad-0a10191772eecb23d31c1ac7442a2efc22eff074.tar.gz
gst-plugins-bad-0a10191772eecb23d31c1ac7442a2efc22eff074.tar.bz2
gst-plugins-bad-0a10191772eecb23d31c1ac7442a2efc22eff074.zip
gst/flv/: Handle not linked pads, try to make it reusable, more safety checks.
Original commit message from CVS: 2007-07-25 Julien MOUTTE <julien@moutte.net> (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_change_state), (gst_flv_demux_dispose), (gst_flv_demux_init): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (FLV_GET_STRING), (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_header): * gst/flv/gstflvparse.h: Handle not linked pads, try to make it reusable, more safety checks.
Diffstat (limited to 'gst/flv/gstflvdemux.h')
-rw-r--r--gst/flv/gstflvdemux.h48
1 files changed, 25 insertions, 23 deletions
diff --git a/gst/flv/gstflvdemux.h b/gst/flv/gstflvdemux.h
index 09de14fd..63878f1d 100644
--- a/gst/flv/gstflvdemux.h
+++ b/gst/flv/gstflvdemux.h
@@ -24,7 +24,6 @@
#include <gst/base/gstadapter.h>
G_BEGIN_DECLS
-
#define GST_TYPE_FLV_DEMUX \
(gst_flv_demux_get_type())
#define GST_FLV_DEMUX(obj) \
@@ -35,11 +34,11 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FLV_DEMUX))
#define GST_IS_FLV_DEMUX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FLV_DEMUX))
-
typedef struct _GstFLVDemux GstFLVDemux;
typedef struct _GstFLVDemuxClass GstFLVDemuxClass;
-typedef enum {
+typedef enum
+{
FLV_STATE_HEADER,
FLV_STATE_TAG_TYPE,
FLV_STATE_TAG_VIDEO,
@@ -49,29 +48,30 @@ typedef enum {
FLV_STATE_NONE
} GstFLVDemuxState;
-struct _GstFLVDemux {
+struct _GstFLVDemux
+{
GstElement element;
- GstPad * sinkpad;
-
- GstPad * audio_pad;
- GstPad * video_pad;
-
- GstAdapter * adapter;
-
- GstSegment * segment;
-
- GstEvent * new_seg_event;
-
- GstTagList * taglist;
-
+ GstPad *sinkpad;
+
+ GstPad *audio_pad;
+ GstPad *video_pad;
+
+ GstAdapter *adapter;
+
+ GstSegment *segment;
+
+ GstEvent *new_seg_event;
+
+ GstTagList *taglist;
+
GstFLVDemuxState state;
-
+
guint64 offset;
GstClockTime duration;
guint64 tag_size;
guint64 tag_data_size;
-
+
/* Audio infos */
guint16 rate;
guint16 channels;
@@ -80,7 +80,8 @@ struct _GstFLVDemux {
guint64 audio_offset;
gboolean audio_need_discont;
gboolean audio_need_segment;
-
+ gboolean audio_linked;
+
/* Video infos */
guint32 w;
guint32 h;
@@ -88,7 +89,8 @@ struct _GstFLVDemux {
guint64 video_offset;
gboolean video_need_discont;
gboolean video_need_segment;
-
+ gboolean video_linked;
+
gboolean random_access;
gboolean need_header;
gboolean has_audio;
@@ -97,12 +99,12 @@ struct _GstFLVDemux {
gboolean strict;
};
-struct _GstFLVDemuxClass {
+struct _GstFLVDemuxClass
+{
GstElementClass parent_class;
};
GType gst_flv_demux_get_type (void);
G_END_DECLS
-
#endif /* __FLV_DEMUX_H__ */