diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2015-08-19 22:41:26 +0300 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-21 00:01:01 +0200 |
commit | e05dc7bfb7c8a2d0c461cb1d60386f067bd01061 (patch) | |
tree | 6d9799398a092797a5ee43954fa68387070167c8 /video/out/wayland_common.h | |
parent | 3245bfefc3803904f5aeade0b3e60cd504ccb16c (diff) | |
download | mpv-e05dc7bfb7c8a2d0c461cb1d60386f067bd01061.tar.bz2 mpv-e05dc7bfb7c8a2d0c461cb1d60386f067bd01061.tar.xz |
vo_wayland: Wait for frame callbacks
Privdes small api for vo_wayland where one can request frame callback
and then wait for it.
This will make vo_wayland play video smoothly.
Diffstat (limited to 'video/out/wayland_common.h')
-rw-r--r-- | video/out/wayland_common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h index d7c505290a..6f3ac72e94 100644 --- a/video/out/wayland_common.h +++ b/video/out/wayland_common.h @@ -47,14 +47,19 @@ struct vo_wayland_output { struct wl_list link; }; +typedef void (*vo_wayland_frame_cb)(void *data, uint32_t time); struct vo_wayland_state { struct vo *vo; struct mp_log* log; struct { + void *data; + vo_wayland_frame_cb function; struct wl_callback *callback; + uint64_t last_us; bool pending; + bool dropping; } frame; #if HAVE_GL_WAYLAND @@ -144,6 +149,8 @@ int vo_wayland_init(struct vo *vo); void vo_wayland_uninit(struct vo *vo); bool vo_wayland_config(struct vo *vo, uint32_t flags); int vo_wayland_control(struct vo *vo, int *events, int request, void *arg); +void vo_wayland_request_frame(struct vo *vo, void *data, vo_wayland_frame_cb cb); +bool vo_wayland_wait_frame(struct vo *vo); #endif /* MPLAYER_WAYLAND_COMMON_H */ |