summaryrefslogtreecommitdiffstats
path: root/options/options.h
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-04-06 16:58:32 -0500
committerDudemanguy <random342@airmail.cc>2022-04-11 18:14:22 +0000
commitfe6d9b6962dededc14d161e522e5f44c1ca2cd60 (patch)
tree916afeb652e5ce1642770813c76fb105b4fbd3b4 /options/options.h
parent2c2a856f2512843d12931a1f6f5b15ea76db8502 (diff)
downloadmpv-fe6d9b6962dededc14d161e522e5f44c1ca2cd60.tar.bz2
mpv-fe6d9b6962dededc14d161e522e5f44c1ca2cd60.tar.xz
player: rearrange video sync opts/enums/defines
The video sync logic for mpv lies completely within its core at essentially the highest layer of abstraction. The problem with this is that it is impossible for VOs to know what video sync mode mpv is currently using since it has no access to the opts. Because different video sync modes completely changes how mpv's render loop operates, it's reasonable that a VO may want to change how it renders based on the current mode (see the next commit for an example). Let's just move the video sync option to mp_vo_opts. MPContext, of course, can still access the value of the option so it only requires minor changes in player/video.c. Additionally, move the VS_IS_DISP define from to player/core.h to common/common.h. All VOs already have access to common/common.h, and there's no need for them to gain access to everything that's in player/core.h.
Diffstat (limited to 'options/options.h')
-rw-r--r--options/options.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/options/options.h b/options/options.h
index fd04ebdfa0..b32dc06519 100644
--- a/options/options.h
+++ b/options/options.h
@@ -61,6 +61,7 @@ typedef struct mp_vo_opts {
double override_display_fps;
double timing_offset;
+ int video_sync;
// vo_drm
struct drm_opts *drm_opts;
@@ -215,7 +216,6 @@ typedef struct MPOpts {
int hls_bitrate;
int edition_id;
int initial_audio_sync;
- int video_sync;
double sync_max_video_change;
double sync_max_audio_change;
int sync_max_factor;