[MPlayer-dev-eng] [PATCH] honour screenw/screenh with xinerama on

Attila Kinali attila at kinali.ch
Fri Jul 27 20:43:48 CEST 2007


On Wed, 25 Jul 2007 23:58:03 +0200
Olivier Jolly <olivier.jolly at pcedev.com> wrote:


>   When mplayer is compiled with xinerama support, the 
> update_xinerama_info function will override the vo_screenheight and 
> vo_screenwidth inconditionnaly.

Hmm.. yes, probably not a good idea.

>   When using the -screenw / -screenh to map a part of the screen to 
> TVout (using the nvtv tool for example), since 1.0pre8, the whole screen 
> was used for displaying instead of the portion of screen indicated on 
> command line.

I don't actually understand what you are trying to achieve.
Can you explain a little bit more?

And while you are at it, can you tell us why you didn't upgrade
since pre8? That version is older than big bang!


>   I'm proposing a patch which adds 2 booleans to keep track of whether 
> the vo_screenheight/width variables come from the command line or by the 
> default values. The update_xinerama_info is then only allowed to change 
> those values if they haven't been set on command line.

I don't like it. It feels hacky.
IMHO the right solution would be to set a flag at init time
whether -screenw or -screenh were used and that all occurences
of setting vo_screenwidht/height would check for these flags.

> Index: libvo/video_out.c
> ===================================================================
> --- libvo/video_out.c	(révision 23862)
> +++ libvo/video_out.c	(copie de travail)
> @@ -29,6 +29,8 @@
>  int vo_depthonscreen=0;
>  int vo_screenwidth=0;
>  int vo_screenheight=0;
> +int vo_screenwidth_overridable=0;
> +int vo_screenheight_overridable=0;
>  
>  int vo_config_count=0;
>  
> Index: libvo/video_out.h
> ===================================================================
> --- libvo/video_out.h	(révision 23862)
> +++ libvo/video_out.h	(copie de travail)
> @@ -198,6 +198,8 @@
>  extern int vo_depthonscreen;
>  extern int vo_screenwidth;
>  extern int vo_screenheight;
> +extern int vo_screenwidth_overridable;
> +extern int vo_screenheight_overridable;

Why the heck did you put variables that are only used in
x11_common.c into video_out.[ch] ?

			Attila Kinali

-- 
Praised are the Fountains of Shelieth, the silver harp of the waters,
But blest in my name forever this stream that stanched my thirst!
                         -- Deed of Morred



More information about the MPlayer-dev-eng mailing list