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.
This commit is contained in:
Max Kellermann
2011-09-16 21:06:12 +02:00
parent 6f655eb9b9
commit 29241c4f83
7 changed files with 78 additions and 0 deletions

View File

@@ -90,6 +90,15 @@ gcc_nonnull(1)
void
input_stream_close(struct input_stream *is);
/**
* Check for errors that may have occurred in the I/O thread.
*
* @return false on error
*/
gcc_nonnull(1)
bool
input_stream_check(struct input_stream *is, GError **error_r);
/**
* Update the public attributes. Call before accessing attributes
* such as "ready" or "offset".