[Mplayer-cvslog] CVS: main/libvo vo_xv.c,1.127,1.128 x11_common.c,1.124,1.125
Attila Kinali CVS
attila at mplayerhq.hu
Wed Jan 1 13:02:52 CET 2003
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv10686/libvo
Modified Files:
vo_xv.c x11_common.c
Log Message:
X11 window aspect patch by Arnaud Boulan <boulan at iie.cnam.fr>
adds 2 options: -keepaspect (default) and -nokeepaspect
tested with icewm and enlightenment
Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -r1.127 -r1.128
--- vo_xv.c 11 Nov 2002 15:20:26 -0000 1.127
+++ vo_xv.c 1 Jan 2003 12:02:49 -0000 1.128
@@ -387,6 +387,8 @@
} else
if ( !(flags&1) ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height );
+ vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 );
+
if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc );
vo_gc = XCreateGC(mDisplay, vo_window, 0L, &xgcv);
XFlush(mDisplay);
Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -r1.124 -r1.125
--- x11_common.c 31 Dec 2002 12:42:14 -0000 1.124
+++ x11_common.c 1 Jan 2003 12:02:49 -0000 1.125
@@ -80,6 +80,7 @@
static int vo_old_width = 0;
static int vo_old_height = 0;
+int vo_x11_keepaspect = 1;
#ifdef HAVE_XINERAMA
int xinerama_screen = 0;
@@ -656,6 +657,15 @@
void vo_x11_sizehint( int x, int y, int width, int height, int max )
{
vo_hint.flags=PPosition | PSize | PWinGravity;
+ if(vo_x11_keepaspect)
+ {
+ vo_hint.flags |= PAspect;
+ vo_hint.min_aspect.x = width;
+ vo_hint.min_aspect.y = height;
+ vo_hint.max_aspect.x = width;
+ vo_hint.max_aspect.y = height;
+ }
+
vo_hint.x=x; vo_hint.y=y; vo_hint.width=width; vo_hint.height=height;
if ( max )
{
More information about the MPlayer-cvslog
mailing list