aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_decoder.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 /test/run_decoder.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 'test/run_decoder.cxx')
-rw-r--r--test/run_decoder.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/run_decoder.cxx b/test/run_decoder.cxx
index fb06c637a..ed29c1880 100644
--- a/test/run_decoder.cxx
+++ b/test/run_decoder.cxx
@@ -22,7 +22,7 @@
#include "DecoderList.hxx"
#include "DecoderAPI.hxx"
#include "InputInit.hxx"
-#include "InputLegacy.hxx"
+#include "InputStream.hxx"
#include "AudioFormat.hxx"
#include "util/Error.hxx"
#include "stdbin.h"
@@ -92,8 +92,7 @@ decoder_read(gcc_unused struct decoder *decoder,
struct input_stream *is,
void *buffer, size_t length)
{
- Error error;
- return input_stream_lock_read(is, buffer, length, error);
+ return is->LockRead(buffer, length, IgnoreError());
}
void
@@ -189,20 +188,20 @@ int main(int argc, char **argv)
Mutex mutex;
Cond cond;
- struct input_stream *is =
- input_stream_open(decoder.uri, mutex, cond, error);
+ input_stream *is =
+ input_stream::Open(decoder.uri, mutex, cond, error);
if (is == NULL) {
if (error.IsDefined())
g_warning("%s", error.GetMessage());
else
- g_printerr("input_stream_open() failed\n");
+ g_printerr("input_stream::Open() failed\n");
return 1;
}
decoder_plugin_stream_decode(decoder.plugin, &decoder, is);
- input_stream_close(is);
+ is->Close();
} else {
g_printerr("Decoder plugin is not usable\n");
return 1;