summaryrefslogtreecommitdiffstats
path: root/mp_fifo.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-29 15:12:19 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-29 15:36:51 +0300
commit77ec83e351ca7218464f8f77a711520d68fa2e5d (patch)
treea34d66134176ded3eeff149c756eecfd0ea52304 /mp_fifo.h
parentf59cda84b1e52293e656fffea1529896d28b2d21 (diff)
downloadmpv-77ec83e351ca7218464f8f77a711520d68fa2e5d.tar.bz2
mpv-77ec83e351ca7218464f8f77a711520d68fa2e5d.tar.xz
Add a context for mp_fifo
Store data in an allocated context and take it as an argument instead of using static variables.
Diffstat (limited to 'mp_fifo.h')
-rw-r--r--mp_fifo.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/mp_fifo.h b/mp_fifo.h
index 60ef27a929..719bbafac7 100644
--- a/mp_fifo.h
+++ b/mp_fifo.h
@@ -1,7 +1,14 @@
#ifndef MPLAYER_MP_FIFO_H
#define MPLAYER_MP_FIFO_H
+struct mp_fifo;
int mplayer_get_key(void *ctx, int fd);
-void mplayer_put_key(int code);
+void mplayer_put_key(struct mp_fifo *fifo, int code);
+// Can be freed with talloc_free()
+struct mp_fifo *mp_fifo_create(void);
+
+#ifdef IS_OLD_VO
+#define mplayer_put_key(key) mplayer_put_key(global_vo->key_fifo, key)
+#endif
#endif /* MPLAYER_MP_FIFO_H */