summaryrefslogtreecommitdiff
path: root/src/decoder/plugins/FaadDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-11-18 07:13:35 +0100
committerMax Kellermann <max@musicpd.org>2016-11-18 09:03:39 +0100
commitfd77acc217340aeee3dc80173b6000815ebb709f (patch)
tree05c4ef7d1c604efd7315abc32b9e962ed1361402 /src/decoder/plugins/FaadDecoderPlugin.cxx
parent595d1942cb795adcc0c037389aeb8238c788a3c0 (diff)
decoder/Client: new interface which wraps struct Decoder
Prepare for a Decoder API redesign based on an abstract class with virtual methods.
Diffstat (limited to 'src/decoder/plugins/FaadDecoderPlugin.cxx')
-rw-r--r--src/decoder/plugins/FaadDecoderPlugin.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/decoder/plugins/FaadDecoderPlugin.cxx b/src/decoder/plugins/FaadDecoderPlugin.cxx
index b16d8bc39..d9e24c1b5 100644
--- a/src/decoder/plugins/FaadDecoderPlugin.cxx
+++ b/src/decoder/plugins/FaadDecoderPlugin.cxx
@@ -324,7 +324,7 @@ faad_get_file_time(InputStream &is)
}
static void
-faad_stream_decode(Decoder &mpd_decoder, InputStream &is,
+faad_stream_decode(DecoderClient &client, InputStream &is,
DecoderBuffer &buffer, const NeAACDecHandle decoder)
{
const auto total_time = faad_song_duration(buffer, is);
@@ -339,7 +339,7 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is,
/* initialize the MPD core */
- decoder_initialized(mpd_decoder, audio_format, false, total_time);
+ decoder_initialized(client, audio_format, false, total_time);
/* the decoder loop */
@@ -393,16 +393,16 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is,
/* send PCM samples to MPD */
- cmd = decoder_data(mpd_decoder, is, decoded,
+ cmd = decoder_data(client, is, decoded,
(size_t)frame_info.samples * 2,
bit_rate);
} while (cmd != DecoderCommand::STOP);
}
static void
-faad_stream_decode(Decoder &mpd_decoder, InputStream &is)
+faad_stream_decode(DecoderClient &client, InputStream &is)
{
- DecoderBuffer buffer(&mpd_decoder, is,
+ DecoderBuffer buffer(&client, is,
FAAD_MIN_STREAMSIZE * MAX_CHANNELS);
/* create the libfaad decoder */
@@ -410,7 +410,7 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is)
const NeAACDecHandle decoder = faad_decoder_new();
AtScopeExit(decoder) { NeAACDecClose(decoder); };
- faad_stream_decode(mpd_decoder, is, buffer, decoder);
+ faad_stream_decode(client, is, buffer, decoder);
}
static bool