[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[456] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-11-26 09:04:07
|
Revision: 456 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=456&view=rev Author: nickols_k Date: 2012-11-26 09:03:57 +0000 (Mon, 26 Nov 2012) Log Message: ----------- simplify logic Modified Paths: -------------- mplayerxp/libvo/video_out.cpp mplayerxp/libvo/video_out.h mplayerxp/libvo/video_out_internal.h mplayerxp/libvo/vo_fbdev.cpp mplayerxp/libvo/vo_null.cpp mplayerxp/libvo/vo_opengl.cpp mplayerxp/libvo/vo_sdl.cpp mplayerxp/libvo/vo_vesa.cpp mplayerxp/libvo/vo_x11.cpp mplayerxp/libvo/vo_xv.cpp mplayerxp/libvo/x11_system.cpp mplayerxp/libvo/x11_system.h mplayerxp/osdep/vbelib.cpp mplayerxp/osdep/vbelib.h Modified: mplayerxp/libvo/video_out.cpp =================================================================== --- mplayerxp/libvo/video_out.cpp 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/video_out.cpp 2012-11-26 09:03:57 UTC (rev 456) @@ -396,7 +396,7 @@ static int vo_inited=0; MPXP_Rc __FASTCALL__ vo_config(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, - uint32_t d_height, uint32_t fullscreen, char *title, + uint32_t d_height, uint32_t fullscreen, const char *title, uint32_t format) { vo_priv_t& priv=*static_cast<vo_priv_t*>(vo->vo_priv); @@ -408,6 +408,7 @@ return MPXP_False; } vo_inited++; + vo->flags=fullscreen; dest_fourcc = format; priv.org_width = width; priv.org_height = height; @@ -421,7 +422,7 @@ priv.dri.d_height = d_h; MSG_V("priv.video_out->config(%u,%u,%u,%u,0x%x,'%s',%s)\n" ,w,h,d_w,d_h,fullscreen,title,vo_format_name(dest_fourcc)); - retval = priv.video_out->config_vo(vo,w,h,d_w,d_h,fullscreen,title,dest_fourcc); + retval = priv.video_out->config_vo(vo,w,h,d_w,d_h,title,dest_fourcc); priv.srcFourcc=format; if(retval == MPXP_Ok) { int dri_retv; Modified: mplayerxp/libvo/video_out.h =================================================================== --- mplayerxp/libvo/video_out.h 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/video_out.h 2012-11-26 09:03:57 UTC (rev 456) @@ -172,9 +172,6 @@ int flags; -// requested resolution/bpp: (-x -y -bpp options) - vo_rect_t dest; - video_private* vo_priv;/* private data of vo structure */ video_private* priv; /* private data of video driver */ video_private* priv3; /* private data of vidix commons */ @@ -224,9 +221,9 @@ * @param format fourcc of source image * @return zero on successful initialization, non-zero on error. **/ - MPXP_Rc (* __FASTCALL__ config_vo)(vo_data_t* vo,uint32_t width, uint32_t height, uint32_t d_width, - uint32_t d_height, uint32_t fullscreen, char *title, - uint32_t format); + MPXP_Rc (* __FASTCALL__ config_vo)(vo_data_t* vo, + uint32_t width, uint32_t height, uint32_t d_width, + uint32_t d_height,const char *title, uint32_t format); /** Control interface * @param request command. See VOCTRL_** for detail @@ -261,7 +258,7 @@ extern const vo_info_t* vo_get_info(vo_data_t* vo); extern MPXP_Rc __FASTCALL__ vo_init(vo_data_t* vo,const char *subdevice_name); extern MPXP_Rc __FASTCALL__ vo_config(vo_data_t* vo,uint32_t width, uint32_t height, uint32_t d_width, - uint32_t d_height, uint32_t fullscreen, char *title, + uint32_t d_height, uint32_t fullscreen,const char *title, uint32_t format); extern uint32_t __FASTCALL__ vo_query_format(vo_data_t* vo,uint32_t* fourcc,unsigned src_w,unsigned src_h); extern MPXP_Rc vo_reset(vo_data_t* vo); Modified: mplayerxp/libvo/video_out_internal.h =================================================================== --- mplayerxp/libvo/video_out_internal.h 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/video_out_internal.h 2012-11-26 09:03:57 UTC (rev 456) @@ -24,7 +24,7 @@ #define __VIDEO_OUT_INTERNAL_H 1 static MPXP_Rc __FASTCALL__ control_vo(vo_data_t*vo,uint32_t request, any_t*data); static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, - uint32_t d_height, uint32_t fullscreen, char *title, + uint32_t d_height, const char *title, uint32_t format); static const vo_info_t* __FASTCALL__ get_info(const vo_data_t*vo); static void __FASTCALL__ select_frame(vo_data_t*vo,unsigned idx); Modified: mplayerxp/libvo/vo_fbdev.cpp =================================================================== --- mplayerxp/libvo/vo_fbdev.cpp 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/vo_fbdev.cpp 2012-11-26 09:03:57 UTC (rev 456) @@ -841,7 +841,7 @@ } static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, - uint32_t d_height, uint32_t fullscreen, char *title, + uint32_t d_height, const char *title, uint32_t format) { fbdev_priv_t& priv = *static_cast<fbdev_priv_t*>(vo->priv); @@ -849,7 +849,6 @@ unsigned x_offset,y_offset,i; UNUSED(title); - UNUSED(fullscreen); priv.srcFourcc = format; if((int)priv.pre_init_err == MPXP_Error) { MSG_ERR(FBDEV "Internal fatal error: init() was called before preinit()\n"); Modified: mplayerxp/libvo/vo_null.cpp =================================================================== --- mplayerxp/libvo/vo_null.cpp 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/vo_null.cpp 2012-11-26 09:03:57 UTC (rev 456) @@ -64,7 +64,7 @@ UNUSED(idx); } -static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format) +static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height,const char *title, uint32_t format) { null_priv_t&priv=*static_cast<null_priv_t*>(vo->priv); unsigned awidth; @@ -75,7 +75,6 @@ priv.fourcc=format; UNUSED(d_width); UNUSED(d_height); - UNUSED(fullscreen); UNUSED(title); priv.pitch_y=priv.pitch_u=priv.pitch_v=1; priv.offset_y=priv.offset_u=priv.offset_v=0; Modified: mplayerxp/libvo/vo_opengl.cpp =================================================================== --- mplayerxp/libvo/vo_opengl.cpp 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/vo_opengl.cpp 2012-11-26 09:03:57 UTC (rev 456) @@ -139,7 +139,7 @@ /* connect to server, create and map window, * allocate colors and (shared) memory */ -static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) +static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, const char *title, uint32_t format) { ogl_priv_t& priv = *static_cast<ogl_priv_t*>(vo->priv); GLX_System& glx = *priv.glx; @@ -154,13 +154,11 @@ priv.image_width = width; priv.image_format=format; - if ( vo_FS(vo) ) { vo->dest.w=d_width; vo->dest.h=d_height; } - priv.num_buffers=vo_conf.xp_buffs; aspect_save_screenres(vo_conf.screenwidth,vo_conf.screenheight); aspect(&d_width,&d_height,vo_ZOOM(vo)?A_ZOOM:A_NOZOOM); - glx.calcpos(vo,&hint,d_width,d_height,flags); + glx.calcpos(&hint,d_width,d_height,vo->flags); hint.flags = PPosition | PSize; priv.dwidth=d_width; priv.dheight=d_height; //XXX: what are the copy vars used for? @@ -215,8 +213,10 @@ { ogl_priv_t& priv = *static_cast<ogl_priv_t*>(vo->priv); GLX_System& glx = *priv.glx; - int e=glx.check_events(vo,adjust_size); - if(e&VO_EVENT_RESIZE) resize(vo,vo->dest.w,vo->dest.h); + int e=glx.check_events(adjust_size,vo); + vo_rect_t r; + glx.get_win_coord(&r); + if(e&VO_EVENT_RESIZE) resize(vo,r.w,r.h); return e|VO_EVENT_FORCE_UPDATE; } @@ -312,12 +312,15 @@ static MPXP_Rc control_vo(vo_data_t*vo,uint32_t request, any_t*data) { ogl_priv_t& priv = *static_cast<ogl_priv_t*>(vo->priv); + GLX_System& glx = *priv.glx; switch (request) { case VOCTRL_QUERY_FORMAT: return query_format((vo_query_fourcc_t*)data); case VOCTRL_FULLSCREEN: vo_fullscreen(vo); - resize(vo,vo->dest.w, vo->dest.h); + vo_rect_t r; + glx.get_win_coord(&r); + resize(vo,r.w,r.h); return MPXP_True; case VOCTRL_GET_NUM_FRAMES: *(uint32_t *)data = priv.num_buffers; Modified: mplayerxp/libvo/vo_sdl.cpp =================================================================== --- mplayerxp/libvo/vo_sdl.cpp 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/vo_sdl.cpp 2012-11-26 09:03:57 UTC (rev 456) @@ -536,7 +536,7 @@ * returns : non-zero on success, zero on error. **/ -static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) +static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, const char *title, uint32_t format) //static int sdl_setup (int width, int height) { sdl_priv_t& priv = *static_cast<sdl_priv_t*>(vo->priv); @@ -647,7 +647,7 @@ } if(priv.X) { aspect_save_screenres(priv.XWidth,priv.XHeight); - aspect(&priv.dstwidth,&priv.dstheight,flags&VOFLAG_SWSCALE?A_ZOOM:A_NOZOOM); + aspect(&priv.dstwidth,&priv.dstheight,vo->flags&VOFLAG_SWSCALE?A_ZOOM:A_NOZOOM); } priv.windowsize.w = priv.dstwidth; priv.windowsize.h = priv.dstheight; @@ -657,21 +657,21 @@ * bit 2 (0x04) enables software scaling (-zoom) * bit 3 (0x08) enables flipping (-flip) */ - if(flags&FLIP) { + if(vo->flags&FLIP) { MSG_V("SDL: using flipped video (only with RGB/BGR/packed YUV)\n"); priv.flip = 1; } - if(flags&FS) { + if(vo->flags&FS) { MSG_V("SDL: setting zoomed fullscreen without modeswitching\n"); MSG_V("SDL: Info - please use -vm or -zoom to switch to best resolution.\n"); priv.fulltype = FS; retval = set_fullmode(vo,priv.fullmode); if(retval!=MPXP_Ok) return retval; - } else if(flags&VM) { + } else if(vo->flags&VM) { MSG_V("SDL: setting zoomed fullscreen with modeswitching\n"); priv.fulltype = VM; set_fullmode(vo,priv.fullmode); - } else if(flags&ZOOM) { + } else if(vo->flags&ZOOM) { MSG_V("SDL: setting zoomed fullscreen with modeswitching\n"); priv.fulltype = ZOOM; retval = set_fullmode(vo,priv.fullmode); Modified: mplayerxp/libvo/vo_vesa.cpp =================================================================== --- mplayerxp/libvo/vo_vesa.cpp 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/vo_vesa.cpp 2012-11-26 09:03:57 UTC (rev 456) @@ -406,7 +406,7 @@ * bit 2 (0x04) enables software scaling (-zoom) * bit 3 (0x08) enables flipping (-flip) (NK: and for what?) */ -static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) +static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, const char *title, uint32_t format) { vesa_priv_t& priv = *static_cast<vesa_priv_t*>(vo->priv); struct VbeInfoBlock vib; @@ -425,11 +425,11 @@ return MPXP_False; } if(priv.subdev_flags == 0xFFFFFFFFUL) return MPXP_False; - if(flags & 0x8) { + if(vo->flags & 0x8) { MSG_WARN("vo_vesa: switch -flip is not supported\n"); } - if(flags & 0x04) use_scaler = 1; - if(flags & 0x01) { + if(vo->flags & 0x04) use_scaler = 1; + if(vo->flags & 0x01) { if(use_scaler) use_scaler = 2; else fs_mode = 1; } Modified: mplayerxp/libvo/vo_x11.cpp =================================================================== --- mplayerxp/libvo/vo_x11.cpp 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/vo_x11.cpp 2012-11-26 09:03:57 UTC (rev 456) @@ -180,13 +180,15 @@ { x11_priv_t& priv = *static_cast<x11_priv_t*>(vo->priv); X11_System& x11 = *priv.x11; - uint32_t ret = x11.check_events(vo,adjust_size); + uint32_t ret = x11.check_events(adjust_size,vo); /* clear the old window */ if (ret & VO_EVENT_RESIZE) { unsigned idx; - unsigned newW= vo->dest.w; - unsigned newH= vo->dest.h; + vo_rect_t r; + x11.get_win_coord(&r); + unsigned newW= r.w; + unsigned newH= r.h; int newAspect= (newW*(1<<16) + (newH>>1))/newH; if(newAspect>priv.baseAspect) newW= (newH*priv.baseAspect + (1<<15))>>16; else newH= ((newW<<16) + (priv.baseAspect>>1)) /priv.baseAspect; @@ -208,7 +210,7 @@ return ret; } -static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width,uint32_t height,uint32_t d_width,uint32_t d_height,uint32_t flags,char *title,uint32_t format) +static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width,uint32_t height,uint32_t d_width,uint32_t d_height,const char *title,uint32_t format) { x11_priv_t& priv = *static_cast<x11_priv_t*>(vo->priv); X11_System& x11 = *priv.x11; @@ -236,10 +238,8 @@ aspect(&d_width,&d_height,vo_FS(vo)?A_ZOOM:A_NOZOOM); - x11.calcpos(vo,&hint,d_width,d_height,flags); + x11.calcpos(&hint,d_width,d_height,vo->flags); hint.flags=PPosition | PSize; - vo->dest.w=hint.width; - vo->dest.h=hint.height; priv.image_width=d_width; priv.image_height=d_height; @@ -339,9 +339,10 @@ x11_priv_t& priv = *static_cast<x11_priv_t*>(vo->priv); X11_System& x11 = *priv.x11; vo_rect_t r; + x11.get_win_coord(&r); r.x=r.y=0; - r.w=(vo->dest.w-myximage->width)/2; - r.h=(vo->dest.h-myximage->height)/2; + r.w=(r.w-myximage->width)/2; + r.h=(r.h-myximage->height)/2; x11.put_image(myximage,r); } @@ -422,7 +423,8 @@ return MPXP_True; } case VOCTRL_FULLSCREEN: - x11.fullscreen(vo); + if(x11.fullscreen()) vo_FS_SET(vo); + else vo_FS_UNSET(vo); #ifdef CONFIG_VIDIX if(priv.vidix_name) resize_vidix(vo); #endif Modified: mplayerxp/libvo/vo_xv.cpp =================================================================== --- mplayerxp/libvo/vo_xv.cpp 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/vo_xv.cpp 2012-11-26 09:03:57 UTC (rev 456) @@ -116,7 +116,7 @@ * connect to server, create and map window, * allocate colors and (shared) memory */ -static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) +static MPXP_Rc __FASTCALL__ config_vo(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height,const char *title, uint32_t format) { xv_priv_t& priv = *static_cast<xv_priv_t*>(vo->priv); Xv_System& xv = *priv.xv; @@ -133,8 +133,6 @@ priv.image_width = width; priv.image_format=format; - if ( vo_FS(vo) ) { vo->dest.w=d_width; vo->dest.h=d_height; } - priv.num_buffers=vo_conf.xp_buffs; priv.depth=xv.depth(); @@ -145,7 +143,7 @@ aspect_save_screenres(vo_conf.screenwidth,vo_conf.screenheight); aspect(&d_width,&d_height,vo_ZOOM(vo)?A_ZOOM:A_NOZOOM); - xv.calcpos(vo,&hint,d_width,d_height,flags); + xv.calcpos(&hint,d_width,d_height,vo->flags); hint.flags = PPosition | PSize; priv.dwidth=d_width; priv.dheight=d_height; //XXX: what are the copy vars used for? @@ -229,7 +227,7 @@ { xv_priv_t& priv = *static_cast<xv_priv_t*>(vo->priv); Xv_System& xv = *priv.xv; - uint32_t e=xv.check_events(vo,adjust_size); + uint32_t e=xv.check_events(adjust_size,vo); if(e&VO_EVENT_RESIZE) { vo_rect_t winc; xv.get_win_coord(&winc); @@ -350,7 +348,8 @@ case VOCTRL_QUERY_FORMAT: return query_format(vo,(vo_query_fourcc_t*)data); case VOCTRL_FULLSCREEN: - xv.fullscreen(vo); + if(xv.fullscreen()) vo_FS_SET(vo); + else vo_FS_UNSET(vo); return MPXP_True; case VOCTRL_CHECK_EVENTS: { Modified: mplayerxp/libvo/x11_system.cpp =================================================================== --- mplayerxp/libvo/x11_system.cpp 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/x11_system.cpp 2012-11-26 09:03:57 UTC (rev 456) @@ -235,6 +235,7 @@ ::XSetInputFocus(mDisplay, window, RevertToNone, CurrentTime); } #endif + get_win_coord(&curr); } void X11_System::select_input(long mask) const @@ -658,7 +659,7 @@ else return "Unknown"; } -uint32_t X11_System::check_events(vo_data_t*vo,vo_adjust_size_t adjust_size) const +uint32_t X11_System::check_events(vo_adjust_size_t adjust_size,vo_data_t*opaque) { uint32_t ret=0; XEvent Event; @@ -677,11 +678,11 @@ case ConfigureNotify: nw = Event.xconfigure.width; nh = Event.xconfigure.height; - if(adjust_size) adj_ret = (*adjust_size)(vo,vo->dest.w,vo->dest.h,&nw,&nh); - ow = vo->dest.w; - oh = vo->dest.h; - vo->dest.w=nw; - vo->dest.h=nh; + if(adjust_size) adj_ret = (*adjust_size)(opaque,curr.w,curr.h,&nw,&nh); + ow = curr.w; + oh = curr.h; + curr.w=nw; + curr.h=nh; Window root; int ifoo; unsigned foo; @@ -689,13 +690,13 @@ ::XGetGeometry(mDisplay, window, &root, &ifoo, &ifoo, &foo/*width*/, &foo/*height*/, &foo, &foo); ::XTranslateCoordinates(mDisplay, window, root, 0, 0, - reinterpret_cast<int*>(&vo->dest.x), - reinterpret_cast<int*>(&vo->dest.y), &win); - if(adjust_size && ow != vo->dest.w && oh != vo->dest.h && adj_ret) { - ::XResizeWindow( mDisplay,window,vo->dest.w,vo->dest.h ); + reinterpret_cast<int*>(&curr.x), + reinterpret_cast<int*>(&curr.y), &win); + if(adjust_size && ow != curr.w && oh != curr.h && adj_ret) { + ::XResizeWindow( mDisplay,window,curr.w,curr.h ); ::XSync( mDisplay,True); } - MSG_V("X11 Window %dx%d-%dx%d\n", vo->dest.x, vo->dest.y, vo->dest.w, vo->dest.h); + MSG_V("X11 Window %dx%d-%dx%d\n", curr.x, curr.y, curr.w, curr.h); ret|=VO_EVENT_RESIZE; break; case KeyPress: { @@ -737,9 +738,8 @@ ::XSetWMNormalHints( mDisplay,window,&hint ); } -void X11_System::calcpos(const vo_data_t*vo,XSizeHints* hint, unsigned d_width, unsigned d_height, unsigned flags ) +void X11_System::calcpos(XSizeHints* hint, unsigned d_width, unsigned d_height, unsigned flags) { - UNUSED(flags); #ifdef HAVE_XF86VM int modeline_width, modeline_height; static uint32_t vm_width; @@ -750,7 +750,7 @@ hint->width=d_width; hint->height=d_height; #ifdef HAVE_XF86VM - if ( vo_VM(vo) ) { + if ( flags & VOFLAG_MODESWITCHING ) { vm_width=d_width; vm_height=d_height; vm_switch(vm_width, vm_height,&modeline_width, &modeline_height); hint->x=(vo_conf.screenwidth-modeline_width)/2; @@ -760,7 +760,7 @@ } else #endif - if ( vo_FS(vo) ) { + if ( flags & VOFLAG_FULLSCREEN ) { hint->width=vo_conf.screenwidth; hint->height=vo_conf.screenheight; hint->x=0; @@ -768,23 +768,23 @@ } } -void X11_System::fullscreen(vo_data_t*vo) +int X11_System::fullscreen() { + int is_fs=(curr.w==vo_conf.screenwidth && curr.h==vo_conf.screenheight); ::XUnmapWindow( mDisplay,window ); - if ( !vo_FS(vo) ) { - vo_FS_SET(vo); - prev=vo->dest; - vo->dest.x=0; vo->dest.y=0; vo->dest.w=vo_conf.screenwidth; vo->dest.h=vo_conf.screenheight; + if ( !is_fs ) { + prev=curr; + curr.x=0; curr.y=0; curr.w=vo_conf.screenwidth; curr.h=vo_conf.screenheight; decoration(0); } else { - vo_FS_UNSET(vo); - vo->dest=prev; + curr=prev; decoration(1); } - sizehint(vo->dest.x,vo->dest.y,vo->dest.w,vo->dest.h ); - ::XMoveResizeWindow( mDisplay,window,vo->dest.x,vo->dest.y,vo->dest.w,vo->dest.h ); + sizehint(curr.x,curr.y,curr.w,curr.h ); + ::XMoveResizeWindow( mDisplay,window,curr.x,curr.y,curr.w,curr.h ); ::XMapWindow( mDisplay,window ); ::XSync( mDisplay,False ); + return !is_fs; } void X11_System::saver_on() @@ -1213,6 +1213,7 @@ ::XSetInputFocus(get_display(), window, RevertToNone, CurrentTime); } #endif + get_win_coord(&curr); } #endif Modified: mplayerxp/libvo/x11_system.h =================================================================== --- mplayerxp/libvo/x11_system.h 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/libvo/x11_system.h 2012-11-26 09:03:57 UTC (rev 456) @@ -55,9 +55,9 @@ void decoration(int d); void classhint(const char *name) const; void sizehint(int x, int y, int width, int height) const; - void calcpos(const vo_data_t* vo,XSizeHints* hint, unsigned d_width, unsigned d_height, unsigned flags); - uint32_t check_events(vo_data_t* vo,vo_adjust_size_t adjust_size) const; - void fullscreen(vo_data_t* vo); + void calcpos(XSizeHints* hint, unsigned d_width, unsigned d_height, unsigned flags); + uint32_t check_events(vo_adjust_size_t adjust_size,vo_data_t* opaque); + int fullscreen(); void saver_off(); void saver_on(); @@ -74,6 +74,7 @@ ::GC get_gc() const {return gc; } ::Window window; + vo_rect_t prev,curr; #ifdef HAVE_SHM ::XShmSegmentInfo Shminfo[MAX_DRI_BUFFERS]; int gXErrorFlag; @@ -91,7 +92,6 @@ int dpms_disabled; int timeout_save; - vo_rect_t prev; int _Shmem_Flag; ::XImage* myximage[MAX_DRI_BUFFERS]; Modified: mplayerxp/osdep/vbelib.cpp =================================================================== --- mplayerxp/osdep/vbelib.cpp 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/osdep/vbelib.cpp 2012-11-26 09:03:57 UTC (rev 456) @@ -219,7 +219,7 @@ return ffff_found; } -static void print_str(unsigned char *str) +static void print_str(const char *str) { size_t i; fflush(stdout); @@ -259,7 +259,7 @@ fpdata.off = (unsigned long)(data->OemStringPtr) & 0xffff; data->OemStringPtr = (char*)PhysToVirt(fpdata); if(!check_str(reinterpret_cast<unsigned char*>(data->OemStringPtr))) data->OemStringPtr = NULL; -#ifdef HAVE_mp_conf.verbose_VAR +#ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { MSG_DBG2("vbelib: OemStringPtr=%04X:%04X => %p\n",fpdata.seg,fpdata.off,data->OemStringPtr); @@ -275,7 +275,7 @@ data->VideoModePtr = NULL; retval = VBE_BROKEN_BIOS; } -#ifdef HAVE_mp_conf.verbose_VAR +#ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { MSG_DBG2("vbelib: VideoModePtr=%04X:%04X => %p\n",fpdata.seg,fpdata.off,data->VideoModePtr); @@ -287,7 +287,7 @@ fpdata.off = (unsigned long)(data->OemVendorNamePtr) & 0xffff; data->OemVendorNamePtr = (char *)PhysToVirt(fpdata); if(!check_str(reinterpret_cast<unsigned char*>(data->OemVendorNamePtr))) data->OemVendorNamePtr = NULL; -#ifdef HAVE_mp_conf.verbose_VAR +#ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { MSG_DBG2("vbelib: OemVendorNamePtr=%04X:%04X => %p\n",fpdata.seg,fpdata.off,data->OemVendorNamePtr); @@ -299,7 +299,7 @@ fpdata.off = (unsigned long)(data->OemProductNamePtr) & 0xffff; data->OemProductNamePtr = (char*)PhysToVirt(fpdata); if(!check_str(reinterpret_cast<unsigned char*>(data->OemProductNamePtr))) data->OemProductNamePtr = NULL; -#ifdef HAVE_mp_conf.verbose_VAR +#ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { MSG_DBG2("vbelib: OemProductNamePtr=%04X:%04X => %p\n",fpdata.seg,fpdata.off,data->OemProductNamePtr); @@ -311,7 +311,7 @@ fpdata.off = (unsigned long)(data->OemProductRevPtr) & 0xffff; data->OemProductRevPtr = (char*)PhysToVirt(fpdata); if(!check_str(reinterpret_cast<unsigned char*>(data->OemProductRevPtr))) data->OemProductRevPtr = NULL; -#ifdef HAVE_mp_conf.verbose_VAR +#ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { MSG_DBG2("vbelib: OemProductRevPtr=%04X:%04X => %p\n",fpdata.seg,fpdata.off,data->OemProductRevPtr); @@ -655,17 +655,17 @@ rm_info = (realVesaProtModeInterface*)PhysToVirtSO(r.es,info_offset); pm_info->SetWindowCall = (void (*)())PhysToVirtSO(r.es,info_offset+rm_info->SetWindowCall); if(!is_addr_valid(reinterpret_cast<any_t*>(pm_info->SetWindowCall))) retval = VBE_BROKEN_BIOS; -#ifdef HAVE_mp_conf.verbose_VAR +#ifdef HAVE_VERBOSE_VAR MSG_DBG2("vbelib: SetWindowCall=%04X:%04X => %p\n",r.es,info_offset+rm_info->SetWindowCall,pm_info->SetWindowCall); #endif pm_info->SetDisplayStart = (void(*)())PhysToVirtSO(r.es,info_offset+rm_info->SetDisplayStart); if(!is_addr_valid(reinterpret_cast<any_t*>(pm_info->SetDisplayStart))) retval = VBE_BROKEN_BIOS; -#ifdef HAVE_mp_conf.verbose_VAR +#ifdef HAVE_VERBOSE_VAR MSG_DBG2("vbelib: SetDisplayStart=%04X:%04X => %p\n",r.es,info_offset+rm_info->SetDisplayStart,pm_info->SetDisplayStart); #endif pm_info->SetPaletteData = (void(*)())PhysToVirtSO(r.es,info_offset+rm_info->SetPaletteData); if(!is_addr_valid(reinterpret_cast<any_t*>(pm_info->SetPaletteData))) retval = VBE_BROKEN_BIOS; -#ifdef HAVE_mp_conf.verbose_VAR +#ifdef HAVE_VERBOSE_VAR MSG_DBG2("vbelib: SetPaletteData=%04X:%04X => %p\n",r.es,info_offset+rm_info->SetPaletteData,pm_info->SetPaletteData); #endif pm_info->iopl_ports = (unsigned short*)PhysToVirtSO(r.es,info_offset+rm_info->iopl_ports); @@ -676,7 +676,7 @@ pm_info->iopl_ports = NULL; /* retval = VBE_BROKEN_BIOS; <- It's for broken BIOSes only */ } -#ifdef HAVE_mp_conf.verbose_VAR +#ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { MSG_DBG2("vbelib: iopl_ports=%04X:%04X => %p\n",r.es,info_offset+rm_info->iopl_ports,pm_info->iopl_ports); @@ -688,7 +688,7 @@ return retval; } /* --------- Standard VGA stuff -------------- */ -int vbeWriteString(int x, int y, int attr, char *str) +int vbeWriteString(int x, int y, int attr,const char *str) { struct LRMI_regs r; any_t*rm_space = NULL; Modified: mplayerxp/osdep/vbelib.h =================================================================== --- mplayerxp/osdep/vbelib.h 2012-11-26 08:01:09 UTC (rev 455) +++ mplayerxp/osdep/vbelib.h 2012-11-26 09:03:57 UTC (rev 456) @@ -219,7 +219,7 @@ int vbeGetProtModeInfo(struct VesaProtModeInterface *); /* Standard VGA stuff */ - int vbeWriteString(int x, int y, int attr, char *str); + int vbeWriteString(int x, int y, int attr,const char *str); /* Misc stuff (For portability only) */ any_t* vbeMapVideoBuffer(unsigned long phys_addr,unsigned long size); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |