From 68fd0eca8bb1ac5e2cb5dd2a3a7ece71b8c92fea Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Sun, 10 Jun 2007 10:53:26 +0000 Subject: Add support for flac >= 1.1.3 which changed the API. Fixes bug #385887. Original commit message from CVS: Patch by: Josh Coalson , updated by Alexis Ballier : * configure.ac: * ext/flac/gstflacdec.c: (gst_flac_dec_reset_decoders), (gst_flac_dec_setup_seekable_decoder), (gst_flac_dec_setup_stream_decoder), (gst_flac_dec_seek), (gst_flac_dec_tell), (gst_flac_dec_length), (gst_flac_dec_eof), (gst_flac_dec_read_seekable), (gst_flac_dec_read_stream): * ext/flac/gstflacdec.h: * ext/flac/gstflacenc.c: (gst_flac_enc_init), (gst_flac_enc_finalize), (gst_flac_enc_set_metadata), (gst_flac_enc_sink_setcaps), (gst_flac_enc_update_quality), (gst_flac_enc_seek_callback), (gst_flac_enc_write_callback), (gst_flac_enc_tell_callback), (gst_flac_enc_sink_event), (gst_flac_enc_chain), (gst_flac_enc_set_property), (gst_flac_enc_get_property), (gst_flac_enc_change_state): * ext/flac/gstflacenc.h: Add support for flac >= 1.1.3 which changed the API. Fixes bug #385887. --- ext/flac/gstflacdec.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ext/flac/gstflacdec.h') diff --git a/ext/flac/gstflacdec.h b/ext/flac/gstflacdec.h index c1057ac8..f4eb9ba3 100644 --- a/ext/flac/gstflacdec.h +++ b/ext/flac/gstflacdec.h @@ -27,6 +27,12 @@ #include +#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8 +#define LEGACY_FLAC +#else +#undef LEGACY_FLAC +#endif + G_BEGIN_DECLS #define GST_TYPE_FLAC_DEC gst_flac_dec_get_type() @@ -41,7 +47,11 @@ typedef struct _GstFlacDecClass GstFlacDecClass; struct _GstFlacDec { GstElement element; +#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8 FLAC__SeekableStreamDecoder *seekable_decoder; /* for pull-based operation */ +#else + FLAC__StreamDecoder *seekable_decoder; /* for pull-based operation */ +#endif FLAC__StreamDecoder *stream_decoder; /* for chain-based operation */ GstAdapter *adapter; -- cgit