wavpack: remove support for ancient API version

This commit is contained in:
Tim-Philipp Müller 2014-11-01 15:33:23 +00:00
parent 0f4f948f5f
commit 29e7b20610
4 changed files with 1 additions and 30 deletions

View file

@ -845,16 +845,7 @@ AG_GST_CHECK_FEATURE(VPX, [VPX decoder], vpx, [
dnl *** wavpack ***
translit(dnm, m, l) AM_CONDITIONAL(USE_WAVPACK, true)
AG_GST_CHECK_FEATURE(WAVPACK, [wavpack plug-in], wavpack, [
PKG_CHECK_MODULES(WAVPACK, wavpack >= 4.40.0, HAVE_WAVPACK=yes, [
PKG_CHECK_MODULES(WAVPACK, wavpack >= 4.20, [
HAVE_WAVPACK=yes
AC_DEFINE(WAVPACK_OLD_API, 1, [old wavpack API])
],[
HAVE_WAVPACK=no
])
])
AC_SUBST(WAVPACK_CFLAGS)
AC_SUBST(WAVPACK_LIBS)
AG_GST_PKG_CHECK_MODULES(WAVPACK, wavpack >= 4.60.0)
])
dnl *** qtdemux & matroska prefer to have zlib ***

View file

@ -38,11 +38,7 @@ gst_wavpack_read_header (WavpackHeader * header, guint8 * buf)
{
memmove (header, buf, sizeof (WavpackHeader));
#ifndef WAVPACK_OLD_API
WavpackLittleEndianToNative (header, (char *) WavpackHeaderFormat);
#else
little_endian_to_native (header, WavpackHeaderFormat);
#endif
return (memcmp (header->ckID, "wvpk", 4) == 0);
}

View file

@ -325,11 +325,7 @@ gst_wavpack_dec_handle_frame (GstAudioDecoder * bdec, GstBuffer * buf)
(dec->sample_rate != WavpackGetSampleRate (dec->context)) ||
(dec->channels != WavpackGetNumChannels (dec->context)) ||
(dec->depth != WavpackGetBytesPerSample (dec->context) * 8) ||
#ifdef WAVPACK_OLD_API
(dec->channel_mask != dec->context->config.channel_mask);
#else
(dec->channel_mask != WavpackGetChannelMask (dec->context));
#endif
if (!gst_pad_has_current_caps (GST_AUDIO_DECODER_SRC_PAD (dec)) ||
format_changed) {
@ -339,11 +335,7 @@ gst_wavpack_dec_handle_frame (GstAudioDecoder * bdec, GstBuffer * buf)
dec->channels = WavpackGetNumChannels (dec->context);
dec->depth = WavpackGetBytesPerSample (dec->context) * 8;
#ifdef WAVPACK_OLD_API
channel_mask = dec->context->config.channel_mask;
#else
channel_mask = WavpackGetChannelMask (dec->context);
#endif
if (channel_mask == 0)
channel_mask = gst_wavpack_get_default_channel_mask (dec->channels);
@ -454,11 +446,7 @@ decode_error:
const gchar *reason = "unknown";
if (dec->context) {
#ifdef WAVPACK_OLD_API
reason = dec->context->error_message;
#else
reason = WavpackGetErrorMessage (dec->context);
#endif
} else {
reason = "couldn't create decoder context";
}

View file

@ -136,9 +136,7 @@ gst_wavpack_enc_mode_get_type (void)
{GST_WAVPACK_ENC_MODE_FAST, "Fast Compression", "fast"},
{GST_WAVPACK_ENC_MODE_DEFAULT, "Normal Compression", "normal"},
{GST_WAVPACK_ENC_MODE_HIGH, "High Compression", "high"},
#ifndef WAVPACK_OLD_API
{GST_WAVPACK_ENC_MODE_VERY_HIGH, "Very High Compression", "veryhigh"},
#endif
{0, NULL, NULL}
};
@ -466,12 +464,10 @@ gst_wavpack_enc_set_wp_config (GstWavpackEnc * enc)
case GST_WAVPACK_ENC_MODE_HIGH:
enc->wp_config->flags |= CONFIG_HIGH_FLAG;
break;
#ifndef WAVPACK_OLD_API
case GST_WAVPACK_ENC_MODE_VERY_HIGH:
enc->wp_config->flags |= CONFIG_HIGH_FLAG;
enc->wp_config->flags |= CONFIG_VERY_HIGH_FLAG;
break;
#endif
}
/* Bitrate, enables lossy mode */