summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-01-23 10:56:47 +0100
committerwm4 <wm4@nowhere>2013-01-23 10:56:47 +0100
commit704c0cb2db7d20adc5b744b9714fed60642d8e5c (patch)
treefcc52a59c605333eb759a1e53f1274161c282a70
parent7885fce7ea68d4c64e034b152f2a0b08bb648adc (diff)
downloadmpv-704c0cb2db7d20adc5b744b9714fed60642d8e5c.tar.bz2
mpv-704c0cb2db7d20adc5b744b9714fed60642d8e5c.tar.xz
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.
-rw-r--r--DOCS/man/en/changes.rst2
-rw-r--r--DOCS/man/en/options.rst14
-rw-r--r--core/cfg-mplayer.h4
-rw-r--r--core/options.h3
-rw-r--r--video/out/vo.c32
5 files changed, 2 insertions, 53 deletions
diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst
index 2b821d68bd..6f85c5ab38 100644
--- a/DOCS/man/en/changes.rst
+++ b/DOCS/man/en/changes.rst
@@ -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
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index a0995db964..d4368baf7b 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -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.
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h
index 54fa3f3ab5..fed5d999e2 100644
--- a/core/cfg-mplayer.h
+++ b/core/cfg-mplayer.h
@@ -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),
diff --git a/core/options.h b/core/options.h
index 3cd0132847..d1c58fdda9 100644
--- a/core/options.h
+++ b/core/options.h
@@ -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;
diff --git a/video/out/vo.c b/video/out/vo.c
index 484aa20a56..f6151cfa27 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -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);