diff options
author | Max Kellermann <max@duempel.org> | 2013-10-23 22:08:59 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-23 23:12:02 +0200 |
commit | 93deb844996120b6326345d6d87e803142dd1968 (patch) | |
tree | d6c00669efffad1b15fc45e03158d6838a7e5827 /src/decoder/ModplugDecoderPlugin.cxx | |
parent | c4d4011c63808a64ca20a4b03fd455a83c23cc33 (diff) | |
download | mpd-93deb844996120b6326345d6d87e803142dd1968.tar.gz mpd-93deb844996120b6326345d6d87e803142dd1968.tar.xz mpd-93deb844996120b6326345d6d87e803142dd1968.zip |
input_stream: rename struct to InputStream
Diffstat (limited to '')
-rw-r--r-- | src/decoder/ModplugDecoderPlugin.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/decoder/ModplugDecoderPlugin.cxx b/src/decoder/ModplugDecoderPlugin.cxx index a86166622..e75f5479c 100644 --- a/src/decoder/ModplugDecoderPlugin.cxx +++ b/src/decoder/ModplugDecoderPlugin.cxx @@ -36,7 +36,7 @@ static constexpr Domain modplug_domain("modplug"); static constexpr size_t MODPLUG_FRAME_SIZE = 4096; static constexpr size_t MODPLUG_PREALLOC_BLOCK = 256 * 1024; -static constexpr input_stream::offset_type MODPLUG_FILE_LIMIT = 100 * 1024 * 1024; +static constexpr InputStream::offset_type MODPLUG_FILE_LIMIT = 100 * 1024 * 1024; static int modplug_loop_count; @@ -52,9 +52,9 @@ modplug_decoder_init(const config_param ¶m) } static WritableBuffer<uint8_t> -mod_loadfile(Decoder *decoder, struct input_stream *is) +mod_loadfile(Decoder *decoder, InputStream &is) { - const input_stream::offset_type size = is->GetSize(); + const InputStream::offset_type size = is.GetSize(); if (size == 0) { LogWarning(modplug_domain, "file is empty"); @@ -80,7 +80,7 @@ mod_loadfile(Decoder *decoder, struct input_stream *is) while (true) { size_t ret = decoder_read(decoder, is, p, end - p); if (ret == 0) { - if (is->LockIsEOF()) + if (is.LockIsEOF()) /* end of file */ break; @@ -107,7 +107,7 @@ mod_loadfile(Decoder *decoder, struct input_stream *is) } static ModPlugFile * -LoadModPlugFile(Decoder *decoder, struct input_stream *is) +LoadModPlugFile(Decoder *decoder, InputStream &is) { const auto buffer = mod_loadfile(decoder, is); if (buffer.IsNull()) { @@ -121,7 +121,7 @@ LoadModPlugFile(Decoder *decoder, struct input_stream *is) } static void -mod_decode(Decoder &decoder, struct input_stream *is) +mod_decode(Decoder &decoder, InputStream &is) { ModPlug_Settings settings; int ret; @@ -147,7 +147,7 @@ mod_decode(Decoder &decoder, struct input_stream *is) assert(audio_format.IsValid()); decoder_initialized(decoder, audio_format, - is->IsSeekable(), + is.IsSeekable(), ModPlug_GetLength(f) / 1000.0); DecoderCommand cmd; @@ -174,7 +174,7 @@ mod_decode(Decoder &decoder, struct input_stream *is) } static bool -modplug_scan_stream(struct input_stream *is, +modplug_scan_stream(InputStream &is, const struct tag_handler *handler, void *handler_ctx) { ModPlugFile *f = LoadModPlugFile(nullptr, is); |