decoder/flac: rename struct flac_data to FlacDecoder
This commit is contained in:
@@ -56,14 +56,14 @@ static void flacPrintErroredState(FLAC__StreamDecoderState state)
|
||||
static void flacMetadata(gcc_unused const FLAC__StreamDecoder * dec,
|
||||
const FLAC__StreamMetadata * block, void *vdata)
|
||||
{
|
||||
flac_metadata_common_cb(block, (struct flac_data *) vdata);
|
||||
flac_metadata_common_cb(block, (FlacDecoder *) vdata);
|
||||
}
|
||||
|
||||
static FLAC__StreamDecoderWriteStatus
|
||||
flac_write_cb(const FLAC__StreamDecoder *dec, const FLAC__Frame *frame,
|
||||
const FLAC__int32 *const buf[], void *vdata)
|
||||
{
|
||||
struct flac_data *data = (struct flac_data *) vdata;
|
||||
FlacDecoder *data = (FlacDecoder *) vdata;
|
||||
FLAC__uint64 nbytes = 0;
|
||||
|
||||
if (FLAC__stream_decoder_get_decode_position(dec, &nbytes)) {
|
||||
@@ -133,7 +133,7 @@ flac_decoder_new(void)
|
||||
}
|
||||
|
||||
static bool
|
||||
flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd)
|
||||
flac_decoder_initialize(FlacDecoder *data, FLAC__StreamDecoder *sd)
|
||||
{
|
||||
if (!FLAC__stream_decoder_process_until_end_of_metadata(sd)) {
|
||||
if (FLAC__stream_decoder_get_state(sd) != FLAC__STREAM_DECODER_END_OF_STREAM)
|
||||
@@ -158,7 +158,7 @@ flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd)
|
||||
}
|
||||
|
||||
static void
|
||||
flac_decoder_loop(struct flac_data *data, FLAC__StreamDecoder *flac_dec)
|
||||
flac_decoder_loop(FlacDecoder *data, FLAC__StreamDecoder *flac_dec)
|
||||
{
|
||||
Decoder &decoder = data->decoder;
|
||||
|
||||
@@ -226,7 +226,7 @@ flac_decoder_loop(struct flac_data *data, FLAC__StreamDecoder *flac_dec)
|
||||
}
|
||||
|
||||
static FLAC__StreamDecoderInitStatus
|
||||
stream_init_oggflac(FLAC__StreamDecoder *flac_dec, struct flac_data *data)
|
||||
stream_init_oggflac(FLAC__StreamDecoder *flac_dec, FlacDecoder *data)
|
||||
{
|
||||
return FLAC__stream_decoder_init_ogg_stream(flac_dec,
|
||||
FlacInput::Read,
|
||||
@@ -241,7 +241,7 @@ stream_init_oggflac(FLAC__StreamDecoder *flac_dec, struct flac_data *data)
|
||||
}
|
||||
|
||||
static FLAC__StreamDecoderInitStatus
|
||||
stream_init_flac(FLAC__StreamDecoder *flac_dec, struct flac_data *data)
|
||||
stream_init_flac(FLAC__StreamDecoder *flac_dec, FlacDecoder *data)
|
||||
{
|
||||
return FLAC__stream_decoder_init_stream(flac_dec,
|
||||
FlacInput::Read,
|
||||
@@ -256,7 +256,7 @@ stream_init_flac(FLAC__StreamDecoder *flac_dec, struct flac_data *data)
|
||||
}
|
||||
|
||||
static FLAC__StreamDecoderInitStatus
|
||||
stream_init(FLAC__StreamDecoder *flac_dec, struct flac_data *data, bool is_ogg)
|
||||
stream_init(FLAC__StreamDecoder *flac_dec, FlacDecoder *data, bool is_ogg)
|
||||
{
|
||||
return is_ogg
|
||||
? stream_init_oggflac(flac_dec, data)
|
||||
@@ -264,7 +264,7 @@ stream_init(FLAC__StreamDecoder *flac_dec, struct flac_data *data, bool is_ogg)
|
||||
}
|
||||
|
||||
static bool
|
||||
FlacInitAndDecode(struct flac_data &data, FLAC__StreamDecoder *sd, bool is_ogg)
|
||||
FlacInitAndDecode(FlacDecoder &data, FLAC__StreamDecoder *sd, bool is_ogg)
|
||||
{
|
||||
auto init_status = stream_init(sd, &data, is_ogg);
|
||||
if (init_status != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
|
||||
@@ -292,7 +292,7 @@ flac_decode_internal(Decoder &decoder,
|
||||
if (flac_dec == nullptr)
|
||||
return;
|
||||
|
||||
struct flac_data data(decoder, input_stream);
|
||||
FlacDecoder data(decoder, input_stream);
|
||||
|
||||
FlacInitAndDecode(data, flac_dec, is_ogg);
|
||||
|
||||
|
Reference in New Issue
Block a user