From 8dd45c0027604b6ff82807760da7a77da4e1b4b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 18 Jul 2006 14:08:06 +0000 Subject: configure.ac: Check for wavpack version and define WAVPACK_OLD_API if necessary. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message from CVS: Patch by: Sebastian Dröge * configure.ac: Check for wavpack version and define WAVPACK_OLD_API if necessary. * ext/wavpack/Makefile.am: * ext/wavpack/gstwavpackcommon.c: (gst_wavpack_read_header), (gst_wavpack_read_metadata): * ext/wavpack/gstwavpackcommon.h: * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_base_init), (gst_wavpack_dec_class_init), (gst_wavpack_dec_init), (gst_wavpack_dec_finalize), (gst_wavpack_dec_format_samples), (gst_wavpack_dec_clip_outgoing_buffer), (gst_wavpack_dec_chain), (gst_wavpack_dec_sink_event), (gst_wavpack_dec_change_state), (gst_wavpack_dec_request_new_pad), (gst_wavpack_dec_plugin_init): * ext/wavpack/gstwavpackdec.h: * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_class_init), (gst_wavpack_enc_init), (gst_wavpack_enc_finalize), (gst_wavpack_enc_set_wp_config): * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_base_init), (gst_wavpack_parse_finalize), (gst_wavpack_parse_class_init), (gst_wavpack_parse_index_get_entry_from_sample), (gst_wavpack_parse_scan_to_find_sample), (gst_wavpack_parse_handle_seek_event), (gst_wavpack_parse_create_src_pad): * ext/wavpack/gstwavpackstreamreader.c: * ext/wavpack/gstwavpackstreamreader.h: Port to new/official wavpack API, don't use API that was exported in wavpack header files and in the lib but meant to be private, at least not for recent wavpack versions; misc. 'cleanups' (#347443). --- ext/wavpack/gstwavpackdec.h | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) (limited to 'ext/wavpack/gstwavpackdec.h') diff --git a/ext/wavpack/gstwavpackdec.h b/ext/wavpack/gstwavpackdec.h index 0d8459e7..7ab9699d 100644 --- a/ext/wavpack/gstwavpackdec.h +++ b/ext/wavpack/gstwavpackdec.h @@ -1,5 +1,6 @@ /* GStreamer Wavpack plugin - * (c) 2004 Arwed v. Merkatz + * Copyright (c) 2004 Arwed v. Merkatz + * Copyright (c) 2006 Sebastian Dröge * * gstwavpackdec.h: raw Wavpack bitstream decoder * @@ -26,8 +27,9 @@ #include -G_BEGIN_DECLS +#include "gstwavpackstreamreader.h" +G_BEGIN_DECLS /* #define's don't like whitespacey bits */ #define GST_TYPE_WAVPACK_DEC \ (gst_wavpack_dec_get_type()) @@ -39,48 +41,40 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WAVPACK_DEC)) #define GST_IS_WAVPACK_DEC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAVPACK_DEC)) - -typedef struct _GstWavpackDec GstWavpackDec; +typedef struct _GstWavpackDec GstWavpackDec; typedef struct _GstWavpackDecClass GstWavpackDecClass; struct _GstWavpackDec { GstElement element; - GstPad *sinkpad, *srcpad; -#if 0 - GstPad *wvcsinkpad; -#endif + /* GstPad *wvcsinkpad; */ + GstPad *sinkpad; + GstPad *srcpad; - WavpackContext *context; + WavpackContext *context; + WavpackStreamReader *stream_reader; - int32_t *decodebuf; - guint decodebuf_size; + read_id wv_id; + /* read_id wvc_id; */ - WavpackStream *stream; + GstSegment segment; /* used for clipping, TIME format */ - guint32 samplerate; - guint channels; - guint width; - long frame_length; + guint sample_rate; + guint width; + guint channels; - guint64 wvcflushed_bytes; - guint64 duration; - guint64 wvcduration; - - guchar *decdata; - long *cache; + gint error_count; }; -struct _GstWavpackDecClass +struct _GstWavpackDecClass { GstElementClass parent; }; GType gst_wavpack_dec_get_type (void); -gboolean gst_wavpack_dec_plugin_init (GstPlugin *plugin); +gboolean gst_wavpack_dec_plugin_init (GstPlugin * plugin); G_END_DECLS - #endif /* __GST_WAVPACK_DEC_H__ */ -- cgit v1.2.1