]> git.pld-linux.org Git - packages/gstreamer-plugins-good.git/commitdiff
- update to flac 1.1.3 API
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 25 Dec 2006 00:28:39 +0000 (00:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    gstreamer-plugins-good-flac.patch -> 1.1

gstreamer-plugins-good-flac.patch [new file with mode: 0644]

diff --git a/gstreamer-plugins-good-flac.patch b/gstreamer-plugins-good-flac.patch
new file mode 100644 (file)
index 0000000..41c0f4c
--- /dev/null
@@ -0,0 +1,728 @@
+--- gst-plugins-good-0.10.5/configure.ac.orig  2006-12-24 16:17:41.709930000 +0100
++++ gst-plugins-good-0.10.5/configure.ac       2006-12-24 21:17:31.439106784 +0100
+@@ -551,14 +551,12 @@
+ dnl *** FLAC ***
+ translit(dnm, m, l) AM_CONDITIONAL(USE_FLAC, true)
+ GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flac, [
+-  GST_CHECK_LIBHEADER(FLAC, FLAC, FLAC__seekable_stream_encoder_new, -lm, FLAC/all.h, FLAC_LIBS="-lFLAC -lm")
+-  dnl API change in FLAC 1.1.1, so require that...
+-  dnl (this check will also fail with FLAC 1.1.3 which changed API again
+-  dnl and with which our plugin does not compile or work yet)
++  GST_CHECK_LIBHEADER(FLAC, FLAC, FLAC__stream_encoder_init_stream, -lm, FLAC/all.h, FLAC_LIBS="-lFLAC -lm")
++  dnl API change in FLAC 1.1.3, so require that...
+   if test x$HAVE_FLAC = xyes; then
+-    AC_CHECK_DECL(FLAC__SEEKABLE_STREAM_ENCODER_TELL_ERROR,
++    AC_CHECK_DECL(FLAC__STREAM_ENCODER_TELL_STATUS_ERROR,
+                   HAVE_FLAC="yes", HAVE_FLAC="no", [
+-#include <FLAC/seekable_stream_encoder.h>
++#include <FLAC/stream_encoder.h>
+                   ])
+   fi
+   AC_SUBST(FLAC_LIBS)
+--- gst-plugins-good-0.10.5/ext/flac/gstflacdec.c.orig 2006-10-16 20:22:46.000000000 +0200
++++ gst-plugins-good-0.10.5/ext/flac/gstflacdec.c      2006-12-24 22:38:53.641327632 +0100
+@@ -93,25 +93,25 @@
+ static void gst_flac_dec_setup_seekable_decoder (GstFlacDec * flacdec);
+ static void gst_flac_dec_setup_stream_decoder (GstFlacDec * flacdec);
+-static FLAC__SeekableStreamDecoderReadStatus
+-gst_flac_dec_read_seekable (const FLAC__SeekableStreamDecoder * decoder,
++static FLAC__StreamDecoderReadStatus
++gst_flac_dec_read_seekable (const FLAC__StreamDecoder * decoder,
+     FLAC__byte buffer[], unsigned *bytes, void *client_data);
+-static FLAC__SeekableStreamDecoderSeekStatus
+-gst_flac_dec_seek (const FLAC__SeekableStreamDecoder * decoder,
++static FLAC__StreamDecoderSeekStatus
++gst_flac_dec_seek (const FLAC__StreamDecoder * decoder,
+     FLAC__uint64 position, void *client_data);
+-static FLAC__SeekableStreamDecoderTellStatus
+-gst_flac_dec_tell (const FLAC__SeekableStreamDecoder * decoder,
++static FLAC__StreamDecoderTellStatus
++gst_flac_dec_tell (const FLAC__StreamDecoder * decoder,
+     FLAC__uint64 * position, void *client_data);
+-static FLAC__SeekableStreamDecoderLengthStatus
+-gst_flac_dec_length (const FLAC__SeekableStreamDecoder * decoder,
++static FLAC__StreamDecoderLengthStatus
++gst_flac_dec_length (const FLAC__StreamDecoder * decoder,
+     FLAC__uint64 * length, void *client_data);
+-static FLAC__bool gst_flac_dec_eof (const FLAC__SeekableStreamDecoder * decoder,
++static FLAC__bool gst_flac_dec_eof (const FLAC__StreamDecoder * decoder,
+     void *client_data);
+ static FLAC__StreamDecoderReadStatus
+ gst_flac_dec_read_stream (const FLAC__StreamDecoder * decoder,
+     FLAC__byte buffer[], unsigned *bytes, void *client_data);
+ static FLAC__StreamDecoderWriteStatus
+-gst_flac_dec_write_seekable (const FLAC__SeekableStreamDecoder * decoder,
++gst_flac_dec_write_seekable (const FLAC__StreamDecoder * decoder,
+     const FLAC__Frame * frame,
+     const FLAC__int32 * const buffer[], void *client_data);
+ static FLAC__StreamDecoderWriteStatus
+@@ -119,14 +119,14 @@
+     const FLAC__Frame * frame,
+     const FLAC__int32 * const buffer[], void *client_data);
+ static void gst_flac_dec_metadata_callback_seekable (const
+-    FLAC__SeekableStreamDecoder * decoder,
++    FLAC__StreamDecoder * decoder,
+     const FLAC__StreamMetadata * metadata, void *client_data);
+ static void gst_flac_dec_metadata_callback_stream (const FLAC__StreamDecoder *
+     decoder, const FLAC__StreamMetadata * metadata, void *client_data);
+ static void gst_flac_dec_metadata_callback (GstFlacDec * flacdec,
+     const FLAC__StreamMetadata * metadata);
+ static void gst_flac_dec_error_callback_seekable (const
+-    FLAC__SeekableStreamDecoder * decoder,
++    FLAC__StreamDecoder * decoder,
+     FLAC__StreamDecoderErrorStatus status, void *client_data);
+ static void gst_flac_dec_error_callback_stream (const FLAC__StreamDecoder *
+     decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
+@@ -212,7 +212,7 @@
+ gst_flac_dec_reset_decoders (GstFlacDec * flacdec)
+ {
+   if (flacdec->seekable_decoder) {
+-    FLAC__seekable_stream_decoder_delete (flacdec->seekable_decoder);
++    FLAC__stream_decoder_delete (flacdec->seekable_decoder);
+     flacdec->seekable_decoder = NULL;
+   }
+@@ -238,27 +238,10 @@
+ {
+   gst_flac_dec_reset_decoders (dec);
+-  dec->seekable_decoder = FLAC__seekable_stream_decoder_new ();
++  dec->seekable_decoder = FLAC__stream_decoder_new ();
+-  FLAC__seekable_stream_decoder_set_read_callback (dec->seekable_decoder,
+-      gst_flac_dec_read_seekable);
+-  FLAC__seekable_stream_decoder_set_seek_callback (dec->seekable_decoder,
+-      gst_flac_dec_seek);
+-  FLAC__seekable_stream_decoder_set_tell_callback (dec->seekable_decoder,
+-      gst_flac_dec_tell);
+-  FLAC__seekable_stream_decoder_set_length_callback (dec->seekable_decoder,
+-      gst_flac_dec_length);
+-  FLAC__seekable_stream_decoder_set_eof_callback (dec->seekable_decoder,
+-      gst_flac_dec_eof);
+-  FLAC__seekable_stream_decoder_set_write_callback (dec->seekable_decoder,
+-      gst_flac_dec_write_seekable);
+-  FLAC__seekable_stream_decoder_set_metadata_respond (dec->seekable_decoder,
++  FLAC__stream_decoder_set_metadata_respond (dec->seekable_decoder,
+       FLAC__METADATA_TYPE_VORBIS_COMMENT);
+-  FLAC__seekable_stream_decoder_set_metadata_callback (dec->seekable_decoder,
+-      gst_flac_dec_metadata_callback_seekable);
+-  FLAC__seekable_stream_decoder_set_error_callback (dec->seekable_decoder,
+-      gst_flac_dec_error_callback_seekable);
+-  FLAC__seekable_stream_decoder_set_client_data (dec->seekable_decoder, dec);
+ }
+ static void
+@@ -270,17 +253,8 @@
+   dec->stream_decoder = FLAC__stream_decoder_new ();
+-  FLAC__stream_decoder_set_read_callback (dec->stream_decoder,
+-      gst_flac_dec_read_stream);
+-  FLAC__stream_decoder_set_write_callback (dec->stream_decoder,
+-      gst_flac_dec_write_stream);
+   FLAC__stream_decoder_set_metadata_respond (dec->stream_decoder,
+       FLAC__METADATA_TYPE_VORBIS_COMMENT);
+-  FLAC__stream_decoder_set_metadata_callback (dec->stream_decoder,
+-      gst_flac_dec_metadata_callback_stream);
+-  FLAC__stream_decoder_set_error_callback (dec->stream_decoder,
+-      gst_flac_dec_error_callback_stream);
+-  FLAC__stream_decoder_set_client_data (dec->stream_decoder, dec);
+ }
+ static void
+@@ -545,7 +519,7 @@
+ }
+ static void
+-gst_flac_dec_metadata_callback_seekable (const FLAC__SeekableStreamDecoder * d,
++gst_flac_dec_metadata_callback_seekable (const FLAC__StreamDecoder * d,
+     const FLAC__StreamMetadata * metadata, void *client_data)
+ {
+   GstFlacDec *dec = GST_FLAC_DEC (client_data);
+@@ -588,7 +562,7 @@
+ }
+ static void
+-gst_flac_dec_error_callback_seekable (const FLAC__SeekableStreamDecoder * d,
++gst_flac_dec_error_callback_seekable (const FLAC__StreamDecoder * d,
+     FLAC__StreamDecoderErrorStatus status, void *client_data)
+ {
+   gst_flac_dec_error_callback (GST_FLAC_DEC (client_data), status);
+@@ -601,8 +575,8 @@
+   gst_flac_dec_error_callback (GST_FLAC_DEC (client_data), status);
+ }
+-static FLAC__SeekableStreamDecoderSeekStatus
+-gst_flac_dec_seek (const FLAC__SeekableStreamDecoder * decoder,
++static FLAC__StreamDecoderSeekStatus
++gst_flac_dec_seek (const FLAC__StreamDecoder * decoder,
+     FLAC__uint64 position, void *client_data)
+ {
+   GstFlacDec *flacdec;
+@@ -612,11 +586,11 @@
+   GST_DEBUG ("seek %" G_GINT64_FORMAT, position);
+   flacdec->offset = position;
+-  return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK;
++  return FLAC__STREAM_DECODER_SEEK_STATUS_OK;
+ }
+-static FLAC__SeekableStreamDecoderTellStatus
+-gst_flac_dec_tell (const FLAC__SeekableStreamDecoder * decoder,
++static FLAC__StreamDecoderTellStatus
++gst_flac_dec_tell (const FLAC__StreamDecoder * decoder,
+     FLAC__uint64 * position, void *client_data)
+ {
+   GstFlacDec *flacdec;
+@@ -627,11 +601,11 @@
+   GST_DEBUG ("tell %" G_GINT64_FORMAT, *position);
+-  return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK;
++  return FLAC__STREAM_DECODER_TELL_STATUS_OK;
+ }
+-static FLAC__SeekableStreamDecoderLengthStatus
+-gst_flac_dec_length (const FLAC__SeekableStreamDecoder * decoder,
++static FLAC__StreamDecoderLengthStatus
++gst_flac_dec_length (const FLAC__StreamDecoder * decoder,
+     FLAC__uint64 * length, void *client_data)
+ {
+   GstFlacDec *flacdec;
+@@ -642,21 +616,21 @@
+   flacdec = GST_FLAC_DEC (client_data);
+   if (!(peer = gst_pad_get_peer (flacdec->sinkpad)))
+-    return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
++    return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
+   gst_pad_query_duration (peer, &fmt, &len);
+   gst_object_unref (peer);
+   if (fmt != GST_FORMAT_BYTES || len == -1)
+-    return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
++    return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
+   *length = len;
+   GST_DEBUG ("length %" G_GINT64_FORMAT, *length);
+-  return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK;
++  return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
+ }
+ static FLAC__bool
+-gst_flac_dec_eof (const FLAC__SeekableStreamDecoder * decoder,
++gst_flac_dec_eof (const FLAC__StreamDecoder * decoder,
+     void *client_data)
+ {
+   GstFlacDec *flacdec;
+@@ -685,8 +659,8 @@
+   return ret;
+ }
+-static FLAC__SeekableStreamDecoderReadStatus
+-gst_flac_dec_read_seekable (const FLAC__SeekableStreamDecoder * decoder,
++static FLAC__StreamDecoderReadStatus
++gst_flac_dec_read_seekable (const FLAC__StreamDecoder * decoder,
+     FLAC__byte buffer[], unsigned *bytes, void *client_data)
+ {
+   GstFlacDec *flacdec;
+@@ -696,7 +670,7 @@
+   if (gst_pad_pull_range (flacdec->sinkpad, flacdec->offset, *bytes,
+           &buf) != GST_FLOW_OK)
+-    return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
++    return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
+   GST_DEBUG ("Read %d bytes at %" G_GUINT64_FORMAT,
+       GST_BUFFER_SIZE (buf), flacdec->offset);
+@@ -705,7 +679,7 @@
+   gst_buffer_unref (buf);
+   flacdec->offset += *bytes;
+-  return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK;
++  return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
+ }
+ static FLAC__StreamDecoderReadStatus
+@@ -881,7 +855,7 @@
+ }
+ static FLAC__StreamDecoderWriteStatus
+-gst_flac_dec_write_seekable (const FLAC__SeekableStreamDecoder * decoder,
++gst_flac_dec_write_seekable (const FLAC__StreamDecoder * decoder,
+     const FLAC__Frame * frame,
+     const FLAC__int32 * const buffer[], void *client_data)
+ {
+@@ -900,7 +874,7 @@
+ gst_flac_dec_loop (GstPad * sinkpad)
+ {
+   GstFlacDec *flacdec;
+-  FLAC__SeekableStreamDecoderState s;
++  FLAC__StreamDecoderState s;
+   flacdec = GST_FLAC_DEC (GST_OBJECT_PARENT (sinkpad));
+@@ -908,8 +882,17 @@
+   if (flacdec->init) {
+     GST_DEBUG_OBJECT (flacdec, "initializing decoder");
+-    s = FLAC__seekable_stream_decoder_init (flacdec->seekable_decoder);
+-    if (s != FLAC__SEEKABLE_STREAM_DECODER_OK)
++    s = FLAC__stream_decoder_init_stream (flacdec->seekable_decoder,
++      gst_flac_dec_read_seekable,
++      gst_flac_dec_seek,
++      gst_flac_dec_tell,
++      gst_flac_dec_length,
++      gst_flac_dec_eof,
++      gst_flac_dec_write_seekable,
++      gst_flac_dec_metadata_callback_seekable,
++      gst_flac_dec_error_callback_seekable,
++      flacdec);
++    if (s != FLAC__STREAM_DECODER_INIT_STATUS_OK)
+       goto analyze_state;
+     /*    FLAC__seekable_stream_decoder_process_metadata (flacdec->seekable_decoder); */
+     flacdec->init = FALSE;
+@@ -920,15 +903,17 @@
+   flacdec->last_flow = GST_FLOW_OK;
+   GST_LOG_OBJECT (flacdec, "processing single");
+-  FLAC__seekable_stream_decoder_process_single (flacdec->seekable_decoder);
++  FLAC__stream_decoder_process_single (flacdec->seekable_decoder);
+ analyze_state:
+   GST_LOG_OBJECT (flacdec, "done processing, checking encoder state");
+-  s = FLAC__seekable_stream_decoder_get_state (flacdec->seekable_decoder);
++  s = FLAC__stream_decoder_get_state (flacdec->seekable_decoder);
+   switch (s) {
+-    case FLAC__SEEKABLE_STREAM_DECODER_OK:
+-    case FLAC__SEEKABLE_STREAM_DECODER_SEEKING:{
++    case FLAC__STREAM_DECODER_SEARCH_FOR_METADATA:
++    case FLAC__STREAM_DECODER_READ_METADATA:
++    case FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC:
++    case FLAC__STREAM_DECODER_READ_FRAME:{
+       GST_DEBUG_OBJECT (flacdec, "everything ok");
+       if (flacdec->last_flow != GST_FLOW_OK &&
+@@ -956,9 +941,9 @@
+       return;
+     }
+-    case FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM:{
++    case FLAC__STREAM_DECODER_END_OF_STREAM:{
+       GST_DEBUG_OBJECT (flacdec, "EOS");
+-      FLAC__seekable_stream_decoder_reset (flacdec->seekable_decoder);
++      FLAC__stream_decoder_reset (flacdec->seekable_decoder);
+       if ((flacdec->segment.flags & GST_SEEK_FLAG_SEGMENT) != 0) {
+         if (flacdec->segment.duration > 0) {
+@@ -972,18 +957,16 @@
+       goto eos_and_pause;
+     }
+-    case FLAC__SEEKABLE_STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
+-    case FLAC__SEEKABLE_STREAM_DECODER_STREAM_DECODER_ERROR:
+-    case FLAC__SEEKABLE_STREAM_DECODER_READ_ERROR:
+-    case FLAC__SEEKABLE_STREAM_DECODER_SEEK_ERROR:
+-    case FLAC__SEEKABLE_STREAM_DECODER_ALREADY_INITIALIZED:
+-    case FLAC__SEEKABLE_STREAM_DECODER_INVALID_CALLBACK:
+-    case FLAC__SEEKABLE_STREAM_DECODER_UNINITIALIZED:
++    case FLAC__STREAM_DECODER_OGG_ERROR:
++    case FLAC__STREAM_DECODER_SEEK_ERROR:
++    case FLAC__STREAM_DECODER_ABORTED:
++    case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
++    case FLAC__STREAM_DECODER_UNINITIALIZED:
+     default:{
+       /* fixme: this error sucks -- should try to figure out when/if an more
+          specific error was already sent via the callback */
+       GST_ELEMENT_ERROR (flacdec, STREAM, DECODE, (NULL),
+-          ("%s", FLAC__SeekableStreamDecoderStateString[s]));
++          ("%s", FLAC__StreamDecoderStateString[s]));
+       goto eos_and_pause;
+     }
+   }
+@@ -1113,8 +1096,17 @@
+   if (dec->init) {
+     GST_DEBUG_OBJECT (dec, "initializing decoder");
+-    s = FLAC__stream_decoder_init (dec->stream_decoder);
+-    if (s != FLAC__STREAM_DECODER_SEARCH_FOR_METADATA) {
++    s = FLAC__stream_decoder_init_stream (dec->stream_decoder,
++      gst_flac_dec_read_stream,
++      NULL,
++      NULL,
++      NULL,
++      NULL,
++      gst_flac_dec_write_stream,
++      gst_flac_dec_metadata_callback_stream,
++      gst_flac_dec_error_callback_stream,
++      dec);
++    if (s != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
+       GST_ELEMENT_ERROR (GST_ELEMENT (dec), LIBRARY, INIT, (NULL), (NULL));
+       return GST_FLOW_ERROR;
+     }
+@@ -1598,7 +1590,7 @@
+   flacdec->seeking = TRUE;
+   seek_ok =
+-      FLAC__seekable_stream_decoder_seek_absolute (flacdec->seekable_decoder,
++      FLAC__stream_decoder_seek_absolute (flacdec->seekable_decoder,
+       segment.start);
+   flacdec->seeking = FALSE;
+--- gst-plugins-good-0.10.5/ext/flac/gstflacenc.h.orig 2006-06-01 23:07:23.000000000 +0200
++++ gst-plugins-good-0.10.5/ext/flac/gstflacenc.h      2006-12-24 22:05:00.981492950 +0100
+@@ -54,7 +54,7 @@
+   gboolean       stopped;
+   FLAC__int32   *data;
+-  FLAC__SeekableStreamEncoder *encoder;
++  FLAC__StreamEncoder *encoder;
+   FLAC__StreamMetadata **meta;
+   GstTagList *     tags;
+--- gst-plugins-good-0.10.5/ext/flac/gstflacdec.h.orig 2006-12-24 22:05:36.051491475 +0100
++++ gst-plugins-good-0.10.5/ext/flac/gstflacdec.h      2006-12-24 22:05:24.698844524 +0100
+@@ -41,7 +41,7 @@
+ struct _GstFlacDec {
+   GstElement     element;
+-  FLAC__SeekableStreamDecoder *seekable_decoder; /* for pull-based operation  */
++  FLAC__StreamDecoder         *seekable_decoder; /* for pull-based operation  */
+   FLAC__StreamDecoder         *stream_decoder;   /* for chain-based operation */
+   GstAdapter                  *adapter;
+--- gst-plugins-good-0.10.5/ext/flac/gstflacenc.c.orig 2006-10-16 20:22:46.000000000 +0200
++++ gst-plugins-good-0.10.5/ext/flac/gstflacenc.c      2006-12-24 22:44:18.171821571 +0100
+@@ -109,14 +109,14 @@
+     GstStateChange transition);
+ static FLAC__StreamEncoderWriteStatus
+-gst_flac_enc_write_callback (const FLAC__SeekableStreamEncoder * encoder,
++gst_flac_enc_write_callback (const FLAC__StreamEncoder * encoder,
+     const FLAC__byte buffer[], unsigned bytes,
+     unsigned samples, unsigned current_frame, void *client_data);
+-static FLAC__SeekableStreamEncoderSeekStatus
+-gst_flac_enc_seek_callback (const FLAC__SeekableStreamEncoder * encoder,
++static FLAC__StreamEncoderSeekStatus
++gst_flac_enc_seek_callback (const FLAC__StreamEncoder * encoder,
+     FLAC__uint64 absolute_byte_offset, void *client_data);
+-static FLAC__SeekableStreamEncoderTellStatus
+-gst_flac_enc_tell_callback (const FLAC__SeekableStreamEncoder * encoder,
++static FLAC__StreamEncoderTellStatus
++gst_flac_enc_tell_callback (const FLAC__StreamEncoder * encoder,
+     FLAC__uint64 * absolute_byte_offset, void *client_data);
+ typedef struct
+@@ -302,7 +302,7 @@
+   gst_pad_use_fixed_caps (flacenc->srcpad);
+   gst_element_add_pad (GST_ELEMENT (flacenc), flacenc->srcpad);
+-  flacenc->encoder = FLAC__seekable_stream_encoder_new ();
++  flacenc->encoder = FLAC__stream_encoder_new ();
+   flacenc->offset = 0;
+   flacenc->samples_written = 0;
+@@ -315,7 +315,7 @@
+ {
+   GstFlacEnc *flacenc = GST_FLAC_ENC (object);
+-  FLAC__seekable_stream_encoder_delete (flacenc->encoder);
++  FLAC__stream_encoder_delete (flacenc->encoder);
+   G_OBJECT_CLASS (parent_class)->finalize (object);
+ }
+@@ -360,7 +360,7 @@
+       FLAC__metadata_object_new (FLAC__METADATA_TYPE_VORBIS_COMMENT);
+   gst_tag_list_foreach (copy, add_one_tag, flacenc);
+-  if (FLAC__seekable_stream_encoder_set_metadata (flacenc->encoder,
++  if (FLAC__stream_encoder_set_metadata (flacenc->encoder,
+           flacenc->meta, 1) != true)
+     g_warning ("Dude, i'm already initialized!");
+   gst_tag_list_free (copy);
+@@ -371,13 +371,13 @@
+ {
+   GstFlacEnc *flacenc;
+   GstStructure *structure;
+-  FLAC__SeekableStreamEncoderState state;
++  FLAC__StreamEncoderState state;
+   /* takes a ref on flacenc */
+   flacenc = GST_FLAC_ENC (gst_pad_get_parent (pad));
+-  if (FLAC__seekable_stream_encoder_get_state (flacenc->encoder) !=
+-      FLAC__SEEKABLE_STREAM_ENCODER_UNINITIALIZED)
++  if (FLAC__stream_encoder_get_state (flacenc->encoder) !=
++      FLAC__STREAM_ENCODER_UNINITIALIZED)
+     goto encoder_already_initialized;
+   structure = gst_caps_get_structure (caps, 0);
+@@ -397,26 +397,22 @@
+   gst_caps_unref (caps);
+-  FLAC__seekable_stream_encoder_set_bits_per_sample (flacenc->encoder,
++  FLAC__stream_encoder_set_bits_per_sample (flacenc->encoder,
+       flacenc->depth);
+-  FLAC__seekable_stream_encoder_set_sample_rate (flacenc->encoder,
++  FLAC__stream_encoder_set_sample_rate (flacenc->encoder,
+       flacenc->sample_rate);
+-  FLAC__seekable_stream_encoder_set_channels (flacenc->encoder,
++  FLAC__stream_encoder_set_channels (flacenc->encoder,
+       flacenc->channels);
+-  FLAC__seekable_stream_encoder_set_write_callback (flacenc->encoder,
+-      gst_flac_enc_write_callback);
+-  FLAC__seekable_stream_encoder_set_seek_callback (flacenc->encoder,
+-      gst_flac_enc_seek_callback);
+-  FLAC__seekable_stream_encoder_set_tell_callback (flacenc->encoder,
+-      gst_flac_enc_tell_callback);
+-
+-  FLAC__seekable_stream_encoder_set_client_data (flacenc->encoder, flacenc);
+-
+   gst_flac_enc_set_metadata (flacenc);
+-  state = FLAC__seekable_stream_encoder_init (flacenc->encoder);
+-  if (state != FLAC__STREAM_ENCODER_OK)
++  state = FLAC__stream_encoder_init_stream (flacenc->encoder,
++    gst_flac_enc_write_callback,
++    gst_flac_enc_seek_callback,
++    gst_flac_enc_tell_callback,
++    NULL,
++    flacenc);
++  if (state != FLAC__STREAM_ENCODER_INIT_STATUS_OK)
+     goto failed_to_initialize;
+   gst_object_unref (flacenc);
+@@ -453,9 +449,9 @@
+ #define DO_UPDATE(name, val, str)                                               \
+   G_STMT_START {                                                                \
+-    if (FLAC__seekable_stream_encoder_get_##name (flacenc->encoder) !=          \
++    if (FLAC__stream_encoder_get_##name (flacenc->encoder) !=                   \
+         flacenc_params[quality].val) {                                          \
+-      FLAC__seekable_stream_encoder_set_##name (flacenc->encoder,               \
++      FLAC__stream_encoder_set_##name (flacenc->encoder,                        \
+           flacenc_params[quality].val);                                         \
+       g_object_notify (G_OBJECT (flacenc), str);                                \
+     }                                                                           \
+@@ -490,8 +486,8 @@
+   return TRUE;
+ }
+-static FLAC__SeekableStreamEncoderSeekStatus
+-gst_flac_enc_seek_callback (const FLAC__SeekableStreamEncoder * encoder,
++static FLAC__StreamEncoderSeekStatus
++gst_flac_enc_seek_callback (const FLAC__StreamEncoder * encoder,
+     FLAC__uint64 absolute_byte_offset, void *client_data)
+ {
+   GstFlacEnc *flacenc;
+@@ -501,7 +497,7 @@
+   flacenc = GST_FLAC_ENC (client_data);
+   if (flacenc->stopped)
+-    return FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_OK;
++    return FLAC__STREAM_ENCODER_SEEK_STATUS_OK;
+   event = gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES,
+       absolute_byte_offset, GST_BUFFER_OFFSET_NONE, 0);
+@@ -525,11 +521,11 @@
+   flacenc->offset = absolute_byte_offset;
+-  return FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_OK;
++  return FLAC__STREAM_ENCODER_SEEK_STATUS_OK;
+ }
+ static FLAC__StreamEncoderWriteStatus
+-gst_flac_enc_write_callback (const FLAC__SeekableStreamEncoder * encoder,
++gst_flac_enc_write_callback (const FLAC__StreamEncoder * encoder,
+     const FLAC__byte buffer[], unsigned bytes,
+     unsigned samples, unsigned current_frame, void *client_data)
+ {
+@@ -577,15 +573,15 @@
+   return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
+ }
+-static FLAC__SeekableStreamEncoderTellStatus
+-gst_flac_enc_tell_callback (const FLAC__SeekableStreamEncoder * encoder,
++static FLAC__StreamEncoderTellStatus
++gst_flac_enc_tell_callback (const FLAC__StreamEncoder * encoder,
+     FLAC__uint64 * absolute_byte_offset, void *client_data)
+ {
+   GstFlacEnc *flacenc = GST_FLAC_ENC (client_data);
+   *absolute_byte_offset = flacenc->offset;
+-  return FLAC__SEEKABLE_STREAM_ENCODER_TELL_STATUS_OK;
++  return FLAC__STREAM_ENCODER_TELL_STATUS_OK;
+ }
+ static gboolean
+@@ -629,7 +625,7 @@
+       break;
+     }
+     case GST_EVENT_EOS:
+-      FLAC__seekable_stream_encoder_finish (flacenc->encoder);
++      FLAC__stream_encoder_finish (flacenc->encoder);
+       ret = gst_pad_event_default (pad, event);
+       break;
+     case GST_EVENT_TAG:
+@@ -686,7 +682,7 @@
+   gst_buffer_unref (buffer);
+-  res = FLAC__seekable_stream_encoder_process_interleaved (flacenc->encoder,
++  res = FLAC__stream_encoder_process_interleaved (flacenc->encoder,
+       (const FLAC__int32 *) data, samples / flacenc->channels);
+   g_free (data);
+@@ -712,51 +708,51 @@
+       gst_flac_enc_update_quality (this, g_value_get_enum (value));
+       break;
+     case PROP_STREAMABLE_SUBSET:
+-      FLAC__seekable_stream_encoder_set_streamable_subset (this->encoder,
++      FLAC__stream_encoder_set_streamable_subset (this->encoder,
+           g_value_get_boolean (value));
+       break;
+     case PROP_MID_SIDE_STEREO:
+-      FLAC__seekable_stream_encoder_set_do_mid_side_stereo (this->encoder,
++      FLAC__stream_encoder_set_do_mid_side_stereo (this->encoder,
+           g_value_get_boolean (value));
+       break;
+     case PROP_LOOSE_MID_SIDE_STEREO:
+-      FLAC__seekable_stream_encoder_set_loose_mid_side_stereo (this->encoder,
++      FLAC__stream_encoder_set_loose_mid_side_stereo (this->encoder,
+           g_value_get_boolean (value));
+       break;
+     case PROP_BLOCKSIZE:
+-      FLAC__seekable_stream_encoder_set_blocksize (this->encoder,
++      FLAC__stream_encoder_set_blocksize (this->encoder,
+           g_value_get_uint (value));
+       break;
+     case PROP_MAX_LPC_ORDER:
+-      FLAC__seekable_stream_encoder_set_max_lpc_order (this->encoder,
++      FLAC__stream_encoder_set_max_lpc_order (this->encoder,
+           g_value_get_uint (value));
+       break;
+     case PROP_QLP_COEFF_PRECISION:
+-      FLAC__seekable_stream_encoder_set_qlp_coeff_precision (this->encoder,
++      FLAC__stream_encoder_set_qlp_coeff_precision (this->encoder,
+           g_value_get_uint (value));
+       break;
+     case PROP_QLP_COEFF_PREC_SEARCH:
+-      FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search (this->encoder,
++      FLAC__stream_encoder_set_do_qlp_coeff_prec_search (this->encoder,
+           g_value_get_boolean (value));
+       break;
+     case PROP_ESCAPE_CODING:
+-      FLAC__seekable_stream_encoder_set_do_escape_coding (this->encoder,
++      FLAC__stream_encoder_set_do_escape_coding (this->encoder,
+           g_value_get_boolean (value));
+       break;
+     case PROP_EXHAUSTIVE_MODEL_SEARCH:
+-      FLAC__seekable_stream_encoder_set_do_exhaustive_model_search (this->
++      FLAC__stream_encoder_set_do_exhaustive_model_search (this->
+           encoder, g_value_get_boolean (value));
+       break;
+     case PROP_MIN_RESIDUAL_PARTITION_ORDER:
+-      FLAC__seekable_stream_encoder_set_min_residual_partition_order (this->
++      FLAC__stream_encoder_set_min_residual_partition_order (this->
+           encoder, g_value_get_uint (value));
+       break;
+     case PROP_MAX_RESIDUAL_PARTITION_ORDER:
+-      FLAC__seekable_stream_encoder_set_max_residual_partition_order (this->
++      FLAC__stream_encoder_set_max_residual_partition_order (this->
+           encoder, g_value_get_uint (value));
+       break;
+     case PROP_RICE_PARAMETER_SEARCH_DIST:
+-      FLAC__seekable_stream_encoder_set_rice_parameter_search_dist (this->
++      FLAC__stream_encoder_set_rice_parameter_search_dist (this->
+           encoder, g_value_get_uint (value));
+       break;
+     default:
+@@ -781,57 +777,57 @@
+       break;
+     case PROP_STREAMABLE_SUBSET:
+       g_value_set_boolean (value,
+-          FLAC__seekable_stream_encoder_get_streamable_subset (this->encoder));
++          FLAC__stream_encoder_get_streamable_subset (this->encoder));
+       break;
+     case PROP_MID_SIDE_STEREO:
+       g_value_set_boolean (value,
+-          FLAC__seekable_stream_encoder_get_do_mid_side_stereo (this->encoder));
++          FLAC__stream_encoder_get_do_mid_side_stereo (this->encoder));
+       break;
+     case PROP_LOOSE_MID_SIDE_STEREO:
+       g_value_set_boolean (value,
+-          FLAC__seekable_stream_encoder_get_loose_mid_side_stereo (this->
++          FLAC__stream_encoder_get_loose_mid_side_stereo (this->
+               encoder));
+       break;
+     case PROP_BLOCKSIZE:
+       g_value_set_uint (value,
+-          FLAC__seekable_stream_encoder_get_blocksize (this->encoder));
++          FLAC__stream_encoder_get_blocksize (this->encoder));
+       break;
+     case PROP_MAX_LPC_ORDER:
+       g_value_set_uint (value,
+-          FLAC__seekable_stream_encoder_get_max_lpc_order (this->encoder));
++          FLAC__stream_encoder_get_max_lpc_order (this->encoder));
+       break;
+     case PROP_QLP_COEFF_PRECISION:
+       g_value_set_uint (value,
+-          FLAC__seekable_stream_encoder_get_qlp_coeff_precision (this->
++          FLAC__stream_encoder_get_qlp_coeff_precision (this->
+               encoder));
+       break;
+     case PROP_QLP_COEFF_PREC_SEARCH:
+       g_value_set_boolean (value,
+-          FLAC__seekable_stream_encoder_get_do_qlp_coeff_prec_search (this->
++          FLAC__stream_encoder_get_do_qlp_coeff_prec_search (this->
+               encoder));
+       break;
+     case PROP_ESCAPE_CODING:
+       g_value_set_boolean (value,
+-          FLAC__seekable_stream_encoder_get_do_escape_coding (this->encoder));
++          FLAC__stream_encoder_get_do_escape_coding (this->encoder));
+       break;
+     case PROP_EXHAUSTIVE_MODEL_SEARCH:
+       g_value_set_boolean (value,
+-          FLAC__seekable_stream_encoder_get_do_exhaustive_model_search (this->
++          FLAC__stream_encoder_get_do_exhaustive_model_search (this->
+               encoder));
+       break;
+     case PROP_MIN_RESIDUAL_PARTITION_ORDER:
+       g_value_set_uint (value,
+-          FLAC__seekable_stream_encoder_get_min_residual_partition_order (this->
++          FLAC__stream_encoder_get_min_residual_partition_order (this->
+               encoder));
+       break;
+     case PROP_MAX_RESIDUAL_PARTITION_ORDER:
+       g_value_set_uint (value,
+-          FLAC__seekable_stream_encoder_get_max_residual_partition_order (this->
++          FLAC__stream_encoder_get_max_residual_partition_order (this->
+               encoder));
+       break;
+     case PROP_RICE_PARAMETER_SEARCH_DIST:
+       g_value_set_uint (value,
+-          FLAC__seekable_stream_encoder_get_rice_parameter_search_dist (this->
++          FLAC__stream_encoder_get_rice_parameter_search_dist (this->
+               encoder));
+       break;
+     default:
+@@ -864,10 +860,10 @@
+     case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
+       break;
+     case GST_STATE_CHANGE_PAUSED_TO_READY:
+-      if (FLAC__seekable_stream_encoder_get_state (flacenc->encoder) !=
++      if (FLAC__stream_encoder_get_state (flacenc->encoder) !=
+           FLAC__STREAM_ENCODER_UNINITIALIZED) {
+         flacenc->stopped = TRUE;
+-        FLAC__seekable_stream_encoder_finish (flacenc->encoder);
++        FLAC__stream_encoder_finish (flacenc->encoder);
+       }
+       flacenc->offset = 0;
+       flacenc->samples_written = 0;
This page took 0.117625 seconds and 4 git commands to generate.