summaryrefslogtreecommitdiffstats
path: root/ext/flac/gstflacenc.h
diff options
context:
space:
mode:
authorJosh Coalson <xflac@yahoo.com>2007-06-10 10:53:26 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-06-10 10:53:26 +0000
commit68fd0eca8bb1ac5e2cb5dd2a3a7ece71b8c92fea (patch)
tree8164e2dd0d36027bcde49223ffe9d5456e776a38 /ext/flac/gstflacenc.h
parentf2fa0a91a6f96f5d0da3a7e78faa37cd9144c987 (diff)
Add support for flac >= 1.1.3 which changed the API. Fixes bug #385887.
Original commit message from CVS: Patch by: Josh Coalson <xflac at yahoo dot com>, updated by Alexis Ballier <aballier at gentoo dot org>: * 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.
Diffstat (limited to 'ext/flac/gstflacenc.h')
-rw-r--r--ext/flac/gstflacenc.h10
1 files changed, 10 insertions, 0 deletions
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 <FLAC/all.h>
+#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;