mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 17:12:36 +00:00
2619d8eff4
Why do these API calls even still exist? I don't know, and maybe they don't make any sense anymore. But whether they should be removed or not is not a decision I want to make now. I want to get rid of mp_dispatch_suspend/resume(), though. So implement the client APIs slightly differently.
22 lines
934 B
C
22 lines
934 B
C
#ifndef MP_DISPATCH_H_
|
|
#define MP_DISPATCH_H_
|
|
|
|
typedef void (*mp_dispatch_fn)(void *data);
|
|
struct mp_dispatch_queue;
|
|
|
|
struct mp_dispatch_queue *mp_dispatch_create(void *talloc_parent);
|
|
void mp_dispatch_set_wakeup_fn(struct mp_dispatch_queue *queue,
|
|
void (*wakeup_fn)(void *wakeup_ctx),
|
|
void *wakeup_ctx);
|
|
void mp_dispatch_enqueue(struct mp_dispatch_queue *queue,
|
|
mp_dispatch_fn fn, void *fn_data);
|
|
void mp_dispatch_enqueue_autofree(struct mp_dispatch_queue *queue,
|
|
mp_dispatch_fn fn, void *fn_data);
|
|
void mp_dispatch_run(struct mp_dispatch_queue *queue,
|
|
mp_dispatch_fn fn, void *fn_data);
|
|
void mp_dispatch_queue_process(struct mp_dispatch_queue *queue, double timeout);
|
|
void mp_dispatch_lock(struct mp_dispatch_queue *queue);
|
|
void mp_dispatch_unlock(struct mp_dispatch_queue *queue);
|
|
|
|
#endif
|