aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/curl_input_plugin.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-29 23:55:40 +0100
committerMax Kellermann <max@duempel.org>2009-12-29 23:55:40 +0100
commitc88f95a2ea1d089501bed84c085acd7312f7dc2a (patch)
treea413d715313a8f349889a893141fdbc2fa1bda92 /src/input/curl_input_plugin.h
parentc7d099c75736664867914fd5013a0a844cd23adc (diff)
downloadmpd-c88f95a2ea1d089501bed84c085acd7312f7dc2a.tar.gz
mpd-c88f95a2ea1d089501bed84c085acd7312f7dc2a.tar.xz
mpd-c88f95a2ea1d089501bed84c085acd7312f7dc2a.zip
input/rewind: new input_stream wrapper to allow stream rewinding
This replaces the rewinding buffer code from the CURL input plugin. It is more generic, and allows rewinding even when the server sends Icy-Metadata (which would have been too difficult to implement within the CURL plugin). This is a rather complex patch for the stable branch (v0.15.x), but it fixes a serious problem: the "vorbis" decoder plugin was unable to play streams with Icy-Metadata, because it couldn't rewind the stream after detecting the codec (Vorbis vs. FLAC).
Diffstat (limited to 'src/input/curl_input_plugin.h')
-rw-r--r--src/input/curl_input_plugin.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/input/curl_input_plugin.h b/src/input/curl_input_plugin.h
index 3816f039b..63ac0dc23 100644
--- a/src/input/curl_input_plugin.h
+++ b/src/input/curl_input_plugin.h
@@ -20,6 +20,16 @@
#ifndef MPD_INPUT_CURL_H
#define MPD_INPUT_CURL_H
+struct input_stream;
+
extern const struct input_plugin input_plugin_curl;
+/**
+ * This is a workaround for an input_stream API deficiency; after
+ * exchanging the input_stream pointer in input_rewind_open(), this
+ * function is called to reinitialize CURL's data pointers.
+ */
+void
+input_curl_reinit(struct input_stream *is);
+
#endif