equal
deleted
inserted
replaced
22 #ifndef __GST_WAVPARSE_H__ |
22 #ifndef __GST_WAVPARSE_H__ |
23 #define __GST_WAVPARSE_H__ |
23 #define __GST_WAVPARSE_H__ |
24 |
24 |
25 |
25 |
26 #include <gst/gst.h> |
26 #include <gst/gst.h> |
27 #include <gst/gst_global.h> |
27 #include "gst/riff/riff-ids.h" |
28 #include <gst/riff/riff-read.h> |
28 #include "gst/riff/riff-read.h" |
29 #include <gst/riff/riff-ids.h> |
|
30 #include <gst/riff/riff-media.h> |
|
31 |
|
32 #include <gst/base/gstadapter.h> |
29 #include <gst/base/gstadapter.h> |
33 |
30 |
34 G_BEGIN_DECLS |
31 G_BEGIN_DECLS |
35 |
32 |
36 #define GST_TYPE_WAVPARSE \ |
33 #define GST_TYPE_WAVPARSE \ |
45 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAVPARSE)) |
42 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAVPARSE)) |
46 |
43 |
47 typedef enum { |
44 typedef enum { |
48 GST_WAVPARSE_START, |
45 GST_WAVPARSE_START, |
49 GST_WAVPARSE_HEADER, |
46 GST_WAVPARSE_HEADER, |
50 GST_WAVPARSE_DATA, |
47 GST_WAVPARSE_DATA |
51 } GstWavParseState; |
48 } GstWavParseState; |
52 |
49 |
53 typedef struct _GstWavParse GstWavParse; |
50 typedef struct _GstWavParse GstWavParse; |
54 typedef struct _GstWavParseClass GstWavParseClass; |
51 typedef struct _GstWavParseClass GstWavParseClass; |
55 |
52 |
67 /* for delayed source pad creation for when |
64 /* for delayed source pad creation for when |
68 * we have the first chunk of data and know |
65 * we have the first chunk of data and know |
69 * the format for sure */ |
66 * the format for sure */ |
70 GstCaps *caps; |
67 GstCaps *caps; |
71 GstTagList *tags; |
68 GstTagList *tags; |
72 GstEvent *newsegment; |
69 GstEvent *close_segment; |
|
70 GstEvent *start_segment; |
73 |
71 |
74 /* WAVE decoding state */ |
72 /* WAVE decoding state */ |
75 GstWavParseState state; |
73 GstWavParseState state; |
76 |
74 |
77 /* format of audio, see defines below */ |
75 /* format of audio, see defines below */ |
78 gint format; |
76 gint format; |
79 |
77 |
80 /* useful audio data */ |
78 /* useful audio data */ |
81 guint16 depth; |
79 guint16 depth; |
82 gint rate; |
80 guint32 rate; |
83 guint16 channels; |
81 guint16 channels; |
84 guint16 blockalign; |
82 guint16 blockalign; |
85 guint16 width; |
83 guint16 width; |
|
84 guint32 av_bps; |
|
85 guint32 fact; |
|
86 |
|
87 /* real bps used or 0 when no bitrate is known */ |
86 guint32 bps; |
88 guint32 bps; |
|
89 gboolean vbr; |
87 |
90 |
88 guint bytes_per_sample; |
91 guint bytes_per_sample; |
89 |
92 |
90 /* position in data part */ |
93 /* position in data part */ |
91 guint64 offset; |
94 guint64 offset; |
92 guint64 end_offset; |
95 guint64 end_offset; |
93 guint64 dataleft; |
96 guint64 dataleft; |
94 /* offset/length of data part */ |
97 /* offset/length of data part */ |
95 guint64 datastart; |
98 guint64 datastart; |
96 guint64 datasize; |
99 guint64 datasize; |
97 |
100 /* duration in time */ |
|
101 guint64 duration; |
|
102 |
98 /* pending seek */ |
103 /* pending seek */ |
99 GstEvent *seek_event; |
104 GstEvent *seek_event; |
100 |
105 |
101 /* For streaming */ |
106 /* For streaming */ |
102 GstAdapter *adapter; |
107 GstAdapter *adapter; |
104 gboolean streaming; |
109 gboolean streaming; |
105 |
110 |
106 /* configured segment, start/stop expressed in time */ |
111 /* configured segment, start/stop expressed in time */ |
107 GstSegment segment; |
112 GstSegment segment; |
108 gboolean segment_running; |
113 gboolean segment_running; |
109 |
114 |
110 /* for late pad configuration */ |
115 /* for late pad configuration */ |
111 gboolean first; |
116 gboolean first; |
|
117 /* discont after seek */ |
|
118 gboolean discont; |
112 }; |
119 }; |
113 |
120 |
114 struct _GstWavParseClass { |
121 struct _GstWavParseClass { |
115 GstElementClass parent_class; |
122 GstElementClass parent_class; |
116 }; |
123 }; |