summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-08-25 19:21:21 +0200
committerDudemanguy <random342@airmail.cc>2023-08-31 17:37:42 +0000
commitf3f1a79fe3ad9bdae344559ec5802c184af41112 (patch)
tree8ad67cec885e18f6d0618dc9b220288574e1e98f /options
parentf3211db7911c89883dc392ddeef8ffe53aeb49b0 (diff)
downloadmpv-f3f1a79fe3ad9bdae344559ec5802c184af41112.tar.bz2
mpv-f3f1a79fe3ad9bdae344559ec5802c184af41112.tar.xz
vo: add --video-crop
Just cropping by VO that works with hwdec. Fixes: #12222
Diffstat (limited to 'options')
-rw-r--r--options/options.c1
-rw-r--r--options/options.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c
index fd242f538b..4b8eb6dc3d 100644
--- a/options/options.c
+++ b/options/options.c
@@ -150,6 +150,7 @@ static const m_option_t mp_vo_opt_list[] = {
{"video-margin-ratio-right", OPT_FLOAT(margin_x[1]), M_RANGE(0.0, 1.0)},
{"video-margin-ratio-top", OPT_FLOAT(margin_y[0]), M_RANGE(0.0, 1.0)},
{"video-margin-ratio-bottom", OPT_FLOAT(margin_y[1]), M_RANGE(0.0, 1.0)},
+ {"video-crop", OPT_RECT(video_crop), .flags = UPDATE_IMGPAR},
{"video-unscaled", OPT_CHOICE(unscaled,
{"no", 0}, {"yes", 1}, {"downscale-big", 2})},
{"wid", OPT_INT64(WinID)},
diff --git a/options/options.h b/options/options.h
index 5e46a99b0b..3250729b48 100644
--- a/options/options.h
+++ b/options/options.h
@@ -73,6 +73,8 @@ typedef struct mp_vo_opts {
struct m_geometry android_surface_size;
int swapchain_depth; // max number of images to render ahead
+
+ struct m_geometry video_crop;
} mp_vo_opts;
// Subtitle options needed by the subtitle decoders/renderers.