[MPlayer-dev-eng] [PATCH] black bars to preserve aspect in vo_xv

Bobby Bingham uhmmmm at ameritech.net
Sun Jan 19 05:37:39 CET 2003


i know that mplayer already uses window hints to keep the appropriate 
aspect ratio when resizing, but many (most ?) window managers don't 
support the PAspect hint.

this patch adds support preserves the aspect ratio for vo_xv when not 
fullscreen, even if window manager doesn't enforce the aspect hint.

there are only two quirks i've noticed with it.
1:
the initial window size seems to be a little too wide, so there are 
black bars added to the side when you start playing the file.  i don't 
know if this is a bug in my code, or if the existing code already 
created the window too wide?

2:
when you switch to fullscreen and back, it doesn't reset the window to 
the same size as before going to fullscreen.  this is because it 
changes vo_d{width,height} to the size used to display the movie (as 
was done in fullscreen mode already). so x11_common.c saves the size 
the movie is shown at as the old window size.

#2 could be fixed by adding a couple for variables, and adjusting the 
actual drawing code to use these for the video size, or by adding call 
to XGetGeometry in x11_common.c before saving the old dimensions.  i 
think the second is better, but want to know what you think.

-- 
Bobby Bingham
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-xv-aspect.diff
Type: text/x-diff
Size: 1761 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030118/7f1ef4b9/attachment.diff>


More information about the MPlayer-dev-eng mailing list