From 29241c4f835797f635816a9f37528aa981f722b5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Sep 2011 21:06:12 +0200 Subject: input_plugin: add method check() To check for errors without reading. The decoder thread wants to do that, before it passes the input stream to the plugin. --- src/input_plugin.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/input_plugin.h') diff --git a/src/input_plugin.h b/src/input_plugin.h index 3ac0bdf40..4e0993d12 100644 --- a/src/input_plugin.h +++ b/src/input_plugin.h @@ -51,6 +51,14 @@ struct input_plugin { struct input_stream *(*open)(const char *uri, GError **error_r); void (*close)(struct input_stream *is); + /** + * Check for errors that may have occurred in the I/O thread. + * May be unimplemented for synchronous plugins. + * + * @return false on error + */ + bool (*check)(struct input_stream *is, GError **error_r); + /** * Update the public attributes. Call before access. Can be * NULL if the plugin always keeps its attributes up to date. -- cgit v1.2.3