aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_decoder.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-05-22 11:10:41 +0200
committerMax Kellermann <max@duempel.org>2014-05-22 12:35:20 +0200
commit4eeea640f4641ec7c2b303567adf3e79855eb885 (patch)
treeb56039e1576a437594230027766b7bd0c5cec9e7 /test/run_decoder.cxx
parentcc6f1020d01a6f8f814a6a6a211a00d490459f66 (diff)
downloadmpd-4eeea640f4641ec7c2b303567adf3e79855eb885.tar.gz
mpd-4eeea640f4641ec7c2b303567adf3e79855eb885.tar.xz
mpd-4eeea640f4641ec7c2b303567adf3e79855eb885.zip
DecoderAPI: add function decoder_open_uri()
Move and refactor code from the Wavpack decoder plugin.
Diffstat (limited to '')
-rw-r--r--test/run_decoder.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/run_decoder.cxx b/test/run_decoder.cxx
index b1c739405..3980340cc 100644
--- a/test/run_decoder.cxx
+++ b/test/run_decoder.cxx
@@ -27,7 +27,6 @@
#include "fs/Path.hxx"
#include "AudioFormat.hxx"
#include "util/Error.hxx"
-#include "thread/Cond.hxx"
#include "Log.hxx"
#include "stdbin.h"
@@ -77,11 +76,9 @@ int main(int argc, char **argv)
if (plugin->file_decode != nullptr) {
plugin->FileDecode(decoder, Path::FromFS(uri));
} else if (plugin->stream_decode != nullptr) {
- Mutex mutex;
- Cond cond;
-
InputStream *is =
- InputStream::OpenReady(uri, mutex, cond, error);
+ InputStream::OpenReady(uri, decoder.mutex,
+ decoder.cond, error);
if (is == NULL) {
if (error.IsDefined())
LogError(error);