vo: add --video-crop

Just cropping by VO that works with hwdec.

Fixes: #12222
This commit is contained in:
Kacper Michajłow
2023-08-25 19:21:21 +02:00
committed by Dudemanguy
parent f3211db791
commit f3f1a79fe3
9 changed files with 89 additions and 5 deletions

View File

@@ -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)},

View File

@@ -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.