Mercurial > mplayer.hg
changeset 16607:971ff1108066
Add -panscanrange option
author | reimar |
---|---|
date | Tue, 27 Sep 2005 08:32:37 +0000 |
parents | 7a06ad5c5b2c |
children | efec5fb96a13 |
files | DOCS/man/en/mplayer.1 cfg-mplayer.h libvo/aspect.c |
diffstat | 3 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1 Mon Sep 26 22:14:54 2005 +0000 +++ b/DOCS/man/en/mplayer.1 Tue Sep 27 08:32:37 2005 +0000 @@ -2278,6 +2278,15 @@ video output drivers. . .TP +.B \-panscanrange <-19.0\-99.0> (experimental) +Change the range of the pan-and-scan functionality (default: 1). +Positive values mean multiples of the default range. +Negative numbers mean you can zoom in up to a factor of -panscanrange+1. +E.g. \-panscanrange -3 allows a zoom factor of up to 4. +This feature is experimental. +Do not report bugs unless you are using -vo gl. +. +.TP .B \-refreshrate <Hz> Set the monitor refreshrate in Hz. Currently only supported by \-vo directx combined with the \-vm option.
--- a/cfg-mplayer.h Mon Sep 26 22:14:54 2005 +0000 +++ b/cfg-mplayer.h Tue Sep 27 08:32:37 2005 +0000 @@ -37,6 +37,7 @@ extern int vo_dbpp; extern int vo_directrendering; extern float vo_panscan; +extern float vo_panscanrange; /* only used at startup (setting these values from configfile) */ extern int vo_gamma_brightness; extern int vo_gamma_saturation; @@ -239,6 +240,7 @@ {"vsync", &vo_vsync, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"novsync", &vo_vsync, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"panscan", &vo_panscan, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 1.0, NULL}, + {"panscanrange", &vo_panscanrange, CONF_TYPE_FLOAT, CONF_RANGE, -19.0, 99.0, NULL}, {"grabpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"nograbpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 1, 0, NULL},
--- a/libvo/aspect.c Mon Sep 26 22:14:54 2005 +0000 +++ b/libvo/aspect.c Tue Sep 27 08:32:37 2005 +0000 @@ -14,6 +14,7 @@ int vo_panscan_x = 0; int vo_panscan_y = 0; float vo_panscan_amount = 0; +float vo_panscanrange = 1.0; #include "video_out.h" @@ -123,8 +124,12 @@ int fwidth,fheight; int vo_panscan_area; + if (vo_panscanrange > 0) { aspect(&fwidth,&fheight,A_ZOOM); vo_panscan_area = (aspdat.scrh-fheight); + vo_panscan_area *= vo_panscanrange; + } else + vo_panscan_area = -vo_panscanrange * aspdat.scrh; vo_panscan_amount = vo_fs ? vo_panscan : 0; vo_panscan_x = vo_panscan_area * vo_panscan_amount * aspdat.asp;