From af103aebd73609fa143b07805082a23525c8a306 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 20 Aug 2016 14:46:38 +0200 Subject: player: update Windows playback state asynchronously Doing this required synchronizing with the VO thread, which could lead to audio dropouts if the VO was frozen (which can happen in practice if e.g. an opengl_cb user is not doing what the API demands). Add a way to send asynchronous VOCTRLs, and use that for the playback state. In theory, it would be better to make this status update a several function and to "merge" several queued update, but that would be slightly more effort/code, and the update is so infrequent that the merging would never happen anyway. The change to vo_destroy() is to make sure all queued asynchronous reuqests are finished before making the vo_thread exit. Even though it's only used on MS Windows, it's run on any platform with any VO, which makes this worse. --- video/out/vo.h | 1 + 1 file changed, 1 insertion(+) (limited to 'video/out/vo.h') diff --git a/video/out/vo.h b/video/out/vo.h index 8fdb2ed1e8..ed2fe94e37 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -342,6 +342,7 @@ struct vo *init_best_video_out(struct mpv_global *global, struct vo_extra *ex); int vo_reconfig(struct vo *vo, struct mp_image_params *p); int vo_control(struct vo *vo, int request, void *data); +void vo_control_async(struct vo *vo, int request, void *data); bool vo_is_ready_for_frame(struct vo *vo, int64_t next_pts); void vo_queue_frame(struct vo *vo, struct vo_frame *frame); void vo_wait_frame(struct vo *vo); -- cgit v1.2.3