diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-09-27 08:32:37 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-09-27 08:32:37 +0000 |
commit | 4c90ccf9dea0cf191696883da0c41265a5baa196 (patch) | |
tree | fd5f05541cd0adc9dd5fd2159fb57734617d907e | |
parent | 6fa96730dcf3370d2d4259ad8063b72dea9c17c8 (diff) |
Add -panscanrange option
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16608 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | DOCS/man/en/mplayer.1 | 9 | ||||
-rw-r--r-- | cfg-mplayer.h | 2 | ||||
-rw-r--r-- | libvo/aspect.c | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 37b5d1daf4..73e044e4d9 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -2278,6 +2278,15 @@ Only works with the xv, xmga, mga, gl, gl2, quartz, macosx and xvidix 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. diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 7e67af6b44..960763f370 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -37,6 +37,7 @@ extern int vo_fsmode; 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 @@ m_option_t mplayer_opts[]={ {"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}, diff --git a/libvo/aspect.c b/libvo/aspect.c index 6ad368a932..05c729baf3 100644 --- a/libvo/aspect.c +++ b/libvo/aspect.c @@ -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 @@ void panscan_calc( void ) 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; |