From e0cf983e53afa6a524821265c7547c11f5c79551 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 25 Apr 2014 19:12:24 +0200 Subject: 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. --- common/global.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common') diff --git a/common/global.h b/common/global.h index 546c585294..e49169bebb 100644 --- a/common/global.h +++ b/common/global.h @@ -7,6 +7,9 @@ struct mpv_global { struct MPOpts *opts; struct mp_log *log; + + int (*stream_interrupt_cb)(void *ctx); + void *stream_interrupt_cb_ctx; }; #endif -- cgit v1.2.3