mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 05:22:30 +00:00
ext/wavpack/: Workaround the non-existance of WavpackGetChannelMask in Wavpack versions below 4.40.0.
Original commit message from CVS: * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_chain): * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_create_src_pad): Workaround the non-existance of WavpackGetChannelMask in Wavpack versions below 4.40.0.
This commit is contained in:
parent
fb183ffa59
commit
857bc80049
3 changed files with 20 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2007-12-09 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
* ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_chain):
|
||||||
|
* ext/wavpack/gstwavpackparse.c:
|
||||||
|
(gst_wavpack_parse_create_src_pad):
|
||||||
|
Workaround the non-existance of WavpackGetChannelMask in Wavpack
|
||||||
|
versions below 4.40.0.
|
||||||
|
|
||||||
2007-12-09 Sebastian Dröge <slomo@circular-chaos.org>
|
2007-12-09 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
|
|
|
@ -305,7 +305,11 @@ gst_wavpack_dec_chain (GstPad * pad, GstBuffer * buf)
|
||||||
(dec->sample_rate != WavpackGetSampleRate (dec->context)) ||
|
(dec->sample_rate != WavpackGetSampleRate (dec->context)) ||
|
||||||
(dec->channels != WavpackGetNumChannels (dec->context)) ||
|
(dec->channels != WavpackGetNumChannels (dec->context)) ||
|
||||||
(dec->depth != WavpackGetBitsPerSample (dec->context)) ||
|
(dec->depth != WavpackGetBitsPerSample (dec->context)) ||
|
||||||
|
#ifdef WAVPACK_OLD_API
|
||||||
|
(dec->channel_mask != dec->context->config.channel_mask);
|
||||||
|
#else
|
||||||
(dec->channel_mask != WavpackGetChannelMask (dec->context));
|
(dec->channel_mask != WavpackGetChannelMask (dec->context));
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!GST_PAD_CAPS (dec->srcpad) || format_changed) {
|
if (!GST_PAD_CAPS (dec->srcpad) || format_changed) {
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
@ -323,7 +327,11 @@ gst_wavpack_dec_chain (GstPad * pad, GstBuffer * buf)
|
||||||
"endianness", G_TYPE_INT, G_BYTE_ORDER,
|
"endianness", G_TYPE_INT, G_BYTE_ORDER,
|
||||||
"signed", G_TYPE_BOOLEAN, TRUE, NULL);
|
"signed", G_TYPE_BOOLEAN, TRUE, NULL);
|
||||||
|
|
||||||
|
#ifdef WAVPACK_OLD_API
|
||||||
|
channel_mask = dec->context->config.channel_mask;
|
||||||
|
#else
|
||||||
channel_mask = WavpackGetChannelMask (dec->context);
|
channel_mask = WavpackGetChannelMask (dec->context);
|
||||||
|
#endif
|
||||||
if (channel_mask == 0)
|
if (channel_mask == 0)
|
||||||
channel_mask = gst_wavpack_get_default_channel_mask (dec->channels);
|
channel_mask = gst_wavpack_get_default_channel_mask (dec->channels);
|
||||||
|
|
||||||
|
|
|
@ -836,8 +836,11 @@ gst_wavpack_parse_create_src_pad (GstWavpackParse * wvparse, GstBuffer * buf,
|
||||||
"channels", G_TYPE_INT, wvparse->channels,
|
"channels", G_TYPE_INT, wvparse->channels,
|
||||||
"rate", G_TYPE_INT, wvparse->samplerate,
|
"rate", G_TYPE_INT, wvparse->samplerate,
|
||||||
"framed", G_TYPE_BOOLEAN, TRUE, NULL);
|
"framed", G_TYPE_BOOLEAN, TRUE, NULL);
|
||||||
|
#ifdef WAVPACK_OLD_API
|
||||||
|
channel_mask = wpc->config.channel_mask;
|
||||||
|
#else
|
||||||
channel_mask = WavpackGetChannelMask (wpc);
|
channel_mask = WavpackGetChannelMask (wpc);
|
||||||
|
#endif
|
||||||
if (channel_mask == 0)
|
if (channel_mask == 0)
|
||||||
channel_mask =
|
channel_mask =
|
||||||
gst_wavpack_get_default_channel_mask (wvparse->channels);
|
gst_wavpack_get_default_channel_mask (wvparse->channels);
|
||||||
|
|
Loading…
Reference in a new issue