summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-08-25 19:29:33 +0200
committerDudemanguy <random342@airmail.cc>2023-08-31 17:37:42 +0000
commitc9c9822289cd7369f3804728b4e973034518ce0f (patch)
tree7cc9a2832246862a67f53c52a7c407f64e90c414 /player
parent817845645f9440978866f77f306292a6d865d64f (diff)
downloadmpv-c9c9822289cd7369f3804728b4e973034518ce0f.tar.bz2
mpv-c9c9822289cd7369f3804728b4e973034518ce0f.tar.xz
player/command: add video-params/crop-[w,h,x,y]
Diffstat (limited to 'player')
-rw-r--r--player/command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 55b0dd9449..c0efeb767c 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2291,6 +2291,10 @@ static int property_imgparams(struct mp_image_params p, int action, void *arg)
{"h", SUB_PROP_INT(p.h)},
{"dw", SUB_PROP_INT(d_w)},
{"dh", SUB_PROP_INT(d_h)},
+ {"crop-x", SUB_PROP_INT(p.crop.x0)},
+ {"crop-y", SUB_PROP_INT(p.crop.y0)},
+ {"crop-w", SUB_PROP_INT(mp_rect_w(p.crop))},
+ {"crop-h", SUB_PROP_INT(mp_rect_h(p.crop))},
{"aspect", SUB_PROP_FLOAT(d_w / (double)d_h)},
{"aspect-name", SUB_PROP_STR(aspect_name), .unavailable = !aspect_name},
{"par", SUB_PROP_FLOAT(p.p_w / (double)p.p_h)},