]> git.pld-linux.org Git - packages/alsaplayer.git/commitdiff
- required for flac-1.1.3
authorSzymon Siwek <sls@pld-linux.org>
Wed, 3 Jan 2007 01:44:31 +0000 (01:44 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    alsaplayer-flac.patch -> 1.1

alsaplayer-flac.patch [new file with mode: 0644]

diff --git a/alsaplayer-flac.patch b/alsaplayer-flac.patch
new file mode 100644 (file)
index 0000000..0ccdf6c
--- /dev/null
@@ -0,0 +1,344 @@
+--- alsaplayer-0.99.76/input/flac/FlacStream.cpp.orig  2007-01-01 23:56:02.000000000 +0000
++++ alsaplayer-0.99.76/input/flac/FlacStream.cpp       2007-01-02 00:16:49.000000000 +0000
+@@ -116,21 +116,22 @@
+       return false;
+     }
+     bool status = true;
+-    status &= FLAC__stream_decoder_set_read_callback (_decoder,
+-                                                    readCallBack);
+-    status &= FLAC__stream_decoder_set_write_callback (_decoder, 
+-                                                   writeCallBack);
+-    status &= FLAC__stream_decoder_set_metadata_callback (_decoder,
+-                                                      metaCallBack);
+-    status &= FLAC__stream_decoder_set_error_callback (_decoder,
+-                                                   errCallBack);
+-    status &= FLAC__stream_decoder_set_client_data (_decoder, (void *) this);
+     if (!status) {
+       apError("FlacStream::open(): status error, huh?");    
+       return false;
+     }
+-    status = (FLAC__stream_decoder_init (_decoder) == FLAC__STREAM_DECODER_SEARCH_FOR_METADATA);
++    status = (FLAC__stream_decoder_init_stream ( _decoder,
++                                              readCallBack,
++                                              NULL,
++                                              NULL,
++                                              NULL,
++                                              NULL,
++                                              writeCallBack,
++                                              metaCallBack,
++                                              errCallBack,
++                                              (void *) this) 
++                  == FLAC__STREAM_DECODER_INIT_STATUS_OK);
+     
+     if (!status) {
+       apError("FlacStream::open(): can't initialize stream decoder");    
+--- alsaplayer-0.99.76/input/flac/FlacSeekableStream.cpp.orig  2007-01-02 00:04:26.000000000 +0000
++++ alsaplayer-0.99.76/input/flac/FlacSeekableStream.cpp       2007-01-02 00:43:29.000000000 +0000
+@@ -39,8 +39,8 @@
+ {
+     if (_decoder)
+     {
+-      FLAC__seekable_stream_decoder_finish (_decoder);
+-      FLAC__seekable_stream_decoder_delete (_decoder);
++      FLAC__stream_decoder_finish (_decoder);
++      FLAC__stream_decoder_delete (_decoder);
+       _decoder = 0;
+     }
+@@ -56,43 +56,36 @@
+       return false;
+     }
+-    _decoder = FLAC__seekable_stream_decoder_new ();
++    _decoder = FLAC__stream_decoder_new ();
+     if (!_decoder) {
+-      apError ("FlacSeekableStream::open(): error creating FLAC__seekable_stream_decoder");
++      apError ("FlacSeekableStream::open(): error creating FLAC__stream_decoder");
+       return false;
+     }
+     bool status = true;
+-    status &= FLAC__seekable_stream_decoder_set_read_callback (_decoder,
+-                                                             readCallBack);
+-    status &= FLAC__seekable_stream_decoder_set_write_callback (_decoder, 
+-                                                              writeCallBack);
+-    status &= FLAC__seekable_stream_decoder_set_metadata_callback (_decoder,
+-                                                                 metaCallBack);
+-    status &= FLAC__seekable_stream_decoder_set_error_callback (_decoder,
+-                                                              errCallBack);
+-    status &= FLAC__seekable_stream_decoder_set_seek_callback (_decoder,
+-                                                             seekCallBack);
+-    status &= FLAC__seekable_stream_decoder_set_tell_callback (_decoder,
+-                                                             tellCallBack);
+-    status &= FLAC__seekable_stream_decoder_set_length_callback (_decoder,
+-                                                               lengthCallBack);
+-    status &= FLAC__seekable_stream_decoder_set_eof_callback (_decoder,
+-                                                            eofCallBack);
+-    status &= FLAC__seekable_stream_decoder_set_client_data (_decoder, (void *) this);
+     if (!status) {
+       apError ("FlacSeekableStream::open(): status error, huh?");    
+       return false;
+     }
+-    status = (FLAC__seekable_stream_decoder_init (_decoder) == FLAC__SEEKABLE_STREAM_DECODER_OK);
++    status = (FLAC__stream_decoder_init_stream (_decoder,
++                                      readCallBack,
++                                      seekCallBack,
++                                      tellCallBack,
++                                      lengthCallBack,
++                                      eofCallBack,
++                                      writeCallBack,
++                                      metaCallBack,
++                                      errCallBack,
++                                      (void*) this) 
++                  == FLAC__STREAM_DECODER_INIT_STATUS_OK);
+     
+     if (!status) {
+-      apError ("FlacSeekableStream::open(): can't initialize seekable stream decoder");    
++      apError ("FlacSeekableStream::open(): can't initialize stream decoder");    
+       return false;
+     }
+     // this will invoke the metaCallBack
+-    if (!FLAC__seekable_stream_decoder_process_until_end_of_metadata (_decoder)) {
++    if (!FLAC__stream_decoder_process_until_end_of_metadata (_decoder)) {
+       apError ("FlacSeekableStream::open(): decoder error");    
+       return false;
+     }
+@@ -117,7 +110,7 @@
+     if (!_decoder)
+       return false;
+-    return FLAC__seekable_stream_decoder_process_single (_decoder);
++    return FLAC__stream_decoder_process_single (_decoder);
+ } // FlacSeekableStream::processOneFrame
+@@ -128,14 +121,14 @@
+     if (!_decoder)
+       return false;
+-    return FLAC__seekable_stream_decoder_seek_absolute (_decoder, sample);
++    return FLAC__stream_decoder_seek_absolute (_decoder, sample);
+ } // FlacSeekableStream::seekAbsolute
+ // static
+ void
+-FlacSeekableStream::metaCallBack (const FLAC__SeekableStreamDecoder * decoder,
++FlacSeekableStream::metaCallBack (const FLAC__StreamDecoder * decoder,
+                                 const FLAC__StreamMetadata * md,
+                                 void * client_data)
+ {
+@@ -154,7 +147,7 @@
+ // static
+ void
+-FlacSeekableStream::errCallBack (const FLAC__SeekableStreamDecoder * decoder,
++FlacSeekableStream::errCallBack (const FLAC__StreamDecoder * decoder,
+                                FLAC__StreamDecoderErrorStatus status,
+                                void * client_data)
+ {
+@@ -172,7 +165,7 @@
+ // static
+ FLAC__StreamDecoderWriteStatus
+-FlacSeekableStream::writeCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
++FlacSeekableStream::writeCallBack (const FLAC__StreamDecoder * /*decoder*/,
+                                  const FLAC__Frame * frame,
+                                  const FLAC__int32 * const buffer[],
+                                  void * client_data)
+@@ -190,91 +183,91 @@
+ // static
+-FLAC__SeekableStreamDecoderReadStatus
+-FlacSeekableStream::readCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
++FLAC__StreamDecoderReadStatus
++FlacSeekableStream::readCallBack (const FLAC__StreamDecoder * /*decoder*/,
+                                 FLAC__byte buffer[],
+                                 unsigned * bytes,
+                                 void * client_data)
+ {
+     if (!client_data)
+-      return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
++      return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
+     FlacSeekableStream * f = (FlacSeekableStream *) client_data;
+     if (!f)
+-      return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
++      return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
+     *bytes = reader_read (buffer, *bytes, f->_datasource);
+-    return *bytes > 0 ? FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK :
++    return *bytes > 0 ? FLAC__STREAM_DECODER_READ_STATUS_CONTINUE :
+       reader_eof (f->_datasource) ? 
+-      FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK : 
+-      FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
++      FLAC__STREAM_DECODER_READ_STATUS_CONTINUE : 
++      FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
+ } // FlacSeekableStream::readCallBack
+ // static
+-FLAC__SeekableStreamDecoderSeekStatus 
+-FlacSeekableStream::seekCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
++FLAC__StreamDecoderSeekStatus 
++FlacSeekableStream::seekCallBack (const FLAC__StreamDecoder * /*decoder*/,
+                                 FLAC__uint64 offset,
+                                 void * client_data)
+ {
+     if (!client_data)
+-      return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
++      return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
+     FlacSeekableStream * f = (FlacSeekableStream *) client_data;
+     if (!f)
+-      return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
++      return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
+     
+     return reader_seek (f->_datasource, offset, SEEK_SET) == 0 ?
+-      FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK :
+-      FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
++      FLAC__STREAM_DECODER_SEEK_STATUS_OK :
++      FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
+ } // FlacSeekableStream::seekCallBack
+ // static
+-FLAC__SeekableStreamDecoderTellStatus 
+-FlacSeekableStream::tellCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
++FLAC__StreamDecoderTellStatus 
++FlacSeekableStream::tellCallBack (const FLAC__StreamDecoder * /*decoder*/,
+                                 FLAC__uint64 * offset,
+                                 void * client_data)
+ {
+     if (!client_data)
+-      return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR;
++      return FLAC__STREAM_DECODER_TELL_STATUS_ERROR;
+     FlacSeekableStream * f = (FlacSeekableStream *) client_data;
+     if (!f)
+-      return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR;
++      return FLAC__STREAM_DECODER_TELL_STATUS_ERROR;
+     long result = reader_tell (f->_datasource);
+     if (result == -1)
+-      return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR;
++      return FLAC__STREAM_DECODER_TELL_STATUS_ERROR;
+     *offset = result;
+-    return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK;
++    return FLAC__STREAM_DECODER_TELL_STATUS_OK;
+     
+ } // FlacSeekableStream::tellCallBack
+ // static
+-FLAC__SeekableStreamDecoderLengthStatus
+-FlacSeekableStream::lengthCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
++FLAC__StreamDecoderLengthStatus
++FlacSeekableStream::lengthCallBack (const FLAC__StreamDecoder * /*decoder*/,
+                                   FLAC__uint64 * len,
+                                   void * client_data)
+ {
+     if (!client_data)
+-      return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
++      return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
+     FlacSeekableStream * f = (FlacSeekableStream *) client_data;
+     if (!f)
+-      return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
++      return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
+     long result = reader_length (f->_datasource);
+     if (result == -1)
+-      return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
++      return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
+     *len = result;
+-    return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK;
++    return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
+ } // FlacSeekableStream::lengthCallBack
+ // static
+ FLAC__bool
+-FlacSeekableStream::eofCallBack (const FLAC__SeekableStreamDecoder * /*decoder*/,
++FlacSeekableStream::eofCallBack (const FLAC__StreamDecoder * /*decoder*/,
+                                void * client_data)
+ {
+     if (!client_data)
+--- alsaplayer-0.99.76/input/flac/FlacSeekableStream.h.orig    2007-01-01 23:42:27.000000000 +0000
++++ alsaplayer-0.99.76/input/flac/FlacSeekableStream.h 2007-01-01 23:51:07.000000000 +0000
+@@ -28,7 +28,7 @@
+ extern "C"
+ {
+-#include <FLAC/seekable_stream_decoder.h>
++#include <FLAC/stream_decoder.h>
+ }
+ namespace Flac
+@@ -78,42 +78,42 @@
+     // flac callbacks for a seekable stream.
+     //---------------------------------------
+-    static void metaCallBack (const FLAC__SeekableStreamDecoder * decoder,
++    static void metaCallBack (const FLAC__StreamDecoder * decoder,
+                             const FLAC__StreamMetadata * md,
+                             void * client_data);
+     static FLAC__StreamDecoderWriteStatus 
+-      writeCallBack (const FLAC__SeekableStreamDecoder * decoder,
++      writeCallBack (const FLAC__StreamDecoder * decoder,
+                      const FLAC__Frame * frame,
+                      const FLAC__int32 * const buffer[],
+                      void * client_data);
+-    static FLAC__SeekableStreamDecoderReadStatus
+-      readCallBack (const FLAC__SeekableStreamDecoder * decoder,
++    static FLAC__StreamDecoderReadStatus
++      readCallBack (const FLAC__StreamDecoder * decoder,
+                     FLAC__byte buffer[],
+                     unsigned * bytes,
+                     void * client_data);
+-    static void errCallBack (const FLAC__SeekableStreamDecoder * decoder,
++    static void errCallBack (const FLAC__StreamDecoder * decoder,
+                            FLAC__StreamDecoderErrorStatus status,
+                            void * client_data);
+-    static FLAC__SeekableStreamDecoderSeekStatus 
+-      seekCallBack (const FLAC__SeekableStreamDecoder * decoder,
++    static FLAC__StreamDecoderSeekStatus 
++      seekCallBack (const FLAC__StreamDecoder * decoder,
+                     FLAC__uint64 offset,
+                     void * client_data);
+-    static FLAC__SeekableStreamDecoderTellStatus 
+-      tellCallBack (const FLAC__SeekableStreamDecoder * decoder,
++    static FLAC__StreamDecoderTellStatus 
++      tellCallBack (const FLAC__StreamDecoder * decoder,
+                     FLAC__uint64 * offset,
+                     void * client_data);
+-    static FLAC__SeekableStreamDecoderLengthStatus
+-      lengthCallBack (const FLAC__SeekableStreamDecoder * decoder,
++    static FLAC__StreamDecoderLengthStatus
++      lengthCallBack (const FLAC__StreamDecoder * decoder,
+                       FLAC__uint64 * len,
+                       void * client_data);
+-    static FLAC__bool eofCallBack (const FLAC__SeekableStreamDecoder * decoder,
++    static FLAC__bool eofCallBack (const FLAC__StreamDecoder * decoder,
+                                  void * client_data);
+@@ -124,7 +124,7 @@
+  private:
+-    FLAC__SeekableStreamDecoder * _decoder;
++    FLAC__StreamDecoder * _decoder;
+ }; // class FlacSeekableStream
This page took 0.045825 seconds and 4 git commands to generate.