summaryrefslogtreecommitdiffstats
path: root/filters/filter.h
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-08-10 20:15:04 -0500
committerDudemanguy <random342@airmail.cc>2023-08-13 19:58:20 +0000
commita177fb6188e735da3536109105ec55a51b3b863c (patch)
tree3e0951b5e031056b16db31d942ee461d980293ea /filters/filter.h
parentc62b45ec2ab020dad04a95aff3c85aab631b1f32 (diff)
downloadmpv-a177fb6188e735da3536109105ec55a51b3b863c.tar.bz2
mpv-a177fb6188e735da3536109105ec55a51b3b863c.tar.xz
vf_vapoursynth: save display resolution as a variable
mpv has a generic method for getting the display resolution, so we can save it in vf_vapoursynth without too much trouble. Unfortunately, the resolution won't actually be available in many cases (like my own) because the windowing backend doesn't actually know it yet. It looks like at least windows always returns the default monitor (maybe we should do something similar for x11 and wayland), so there's at least some value. Of course, this still has a bunch of pitfalls like not being able to cope with multi monitor setups at all but so does display_fps. As an aside, the vapoursynth API this uses apparently requires R26 (an ancient version anyway), so bump the build to compensate for this. Fixes #11510
Diffstat (limited to 'filters/filter.h')
-rw-r--r--filters/filter.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/filters/filter.h b/filters/filter.h
index 35a4afac83..8820199a42 100644
--- a/filters/filter.h
+++ b/filters/filter.h
@@ -398,6 +398,7 @@ struct mp_stream_info {
void *priv; // for use by whoever implements the callbacks
double (*get_display_fps)(struct mp_stream_info *i);
+ void (*get_display_res)(struct mp_stream_info *i, int *res);
struct mp_hwdec_devices *hwdec_devs;
struct osd_state *osd;