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/PcmDecoderPlugin.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/PcmDecoderPlugin.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/decoder/PcmDecoderPlugin.cxx b/src/decoder/PcmDecoderPlugin.cxx index 0a19ed59b..dbc38fb76 100644 --- a/src/decoder/PcmDecoderPlugin.cxx +++ b/src/decoder/PcmDecoderPlugin.cxx @@ -31,7 +31,7 @@ #include <stdio.h> /* for SEEK_SET */ static void -pcm_stream_decode(Decoder &decoder, struct input_stream *is) +pcm_stream_decode(Decoder &decoder, InputStream &is) { static constexpr AudioFormat audio_format = { 44100, @@ -39,19 +39,19 @@ pcm_stream_decode(Decoder &decoder, struct input_stream *is) 2, }; - const char *const mime = is->GetMimeType(); + const char *const mime = is.GetMimeType(); const bool reverse_endian = mime != nullptr && strcmp(mime, "audio/x-mpd-cdda-pcm-reverse") == 0; const double time_to_size = audio_format.GetTimeToSize(); float total_time = -1; - const auto size = is->GetSize(); + const auto size = is.GetSize(); if (size >= 0) total_time = size / time_to_size; decoder_initialized(decoder, audio_format, - is->IsSeekable(), total_time); + is.IsSeekable(), total_time); DecoderCommand cmd; do { @@ -60,7 +60,7 @@ pcm_stream_decode(Decoder &decoder, struct input_stream *is) size_t nbytes = decoder_read(decoder, is, buffer, sizeof(buffer)); - if (nbytes == 0 && is->LockIsEOF()) + if (nbytes == 0 && is.LockIsEOF()) break; if (reverse_endian) @@ -74,11 +74,11 @@ pcm_stream_decode(Decoder &decoder, struct input_stream *is) buffer, nbytes, 0) : decoder_get_command(decoder); if (cmd == DecoderCommand::SEEK) { - input_stream::offset_type offset(time_to_size * - decoder_seek_where(decoder)); + InputStream::offset_type offset(time_to_size * + decoder_seek_where(decoder)); Error error; - if (is->LockSeek(offset, SEEK_SET, error)) { + if (is.LockSeek(offset, SEEK_SET, error)) { decoder_command_finished(decoder); } else { LogError(error); |