diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2006-01-29 20:07:49 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2006-01-29 20:07:49 +0000 |
commit | f54198bd02bea27ae019bcf27eb309f107081991 (patch) | |
tree | 2393ad1bf14ab76c94d133f8085e2fe3ca272394 /ext/wavpack/gstwavpackparse.h | |
parent | 24994159f481ad3240d7cfb0a07e494d66becbb0 (diff) | |
download | gst-plugins-bad-f54198bd02bea27ae019bcf27eb309f107081991.tar.gz gst-plugins-bad-f54198bd02bea27ae019bcf27eb309f107081991.tar.bz2 gst-plugins-bad-f54198bd02bea27ae019bcf27eb309f107081991.zip |
ext/wavpack/gstwavpackdec.c: Add debug category, use boilerplate macros, fix handling of widths of 32 bits.
Original commit message from CVS:
* ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_setcaps),
(gst_wavpack_dec_base_init), (gst_wavpack_dec_dispose),
(gst_wavpack_dec_class_init), (gst_wavpack_dec_sink_event),
(gst_wavpack_dec_init), (gst_wavpack_dec_format_samples),
(gst_wavpack_dec_chain), (gst_wavpack_dec_plugin_init):
Add debug category, use boilerplate macros, fix handling
of widths of 32 bits.
* ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_base_init),
(gst_wavpack_parse_dispose), (gst_wavpack_parse_class_init),
(gst_wavpack_parse_index_get_last_entry),
(gst_wavpack_parse_index_get_entry_from_sample),
(gst_wavpack_parse_index_append_entry), (gst_wavpack_parse_reset),
(gst_wavpack_parse_src_query),
(gst_wavpack_parse_scan_to_find_sample),
(gst_wavpack_parse_send_newsegment),
(gst_wavpack_parse_handle_seek_event),
(gst_wavpack_parse_src_event), (gst_wavpack_parse_init),
(gst_wavpack_parse_get_upstream_length),
(gst_wavpack_parse_pull_buffer),
(gst_wavpack_parse_create_src_pad), (gst_wavpack_parse_loop),
(gst_wavpack_parse_change_state),
(gst_wavepack_parse_sink_activate),
(gst_wavepack_parse_sink_activate_pull),
(gst_wavpack_parse_plugin_init):
* ext/wavpack/gstwavpackparse.h:
Rewrite a bit, mostly to fix flow logic and to make seeking work.
Fix buffer/event refcounting. Add some debug statements. Add
width of 32 to source pad template caps. Use boilerplate macros.
Diffstat (limited to 'ext/wavpack/gstwavpackparse.h')
-rw-r--r-- | ext/wavpack/gstwavpackparse.h | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/ext/wavpack/gstwavpackparse.h b/ext/wavpack/gstwavpackparse.h index 41bfe494..99f3a89a 100644 --- a/ext/wavpack/gstwavpackparse.h +++ b/ext/wavpack/gstwavpackparse.h @@ -38,28 +38,40 @@ G_BEGIN_DECLS #define GST_IS_WAVPACK_PARSE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAVPACK_PARSE)) -typedef struct _GstWavpackParse GstWavpackParse; -typedef struct _GstWavpackParseClass GstWavpackParseClass; +typedef struct _GstWavpackParse GstWavpackParse; +typedef struct _GstWavpackParseClass GstWavpackParseClass; +typedef struct _GstWavpackParseIndexEntry GstWavpackParseIndexEntry; + +struct _GstWavpackParseIndexEntry { + gint64 byte_offset; /* byte offset of this chunk */ + gint64 sample_offset; /* first sample in this chunk */ + gint64 sample_offset_end; /* first sample in next chunk */ +}; struct _GstWavpackParse { - GstElement element; + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad; + GstPad *srcpad; - guint32 samplerate; - guint32 channels; - guint32 total_samples; - guint64 timestamp; - - guint64 flushed_bytes; - guint64 duration; - - guint64 seek_offset; - gboolean seek_pending; - gboolean need_discont; - gboolean need_flush; - gboolean eos; + guint samplerate; + guint channels; + guint total_samples; + + gboolean need_newsegment; + + gint64 current_offset; /* byte offset on sink pad */ + gint64 upstream_length; /* length of file in bytes */ + + GstSegment segment; /* the currently configured segment, in + * samples/audio frames (DEFAULT format) */ + + /* Array of GstWavpackParseIndexEntry structs, mapping known + * sample offsets to byte offsets. Is kept increasing without + * gaps (ie. append only and consecutive entries must always + * map to consecutive chunks in the file). */ + GArray *entries; }; struct _GstWavpackParseClass |