diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-10-17 09:49:25 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-10-17 09:49:25 +0000 |
commit | 7eadbc8831d075a383e82c0fda3ea68a3d219385 (patch) | |
tree | 0f1d7f126ba4960830d30f3e1afc149a95f43dd1 /libvo/vo_xvidix.c | |
parent | 60c8189dd92322e2426c19795e82724f0b996e2a (diff) | |
download | mpv-7eadbc8831d075a383e82c0fda3ea68a3d219385.tar.bz2 mpv-7eadbc8831d075a383e82c0fda3ea68a3d219385.tar.xz |
-fixed-vo support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7778 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_xvidix.c')
-rw-r--r-- | libvo/vo_xvidix.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c index 2611dce141..655feafb79 100644 --- a/libvo/vo_xvidix.c +++ b/libvo/vo_xvidix.c @@ -201,8 +201,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, XWindowAttributes attribs; int window_depth; -// if (title) -// free(title); title = "MPlayer VIDIX X11 Overlay"; panscan_init(); @@ -212,9 +210,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, 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 @@ else { #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 } 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); - - 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); + 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 ); + + 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 @@ static uint32_t preinit(const char *arg) vidix_name = NULL; } + if (!vo_init()) return(1); + if (vidix_preinit(vidix_name, &video_out_xvidix) != 0) return(1); |