mirror of https://github.com/mpv-player/mpv
video: remove -x/-y/-xy options
-x/-y were rather useless and obscure. The only use I can see is forcing a specific aspect ratio without having to calculate the aspect ratio float value (although --aspect takes values of the form w:h). This can be also done with --geometry and --no-keepaspect. There was also a comment that -x/-y is useful for -vm, although I don't see how this is useful as it still messes up aspect ratio. -xy is mostly obsolete. It does two things: a) set the window width to a pixel value, b) scale the window size by a factor. a) is already done by --autofit (--autofit=num does exactly the same thing as --xy=num, if num >= 8). b) is not all that useful, so we just drop that functionality.
This commit is contained in:
parent
7885fce7ea
commit
704c0cb2db
|
@ -118,6 +118,8 @@ Command line switches
|
|||
-vobsub --sub (pass the .idx file)
|
||||
-ass-bottom-margin --vf=sub=bottom:top
|
||||
-vc ffh264vdpau (etc.) --hwdec=vdpau
|
||||
-x, -y --geometry + --no-keepaspect
|
||||
-xy --autofit
|
||||
=================================== ===================================
|
||||
|
||||
input.conf and slave commands
|
||||
|
|
|
@ -2329,10 +2329,6 @@
|
|||
(X11 and win32 only)
|
||||
This tells mpv to attach to an existing window.See ``--slave-broken``.
|
||||
|
||||
--x=<width>
|
||||
Scale image to width <width> (if software/hardware scaling is available).
|
||||
Disables aspect calculations.
|
||||
|
||||
--screen=<all|current|0-32>
|
||||
In multi-monitor configurations (i.e. a single desktop that spans across
|
||||
multiple displays) this option tells mpv which screen to display the
|
||||
|
@ -2344,13 +2340,3 @@
|
|||
This option is not suitable to only set the startup screen (because it
|
||||
will always display on the given screen in fullscreen mode),
|
||||
``--geometry`` is the best that is available for that purpose currently.
|
||||
|
||||
--xy=<value>
|
||||
|
||||
:value<=8: Scale image by factor <value>.
|
||||
:value>8: Set width to value and calculate height to keep correct aspect
|
||||
ratio.
|
||||
|
||||
--y=<height>
|
||||
Scale image to height <height> (if software/hardware scaling is available).
|
||||
Disables aspect calculations.
|
||||
|
|
|
@ -483,7 +483,6 @@ const m_option_t common_opts[] = {
|
|||
{"ssf", (void *) scaler_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
||||
OPT_FLOATRANGE("aspect", movie_aspect, 0, 0.1, 10.0),
|
||||
OPT_FLAG_CONSTANTS("no-aspect", movie_aspect, 0, 0, 0),
|
||||
OPT_FLOATRANGE("xy", screen_size_xy, 0, 0.001, 4096),
|
||||
|
||||
OPT_FLAG_CONSTANTS("flip", flip, 0, 0, 1),
|
||||
|
||||
|
@ -579,9 +578,6 @@ const m_option_t mplayer_opts[]={
|
|||
|
||||
{"edlout", &edl_output_filename, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||
|
||||
// force window width/height or resolution (with -vm)
|
||||
OPT_INTRANGE("x", screen_size_x, 0, 0, 4096),
|
||||
OPT_INTRANGE("y", screen_size_y, 0, 0, 4096),
|
||||
// set screen dimensions (when not detectable or virtual!=visible)
|
||||
OPT_INTRANGE("screenw", vo_screenwidth, CONF_GLOBAL, 0, 4096),
|
||||
OPT_INTRANGE("screenh", vo_screenheight, CONF_GLOBAL, 0, 4096),
|
||||
|
|
|
@ -16,8 +16,6 @@ typedef struct MPOpts {
|
|||
float softvol_max;
|
||||
int gapless_audio;
|
||||
int ao_buffersize;
|
||||
int screen_size_x;
|
||||
int screen_size_y;
|
||||
int vo_screenwidth;
|
||||
int vo_screenheight;
|
||||
struct m_geometry vo_geometry;
|
||||
|
@ -110,7 +108,6 @@ typedef struct MPOpts {
|
|||
float drc_level;
|
||||
struct m_obj_settings *vf_settings;
|
||||
float movie_aspect;
|
||||
float screen_size_xy;
|
||||
int flip;
|
||||
int vd_use_dr1;
|
||||
char **sub_name;
|
||||
|
|
|
@ -394,41 +394,9 @@ static void determine_window_geometry(struct vo *vo, int d_w, int d_h)
|
|||
int scr_w = opts->vo_screenwidth;
|
||||
int scr_h = opts->vo_screenheight;
|
||||
|
||||
int vid_w = vo->aspdat.orgw;
|
||||
int vid_h = vo->aspdat.orgh;
|
||||
|
||||
if (opts->screen_size_x || opts->screen_size_y) {
|
||||
d_w = opts->screen_size_x;
|
||||
d_h = opts->screen_size_y;
|
||||
if (!opts->vidmode) {
|
||||
if (!d_w)
|
||||
d_w = 1;
|
||||
if (!d_h)
|
||||
d_h = 1;
|
||||
if (d_w <= 8)
|
||||
d_w *= vid_w;
|
||||
if (d_h <= 8)
|
||||
d_h *= vid_h;
|
||||
}
|
||||
}
|
||||
|
||||
// This is only for applying monitor pixel aspect
|
||||
// Store d_w/d_h, because aspect() uses it
|
||||
aspect_save_videores(vo, vid_w, vid_h, d_w, d_h);
|
||||
aspect(vo, &d_w, &d_h, A_NOZOOM);
|
||||
|
||||
if (opts->screen_size_xy >= 0.001) {
|
||||
if (opts->screen_size_xy <= 8) {
|
||||
// -xy means x+y scale
|
||||
d_w *= opts->screen_size_xy;
|
||||
d_h *= opts->screen_size_xy;
|
||||
} else {
|
||||
// -xy means forced width while keeping correct aspect
|
||||
d_h = opts->screen_size_xy * d_h / d_w;
|
||||
d_w = opts->screen_size_xy;
|
||||
}
|
||||
}
|
||||
|
||||
apply_autofit(&d_w, &d_h, scr_w, scr_h, &opts->vo_autofit, true);
|
||||
apply_autofit(&d_w, &d_h, scr_w, scr_h, &opts->vo_autofit_larger, false);
|
||||
|
||||
|
|
Loading…
Reference in New Issue