2009-03-13 18:43:16 +01:00
|
|
|
/*
|
2012-10-02 10:56:44 +02:00
|
|
|
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
2009-03-13 18:43:16 +01:00
|
|
|
* http://www.musicpd.org
|
2004-02-24 00:41:20 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2009-03-13 18:43:16 +01:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2004-02-24 00:41:20 +01:00
|
|
|
*/
|
|
|
|
|
2009-11-11 16:37:42 +01:00
|
|
|
#include "config.h" /* must be first for large file support */
|
2013-05-05 14:19:04 +02:00
|
|
|
#include "FlacDecoderPlugin.h"
|
|
|
|
#include "FlacCommon.hxx"
|
|
|
|
#include "FlacMetadata.hxx"
|
2013-01-07 22:12:09 +01:00
|
|
|
#include "OggCodec.hxx"
|
2009-11-11 16:43:34 +01:00
|
|
|
|
2009-01-01 18:09:24 +01:00
|
|
|
#include <glib.h>
|
|
|
|
|
2008-10-08 10:49:29 +02:00
|
|
|
#include <assert.h>
|
2008-11-24 10:33:08 +01:00
|
|
|
#include <unistd.h>
|
2008-10-08 10:49:29 +02:00
|
|
|
|
2009-03-08 20:16:53 +01:00
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
2012-10-02 10:04:44 +02:00
|
|
|
#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT <= 7
|
|
|
|
#error libFLAC is too old
|
|
|
|
#endif
|
|
|
|
|
2006-12-04 05:45:44 +01:00
|
|
|
static void flacPrintErroredState(FLAC__StreamDecoderState state)
|
2004-05-05 01:39:02 +02:00
|
|
|
{
|
2006-07-20 18:02:40 +02:00
|
|
|
switch (state) {
|
2006-12-04 05:45:44 +01:00
|
|
|
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:
|
|
|
|
case FLAC__STREAM_DECODER_END_OF_STREAM:
|
|
|
|
return;
|
2012-02-11 12:26:45 +01:00
|
|
|
|
2006-12-04 05:45:44 +01:00
|
|
|
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:
|
2012-02-11 12:26:45 +01:00
|
|
|
break;
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|
2008-11-21 20:15:50 +01:00
|
|
|
|
2012-02-11 12:26:45 +01:00
|
|
|
g_warning("%s\n", FLAC__StreamDecoderStateString[state]);
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|
|
|
|
|
2009-11-11 16:59:28 +01:00
|
|
|
static void flacMetadata(G_GNUC_UNUSED const FLAC__StreamDecoder * dec,
|
2006-07-20 18:02:40 +02:00
|
|
|
const FLAC__StreamMetadata * block, void *vdata)
|
2004-05-05 01:39:02 +02:00
|
|
|
{
|
2009-01-15 19:50:28 +01:00
|
|
|
flac_metadata_common_cb(block, (struct flac_data *) vdata);
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|
|
|
|
|
2009-01-15 19:50:28 +01:00
|
|
|
static FLAC__StreamDecoderWriteStatus
|
2009-11-11 16:59:28 +01:00
|
|
|
flac_write_cb(const FLAC__StreamDecoder *dec, const FLAC__Frame *frame,
|
2009-01-15 19:50:28 +01:00
|
|
|
const FLAC__int32 *const buf[], void *vdata)
|
2004-05-05 01:39:02 +02:00
|
|
|
{
|
2009-01-15 19:50:28 +01:00
|
|
|
struct flac_data *data = (struct flac_data *) vdata;
|
2009-11-11 19:52:14 +01:00
|
|
|
FLAC__uint64 nbytes = 0;
|
2006-07-20 18:02:40 +02:00
|
|
|
|
2009-11-11 19:52:14 +01:00
|
|
|
if (FLAC__stream_decoder_get_decode_position(dec, &nbytes)) {
|
|
|
|
if (data->position > 0 && nbytes > data->position) {
|
|
|
|
nbytes -= data->position;
|
|
|
|
data->position += nbytes;
|
|
|
|
} else {
|
|
|
|
data->position = nbytes;
|
|
|
|
nbytes = 0;
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
nbytes = 0;
|
|
|
|
|
|
|
|
return flac_common_write(data, frame, buf, nbytes);
|
2004-02-24 00:41:20 +01:00
|
|
|
}
|
|
|
|
|
2012-02-11 19:12:02 +01:00
|
|
|
static bool
|
|
|
|
flac_scan_file(const char *file,
|
|
|
|
const struct tag_handler *handler, void *handler_ctx)
|
2006-07-20 18:02:40 +02:00
|
|
|
{
|
2013-05-05 14:19:04 +02:00
|
|
|
FlacMetadataChain chain;
|
2012-10-04 07:11:41 +02:00
|
|
|
if (!chain.Read(file)) {
|
|
|
|
g_debug("Failed to read FLAC tags: %s",
|
|
|
|
chain.GetStatusString());
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
chain.Scan(handler, handler_ctx);
|
|
|
|
return true;
|
2004-05-31 03:54:10 +02:00
|
|
|
}
|
|
|
|
|
2012-10-04 07:09:31 +02:00
|
|
|
static bool
|
|
|
|
flac_scan_stream(struct input_stream *is,
|
|
|
|
const struct tag_handler *handler, void *handler_ctx)
|
|
|
|
{
|
2013-05-05 14:19:04 +02:00
|
|
|
FlacMetadataChain chain;
|
2012-10-04 07:09:31 +02:00
|
|
|
if (!chain.Read(is)) {
|
|
|
|
g_debug("Failed to read FLAC tags: %s",
|
|
|
|
chain.GetStatusString());
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
chain.Scan(handler, handler_ctx);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2009-11-11 18:56:10 +01:00
|
|
|
/**
|
|
|
|
* Some glue code around FLAC__stream_decoder_new().
|
|
|
|
*/
|
|
|
|
static FLAC__StreamDecoder *
|
|
|
|
flac_decoder_new(void)
|
|
|
|
{
|
|
|
|
FLAC__StreamDecoder *sd = FLAC__stream_decoder_new();
|
2012-10-02 10:56:44 +02:00
|
|
|
if (sd == nullptr) {
|
2009-11-11 18:56:10 +01:00
|
|
|
g_warning("FLAC__stream_decoder_new() failed");
|
2012-10-02 10:56:44 +02:00
|
|
|
return nullptr;
|
2009-11-11 18:56:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if(!FLAC__stream_decoder_set_metadata_respond(sd, FLAC__METADATA_TYPE_VORBIS_COMMENT))
|
|
|
|
g_debug("FLAC__stream_decoder_set_metadata_respond() has failed");
|
|
|
|
|
|
|
|
return sd;
|
|
|
|
}
|
|
|
|
|
2009-11-11 19:01:31 +01:00
|
|
|
static bool
|
|
|
|
flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd,
|
2010-01-05 21:46:12 +01:00
|
|
|
FLAC__uint64 duration)
|
2009-11-11 19:01:31 +01:00
|
|
|
{
|
2010-01-05 21:46:12 +01:00
|
|
|
data->total_frames = duration;
|
2009-11-11 20:34:59 +01:00
|
|
|
|
2009-11-11 19:01:31 +01:00
|
|
|
if (!FLAC__stream_decoder_process_until_end_of_metadata(sd)) {
|
|
|
|
g_warning("problem reading metadata");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2010-03-21 18:21:47 +01:00
|
|
|
if (data->initialized) {
|
2010-01-06 09:54:09 +01:00
|
|
|
/* done */
|
2010-03-21 18:21:47 +01:00
|
|
|
decoder_initialized(data->decoder, &data->audio_format,
|
|
|
|
data->input_stream->seekable,
|
|
|
|
(float)data->total_frames /
|
|
|
|
(float)data->audio_format.sample_rate);
|
2010-01-06 09:54:09 +01:00
|
|
|
return true;
|
2010-03-21 18:21:47 +01:00
|
|
|
}
|
2010-01-06 09:54:09 +01:00
|
|
|
|
|
|
|
if (data->input_stream->seekable)
|
|
|
|
/* allow the workaround below only for nonseekable
|
|
|
|
streams*/
|
|
|
|
return false;
|
|
|
|
|
|
|
|
/* no stream_info packet found; try to initialize the decoder
|
|
|
|
from the first frame header */
|
|
|
|
FLAC__stream_decoder_process_single(sd);
|
2010-01-05 21:46:12 +01:00
|
|
|
return data->initialized;
|
2009-11-11 19:01:31 +01:00
|
|
|
}
|
|
|
|
|
2009-11-11 13:59:45 +01:00
|
|
|
static void
|
2009-11-11 16:59:28 +01:00
|
|
|
flac_decoder_loop(struct flac_data *data, FLAC__StreamDecoder *flac_dec,
|
2009-11-11 13:59:45 +01:00
|
|
|
FLAC__uint64 t_start, FLAC__uint64 t_end)
|
|
|
|
{
|
|
|
|
struct decoder *decoder = data->decoder;
|
|
|
|
enum decoder_command cmd;
|
|
|
|
|
2009-11-11 20:18:39 +01:00
|
|
|
data->first_frame = t_start;
|
|
|
|
|
2009-11-11 13:59:45 +01:00
|
|
|
while (true) {
|
2013-07-31 00:26:55 +02:00
|
|
|
if (!data->tag.IsEmpty()) {
|
2009-11-11 13:59:45 +01:00
|
|
|
cmd = decoder_tag(data->decoder, data->input_stream,
|
2013-07-31 00:26:55 +02:00
|
|
|
std::move(data->tag));
|
|
|
|
data->tag.Clear();
|
2009-11-11 13:59:45 +01:00
|
|
|
} else
|
|
|
|
cmd = decoder_get_command(decoder);
|
|
|
|
|
|
|
|
if (cmd == DECODE_COMMAND_SEEK) {
|
|
|
|
FLAC__uint64 seek_sample = t_start +
|
|
|
|
decoder_seek_where(decoder) *
|
2010-01-06 09:00:32 +01:00
|
|
|
data->audio_format.sample_rate;
|
2009-11-11 13:59:45 +01:00
|
|
|
if (seek_sample >= t_start &&
|
|
|
|
(t_end == 0 || seek_sample <= t_end) &&
|
2009-11-11 16:59:28 +01:00
|
|
|
FLAC__stream_decoder_seek_absolute(flac_dec, seek_sample)) {
|
2009-11-11 13:59:45 +01:00
|
|
|
data->next_frame = seek_sample;
|
|
|
|
data->position = 0;
|
|
|
|
decoder_command_finished(decoder);
|
|
|
|
} else
|
|
|
|
decoder_seek_error(decoder);
|
|
|
|
} else if (cmd == DECODE_COMMAND_STOP ||
|
2009-11-11 16:59:28 +01:00
|
|
|
FLAC__stream_decoder_get_state(flac_dec) == FLAC__STREAM_DECODER_END_OF_STREAM)
|
2009-11-11 13:59:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
if (t_end != 0 && data->next_frame >= t_end)
|
|
|
|
/* end of this sub track */
|
|
|
|
break;
|
|
|
|
|
2012-02-11 12:47:43 +01:00
|
|
|
if (!FLAC__stream_decoder_process_single(flac_dec) &&
|
|
|
|
decoder_get_command(decoder) == DECODE_COMMAND_NONE) {
|
|
|
|
/* a failure that was not triggered by a
|
|
|
|
decoder command */
|
|
|
|
flacPrintErroredState(FLAC__stream_decoder_get_state(flac_dec));
|
|
|
|
break;
|
2009-11-11 13:59:45 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-11 11:50:26 +01:00
|
|
|
static FLAC__StreamDecoderInitStatus
|
|
|
|
stream_init_oggflac(FLAC__StreamDecoder *flac_dec, struct flac_data *data)
|
|
|
|
{
|
|
|
|
return FLAC__stream_decoder_init_ogg_stream(flac_dec,
|
2013-05-05 14:19:04 +02:00
|
|
|
FlacInput::Read,
|
|
|
|
FlacInput::Seek,
|
|
|
|
FlacInput::Tell,
|
|
|
|
FlacInput::Length,
|
|
|
|
FlacInput::Eof,
|
2012-02-11 11:50:26 +01:00
|
|
|
flac_write_cb,
|
|
|
|
flacMetadata,
|
2013-05-05 14:19:04 +02:00
|
|
|
FlacInput::Error,
|
2012-02-11 11:50:26 +01:00
|
|
|
data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static FLAC__StreamDecoderInitStatus
|
|
|
|
stream_init_flac(FLAC__StreamDecoder *flac_dec, struct flac_data *data)
|
|
|
|
{
|
|
|
|
return FLAC__stream_decoder_init_stream(flac_dec,
|
2013-05-05 14:19:04 +02:00
|
|
|
FlacInput::Read,
|
|
|
|
FlacInput::Seek,
|
|
|
|
FlacInput::Tell,
|
|
|
|
FlacInput::Length,
|
|
|
|
FlacInput::Eof,
|
2012-10-02 19:27:30 +02:00
|
|
|
flac_write_cb,
|
2012-02-11 11:50:26 +01:00
|
|
|
flacMetadata,
|
2013-05-05 14:19:04 +02:00
|
|
|
FlacInput::Error,
|
2012-02-11 11:50:26 +01:00
|
|
|
data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static FLAC__StreamDecoderInitStatus
|
|
|
|
stream_init(FLAC__StreamDecoder *flac_dec, struct flac_data *data, bool is_ogg)
|
|
|
|
{
|
|
|
|
return is_ogg
|
|
|
|
? stream_init_oggflac(flac_dec, data)
|
|
|
|
: stream_init_flac(flac_dec, data);
|
|
|
|
}
|
|
|
|
|
2008-11-11 17:13:44 +01:00
|
|
|
static void
|
2009-01-15 19:50:28 +01:00
|
|
|
flac_decode_internal(struct decoder * decoder,
|
|
|
|
struct input_stream *input_stream,
|
2008-10-30 08:38:54 +01:00
|
|
|
bool is_ogg)
|
2006-12-04 05:45:41 +01:00
|
|
|
{
|
2009-11-11 16:59:28 +01:00
|
|
|
FLAC__StreamDecoder *flac_dec;
|
2006-12-04 05:45:41 +01:00
|
|
|
|
2009-11-11 18:56:10 +01:00
|
|
|
flac_dec = flac_decoder_new();
|
2012-10-02 10:56:44 +02:00
|
|
|
if (flac_dec == nullptr)
|
2008-11-11 17:13:44 +01:00
|
|
|
return;
|
2009-11-11 18:56:10 +01:00
|
|
|
|
2012-10-02 19:47:31 +02:00
|
|
|
struct flac_data data(decoder, input_stream);
|
2007-12-07 00:01:28 +01:00
|
|
|
|
2012-02-11 11:50:26 +01:00
|
|
|
FLAC__StreamDecoderInitStatus status =
|
|
|
|
stream_init(flac_dec, &data, is_ogg);
|
|
|
|
if (status != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
|
|
|
|
FLAC__stream_decoder_delete(flac_dec);
|
|
|
|
g_warning("%s", FLAC__StreamDecoderInitStatusString[status]);
|
|
|
|
return;
|
2008-11-10 14:49:34 +01:00
|
|
|
}
|
|
|
|
|
2010-01-05 21:46:12 +01:00
|
|
|
if (!flac_decoder_initialize(&data, flac_dec, 0)) {
|
2012-02-11 12:56:52 +01:00
|
|
|
FLAC__stream_decoder_finish(flac_dec);
|
2009-11-11 19:01:31 +01:00
|
|
|
FLAC__stream_decoder_delete(flac_dec);
|
|
|
|
return;
|
2008-11-21 20:27:30 +01:00
|
|
|
}
|
|
|
|
|
2009-11-11 13:59:45 +01:00
|
|
|
flac_decoder_loop(&data, flac_dec, 0, 0);
|
2006-12-04 05:45:41 +01:00
|
|
|
|
2012-02-11 12:56:52 +01:00
|
|
|
FLAC__stream_decoder_finish(flac_dec);
|
2009-11-11 16:59:28 +01:00
|
|
|
FLAC__stream_decoder_delete(flac_dec);
|
2006-12-04 05:45:50 +01:00
|
|
|
}
|
|
|
|
|
2008-11-11 17:13:44 +01:00
|
|
|
static void
|
2009-01-15 19:50:28 +01:00
|
|
|
flac_decode(struct decoder * decoder, struct input_stream *input_stream)
|
2006-12-04 05:45:50 +01:00
|
|
|
{
|
2009-01-15 19:50:28 +01:00
|
|
|
flac_decode_internal(decoder, input_stream, false);
|
2006-12-04 05:45:50 +01:00
|
|
|
}
|
|
|
|
|
2008-11-09 22:01:47 +01:00
|
|
|
static bool
|
2009-02-15 18:34:14 +01:00
|
|
|
oggflac_init(G_GNUC_UNUSED const struct config_param *param)
|
2008-11-09 22:01:47 +01:00
|
|
|
{
|
|
|
|
return !!FLAC_API_SUPPORTS_OGG_FLAC;
|
|
|
|
}
|
|
|
|
|
2012-02-11 19:12:02 +01:00
|
|
|
static bool
|
|
|
|
oggflac_scan_file(const char *file,
|
|
|
|
const struct tag_handler *handler, void *handler_ctx)
|
2006-12-04 05:45:50 +01:00
|
|
|
{
|
2013-05-05 14:19:04 +02:00
|
|
|
FlacMetadataChain chain;
|
2012-10-02 11:24:05 +02:00
|
|
|
if (!chain.ReadOgg(file)) {
|
|
|
|
g_debug("Failed to read OggFLAC tags: %s",
|
|
|
|
chain.GetStatusString());
|
2012-02-11 19:12:02 +01:00
|
|
|
return false;
|
2012-02-11 11:50:26 +01:00
|
|
|
}
|
|
|
|
|
2012-10-02 18:24:15 +02:00
|
|
|
chain.Scan(handler, handler_ctx);
|
2012-02-11 19:12:02 +01:00
|
|
|
return true;
|
2006-12-04 05:45:41 +01:00
|
|
|
}
|
|
|
|
|
2012-10-04 07:09:31 +02:00
|
|
|
static bool
|
|
|
|
oggflac_scan_stream(struct input_stream *is,
|
|
|
|
const struct tag_handler *handler, void *handler_ctx)
|
|
|
|
{
|
2013-05-05 14:19:04 +02:00
|
|
|
FlacMetadataChain chain;
|
2012-10-04 07:09:31 +02:00
|
|
|
if (!chain.ReadOgg(is)) {
|
|
|
|
g_debug("Failed to read OggFLAC tags: %s",
|
|
|
|
chain.GetStatusString());
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
chain.Scan(handler, handler_ctx);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2008-11-11 17:13:44 +01:00
|
|
|
static void
|
2009-01-15 19:50:28 +01:00
|
|
|
oggflac_decode(struct decoder *decoder, struct input_stream *input_stream)
|
2006-12-04 05:45:50 +01:00
|
|
|
{
|
2012-09-04 13:05:12 +02:00
|
|
|
if (ogg_codec_detect(decoder, input_stream) != OGG_CODEC_FLAC)
|
2008-11-11 17:13:44 +01:00
|
|
|
return;
|
2006-12-04 05:45:50 +01:00
|
|
|
|
2012-09-04 13:05:12 +02:00
|
|
|
/* rewind the stream, because ogg_codec_detect() has
|
2008-11-10 15:07:01 +01:00
|
|
|
moved it */
|
2012-10-02 10:56:44 +02:00
|
|
|
input_stream_lock_seek(input_stream, 0, SEEK_SET, nullptr);
|
2008-11-10 15:07:01 +01:00
|
|
|
|
2009-01-15 19:50:28 +01:00
|
|
|
flac_decode_internal(decoder, input_stream, true);
|
2006-12-04 05:45:50 +01:00
|
|
|
}
|
|
|
|
|
2012-10-02 10:56:44 +02:00
|
|
|
static const char *const oggflac_suffixes[] = { "ogg", "oga", nullptr };
|
2008-11-01 14:55:23 +01:00
|
|
|
static const char *const oggflac_mime_types[] = {
|
|
|
|
"application/ogg",
|
|
|
|
"application/x-ogg",
|
2009-12-29 22:33:46 +01:00
|
|
|
"audio/ogg",
|
|
|
|
"audio/x-flac+ogg",
|
|
|
|
"audio/x-ogg",
|
2012-10-02 10:56:44 +02:00
|
|
|
nullptr
|
2008-11-01 14:55:23 +01:00
|
|
|
};
|
2006-12-04 05:45:50 +01:00
|
|
|
|
2009-01-15 19:50:28 +01:00
|
|
|
const struct decoder_plugin oggflac_decoder_plugin = {
|
2012-10-02 10:56:44 +02:00
|
|
|
"oggflac",
|
|
|
|
oggflac_init,
|
|
|
|
nullptr,
|
|
|
|
oggflac_decode,
|
|
|
|
nullptr,
|
|
|
|
oggflac_scan_file,
|
2012-10-04 07:09:31 +02:00
|
|
|
oggflac_scan_stream,
|
2012-10-02 10:56:44 +02:00
|
|
|
nullptr,
|
|
|
|
oggflac_suffixes,
|
|
|
|
oggflac_mime_types,
|
2008-10-17 21:57:09 +02:00
|
|
|
};
|
2006-12-04 05:45:50 +01:00
|
|
|
|
2012-10-02 10:56:44 +02:00
|
|
|
static const char *const flac_suffixes[] = { "flac", nullptr };
|
2008-11-01 14:55:23 +01:00
|
|
|
static const char *const flac_mime_types[] = {
|
2009-12-29 22:33:46 +01:00
|
|
|
"application/flac",
|
|
|
|
"application/x-flac",
|
|
|
|
"audio/flac",
|
|
|
|
"audio/x-flac",
|
2012-10-02 10:56:44 +02:00
|
|
|
nullptr
|
2008-11-01 14:55:23 +01:00
|
|
|
};
|
2004-05-31 03:54:10 +02:00
|
|
|
|
2009-01-15 19:50:28 +01:00
|
|
|
const struct decoder_plugin flac_decoder_plugin = {
|
2012-10-02 10:56:44 +02:00
|
|
|
"flac",
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
flac_decode,
|
|
|
|
nullptr,
|
|
|
|
flac_scan_file,
|
2012-10-04 07:09:31 +02:00
|
|
|
flac_scan_stream,
|
2012-10-02 10:56:44 +02:00
|
|
|
nullptr,
|
|
|
|
flac_suffixes,
|
|
|
|
flac_mime_types,
|
2004-05-31 03:54:10 +02:00
|
|
|
};
|