[MPlayer-dev-eng] [PATCH] automatically set monitor_aspect for x11 based vo's

Rich Felker dalias at aerifal.cx
Tue Feb 14 01:29:28 CET 2006


On Mon, Feb 13, 2006 at 11:04:34PM +0200, Ivan Kalvachev wrote:
> 2006/2/13, René Rebe <rene at exactcode.de>:
> > Hi all,
> >
> > Set the monitor aspect automatically for X displays as done by other drivers,
> > e.g. the OS X one. Formerly 4:3 was always assumted leading to obviously
> > false apsect on recent 16:9 / 16:10 desktop and laptop displays.
> >
> >   - Rene Rebe <rene at exactcode.de>
> >
> > --- MPlayer-1.0pre7try2/libvo/x11_common.c      2005-04-16 17:52:03.000000000 +0200
> > +++ MPlayer-1.0pre7try2-fixed/libvo/x11_common.c        2006-02-12 19:04:15.070424750 +0100
> > @@ -87,6 +87,8 @@
> >  static int vo_fs_flip = 0;
> >  char **vo_fstype_list;
> >
> > +extern float monitor_aspect;
> > +
> >  /* if equal to 1 means that WM is a metacity (broken as hell) */
> >  int metacity_hack = 0;
> >
> > @@ -510,6 +512,14 @@
> >             vo_screenwidth, vo_screenheight, depth, vo_depthonscreen,
> >             dispName, mLocalDisplay ? "local" : "remote");
> >
> > +    {
> > +        int w, h;
> > +        w = XDisplayWidthMM (mDisplay, mScreen);
> > +        h = XDisplayHeightMM (mDisplay, mScreen);
> > +        if (w && h)
> > +            monitor_aspect = (float) w / h;
> > +    }
> > +
> >      vo_wm_type = vo_wm_detect();
> >
> >      vo_fs_type = vo_x11_get_fs_type(vo_wm_type);
> 
> I think there was an older and much more mature patch for the same
> purpose. It handled override from the user (aka monitor-aspect
> option), and even rotation of the display...
> 
> Probably we have to rush beastd to approove it.

Yes, it's not acceptable if it overrides the user's choice. Consider
for example playing a movie on TV-out to a 16:9 TV over a 4:3 signal.
The user always needs to have the last word on monitor aspect.

Rich




More information about the MPlayer-dev-eng mailing list