mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
Add -panscanrange option
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16608 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6fa96730dc
commit
4c90ccf9de
@ -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.
|
||||
|
@ -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},
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user