From: Tim-Philipp Müller Date: Tue, 23 May 2006 16:45:22 +0000 (+0000) Subject: ext/flac/: Remove backwards compatibility cruft for dealing with FLAC API changes... X-Git-Tag: RELEASE-0_10_5~444 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13518af4c3609b0458f61469894cd5a098e49346;p=platform%2Fupstream%2Fgst-plugins-good.git ext/flac/: Remove backwards compatibility cruft for dealing with FLAC API changes in the 1.0.x series - we require 1.... Original commit message from CVS: * ext/flac/Makefile.am: * ext/flac/flac_compat.h: * ext/flac/gstflac.c: * ext/flac/gstflacdec.c: (gst_flac_dec_init): * ext/flac/gstflacenc.c: Remove backwards compatibility cruft for dealing with FLAC API changes in the 1.0.x series - we require 1.1.1 or newer these days. --- diff --git a/ChangeLog b/ChangeLog index 1537de1..e80a0c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2006-05-23 Tim-Philipp Müller + * ext/flac/Makefile.am: + * ext/flac/flac_compat.h: + * ext/flac/gstflac.c: + * ext/flac/gstflacdec.c: (gst_flac_dec_init): + * ext/flac/gstflacenc.c: + Remove backwards compatibility cruft for dealing with FLAC API + changes in the 1.0.x series - we require 1.1.1 or newer these days. + +2006-05-23 Tim-Philipp Müller + * gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream), (gst_matroska_demux_push_xiph_codec_priv_data), (gst_matroska_demux_parse_blockgroup_or_simpleblock), diff --git a/ext/flac/Makefile.am b/ext/flac/Makefile.am index b7f1c3f..d789ddc 100644 --- a/ext/flac/Makefile.am +++ b/ext/flac/Makefile.am @@ -1,10 +1,12 @@ plugin_LTLIBRARIES = libgstflac.la +# gstflactag.c +# gstflactag.h + libgstflac_la_SOURCES = gstflac.c gstflacdec.c gstflacenc.c -#gstflacenc.c gstflactag.c libgstflac_la_CFLAGS = $(GST_CFLAGS) -I$(top_srcdir) $(GST_PLUGINS_BASE_CFLAGS) libgstflac_la_LIBADD = $(GST_LIBS) $(FLAC_LIBS) $(GST_PLUGINS_BASE_LIBS) \ -lgsttag-@GST_MAJORMINOR@ libgstflac_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -noinst_HEADERS = gstflacenc.h gstflacdec.h flac_compat.h gstflactag.h +noinst_HEADERS = gstflacenc.h gstflacdec.h diff --git a/ext/flac/flac_compat.h b/ext/flac/flac_compat.h deleted file mode 100644 index 2360528..0000000 --- a/ext/flac/flac_compat.h +++ /dev/null @@ -1,55 +0,0 @@ - -/* This file is an attempt to hack compatibility between the - * FLAC API version used in the code in this directory - * (currently 1.0.3) and older versions of FLAC, particularly - * 1.0.2. - */ - -#ifndef _FLAC_COMPAT_H_ -#define _FLAC_COMPAT_H_ - -#ifndef VERSION -#define VERSION bogus -#endif -#include - -/* FIXME when there's a autoconf symbol */ -#ifndef FLAC_VERSION - -#ifndef FLAC__VERSION_STRING /* removed in 1.0.4 */ -#define FLAC_VERSION 0x010004 -#else -#ifdef FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE -#define FLAC_VERSION 0x010003 -#else -#define FLAC_VERSION 0x010002 -#endif -#endif - -#endif /* !defined(FLAC_VERSION) */ - - -#if FLAC_VERSION < 0x010004 -#define FLAC__STREAM_ENCODER_OK FLAC__STREAM_ENCODER_WRITE_OK -#define FLAC__seekable_stream_decoder_process_single(a) \ - FLAC__seekable_stream_decoder_process_one_frame(a) -#endif /* FLAC_VERSION < 0x010004 */ - -#if FLAC_VERSION < 0x010003 - -#define FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC \ - FLAC__STREAM_DECODER_ERROR_LOST_SYNC -#define FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER \ - FLAC__STREAM_DECODER_ERROR_BAD_HEADER -#define FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH \ - FLAC__STREAM_DECODER_ERROR_FRAME_CRC_MISMATCH -#define FLAC__STREAM_DECODER_WRITE_STATUS_ABORT \ - FLAC__STREAM_DECODER_WRITE_ABORT -#define FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE \ - FLAC__STREAM_DECODER_WRITE_CONTINUE - -#define FLAC__StreamMetadata FLAC__StreamMetaData - -#endif /* FLAC_VERSION < 0x010003 */ - -#endif /* _FLAC_COMPAT_H_ */ diff --git a/ext/flac/gstflac.c b/ext/flac/gstflac.c index 38ab07e..6ae9d7a 100644 --- a/ext/flac/gstflac.c +++ b/ext/flac/gstflac.c @@ -25,8 +25,6 @@ #include "gstflacdec.h" #include "gstflactag.h" -#include "flac_compat.h" - #include static gboolean diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 7457aa3..7b81868 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -51,8 +51,6 @@ #include -#include "flac_compat.h" - GST_DEBUG_CATEGORY_STATIC (flacdec_debug); #define GST_CAT_DEFAULT flacdec_debug @@ -182,17 +180,8 @@ gst_flac_dec_init (GstFlacDec * flacdec, GstFlacDecClass * klass) gst_flac_dec_length); FLAC__seekable_stream_decoder_set_eof_callback (flacdec->decoder, gst_flac_dec_eof); -#if FLAC_VERSION >= 0x010003 FLAC__seekable_stream_decoder_set_write_callback (flacdec->decoder, gst_flac_dec_write); -#else - FLAC__seekable_stream_decoder_set_write_callback (flacdec->decoder, - (FLAC__StreamDecoderWriteStatus (*) - (const FLAC__SeekableStreamDecoder * decoder, - const FLAC__Frame * frame, - const FLAC__int32 * buffer[], void *client_data)) - (gst_flac_dec_write)); -#endif FLAC__seekable_stream_decoder_set_metadata_respond (flacdec->decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT); FLAC__seekable_stream_decoder_set_metadata_callback (flacdec->decoder, diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index 28b85c2..b13d771 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -28,7 +28,6 @@ #include #include #include -#include "flac_compat.h" static const GstElementDetails flacenc_details =