Lines 91-135
Link Here
|
91 |
static GstFlowReturn gst_flac_dec_chain (GstPad * pad, GstBuffer * buf); |
91 |
static GstFlowReturn gst_flac_dec_chain (GstPad * pad, GstBuffer * buf); |
92 |
static void gst_flac_dec_reset_decoders (GstFlacDec * flacdec); |
92 |
static void gst_flac_dec_reset_decoders (GstFlacDec * flacdec); |
93 |
static void gst_flac_dec_setup_seekable_decoder (GstFlacDec * flacdec); |
93 |
static void gst_flac_dec_setup_seekable_decoder (GstFlacDec * flacdec); |
|
|
94 |
#ifdef LEGACY_FLAC |
94 |
static void gst_flac_dec_setup_stream_decoder (GstFlacDec * flacdec); |
95 |
static void gst_flac_dec_setup_stream_decoder (GstFlacDec * flacdec); |
|
|
96 |
#endif |
95 |
|
97 |
|
|
|
98 |
#ifdef LEGACY_FLAC |
96 |
static FLAC__SeekableStreamDecoderReadStatus |
99 |
static FLAC__SeekableStreamDecoderReadStatus |
97 |
gst_flac_dec_read_seekable (const FLAC__SeekableStreamDecoder * decoder, |
100 |
gst_flac_dec_read_seekable (const FLAC__SeekableStreamDecoder * decoder, |
98 |
FLAC__byte buffer[], unsigned *bytes, void *client_data); |
101 |
FLAC__byte buffer[], unsigned *bytes, void *client_data); |
|
|
102 |
#else |
103 |
static FLAC__StreamDecoderReadStatus |
104 |
gst_flac_dec_read_seekable (const FLAC__StreamDecoder * decoder, |
105 |
FLAC__byte buffer[], size_t *bytes, void *client_data); |
106 |
#endif |
107 |
#ifdef LEGACY_FLAC |
99 |
static FLAC__SeekableStreamDecoderSeekStatus |
108 |
static FLAC__SeekableStreamDecoderSeekStatus |
100 |
gst_flac_dec_seek (const FLAC__SeekableStreamDecoder * decoder, |
109 |
gst_flac_dec_seek (const FLAC__SeekableStreamDecoder * decoder, |
|
|
110 |
#else |
111 |
static FLAC__StreamDecoderSeekStatus |
112 |
gst_flac_dec_seek (const FLAC__StreamDecoder * decoder, |
113 |
#endif |
101 |
FLAC__uint64 position, void *client_data); |
114 |
FLAC__uint64 position, void *client_data); |
|
|
115 |
#ifdef LEGACY_FLAC |
102 |
static FLAC__SeekableStreamDecoderTellStatus |
116 |
static FLAC__SeekableStreamDecoderTellStatus |
103 |
gst_flac_dec_tell (const FLAC__SeekableStreamDecoder * decoder, |
117 |
gst_flac_dec_tell (const FLAC__SeekableStreamDecoder * decoder, |
|
|
118 |
#else |
119 |
static FLAC__StreamDecoderTellStatus |
120 |
gst_flac_dec_tell (const FLAC__StreamDecoder * decoder, |
121 |
#endif |
104 |
FLAC__uint64 * position, void *client_data); |
122 |
FLAC__uint64 * position, void *client_data); |
|
|
123 |
#ifdef LEGACY_FLAC |
105 |
static FLAC__SeekableStreamDecoderLengthStatus |
124 |
static FLAC__SeekableStreamDecoderLengthStatus |
106 |
gst_flac_dec_length (const FLAC__SeekableStreamDecoder * decoder, |
125 |
gst_flac_dec_length (const FLAC__SeekableStreamDecoder * decoder, |
|
|
126 |
#else |
127 |
static FLAC__StreamDecoderLengthStatus |
128 |
gst_flac_dec_length (const FLAC__StreamDecoder * decoder, |
129 |
#endif |
107 |
FLAC__uint64 * length, void *client_data); |
130 |
FLAC__uint64 * length, void *client_data); |
|
|
131 |
#ifdef LEGACY_FLAC |
108 |
static FLAC__bool gst_flac_dec_eof (const FLAC__SeekableStreamDecoder * decoder, |
132 |
static FLAC__bool gst_flac_dec_eof (const FLAC__SeekableStreamDecoder * decoder, |
|
|
133 |
#else |
134 |
static FLAC__bool gst_flac_dec_eof (const FLAC__StreamDecoder * decoder, |
135 |
#endif |
109 |
void *client_data); |
136 |
void *client_data); |
110 |
static FLAC__StreamDecoderReadStatus |
137 |
static FLAC__StreamDecoderReadStatus |
111 |
gst_flac_dec_read_stream (const FLAC__StreamDecoder * decoder, |
138 |
gst_flac_dec_read_stream (const FLAC__StreamDecoder * decoder, |
112 |
FLAC__byte buffer[], unsigned *bytes, void *client_data); |
139 |
FLAC__byte buffer[], unsigned *bytes, void *client_data); |
113 |
static FLAC__StreamDecoderWriteStatus |
140 |
static FLAC__StreamDecoderWriteStatus |
|
|
141 |
#ifdef LEGACY_FLAC |
114 |
gst_flac_dec_write_seekable (const FLAC__SeekableStreamDecoder * decoder, |
142 |
gst_flac_dec_write_seekable (const FLAC__SeekableStreamDecoder * decoder, |
|
|
143 |
#else |
144 |
gst_flac_dec_write_seekable (const FLAC__StreamDecoder * decoder, |
145 |
#endif |
115 |
const FLAC__Frame * frame, |
146 |
const FLAC__Frame * frame, |
116 |
const FLAC__int32 * const buffer[], void *client_data); |
147 |
const FLAC__int32 * const buffer[], void *client_data); |
|
|
148 |
#ifdef LEGACY_FLAC |
117 |
static FLAC__StreamDecoderWriteStatus |
149 |
static FLAC__StreamDecoderWriteStatus |
118 |
gst_flac_dec_write_stream (const FLAC__StreamDecoder * decoder, |
150 |
gst_flac_dec_write_stream (const FLAC__StreamDecoder * decoder, |
119 |
const FLAC__Frame * frame, |
151 |
const FLAC__Frame * frame, |
120 |
const FLAC__int32 * const buffer[], void *client_data); |
152 |
const FLAC__int32 * const buffer[], void *client_data); |
|
|
153 |
#endif |
121 |
static void gst_flac_dec_metadata_callback_seekable (const |
154 |
static void gst_flac_dec_metadata_callback_seekable (const |
|
|
155 |
#ifdef LEGACY_FLAC |
122 |
FLAC__SeekableStreamDecoder * decoder, |
156 |
FLAC__SeekableStreamDecoder * decoder, |
|
|
157 |
#else |
158 |
FLAC__StreamDecoder * decoder, |
159 |
#endif |
123 |
const FLAC__StreamMetadata * metadata, void *client_data); |
160 |
const FLAC__StreamMetadata * metadata, void *client_data); |
|
|
161 |
#ifdef LEGACY_FLAC |
124 |
static void gst_flac_dec_metadata_callback_stream (const FLAC__StreamDecoder * |
162 |
static void gst_flac_dec_metadata_callback_stream (const FLAC__StreamDecoder * |
125 |
decoder, const FLAC__StreamMetadata * metadata, void *client_data); |
163 |
decoder, const FLAC__StreamMetadata * metadata, void *client_data); |
|
|
164 |
#endif |
126 |
static void gst_flac_dec_metadata_callback (GstFlacDec * flacdec, |
165 |
static void gst_flac_dec_metadata_callback (GstFlacDec * flacdec, |
127 |
const FLAC__StreamMetadata * metadata); |
166 |
const FLAC__StreamMetadata * metadata); |
128 |
static void gst_flac_dec_error_callback_seekable (const |
167 |
static void gst_flac_dec_error_callback_seekable (const |
|
|
168 |
#ifdef LEGACY_FLAC |
129 |
FLAC__SeekableStreamDecoder * decoder, |
169 |
FLAC__SeekableStreamDecoder * decoder, |
|
|
170 |
#else |
171 |
FLAC__StreamDecoder * decoder, |
172 |
#endif |
130 |
FLAC__StreamDecoderErrorStatus status, void *client_data); |
173 |
FLAC__StreamDecoderErrorStatus status, void *client_data); |
|
|
174 |
#ifdef LEGACY_FLAC |
131 |
static void gst_flac_dec_error_callback_stream (const FLAC__StreamDecoder * |
175 |
static void gst_flac_dec_error_callback_stream (const FLAC__StreamDecoder * |
132 |
decoder, FLAC__StreamDecoderErrorStatus status, void *client_data); |
176 |
decoder, FLAC__StreamDecoderErrorStatus status, void *client_data); |
|
|
177 |
#endif |
133 |
|
178 |
|
134 |
GST_BOILERPLATE (GstFlacDec, gst_flac_dec, GstElement, GST_TYPE_ELEMENT); |
179 |
GST_BOILERPLATE (GstFlacDec, gst_flac_dec, GstElement, GST_TYPE_ELEMENT); |
135 |
#define GST_FLAC_DEC_SRC_CAPS \ |
180 |
#define GST_FLAC_DEC_SRC_CAPS \ |
Lines 212-226
Link Here
|
212 |
gst_flac_dec_reset_decoders (GstFlacDec * flacdec) |
257 |
gst_flac_dec_reset_decoders (GstFlacDec * flacdec) |
213 |
{ |
258 |
{ |
214 |
if (flacdec->seekable_decoder) { |
259 |
if (flacdec->seekable_decoder) { |
|
|
260 |
#ifdef LEGACY_FLAC |
215 |
FLAC__seekable_stream_decoder_delete (flacdec->seekable_decoder); |
261 |
FLAC__seekable_stream_decoder_delete (flacdec->seekable_decoder); |
|
|
262 |
#else |
263 |
FLAC__stream_decoder_delete (flacdec->seekable_decoder); |
264 |
#endif |
216 |
flacdec->seekable_decoder = NULL; |
265 |
flacdec->seekable_decoder = NULL; |
217 |
} |
266 |
} |
218 |
|
267 |
|
|
|
268 |
#ifdef LEGACY_FLAC |
219 |
/* Clean up the stream_decoder */ |
269 |
/* Clean up the stream_decoder */ |
220 |
if (flacdec->stream_decoder) { |
270 |
if (flacdec->stream_decoder) { |
221 |
FLAC__stream_decoder_delete (flacdec->stream_decoder); |
271 |
FLAC__stream_decoder_delete (flacdec->stream_decoder); |
222 |
flacdec->stream_decoder = NULL; |
272 |
flacdec->stream_decoder = NULL; |
223 |
} |
273 |
} |
|
|
274 |
#endif |
224 |
|
275 |
|
225 |
if (flacdec->adapter) { |
276 |
if (flacdec->adapter) { |
226 |
gst_adapter_clear (flacdec->adapter); |
277 |
gst_adapter_clear (flacdec->adapter); |
Lines 238-245
Link Here
|
238 |
{ |
289 |
{ |
239 |
gst_flac_dec_reset_decoders (dec); |
290 |
gst_flac_dec_reset_decoders (dec); |
240 |
|
291 |
|
|
|
292 |
#ifdef LEGACY_FLAC |
241 |
dec->seekable_decoder = FLAC__seekable_stream_decoder_new (); |
293 |
dec->seekable_decoder = FLAC__seekable_stream_decoder_new (); |
|
|
294 |
#else |
295 |
dec->seekable_decoder = FLAC__stream_decoder_new (); |
296 |
#endif |
242 |
|
297 |
|
|
|
298 |
#ifdef LEGACY_FLAC |
243 |
FLAC__seekable_stream_decoder_set_read_callback (dec->seekable_decoder, |
299 |
FLAC__seekable_stream_decoder_set_read_callback (dec->seekable_decoder, |
244 |
gst_flac_dec_read_seekable); |
300 |
gst_flac_dec_read_seekable); |
245 |
FLAC__seekable_stream_decoder_set_seek_callback (dec->seekable_decoder, |
301 |
FLAC__seekable_stream_decoder_set_seek_callback (dec->seekable_decoder, |
Lines 253-266
Link Here
|
253 |
FLAC__seekable_stream_decoder_set_write_callback (dec->seekable_decoder, |
309 |
FLAC__seekable_stream_decoder_set_write_callback (dec->seekable_decoder, |
254 |
gst_flac_dec_write_seekable); |
310 |
gst_flac_dec_write_seekable); |
255 |
FLAC__seekable_stream_decoder_set_metadata_respond (dec->seekable_decoder, |
311 |
FLAC__seekable_stream_decoder_set_metadata_respond (dec->seekable_decoder, |
|
|
312 |
#else |
313 |
FLAC__stream_decoder_set_metadata_respond (dec->seekable_decoder, |
314 |
#endif |
256 |
FLAC__METADATA_TYPE_VORBIS_COMMENT); |
315 |
FLAC__METADATA_TYPE_VORBIS_COMMENT); |
|
|
316 |
#ifdef LEGACY_FLAC |
257 |
FLAC__seekable_stream_decoder_set_metadata_callback (dec->seekable_decoder, |
317 |
FLAC__seekable_stream_decoder_set_metadata_callback (dec->seekable_decoder, |
258 |
gst_flac_dec_metadata_callback_seekable); |
318 |
gst_flac_dec_metadata_callback_seekable); |
259 |
FLAC__seekable_stream_decoder_set_error_callback (dec->seekable_decoder, |
319 |
FLAC__seekable_stream_decoder_set_error_callback (dec->seekable_decoder, |
260 |
gst_flac_dec_error_callback_seekable); |
320 |
gst_flac_dec_error_callback_seekable); |
261 |
FLAC__seekable_stream_decoder_set_client_data (dec->seekable_decoder, dec); |
321 |
FLAC__seekable_stream_decoder_set_client_data (dec->seekable_decoder, dec); |
|
|
322 |
#endif |
262 |
} |
323 |
} |
263 |
|
324 |
|
|
|
325 |
#ifdef LEGACY_FLAC |
264 |
static void |
326 |
static void |
265 |
gst_flac_dec_setup_stream_decoder (GstFlacDec * dec) |
327 |
gst_flac_dec_setup_stream_decoder (GstFlacDec * dec) |
266 |
{ |
328 |
{ |
Lines 282-287
Link Here
|
282 |
gst_flac_dec_error_callback_stream); |
344 |
gst_flac_dec_error_callback_stream); |
283 |
FLAC__stream_decoder_set_client_data (dec->stream_decoder, dec); |
345 |
FLAC__stream_decoder_set_client_data (dec->stream_decoder, dec); |
284 |
} |
346 |
} |
|
|
347 |
#endif |
285 |
|
348 |
|
286 |
static void |
349 |
static void |
287 |
gst_flac_dec_finalize (GObject * object) |
350 |
gst_flac_dec_finalize (GObject * object) |
Lines 545-551
Link Here
|
545 |
} |
608 |
} |
546 |
|
609 |
|
547 |
static void |
610 |
static void |
|
|
611 |
#ifdef LEGACY_FLAC |
548 |
gst_flac_dec_metadata_callback_seekable (const FLAC__SeekableStreamDecoder * d, |
612 |
gst_flac_dec_metadata_callback_seekable (const FLAC__SeekableStreamDecoder * d, |
|
|
613 |
#else |
614 |
gst_flac_dec_metadata_callback_seekable (const FLAC__StreamDecoder * d, |
615 |
#endif |
549 |
const FLAC__StreamMetadata * metadata, void *client_data) |
616 |
const FLAC__StreamMetadata * metadata, void *client_data) |
550 |
{ |
617 |
{ |
551 |
GstFlacDec *dec = GST_FLAC_DEC (client_data); |
618 |
GstFlacDec *dec = GST_FLAC_DEC (client_data); |
Lines 553-558
Link Here
|
553 |
gst_flac_dec_metadata_callback (dec, metadata); |
620 |
gst_flac_dec_metadata_callback (dec, metadata); |
554 |
} |
621 |
} |
555 |
|
622 |
|
|
|
623 |
#ifdef LEGACY_FLAC |
556 |
static void |
624 |
static void |
557 |
gst_flac_dec_metadata_callback_stream (const FLAC__StreamDecoder * decoder, |
625 |
gst_flac_dec_metadata_callback_stream (const FLAC__StreamDecoder * decoder, |
558 |
const FLAC__StreamMetadata * metadata, void *client_data) |
626 |
const FLAC__StreamMetadata * metadata, void *client_data) |
Lines 561-566
Link Here
|
561 |
|
629 |
|
562 |
gst_flac_dec_metadata_callback (dec, metadata); |
630 |
gst_flac_dec_metadata_callback (dec, metadata); |
563 |
} |
631 |
} |
|
|
632 |
#endif |
564 |
|
633 |
|
565 |
static void |
634 |
static void |
566 |
gst_flac_dec_error_callback (GstFlacDec * dec, |
635 |
gst_flac_dec_error_callback (GstFlacDec * dec, |
Lines 588-608
Link Here
|
588 |
} |
657 |
} |
589 |
|
658 |
|
590 |
static void |
659 |
static void |
|
|
660 |
#ifdef LEGACY_FLAC |
591 |
gst_flac_dec_error_callback_seekable (const FLAC__SeekableStreamDecoder * d, |
661 |
gst_flac_dec_error_callback_seekable (const FLAC__SeekableStreamDecoder * d, |
|
|
662 |
#else |
663 |
gst_flac_dec_error_callback_seekable (const FLAC__StreamDecoder * d, |
664 |
#endif |
592 |
FLAC__StreamDecoderErrorStatus status, void *client_data) |
665 |
FLAC__StreamDecoderErrorStatus status, void *client_data) |
593 |
{ |
666 |
{ |
594 |
gst_flac_dec_error_callback (GST_FLAC_DEC (client_data), status); |
667 |
gst_flac_dec_error_callback (GST_FLAC_DEC (client_data), status); |
595 |
} |
668 |
} |
596 |
|
669 |
|
|
|
670 |
#ifdef LEGACY_FLAC |
597 |
static void |
671 |
static void |
598 |
gst_flac_dec_error_callback_stream (const FLAC__StreamDecoder * d, |
672 |
gst_flac_dec_error_callback_stream (const FLAC__StreamDecoder * d, |
599 |
FLAC__StreamDecoderErrorStatus status, void *client_data) |
673 |
FLAC__StreamDecoderErrorStatus status, void *client_data) |
600 |
{ |
674 |
{ |
601 |
gst_flac_dec_error_callback (GST_FLAC_DEC (client_data), status); |
675 |
gst_flac_dec_error_callback (GST_FLAC_DEC (client_data), status); |
602 |
} |
676 |
} |
|
|
677 |
#endif |
603 |
|
678 |
|
|
|
679 |
#ifdef LEGACY_FLAC |
604 |
static FLAC__SeekableStreamDecoderSeekStatus |
680 |
static FLAC__SeekableStreamDecoderSeekStatus |
605 |
gst_flac_dec_seek (const FLAC__SeekableStreamDecoder * decoder, |
681 |
gst_flac_dec_seek (const FLAC__SeekableStreamDecoder * decoder, |
|
|
682 |
#else |
683 |
static FLAC__StreamDecoderSeekStatus |
684 |
gst_flac_dec_seek (const FLAC__StreamDecoder * decoder, |
685 |
#endif |
606 |
FLAC__uint64 position, void *client_data) |
686 |
FLAC__uint64 position, void *client_data) |
607 |
{ |
687 |
{ |
608 |
GstFlacDec *flacdec; |
688 |
GstFlacDec *flacdec; |
Lines 612-622
Link Here
|
612 |
GST_DEBUG ("seek %" G_GINT64_FORMAT, position); |
692 |
GST_DEBUG ("seek %" G_GINT64_FORMAT, position); |
613 |
flacdec->offset = position; |
693 |
flacdec->offset = position; |
614 |
|
694 |
|
|
|
695 |
#ifdef LEGACY_FLAC |
615 |
return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK; |
696 |
return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK; |
|
|
697 |
#else |
698 |
return FLAC__STREAM_DECODER_SEEK_STATUS_OK; |
699 |
#endif |
616 |
} |
700 |
} |
617 |
|
701 |
|
|
|
702 |
#ifdef LEGACY_FLAC |
618 |
static FLAC__SeekableStreamDecoderTellStatus |
703 |
static FLAC__SeekableStreamDecoderTellStatus |
619 |
gst_flac_dec_tell (const FLAC__SeekableStreamDecoder * decoder, |
704 |
gst_flac_dec_tell (const FLAC__SeekableStreamDecoder * decoder, |
|
|
705 |
#else |
706 |
static FLAC__StreamDecoderTellStatus |
707 |
gst_flac_dec_tell (const FLAC__StreamDecoder * decoder, |
708 |
#endif |
620 |
FLAC__uint64 * position, void *client_data) |
709 |
FLAC__uint64 * position, void *client_data) |
621 |
{ |
710 |
{ |
622 |
GstFlacDec *flacdec; |
711 |
GstFlacDec *flacdec; |
Lines 627-637
Link Here
|
627 |
|
716 |
|
628 |
GST_DEBUG ("tell %" G_GINT64_FORMAT, *position); |
717 |
GST_DEBUG ("tell %" G_GINT64_FORMAT, *position); |
629 |
|
718 |
|
|
|
719 |
#ifdef LEGACY_FLAC |
630 |
return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK; |
720 |
return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK; |
|
|
721 |
#else |
722 |
return FLAC__STREAM_DECODER_TELL_STATUS_OK; |
723 |
#endif |
631 |
} |
724 |
} |
632 |
|
725 |
|
|
|
726 |
#ifdef LEGACY_FLAC |
633 |
static FLAC__SeekableStreamDecoderLengthStatus |
727 |
static FLAC__SeekableStreamDecoderLengthStatus |
634 |
gst_flac_dec_length (const FLAC__SeekableStreamDecoder * decoder, |
728 |
gst_flac_dec_length (const FLAC__SeekableStreamDecoder * decoder, |
|
|
729 |
#else |
730 |
static FLAC__StreamDecoderLengthStatus |
731 |
gst_flac_dec_length (const FLAC__StreamDecoder * decoder, |
732 |
#endif |
635 |
FLAC__uint64 * length, void *client_data) |
733 |
FLAC__uint64 * length, void *client_data) |
636 |
{ |
734 |
{ |
637 |
GstFlacDec *flacdec; |
735 |
GstFlacDec *flacdec; |
Lines 642-662
Link Here
|
642 |
flacdec = GST_FLAC_DEC (client_data); |
740 |
flacdec = GST_FLAC_DEC (client_data); |
643 |
|
741 |
|
644 |
if (!(peer = gst_pad_get_peer (flacdec->sinkpad))) |
742 |
if (!(peer = gst_pad_get_peer (flacdec->sinkpad))) |
|
|
743 |
#ifdef LEGACY_FLAC |
645 |
return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR; |
744 |
return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR; |
|
|
745 |
#else |
746 |
return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR; |
747 |
#endif |
646 |
gst_pad_query_duration (peer, &fmt, &len); |
748 |
gst_pad_query_duration (peer, &fmt, &len); |
647 |
gst_object_unref (peer); |
749 |
gst_object_unref (peer); |
648 |
if (fmt != GST_FORMAT_BYTES || len == -1) |
750 |
if (fmt != GST_FORMAT_BYTES || len == -1) |
|
|
751 |
#ifdef LEGACY_FLAC |
649 |
return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR; |
752 |
return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR; |
|
|
753 |
#else |
754 |
return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR; |
755 |
#endif |
650 |
|
756 |
|
651 |
*length = len; |
757 |
*length = len; |
652 |
|
758 |
|
653 |
GST_DEBUG ("length %" G_GINT64_FORMAT, *length); |
759 |
GST_DEBUG ("length %" G_GINT64_FORMAT, *length); |
654 |
|
760 |
|
|
|
761 |
#ifdef LEGACY_FLAC |
655 |
return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK; |
762 |
return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK; |
|
|
763 |
#else |
764 |
return FLAC__STREAM_DECODER_LENGTH_STATUS_OK; |
765 |
#endif |
656 |
} |
766 |
} |
657 |
|
767 |
|
658 |
static FLAC__bool |
768 |
static FLAC__bool |
|
|
769 |
#ifdef LEGACY_FLAC |
659 |
gst_flac_dec_eof (const FLAC__SeekableStreamDecoder * decoder, |
770 |
gst_flac_dec_eof (const FLAC__SeekableStreamDecoder * decoder, |
|
|
771 |
#else |
772 |
gst_flac_dec_eof (const FLAC__StreamDecoder * decoder, |
773 |
#endif |
660 |
void *client_data) |
774 |
void *client_data) |
661 |
{ |
775 |
{ |
662 |
GstFlacDec *flacdec; |
776 |
GstFlacDec *flacdec; |
Lines 685-693
Link Here
|
685 |
return ret; |
799 |
return ret; |
686 |
} |
800 |
} |
687 |
|
801 |
|
|
|
802 |
#ifdef LEGACY_FLAC |
688 |
static FLAC__SeekableStreamDecoderReadStatus |
803 |
static FLAC__SeekableStreamDecoderReadStatus |
689 |
gst_flac_dec_read_seekable (const FLAC__SeekableStreamDecoder * decoder, |
804 |
gst_flac_dec_read_seekable (const FLAC__SeekableStreamDecoder * decoder, |
690 |
FLAC__byte buffer[], unsigned *bytes, void *client_data) |
805 |
FLAC__byte buffer[], unsigned *bytes, void *client_data) |
|
|
806 |
#else |
807 |
static FLAC__StreamDecoderReadStatus |
808 |
gst_flac_dec_read_seekable (const FLAC__StreamDecoder * decoder, |
809 |
FLAC__byte buffer[], size_t *bytes, void *client_data) |
810 |
#endif |
691 |
{ |
811 |
{ |
692 |
GstFlacDec *flacdec; |
812 |
GstFlacDec *flacdec; |
693 |
GstBuffer *buf; |
813 |
GstBuffer *buf; |
Lines 696-702
Link Here
|
696 |
|
816 |
|
697 |
if (gst_pad_pull_range (flacdec->sinkpad, flacdec->offset, *bytes, |
817 |
if (gst_pad_pull_range (flacdec->sinkpad, flacdec->offset, *bytes, |
698 |
&buf) != GST_FLOW_OK) |
818 |
&buf) != GST_FLOW_OK) |
|
|
819 |
#ifdef LEGACY_FLAC |
699 |
return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR; |
820 |
return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR; |
|
|
821 |
#else |
822 |
return FLAC__STREAM_DECODER_READ_STATUS_ABORT; |
823 |
#endif |
700 |
|
824 |
|
701 |
GST_DEBUG ("Read %d bytes at %" G_GUINT64_FORMAT, |
825 |
GST_DEBUG ("Read %d bytes at %" G_GUINT64_FORMAT, |
702 |
GST_BUFFER_SIZE (buf), flacdec->offset); |
826 |
GST_BUFFER_SIZE (buf), flacdec->offset); |
Lines 705-711
Link Here
|
705 |
gst_buffer_unref (buf); |
829 |
gst_buffer_unref (buf); |
706 |
flacdec->offset += *bytes; |
830 |
flacdec->offset += *bytes; |
707 |
|
831 |
|
|
|
832 |
#ifdef LEGACY_FLAC |
708 |
return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK; |
833 |
return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK; |
|
|
834 |
#else |
835 |
return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; |
836 |
#endif |
709 |
} |
837 |
} |
710 |
|
838 |
|
711 |
static FLAC__StreamDecoderReadStatus |
839 |
static FLAC__StreamDecoderReadStatus |
Lines 881-893
Link Here
|
881 |
} |
1009 |
} |
882 |
|
1010 |
|
883 |
static FLAC__StreamDecoderWriteStatus |
1011 |
static FLAC__StreamDecoderWriteStatus |
|
|
1012 |
#ifdef LEGACY_FLAC |
884 |
gst_flac_dec_write_seekable (const FLAC__SeekableStreamDecoder * decoder, |
1013 |
gst_flac_dec_write_seekable (const FLAC__SeekableStreamDecoder * decoder, |
|
|
1014 |
#else |
1015 |
gst_flac_dec_write_seekable (const FLAC__StreamDecoder * decoder, |
1016 |
#endif |
885 |
const FLAC__Frame * frame, |
1017 |
const FLAC__Frame * frame, |
886 |
const FLAC__int32 * const buffer[], void *client_data) |
1018 |
const FLAC__int32 * const buffer[], void *client_data) |
887 |
{ |
1019 |
{ |
888 |
return gst_flac_dec_write (GST_FLAC_DEC (client_data), frame, buffer); |
1020 |
return gst_flac_dec_write (GST_FLAC_DEC (client_data), frame, buffer); |
889 |
} |
1021 |
} |
890 |
|
1022 |
|
|
|
1023 |
#ifdef LEGACY_FLAC |
891 |
static FLAC__StreamDecoderWriteStatus |
1024 |
static FLAC__StreamDecoderWriteStatus |
892 |
gst_flac_dec_write_stream (const FLAC__StreamDecoder * decoder, |
1025 |
gst_flac_dec_write_stream (const FLAC__StreamDecoder * decoder, |
893 |
const FLAC__Frame * frame, |
1026 |
const FLAC__Frame * frame, |
Lines 895-906
Link Here
|
895 |
{ |
1028 |
{ |
896 |
return gst_flac_dec_write (GST_FLAC_DEC (client_data), frame, buffer); |
1029 |
return gst_flac_dec_write (GST_FLAC_DEC (client_data), frame, buffer); |
897 |
} |
1030 |
} |
|
|
1031 |
#endif |
898 |
|
1032 |
|
899 |
static void |
1033 |
static void |
900 |
gst_flac_dec_loop (GstPad * sinkpad) |
1034 |
gst_flac_dec_loop (GstPad * sinkpad) |
901 |
{ |
1035 |
{ |
902 |
GstFlacDec *flacdec; |
1036 |
GstFlacDec *flacdec; |
|
|
1037 |
#ifdef LEGACY_FLAC |
903 |
FLAC__SeekableStreamDecoderState s; |
1038 |
FLAC__SeekableStreamDecoderState s; |
|
|
1039 |
#else |
1040 |
FLAC__StreamDecoderState s; |
1041 |
#endif |
904 |
|
1042 |
|
905 |
flacdec = GST_FLAC_DEC (GST_OBJECT_PARENT (sinkpad)); |
1043 |
flacdec = GST_FLAC_DEC (GST_OBJECT_PARENT (sinkpad)); |
906 |
|
1044 |
|
Lines 908-917
Link Here
|
908 |
|
1046 |
|
909 |
if (flacdec->init) { |
1047 |
if (flacdec->init) { |
910 |
GST_DEBUG_OBJECT (flacdec, "initializing decoder"); |
1048 |
GST_DEBUG_OBJECT (flacdec, "initializing decoder"); |
|
|
1049 |
#ifdef LEGACY_FLAC |
911 |
s = FLAC__seekable_stream_decoder_init (flacdec->seekable_decoder); |
1050 |
s = FLAC__seekable_stream_decoder_init (flacdec->seekable_decoder); |
912 |
if (s != FLAC__SEEKABLE_STREAM_DECODER_OK) |
1051 |
if (s != FLAC__SEEKABLE_STREAM_DECODER_OK) |
|
|
1052 |
#else |
1053 |
s = FLAC__stream_decoder_init_stream (flacdec->seekable_decoder, |
1054 |
gst_flac_dec_read_seekable, |
1055 |
gst_flac_dec_seek, |
1056 |
gst_flac_dec_tell, |
1057 |
gst_flac_dec_length, |
1058 |
gst_flac_dec_eof, |
1059 |
gst_flac_dec_write_seekable, |
1060 |
gst_flac_dec_metadata_callback_seekable, |
1061 |
gst_flac_dec_error_callback_seekable, |
1062 |
flacdec); |
1063 |
if (s != FLAC__STREAM_DECODER_INIT_STATUS_OK) |
1064 |
#endif |
913 |
goto analyze_state; |
1065 |
goto analyze_state; |
|
|
1066 |
#ifdef LEGACY_FLAC |
914 |
/* FLAC__seekable_stream_decoder_process_metadata (flacdec->seekable_decoder); */ |
1067 |
/* FLAC__seekable_stream_decoder_process_metadata (flacdec->seekable_decoder); */ |
|
|
1068 |
#else |
1069 |
/* FLAC__stream_decoder_process_metadata (flacdec->seekable_decoder); */ |
1070 |
#endif |
915 |
flacdec->init = FALSE; |
1071 |
flacdec->init = FALSE; |
916 |
} |
1072 |
} |
917 |
|
1073 |
|
Lines 920-934
Link Here
|
920 |
flacdec->last_flow = GST_FLOW_OK; |
1076 |
flacdec->last_flow = GST_FLOW_OK; |
921 |
|
1077 |
|
922 |
GST_LOG_OBJECT (flacdec, "processing single"); |
1078 |
GST_LOG_OBJECT (flacdec, "processing single"); |
|
|
1079 |
#ifdef LEGACY_FLAC |
923 |
FLAC__seekable_stream_decoder_process_single (flacdec->seekable_decoder); |
1080 |
FLAC__seekable_stream_decoder_process_single (flacdec->seekable_decoder); |
|
|
1081 |
#else |
1082 |
FLAC__stream_decoder_process_single (flacdec->seekable_decoder); |
1083 |
#endif |
924 |
|
1084 |
|
925 |
analyze_state: |
1085 |
analyze_state: |
926 |
|
1086 |
|
927 |
GST_LOG_OBJECT (flacdec, "done processing, checking encoder state"); |
1087 |
GST_LOG_OBJECT (flacdec, "done processing, checking encoder state"); |
|
|
1088 |
#ifdef LEGACY_FLAC |
928 |
s = FLAC__seekable_stream_decoder_get_state (flacdec->seekable_decoder); |
1089 |
s = FLAC__seekable_stream_decoder_get_state (flacdec->seekable_decoder); |
929 |
switch (s) { |
1090 |
switch (s) { |
930 |
case FLAC__SEEKABLE_STREAM_DECODER_OK: |
1091 |
case FLAC__SEEKABLE_STREAM_DECODER_OK: |
931 |
case FLAC__SEEKABLE_STREAM_DECODER_SEEKING:{ |
1092 |
case FLAC__SEEKABLE_STREAM_DECODER_SEEKING:{ |
|
|
1093 |
#else |
1094 |
s = FLAC__stream_decoder_get_state (flacdec->seekable_decoder); |
1095 |
switch (s) { |
1096 |
case FLAC__STREAM_DECODER_INIT_STATUS_OK: |
1097 |
case FLAC__STREAM_DECODER_READ_METADATA: |
1098 |
case FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC: |
1099 |
case FLAC__STREAM_DECODER_READ_FRAME:{ |
1100 |
#endif |
932 |
GST_DEBUG_OBJECT (flacdec, "everything ok"); |
1101 |
GST_DEBUG_OBJECT (flacdec, "everything ok"); |
933 |
|
1102 |
|
934 |
if (flacdec->last_flow != GST_FLOW_OK && |
1103 |
if (flacdec->last_flow != GST_FLOW_OK && |
Lines 956-964
Link Here
|
956 |
return; |
1125 |
return; |
957 |
} |
1126 |
} |
958 |
|
1127 |
|
|
|
1128 |
#ifdef LEGACY_FLAC |
959 |
case FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM:{ |
1129 |
case FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM:{ |
|
|
1130 |
#else |
1131 |
case FLAC__STREAM_DECODER_END_OF_STREAM:{ |
1132 |
#endif |
960 |
GST_DEBUG_OBJECT (flacdec, "EOS"); |
1133 |
GST_DEBUG_OBJECT (flacdec, "EOS"); |
|
|
1134 |
#ifdef LEGACY_FLAC |
961 |
FLAC__seekable_stream_decoder_reset (flacdec->seekable_decoder); |
1135 |
FLAC__seekable_stream_decoder_reset (flacdec->seekable_decoder); |
|
|
1136 |
#else |
1137 |
FLAC__stream_decoder_reset (flacdec->seekable_decoder); |
1138 |
#endif |
962 |
|
1139 |
|
963 |
if ((flacdec->segment.flags & GST_SEEK_FLAG_SEGMENT) != 0) { |
1140 |
if ((flacdec->segment.flags & GST_SEEK_FLAG_SEGMENT) != 0) { |
964 |
if (flacdec->segment.duration > 0) { |
1141 |
if (flacdec->segment.duration > 0) { |
Lines 972-977
Link Here
|
972 |
goto eos_and_pause; |
1149 |
goto eos_and_pause; |
973 |
} |
1150 |
} |
974 |
|
1151 |
|
|
|
1152 |
#ifdef LEGACY_FLAC |
975 |
case FLAC__SEEKABLE_STREAM_DECODER_MEMORY_ALLOCATION_ERROR: |
1153 |
case FLAC__SEEKABLE_STREAM_DECODER_MEMORY_ALLOCATION_ERROR: |
976 |
case FLAC__SEEKABLE_STREAM_DECODER_STREAM_DECODER_ERROR: |
1154 |
case FLAC__SEEKABLE_STREAM_DECODER_STREAM_DECODER_ERROR: |
977 |
case FLAC__SEEKABLE_STREAM_DECODER_READ_ERROR: |
1155 |
case FLAC__SEEKABLE_STREAM_DECODER_READ_ERROR: |
Lines 979-989
Link Here
|
979 |
case FLAC__SEEKABLE_STREAM_DECODER_ALREADY_INITIALIZED: |
1157 |
case FLAC__SEEKABLE_STREAM_DECODER_ALREADY_INITIALIZED: |
980 |
case FLAC__SEEKABLE_STREAM_DECODER_INVALID_CALLBACK: |
1158 |
case FLAC__SEEKABLE_STREAM_DECODER_INVALID_CALLBACK: |
981 |
case FLAC__SEEKABLE_STREAM_DECODER_UNINITIALIZED: |
1159 |
case FLAC__SEEKABLE_STREAM_DECODER_UNINITIALIZED: |
|
|
1160 |
#else |
1161 |
case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR: |
1162 |
case FLAC__STREAM_DECODER_OGG_ERROR: |
1163 |
case FLAC__STREAM_DECODER_SEEK_ERROR: |
1164 |
case FLAC__STREAM_DECODER_ABORTED: |
1165 |
case FLAC__STREAM_DECODER_UNINITIALIZED: |
1166 |
#endif |
982 |
default:{ |
1167 |
default:{ |
983 |
/* fixme: this error sucks -- should try to figure out when/if an more |
1168 |
/* fixme: this error sucks -- should try to figure out when/if an more |
984 |
specific error was already sent via the callback */ |
1169 |
specific error was already sent via the callback */ |
985 |
GST_ELEMENT_ERROR (flacdec, STREAM, DECODE, (NULL), |
1170 |
GST_ELEMENT_ERROR (flacdec, STREAM, DECODE, (NULL), |
|
|
1171 |
#ifdef LEGACY_FLAC |
986 |
("%s", FLAC__SeekableStreamDecoderStateString[s])); |
1172 |
("%s", FLAC__SeekableStreamDecoderStateString[s])); |
|
|
1173 |
#else |
1174 |
("%s", FLAC__StreamDecoderStateString[s])); |
1175 |
#endif |
987 |
goto eos_and_pause; |
1176 |
goto eos_and_pause; |
988 |
} |
1177 |
} |
989 |
} |
1178 |
} |
Lines 1032-1039
Link Here
|
1032 |
|
1221 |
|
1033 |
switch (GST_EVENT_TYPE (event)) { |
1222 |
switch (GST_EVENT_TYPE (event)) { |
1034 |
case GST_EVENT_FLUSH_STOP:{ |
1223 |
case GST_EVENT_FLUSH_STOP:{ |
|
|
1224 |
#ifdef LEGACY_FLAC |
1035 |
if (dec->stream_decoder) { |
1225 |
if (dec->stream_decoder) { |
1036 |
FLAC__stream_decoder_flush (dec->stream_decoder); |
1226 |
FLAC__stream_decoder_flush (dec->stream_decoder); |
|
|
1227 |
#else |
1228 |
if (dec->seekable_decoder) { |
1229 |
FLAC__stream_decoder_flush (dec->seekable_decoder); |
1230 |
#endif |
1037 |
gst_adapter_clear (dec->adapter); |
1231 |
gst_adapter_clear (dec->adapter); |
1038 |
} |
1232 |
} |
1039 |
res = gst_pad_push_event (dec->srcpad, event); |
1233 |
res = gst_pad_push_event (dec->srcpad, event); |
Lines 1081-1089
Link Here
|
1081 |
GST_LOG_OBJECT (dec, "EOS, with %u bytes available in adapter", |
1275 |
GST_LOG_OBJECT (dec, "EOS, with %u bytes available in adapter", |
1082 |
gst_adapter_available (dec->adapter)); |
1276 |
gst_adapter_available (dec->adapter)); |
1083 |
if (gst_adapter_available (dec->adapter) > 0) { |
1277 |
if (gst_adapter_available (dec->adapter) > 0) { |
|
|
1278 |
#ifdef LEGACY_FLAC |
1084 |
FLAC__stream_decoder_process_until_end_of_stream (dec->stream_decoder); |
1279 |
FLAC__stream_decoder_process_until_end_of_stream (dec->stream_decoder); |
1085 |
} |
1280 |
} |
1086 |
FLAC__stream_decoder_flush (dec->stream_decoder); |
1281 |
FLAC__stream_decoder_flush (dec->stream_decoder); |
|
|
1282 |
#else |
1283 |
FLAC__stream_decoder_process_until_end_of_stream (dec->seekable_decoder); |
1284 |
} |
1285 |
FLAC__stream_decoder_flush (dec->seekable_decoder); |
1286 |
#endif |
1087 |
gst_adapter_clear (dec->adapter); |
1287 |
gst_adapter_clear (dec->adapter); |
1088 |
res = gst_pad_push_event (dec->srcpad, event); |
1288 |
res = gst_pad_push_event (dec->srcpad, event); |
1089 |
break; |
1289 |
break; |
Lines 1113-1119
Link Here
|
1113 |
|
1313 |
|
1114 |
if (dec->init) { |
1314 |
if (dec->init) { |
1115 |
GST_DEBUG_OBJECT (dec, "initializing decoder"); |
1315 |
GST_DEBUG_OBJECT (dec, "initializing decoder"); |
|
|
1316 |
#ifdef LEGACY_FLAC |
1116 |
s = FLAC__stream_decoder_init (dec->stream_decoder); |
1317 |
s = FLAC__stream_decoder_init (dec->stream_decoder); |
|
|
1318 |
#else |
1319 |
s = FLAC__stream_decoder_init_stream (dec->seekable_decoder, |
1320 |
gst_flac_dec_read_stream, |
1321 |
NULL, |
1322 |
NULL, |
1323 |
NULL, |
1324 |
NULL, |
1325 |
gst_flac_dec_write_seekable, |
1326 |
gst_flac_dec_metadata_callback_seekable, |
1327 |
gst_flac_dec_error_callback_seekable, |
1328 |
(void*)dec); |
1329 |
#endif |
1117 |
if (s != FLAC__STREAM_DECODER_SEARCH_FOR_METADATA) { |
1330 |
if (s != FLAC__STREAM_DECODER_SEARCH_FOR_METADATA) { |
1118 |
GST_ELEMENT_ERROR (GST_ELEMENT (dec), LIBRARY, INIT, (NULL), (NULL)); |
1331 |
GST_ELEMENT_ERROR (GST_ELEMENT (dec), LIBRARY, INIT, (NULL), (NULL)); |
1119 |
return GST_FLOW_ERROR; |
1332 |
return GST_FLOW_ERROR; |
Lines 1125-1131
Link Here
|
1125 |
if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT)) { |
1338 |
if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT)) { |
1126 |
/* Clear the adapter and the decoder */ |
1339 |
/* Clear the adapter and the decoder */ |
1127 |
gst_adapter_clear (dec->adapter); |
1340 |
gst_adapter_clear (dec->adapter); |
|
|
1341 |
#ifdef LEGACY_FLAC |
1128 |
FLAC__stream_decoder_flush (dec->stream_decoder); |
1342 |
FLAC__stream_decoder_flush (dec->stream_decoder); |
|
|
1343 |
#else |
1344 |
FLAC__stream_decoder_flush (dec->seekable_decoder); |
1345 |
#endif |
1129 |
} |
1346 |
} |
1130 |
|
1347 |
|
1131 |
if (dec->framed) { |
1348 |
if (dec->framed) { |
Lines 1162-1168
Link Here
|
1162 |
dec->last_flow == GST_FLOW_OK) { |
1379 |
dec->last_flow == GST_FLOW_OK) { |
1163 |
GST_LOG_OBJECT (dec, "%u bytes available", |
1380 |
GST_LOG_OBJECT (dec, "%u bytes available", |
1164 |
gst_adapter_available (dec->adapter)); |
1381 |
gst_adapter_available (dec->adapter)); |
|
|
1382 |
#ifdef LEGACY_FLAC |
1165 |
if (!FLAC__stream_decoder_process_single (dec->stream_decoder)) { |
1383 |
if (!FLAC__stream_decoder_process_single (dec->stream_decoder)) { |
|
|
1384 |
#else |
1385 |
if (!FLAC__stream_decoder_process_single (dec->seekable_decoder)) { |
1386 |
#endif |
1166 |
GST_DEBUG_OBJECT (dec, "process_single failed"); |
1387 |
GST_DEBUG_OBJECT (dec, "process_single failed"); |
1167 |
break; |
1388 |
break; |
1168 |
} |
1389 |
} |
Lines 1171-1177
Link Here
|
1171 |
/* framed - there should always be enough data to decode something */ |
1392 |
/* framed - there should always be enough data to decode something */ |
1172 |
GST_LOG_OBJECT (dec, "%u bytes available", |
1393 |
GST_LOG_OBJECT (dec, "%u bytes available", |
1173 |
gst_adapter_available (dec->adapter)); |
1394 |
gst_adapter_available (dec->adapter)); |
|
|
1395 |
#ifdef LEGACY_FLAC |
1174 |
if (!FLAC__stream_decoder_process_single (dec->stream_decoder)) { |
1396 |
if (!FLAC__stream_decoder_process_single (dec->stream_decoder)) { |
|
|
1397 |
#else |
1398 |
if (!FLAC__stream_decoder_process_single (dec->seekable_decoder)) { |
1399 |
#endif |
1175 |
GST_DEBUG_OBJECT (dec, "process_single failed"); |
1400 |
GST_DEBUG_OBJECT (dec, "process_single failed"); |
1176 |
} |
1401 |
} |
1177 |
} else { |
1402 |
} else { |
Lines 1598-1604
Link Here
|
1598 |
flacdec->seeking = TRUE; |
1823 |
flacdec->seeking = TRUE; |
1599 |
|
1824 |
|
1600 |
seek_ok = |
1825 |
seek_ok = |
|
|
1826 |
#ifdef LEGACY_FLAC |
1601 |
FLAC__seekable_stream_decoder_seek_absolute (flacdec->seekable_decoder, |
1827 |
FLAC__seekable_stream_decoder_seek_absolute (flacdec->seekable_decoder, |
|
|
1828 |
#else |
1829 |
FLAC__stream_decoder_seek_absolute (flacdec->seekable_decoder, |
1830 |
#endif |
1602 |
segment.start); |
1831 |
segment.start); |
1603 |
|
1832 |
|
1604 |
flacdec->seeking = FALSE; |
1833 |
flacdec->seeking = FALSE; |
Lines 1681-1687
Link Here
|
1681 |
{ |
1910 |
{ |
1682 |
GstFlacDec *dec = GST_FLAC_DEC (GST_OBJECT_PARENT (sinkpad)); |
1911 |
GstFlacDec *dec = GST_FLAC_DEC (GST_OBJECT_PARENT (sinkpad)); |
1683 |
|
1912 |
|
|
|
1913 |
#ifdef LEGACY_FLAC |
1684 |
gst_flac_dec_setup_stream_decoder (dec); |
1914 |
gst_flac_dec_setup_stream_decoder (dec); |
|
|
1915 |
#else |
1916 |
gst_flac_dec_setup_seekable_decoder (dec); |
1917 |
#endif |
1685 |
return TRUE; |
1918 |
return TRUE; |
1686 |
} |
1919 |
} |
1687 |
|
1920 |
|