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 --- test/run_decoder.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'test/run_decoder.cxx') 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; -- cgit v1.2.3