summaryrefslogtreecommitdiff
path: root/src/decoder/DecoderAPI.hxx
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 /src/decoder/DecoderAPI.hxx
parentcc6f1020d01a6f8f814a6a6a211a00d490459f66 (diff)
DecoderAPI: add function decoder_open_uri()
Move and refactor code from the Wavpack decoder plugin.
Diffstat (limited to 'src/decoder/DecoderAPI.hxx')
-rw-r--r--src/decoder/DecoderAPI.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/decoder/DecoderAPI.hxx b/src/decoder/DecoderAPI.hxx
index 0a7b84371..c57a02e01 100644
--- a/src/decoder/DecoderAPI.hxx
+++ b/src/decoder/DecoderAPI.hxx
@@ -40,6 +40,8 @@
// IWYU pragma: end_exports
+class Error;
+
/**
* Notify the player thread that it has finished initialization and
* that it has read the song's meta data.
@@ -96,6 +98,14 @@ void
decoder_seek_error(Decoder &decoder);
/**
+ * Open a new #InputStream and wait until it's ready. Can get
+ * cancelled by DecoderCommand::STOP (returns nullptr without setting
+ * #Error).
+ */
+InputStream *
+decoder_open_uri(Decoder &decoder, const char *uri, Error &error);
+
+/**
* Blocking read from the input stream.
*
* @param decoder the decoder object