From 5f49009849271ecd995f9f41e4eb2a36a0fc024a Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 3 Jun 2020 17:26:08 +0200 Subject: options: add --video-scale-x/y Requested. Fixes: #6303 --- options/options.c | 4 ++++ options/options.h | 1 + 2 files changed, 5 insertions(+) (limited to 'options') diff --git a/options/options.c b/options/options.c index 22ae8e77e5..4467c106ba 100644 --- a/options/options.c +++ b/options/options.c @@ -136,6 +136,8 @@ static const m_option_t mp_vo_opt_list[] = { {"video-pan-y", OPT_FLOAT(pan_y), M_RANGE(-3.0, 3.0)}, {"video-align-x", OPT_FLOAT(align_x), M_RANGE(-1.0, 1.0)}, {"video-align-y", OPT_FLOAT(align_y), M_RANGE(-1.0, 1.0)}, + {"video-scale-x", OPT_FLOAT(scale_x), M_RANGE(0, 10000.0)}, + {"video-scale-y", OPT_FLOAT(scale_y), M_RANGE(0, 10000.0)}, {"video-margin-ratio-left", OPT_FLOAT(margin_x[0]), M_RANGE(0.0, 1.0)}, {"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)}, @@ -177,6 +179,8 @@ const struct m_sub_options vo_sub_opts = { .screen_id = -1, .fsscreen_id = -1, .panscan = 0.0f, + .scale_x = 1.0f, + .scale_y = 1.0f, .keepaspect = 1, .keepaspect_window = 1, .hidpi_window_scale = 1, diff --git a/options/options.h b/options/options.h index 92e0d7c129..45d0747358 100644 --- a/options/options.h +++ b/options/options.h @@ -31,6 +31,7 @@ typedef struct mp_vo_opts { float zoom; float pan_x, pan_y; float align_x, align_y; + float scale_x, scale_y; float margin_x[2]; float margin_y[2]; int unscaled; -- cgit v1.2.3