From 7d0269d2cec68c7e55df5b6db3d2266741534b17 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Sep 2013 00:06:31 +0200 Subject: InputLegacy: move functions to the input_stream class --- src/decoder/MpcdecDecoderPlugin.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/decoder/MpcdecDecoderPlugin.cxx') diff --git a/src/decoder/MpcdecDecoderPlugin.cxx b/src/decoder/MpcdecDecoderPlugin.cxx index 35d5ce0df..87d868f19 100644 --- a/src/decoder/MpcdecDecoderPlugin.cxx +++ b/src/decoder/MpcdecDecoderPlugin.cxx @@ -20,6 +20,7 @@ #include "config.h" #include "MpcdecDecoderPlugin.hxx" #include "DecoderAPI.hxx" +#include "InputStream.hxx" #include "CheckAudioFormat.hxx" #include "TagHandler.hxx" #include "util/Error.hxx" @@ -54,8 +55,7 @@ mpc_seek_cb(mpc_reader *reader, mpc_int32_t offset) struct mpc_decoder_data *data = (struct mpc_decoder_data *)reader->data; - return input_stream_lock_seek(data->is, offset, SEEK_SET, - IgnoreError()); + return data->is->LockSeek(offset, SEEK_SET, IgnoreError()); } static mpc_int32_t @@ -64,7 +64,7 @@ mpc_tell_cb(mpc_reader *reader) struct mpc_decoder_data *data = (struct mpc_decoder_data *)reader->data; - return (long)input_stream_get_offset(data->is); + return (long)data->is->GetOffset(); } static mpc_bool_t @@ -73,7 +73,7 @@ mpc_canseek_cb(mpc_reader *reader) struct mpc_decoder_data *data = (struct mpc_decoder_data *)reader->data; - return input_stream_is_seekable(data->is); + return data->is->IsSeekable(); } static mpc_int32_t @@ -82,7 +82,7 @@ mpc_getsize_cb(mpc_reader *reader) struct mpc_decoder_data *data = (struct mpc_decoder_data *)reader->data; - return input_stream_get_size(data->is); + return data->is->GetSize(); } /* this _looks_ performance-critical, don't de-inline -- eric */ @@ -175,7 +175,7 @@ mpcdec_decode(struct decoder *mpd_decoder, struct input_stream *is) decoder_replay_gain(mpd_decoder, &replay_gain_info); decoder_initialized(mpd_decoder, audio_format, - input_stream_is_seekable(is), + is->IsSeekable(), mpc_streaminfo_get_length(&info)); enum decoder_command cmd = DECODE_COMMAND_NONE; -- cgit v1.2.3