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

Olivier Jolly olivier.jolly at pcedev.com
Sat Aug 4 17:45:58 CEST 2007


Dear Attila,
  thanks for your feedback

Attila Kinali a écrit :
>>   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?
>   
Concretely, I was using screenw and screenh to force mplayer into 
thinking the screen was only 800x600 instead of 2400x960, so that, when 
going to fullscreen, the whole move was shown in the upper left 800x600 
window. This part of the screen is what I have cloned on my tv with the 
proprietary nvidia driver.
> And while you are at it, can you tell us why you didn't upgrade
> since pre8? That version is older than big bang!
>   
With OSS, I had the freedom to use outdated software :) More seriously, 
I didn't upgrade precisely because of this "bug". I was testing versions 
regularly expecting the old behaviour to come back, but when I had time 
a few weeks ago I had a deeper look at it.
>>   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.
>   
ok, I'm proposing a different patch, which also solve my problem.
I'm keeping the command line screenw and screenh content (with a default 
of 0 which means that nothing was set on command line) inside 
vo_user_screenwidth and vo_user_screenheight (it might not be the best 
naming choice but my english is going weaker and weaker). I then use 
those command line based variables to override the setting of 
vo_screenwidth and vo_screenheight in update_xinerama_info in 
x11_common.c, w32_update_xinerama_info in w32_common.c and control in 
vo_directx.c . On another hand, there are a couple of config function 
which would override the vo_screenwidth and vo_screenheight whether it 
has been previsouly set or not, I changed this to check 
vo_screenheight/vo_screenwidth to be zero before setting them (in 
vo_winvidix.c and vo_ggi.c).
The vo_init and vo_w32_init were changed to store the command line 
values into the vo_user_screenwidth and vo_user_screenheight. Are there 
other places which could also be changed to get the command line flags ?
> Why the heck did you put variables that are only used in
> x11_common.c into video_out.[ch] ?
>   
by similarity with the vo_screenheight and vo_screenwidth location, now 
that this patch is also w32 aware, it makes more sense I guess.

Please have a look at the updated attached patch.
  Thanks in advance
  Best regards all
> 			Attila Kinali
>   
+Olivier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenwh_command_line.patch
Type: text/x-patch
Size: 4515 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070804/27da186b/attachment.bin>


More information about the MPlayer-dev-eng mailing list