Mercurial > mplayer.hg
diff libvo/vo_xvidix.c @ 7777:ed7b05575aab
-fixed-vo support
author | pontscho |
---|---|
date | Thu, 17 Oct 2002 09:49:25 +0000 |
parents | eca7dbad0166 |
children | 48c71b6c7389 |
line wrap: on
line diff
--- a/libvo/vo_xvidix.c Thu Oct 17 00:54:13 2002 +0000 +++ b/libvo/vo_xvidix.c Thu Oct 17 09:49:25 2002 +0000 @@ -201,8 +201,6 @@ XWindowAttributes attribs; int window_depth; -// if (title) -// free(title); title = "MPlayer VIDIX X11 Overlay"; panscan_init(); @@ -212,9 +210,6 @@ image_format = format; vo_mouse_autohide=1; - if (!vo_init()) - return(-1); - aspect_save_orig(width, height); aspect_save_prescale(d_width, d_height); aspect_save_screenres(vo_screenwidth, vo_screenheight); @@ -258,9 +253,6 @@ { #endif - /* destroy window before creating one */ - if (vo_window) XDestroyWindow(mDisplay, vo_window); - #ifdef X11_FULLSCREEN if ( ( flags&1 )||(flags & 0x04) ) aspect(&d_width, &d_height, A_ZOOM); #endif @@ -296,24 +288,28 @@ } else { - vo_window = XCreateWindow(mDisplay, RootWindow(mDisplay, mScreen), - vo_dx, vo_dy, window_width, window_height, xswa.border_pixel, - vinfo.depth, InputOutput, vinfo.visual, xswamask, &xswa); + if ( vo_window == None ) + { + vo_window = XCreateWindow(mDisplay, RootWindow(mDisplay, mScreen), + vo_dx, vo_dy, window_width, window_height, xswa.border_pixel, + vinfo.depth, InputOutput, vinfo.visual, xswamask, &xswa); - vo_x11_classhint(mDisplay, vo_window, "xvidix"); - vo_hidecursor(mDisplay, vo_window); - vo_x11_sizehint( vo_dx,vo_dy,vo_dwidth,vo_dheight,0 ); + vo_x11_classhint(mDisplay, vo_window, "xvidix"); + vo_hidecursor(mDisplay, vo_window); + vo_x11_sizehint( vo_dx,vo_dy,vo_dwidth,vo_dheight,0 ); - XStoreName(mDisplay, vo_window, title); - XMapWindow(mDisplay, vo_window); + XStoreName(mDisplay, vo_window, title); + XMapWindow(mDisplay, vo_window); - if ( flags&1 ) vo_x11_fullscreen(); + if ( flags&1 ) vo_x11_fullscreen(); #ifdef HAVE_XINERAMA - vo_x11_xinerama_move(mDisplay, vo_window); + vo_x11_xinerama_move(mDisplay, vo_window); #endif - + } else if ( !(flags&1) ) XMoveResizeWindow( mDisplay,vo_window,vo_dx,vo_dy,vo_dwidth,vo_dheight ); } + + if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc ); vo_gc = XCreateGC(mDisplay, vo_window, GCForeground, &mGCV); #ifdef HAVE_NEW_GUI } @@ -420,6 +416,8 @@ vidix_name = NULL; } + if (!vo_init()) return(1); + if (vidix_preinit(vidix_name, &video_out_xvidix) != 0) return(1);