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/gstflacenc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ext/flac/gstflacenc.h') diff --git a/ext/flac/gstflacenc.h b/ext/flac/gstflacenc.h index 500e26a0..ca1933a2 100644 --- a/ext/flac/gstflacenc.h +++ b/ext/flac/gstflacenc.h @@ -25,6 +25,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_ENC (gst_flac_enc_get_type()) @@ -55,7 +61,11 @@ struct _GstFlacEnc { gboolean stopped; FLAC__int32 *data; +#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8 FLAC__SeekableStreamEncoder *encoder; +#else + FLAC__StreamEncoder *encoder; +#endif FLAC__StreamMetadata **meta; GstTagList * tags; -- cgit