mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 11:18:32 +00:00
new monitorpixelaspect option, esp. useful for xinerama setups with upcoming patch
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18106 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a3713ceb29
commit
02c0f0258f
@ -2505,6 +2505,13 @@ Set the aspect ratio of your monitor or TV screen.
|
||||
.PD 1
|
||||
.
|
||||
.TP
|
||||
.B \-monitorpixelaspect <ratio> (also see \-aspect)
|
||||
Set the aspect of a single pixel of your monitor or TV screen (default: disabled).
|
||||
Overrides the \-monitoraspect setting.
|
||||
A value of 0 disables, a value of 1 means square pixels
|
||||
(correct for (almost?) all LCDs).
|
||||
.
|
||||
.TP
|
||||
.B \-nodouble
|
||||
Disables double buffering, mostly for debugging purposes.
|
||||
Double buffering fixes flicker by storing two frames in memory, and
|
||||
|
@ -109,6 +109,7 @@ extern int nortc;
|
||||
|
||||
/* from libvo/aspect.c */
|
||||
extern float monitor_aspect;
|
||||
extern float monitor_pixel_aspect;
|
||||
|
||||
extern int sws_flags;
|
||||
extern int readPPOpt(void *conf, char *arg);
|
||||
@ -224,6 +225,7 @@ m_option_t mplayer_opts[]={
|
||||
{"geometry", &vo_geometry, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||
// set aspect ratio of monitor - useful for 16:9 TVout
|
||||
{"monitoraspect", &monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 9.0, NULL},
|
||||
{"monitorpixelaspect", &monitor_pixel_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 9.0, NULL},
|
||||
// video mode switching: (x11,xv,dga)
|
||||
{"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||
{"novm", &vidmode, CONF_TYPE_FLAG, 0, 1, 0, NULL},
|
||||
|
@ -19,6 +19,7 @@ float vo_panscanrange = 1.0;
|
||||
#include "video_out.h"
|
||||
|
||||
float monitor_aspect=4.0/3.0;
|
||||
float monitor_pixel_aspect=0;
|
||||
extern float movie_aspect;
|
||||
|
||||
static struct {
|
||||
@ -53,6 +54,8 @@ void aspect_save_screenres(int scrw, int scrh){
|
||||
#endif
|
||||
aspdat.scrw = scrw;
|
||||
aspdat.scrh = scrh;
|
||||
if (monitor_pixel_aspect)
|
||||
monitor_aspect = monitor_pixel_aspect * scrw / scrh;
|
||||
}
|
||||
|
||||
/* aspect is called with the source resolution and the
|
||||
|
Loading…
Reference in New Issue
Block a user