diff options
author | wm4 <wm4@nowhere> | 2014-04-25 19:12:24 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-25 19:12:24 +0200 |
commit | e0cf983e53afa6a524821265c7547c11f5c79551 (patch) | |
tree | 4ea1c5f0b17464e6b503c23be14b935cba0090d4 /stream/stream.h | |
parent | 3d51ef3dc83ea59a47c0eccf4ae93ae2a441ceb7 (diff) | |
download | mpv-e0cf983e53afa6a524821265c7547c11f5c79551.tar.bz2 mpv-e0cf983e53afa6a524821265c7547c11f5c79551.tar.xz |
stream: remove interrupt callback global variables
This used global variables for the asynchronous interrupt callback.
Pick the simple and dumb solution and stuff the callback into
mpv_global. Do this because interrupt checking should also work in the
connect phase, and currently stream creation equates connecting.
Ideally, this would be passed to the stream on creation instead, or
connecting would be separated from creation. But since I don't know yet
which is better, and since moving stream/demuxer into their own thread
is something that will happen later, go with the mpv_global solution.
Diffstat (limited to 'stream/stream.h')
-rw-r--r-- | stream/stream.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/stream/stream.h b/stream/stream.h index d51a26f61c..0fabd62b1f 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -227,14 +227,7 @@ struct stream *stream_open(const char *filename, struct mpv_global *global); stream_t *open_output_stream(const char *filename, struct mpv_global *global); stream_t *open_memory_stream(void *data, int len); -/// Set the callback to be used by libstream to check for user -/// interruption during long blocking operations (cache filling, etc). -struct input_ctx; -void stream_set_interrupt_callback(int (*cb)(struct input_ctx *, int), - struct input_ctx *ctx); -/// Call the interrupt checking callback if there is one and -/// wait for time milliseconds -int stream_check_interrupt(int time); +bool stream_check_interrupt(struct stream *s); bool stream_manages_timeline(stream_t *s); |