From 4eeea640f4641ec7c2b303567adf3e79855eb885 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 22 May 2014 11:10:41 +0200 Subject: DecoderAPI: add function decoder_open_uri() Move and refactor code from the Wavpack decoder plugin. --- src/decoder/DecoderAPI.hxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/decoder/DecoderAPI.hxx') 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. @@ -95,6 +97,14 @@ decoder_seek_where(Decoder &decoder); 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. * -- cgit v1.2.3