ext/flac/: Remove backwards compatibility cruft for dealing with FLAC API changes...
authorTim-Philipp Müller <tim@centricular.net>
Tue, 23 May 2006 16:45:22 +0000 (16:45 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Tue, 23 May 2006 16:45:22 +0000 (16:45 +0000)
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.

ChangeLog
ext/flac/Makefile.am
ext/flac/flac_compat.h [deleted file]
ext/flac/gstflac.c
ext/flac/gstflacdec.c
ext/flac/gstflacenc.c

index 1537de1..e80a0c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2006-05-23  Tim-Philipp Müller  <tim at centricular dot net>
 
+       * 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  <tim at centricular dot net>
+
        * 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),
index b7f1c3f..d789ddc 100644 (file)
@@ -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 (file)
index 2360528..0000000
+++ /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 <FLAC/all.h>
-
-/* 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_ */
index 38ab07e..6ae9d7a 100644 (file)
@@ -25,8 +25,6 @@
 #include "gstflacdec.h"
 #include "gstflactag.h"
 
-#include "flac_compat.h"
-
 #include <gst/tag/tag.h>
 
 static gboolean
index 7457aa3..7b81868 100644 (file)
@@ -51,8 +51,6 @@
 
 #include <gst/tag/tag.h>
 
-#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,
index 28b85c2..b13d771 100644 (file)
@@ -28,7 +28,6 @@
 #include <gst/audio/audio.h>
 #include <gst/tag/tag.h>
 #include <gst/gsttagsetter.h>
-#include "flac_compat.h"
 
 
 static const GstElementDetails flacenc_details =