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.
This commit is contained in:
Tim-Philipp Müller 2006-05-23 16:45:22 +00:00
parent 4e012bac91
commit 13518af4c3
6 changed files with 14 additions and 71 deletions

View file

@ -1,3 +1,13 @@
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),

View 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

View file

@ -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_ */

View file

@ -25,8 +25,6 @@
#include "gstflacdec.h"
#include "gstflactag.h"
#include "flac_compat.h"
#include <gst/tag/tag.h>
static gboolean

View 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,

View 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 =