aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/SndfileDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-05 00:06:31 +0200
committerMax Kellermann <max@duempel.org>2013-09-05 00:23:14 +0200
commit7d0269d2cec68c7e55df5b6db3d2266741534b17 (patch)
tree613f5d7b03bc9624f15167c76f8f4309603944cc /src/decoder/SndfileDecoderPlugin.cxx
parent52ffdb0a55e43153fa9fc1189316884a630df700 (diff)
downloadmpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.tar.gz
mpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.tar.xz
mpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.zip
InputLegacy: move functions to the input_stream class
Diffstat (limited to 'src/decoder/SndfileDecoderPlugin.cxx')
-rw-r--r--src/decoder/SndfileDecoderPlugin.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/decoder/SndfileDecoderPlugin.cxx b/src/decoder/SndfileDecoderPlugin.cxx
index 0b83c142a..f61e7c2c2 100644
--- a/src/decoder/SndfileDecoderPlugin.cxx
+++ b/src/decoder/SndfileDecoderPlugin.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "SndfileDecoderPlugin.hxx"
#include "DecoderAPI.hxx"
+#include "InputStream.hxx"
#include "CheckAudioFormat.hxx"
#include "TagHandler.hxx"
#include "util/Error.hxx"
@@ -34,7 +35,7 @@ sndfile_vio_get_filelen(void *user_data)
{
const struct input_stream *is = (const struct input_stream *)user_data;
- return input_stream_get_size(is);
+ return is->GetSize();
}
static sf_count_t
@@ -42,10 +43,10 @@ sndfile_vio_seek(sf_count_t offset, int whence, void *user_data)
{
struct input_stream *is = (struct input_stream *)user_data;
- if (!input_stream_lock_seek(is, offset, whence, IgnoreError()))
+ if (!is->LockSeek(offset, whence, IgnoreError()))
return -1;
- return input_stream_get_offset(is);
+ return is->GetOffset();
}
static sf_count_t
@@ -54,7 +55,7 @@ sndfile_vio_read(void *ptr, sf_count_t count, void *user_data)
struct input_stream *is = (struct input_stream *)user_data;
Error error;
- size_t nbytes = input_stream_lock_read(is, ptr, count, error);
+ size_t nbytes = is->LockRead(ptr, count, error);
if (nbytes == 0 && error.IsDefined()) {
g_warning("%s", error.GetMessage());
return -1;
@@ -77,7 +78,7 @@ sndfile_vio_tell(void *user_data)
{
const struct input_stream *is = (const struct input_stream *)user_data;
- return input_stream_get_offset(is);
+ return is->GetOffset();
}
/**