diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-04-09 00:36:28 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-04-09 00:36:28 +0000 |
commit | f481e7870b0fcb7fec1614efab4fc7baf380bf1c (patch) | |
tree | b5cbdd1b187650efb3bea73bb69c862fdfae74ba /stream/stream.c | |
parent | 64868a36cd8113336745f5baf336ae76553de9ab (diff) | |
download | mpv-f481e7870b0fcb7fec1614efab4fc7baf380bf1c.tar.bz2 mpv-f481e7870b0fcb7fec1614efab4fc7baf380bf1c.tar.xz |
Remove the need for code using stream to export an mp_input_check_interrupt()
function. It also removes the compile-time dependency on input.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26358 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream.c')
-rw-r--r-- | stream/stream.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/stream/stream.c b/stream/stream.c index 9c1fb8b0b4..42ceff1934 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -34,6 +34,8 @@ //#include "vcd_read_bincue.h" +static int (*stream_check_interrupt_cb)(int time) = NULL; + extern const stream_info_t stream_info_vcd; extern const stream_info_t stream_info_cdda; extern const stream_info_t stream_info_netstream; @@ -455,3 +457,12 @@ stream_t* new_ds_stream(demux_stream_t *ds) { s->priv = ds; return s; } + +void stream_set_interrupt_callback(int (*cb)(int)) { + stream_check_interrupt_cb = cb; +} + +int stream_check_interrupt(int time) { + if(!stream_check_interrupt_cb) return 0; + return stream_check_interrupt_cb(time); +} |