1 diff -ur alsaplayer-0.99.77.orig/input/flac/FlacSeekableStream.cpp alsaplayer-0.99.77/input/flac/FlacSeekableStream.cpp
2 --- alsaplayer-0.99.77.orig/input/flac/FlacSeekableStream.cpp 2003-03-03 09:32:59.000000000 +0100
3 +++ alsaplayer-0.99.77/input/flac/FlacSeekableStream.cpp 2007-04-01 15:46:30.000000000 +0200
8 - FLAC__seekable_stream_decoder_finish (_decoder);
9 - FLAC__seekable_stream_decoder_delete (_decoder);
10 + FLAC__stream_decoder_finish (_decoder);
11 + FLAC__stream_decoder_delete (_decoder);
19 - _decoder = FLAC__seekable_stream_decoder_new ();
20 + _decoder = FLAC__stream_decoder_new ();
22 - apError ("FlacSeekableStream::open(): error creating FLAC__seekable_stream_decoder");
23 + apError ("FlacSeekableStream::open(): error creating FLAC__stream_decoder");
27 - status &= FLAC__seekable_stream_decoder_set_read_callback (_decoder,
29 - status &= FLAC__seekable_stream_decoder_set_write_callback (_decoder,
31 - status &= FLAC__seekable_stream_decoder_set_metadata_callback (_decoder,
33 - status &= FLAC__seekable_stream_decoder_set_error_callback (_decoder,
35 - status &= FLAC__seekable_stream_decoder_set_seek_callback (_decoder,
37 - status &= FLAC__seekable_stream_decoder_set_tell_callback (_decoder,
39 - status &= FLAC__seekable_stream_decoder_set_length_callback (_decoder,
41 - status &= FLAC__seekable_stream_decoder_set_eof_callback (_decoder,
43 - status &= FLAC__seekable_stream_decoder_set_client_data (_decoder, (void *) this);
46 apError ("FlacSeekableStream::open(): status error, huh?");
49 - status = (FLAC__seekable_stream_decoder_init (_decoder) == FLAC__SEEKABLE_STREAM_DECODER_OK);
50 + status = (FLAC__stream_decoder_init_stream (_decoder,
60 + == FLAC__STREAM_DECODER_INIT_STATUS_OK);
63 - apError ("FlacSeekableStream::open(): can't initialize seekable stream decoder");
64 + apError ("FlacSeekableStream::open(): can't initialize stream decoder");
68 // this will invoke the metaCallBack
69 - if (!FLAC__seekable_stream_decoder_process_until_end_of_metadata (_decoder)) {
70 + if (!FLAC__stream_decoder_process_until_end_of_metadata (_decoder)) {
71 apError ("FlacSeekableStream::open(): decoder error");
78 - return FLAC__seekable_stream_decoder_process_single (_decoder);
79 + return FLAC__stream_decoder_process_single (_decoder);
81 } // FlacSeekableStream::processOneFrame
87 - return FLAC__seekable_stream_decoder_seek_absolute (_decoder, sample);
88 + return FLAC__stream_decoder_seek_absolute (_decoder, sample);
90 } // FlacSeekableStream::seekAbsolute
95 -FlacSeekableStream::metaCallBack (const FLAC__SeekableStreamDecoder * decoder,
96 +FlacSeekableStream::metaCallBack (const FLAC__StreamDecoder * decoder,
97 const FLAC__StreamMetadata * md,
104 -FlacSeekableStream::errCallBack (const FLAC__SeekableStreamDecoder * decoder,
105 +FlacSeekableStream::errCallBack (const FLAC__StreamDecoder * decoder,
106 FLAC__StreamDecoderErrorStatus status,
112 FLAC__StreamDecoderWriteStatus
113 -FlacSeekableStream::writeCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
114 +FlacSeekableStream::writeCallBack (const FLAC__StreamDecoder * /*decoder*/,
115 const FLAC__Frame * frame,
116 const FLAC__int32 * const buffer[],
118 @@ -190,91 +183,91 @@
122 -FLAC__SeekableStreamDecoderReadStatus
123 -FlacSeekableStream::readCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
124 +FLAC__StreamDecoderReadStatus
125 +FlacSeekableStream::readCallBack (const FLAC__StreamDecoder * /*decoder*/,
132 - return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
133 + return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
134 FlacSeekableStream * f = (FlacSeekableStream *) client_data;
136 - return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
137 + return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
139 *bytes = reader_read (buffer, *bytes, f->_datasource);
140 - return *bytes > 0 ? FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK :
141 + return *bytes > 0 ? FLAC__STREAM_DECODER_READ_STATUS_CONTINUE :
142 reader_eof (f->_datasource) ?
143 - FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK :
144 - FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
145 + FLAC__STREAM_DECODER_READ_STATUS_CONTINUE :
146 + FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
148 } // FlacSeekableStream::readCallBack
152 -FLAC__SeekableStreamDecoderSeekStatus
153 -FlacSeekableStream::seekCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
154 +FLAC__StreamDecoderSeekStatus
155 +FlacSeekableStream::seekCallBack (const FLAC__StreamDecoder * /*decoder*/,
160 - return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
161 + return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
162 FlacSeekableStream * f = (FlacSeekableStream *) client_data;
164 - return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
165 + return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
167 return reader_seek (f->_datasource, offset, SEEK_SET) == 0 ?
168 - FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK :
169 - FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
170 + FLAC__STREAM_DECODER_SEEK_STATUS_OK :
171 + FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
173 } // FlacSeekableStream::seekCallBack
177 -FLAC__SeekableStreamDecoderTellStatus
178 -FlacSeekableStream::tellCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
179 +FLAC__StreamDecoderTellStatus
180 +FlacSeekableStream::tellCallBack (const FLAC__StreamDecoder * /*decoder*/,
181 FLAC__uint64 * offset,
185 - return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR;
186 + return FLAC__STREAM_DECODER_TELL_STATUS_ERROR;
187 FlacSeekableStream * f = (FlacSeekableStream *) client_data;
189 - return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR;
190 + return FLAC__STREAM_DECODER_TELL_STATUS_ERROR;
192 long result = reader_tell (f->_datasource);
194 - return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR;
195 + return FLAC__STREAM_DECODER_TELL_STATUS_ERROR;
197 - return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK;
198 + return FLAC__STREAM_DECODER_TELL_STATUS_OK;
200 } // FlacSeekableStream::tellCallBack
204 -FLAC__SeekableStreamDecoderLengthStatus
205 -FlacSeekableStream::lengthCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
206 +FLAC__StreamDecoderLengthStatus
207 +FlacSeekableStream::lengthCallBack (const FLAC__StreamDecoder * /*decoder*/,
212 - return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
213 + return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
214 FlacSeekableStream * f = (FlacSeekableStream *) client_data;
216 - return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
217 + return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
219 long result = reader_length (f->_datasource);
221 - return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
222 + return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
224 - return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK;
225 + return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
227 } // FlacSeekableStream::lengthCallBack
232 -FlacSeekableStream::eofCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
233 +FlacSeekableStream::eofCallBack (const FLAC__StreamDecoder * /*decoder*/,
237 diff -ur alsaplayer-0.99.77.orig/input/flac/FlacSeekableStream.h alsaplayer-0.99.77/input/flac/FlacSeekableStream.h
238 --- alsaplayer-0.99.77.orig/input/flac/FlacSeekableStream.h 2003-03-03 09:32:59.000000000 +0100
239 +++ alsaplayer-0.99.77/input/flac/FlacSeekableStream.h 2007-04-01 15:45:53.000000000 +0200
244 -#include <FLAC/seekable_stream_decoder.h>
245 +#include <FLAC/stream_decoder.h>
250 // flac callbacks for a seekable stream.
251 //---------------------------------------
253 - static void metaCallBack (const FLAC__SeekableStreamDecoder * decoder,
254 + static void metaCallBack (const FLAC__StreamDecoder * decoder,
255 const FLAC__StreamMetadata * md,
258 static FLAC__StreamDecoderWriteStatus
259 - writeCallBack (const FLAC__SeekableStreamDecoder * decoder,
260 + writeCallBack (const FLAC__StreamDecoder * decoder,
261 const FLAC__Frame * frame,
262 const FLAC__int32 * const buffer[],
265 - static FLAC__SeekableStreamDecoderReadStatus
266 - readCallBack (const FLAC__SeekableStreamDecoder * decoder,
267 + static FLAC__StreamDecoderReadStatus
268 + readCallBack (const FLAC__StreamDecoder * decoder,
274 - static void errCallBack (const FLAC__SeekableStreamDecoder * decoder,
275 + static void errCallBack (const FLAC__StreamDecoder * decoder,
276 FLAC__StreamDecoderErrorStatus status,
279 - static FLAC__SeekableStreamDecoderSeekStatus
280 - seekCallBack (const FLAC__SeekableStreamDecoder * decoder,
281 + static FLAC__StreamDecoderSeekStatus
282 + seekCallBack (const FLAC__StreamDecoder * decoder,
286 - static FLAC__SeekableStreamDecoderTellStatus
287 - tellCallBack (const FLAC__SeekableStreamDecoder * decoder,
288 + static FLAC__StreamDecoderTellStatus
289 + tellCallBack (const FLAC__StreamDecoder * decoder,
290 FLAC__uint64 * offset,
293 - static FLAC__SeekableStreamDecoderLengthStatus
294 - lengthCallBack (const FLAC__SeekableStreamDecoder * decoder,
295 + static FLAC__StreamDecoderLengthStatus
296 + lengthCallBack (const FLAC__StreamDecoder * decoder,
300 - static FLAC__bool eofCallBack (const FLAC__SeekableStreamDecoder * decoder,
301 + static FLAC__bool eofCallBack (const FLAC__StreamDecoder * decoder,
309 - FLAC__SeekableStreamDecoder * _decoder;
310 + FLAC__StreamDecoder * _decoder;
312 }; // class FlacSeekableStream
314 diff -ur alsaplayer-0.99.77.orig/input/flac/FlacStream.cpp alsaplayer-0.99.77/input/flac/FlacStream.cpp
315 --- alsaplayer-0.99.77.orig/input/flac/FlacStream.cpp 2003-03-09 03:46:33.000000000 +0100
316 +++ alsaplayer-0.99.77/input/flac/FlacStream.cpp 2007-04-01 15:45:45.000000000 +0200
317 @@ -116,21 +116,22 @@
321 - status &= FLAC__stream_decoder_set_read_callback (_decoder,
323 - status &= FLAC__stream_decoder_set_write_callback (_decoder,
325 - status &= FLAC__stream_decoder_set_metadata_callback (_decoder,
327 - status &= FLAC__stream_decoder_set_error_callback (_decoder,
329 - status &= FLAC__stream_decoder_set_client_data (_decoder, (void *) this);
332 apError("FlacStream::open(): status error, huh?");
335 - status = (FLAC__stream_decoder_init (_decoder) == FLAC__STREAM_DECODER_SEARCH_FOR_METADATA);
336 + status = (FLAC__stream_decoder_init_stream ( _decoder,
346 + == FLAC__STREAM_DECODER_INIT_STATUS_OK);
349 apError("FlacStream::open(): can't initialize stream decoder");
353 FLAC__StreamDecoderReadStatus
354 -FlacStream::realReadCallBack (FLAC__byte buffer[], unsigned * bytes)
355 +FlacStream::realReadCallBack (FLAC__byte buffer[], size_t * bytes)
357 *bytes = reader_read (buffer, *bytes, _datasource);
358 return *bytes > 0 ? FLAC__STREAM_DECODER_READ_STATUS_CONTINUE :
360 FLAC__StreamDecoderReadStatus
361 FlacStream::readCallBack (const FLAC__StreamDecoder *,
368 diff -ur alsaplayer-0.99.77.orig/input/flac/FlacStream.h alsaplayer-0.99.77/input/flac/FlacStream.h
369 --- alsaplayer-0.99.77.orig/input/flac/FlacStream.h 2003-03-03 09:32:59.000000000 +0100
370 +++ alsaplayer-0.99.77/input/flac/FlacStream.h 2007-04-01 15:46:08.000000000 +0200
373 FLAC__StreamDecoderReadStatus
374 realReadCallBack (FLAC__byte buffer[],
381 static FLAC__StreamDecoderReadStatus
382 readCallBack (const FLAC__StreamDecoder * decoder,
388 static void errCallBack (const FLAC__StreamDecoder * decoder,
389 diff -ur alsaplayer-0.99.77.orig/input/flac/OggFlacStream.cpp alsaplayer-0.99.77/input/flac/OggFlacStream.cpp
390 --- alsaplayer-0.99.77.orig/input/flac/OggFlacStream.cpp 2003-03-09 03:46:34.000000000 +0100
391 +++ alsaplayer-0.99.77/input/flac/OggFlacStream.cpp 2007-04-01 15:46:39.000000000 +0200
393 FLAC__StreamDecoderReadStatus
394 OggFlacStream::readCallBack (const OggFLAC__StreamDecoder * decoder,
401 diff -ur alsaplayer-0.99.77.orig/input/flac/OggFlacStream.h alsaplayer-0.99.77/input/flac/OggFlacStream.h
402 --- alsaplayer-0.99.77.orig/input/flac/OggFlacStream.h 2003-03-03 09:33:47.000000000 +0100
403 +++ alsaplayer-0.99.77/input/flac/OggFlacStream.h 2007-04-01 15:46:18.000000000 +0200
405 static FLAC__StreamDecoderReadStatus
406 readCallBack (const OggFLAC__StreamDecoder * decoder,
412 static void errCallBack (const OggFLAC__StreamDecoder * decoder,