diff options
author | wm4 <wm4@nowhere> | 2015-01-23 20:56:11 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-23 20:56:25 +0100 |
commit | a0a40eb2872d137898e6f96b8d46490f2e63071f (patch) | |
tree | 2e665b1ce92a6984c5498e8faaa38e0d6b2d7e92 /video/out/vo.c | |
parent | d76dbbd41427a12f03dac7ccc99d8c864b228d6b (diff) | |
download | mpv-a0a40eb2872d137898e6f96b8d46490f2e63071f.tar.bz2 mpv-a0a40eb2872d137898e6f96b8d46490f2e63071f.tar.xz |
vo: fix disabling/enabling smoothmotion at runtime
vo.c queried the VO at initialization whether it wants to be updated on
every display frame, or every video frame. If the smoothmotion option
was changed at runtime, the rendering mode in vo.c wasn't updated.
Just let vo_opengl set the mode directly. Abuse the existing
vo_set_flip_queue_offset() function for this.
Also add a comment suggesting the use of --display-fps to the manpage,
which doesn't have anything to do with the rest of this commit, but is
important to make smoothmotion run well.
Diffstat (limited to 'video/out/vo.c')
-rw-r--r-- | video/out/vo.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index afc963e8fd..36bd2a9c2e 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -711,7 +711,6 @@ static void *vo_thread(void *ptr) mpthread_set_name("vo"); int r = vo->driver->preinit(vo) ? -1 : 0; - vo->driver->control(vo, VOCTRL_GET_VSYNC_TIMED, &in->vsync_timed); mp_rendezvous(vo, r); // init barrier if (r < 0) return NULL; @@ -879,13 +878,16 @@ const char *vo_get_window_title(struct vo *vo) return vo->in->window_title; } -// flip_page[_timed] will be called this many microseconds too early. +// flip_page[_timed] will be called offset_us microseconds too early. // (For vo_vdpau, which does its own timing.) -void vo_set_flip_queue_offset(struct vo *vo, int64_t us) +// Setting vsync_timed to true redraws as fast as possible. +// (For vo_opengl smoothmotion.) +void vo_set_flip_queue_params(struct vo *vo, int64_t offset_us, bool vsync_timed) { struct vo_internal *in = vo->in; pthread_mutex_lock(&in->lock); - in->flip_queue_offset = us; + in->flip_queue_offset = offset_us; + in->vsync_timed = vsync_timed; pthread_mutex_unlock(&in->lock); } |