[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[463] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-11-27 13:18:25
|
Revision: 463 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=463&view=rev Author: nickols_k Date: 2012-11-27 13:18:15 +0000 (Tue, 27 Nov 2012) Log Message: ----------- fix fullscreen mode Modified Paths: -------------- mplayerxp/libvo/video_out.cpp mplayerxp/libvo/vo_fbdev.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/mplayerxp.cpp Modified: mplayerxp/libvo/video_out.cpp =================================================================== --- mplayerxp/libvo/video_out.cpp 2012-11-27 12:43:14 UTC (rev 462) +++ mplayerxp/libvo/video_out.cpp 2012-11-27 13:18:15 UTC (rev 463) @@ -51,6 +51,7 @@ VO_Config::VO_Config() { memset(&subdevice,0,reinterpret_cast<long>(&dbpp) - reinterpret_cast<long>(&subdevice)); movie_aspect=-1.0; + softzoom=1; flip=-1; xp_buffs=64; dbpp=0; Modified: mplayerxp/libvo/vo_fbdev.cpp =================================================================== --- mplayerxp/libvo/vo_fbdev.cpp 2012-11-27 12:43:14 UTC (rev 462) +++ mplayerxp/libvo/vo_fbdev.cpp 2012-11-27 13:18:15 UTC (rev 463) @@ -1047,7 +1047,7 @@ aspect_save_orig(width,height); aspect_save_prescale(d_width,d_height); aspect_save_screenres(xres,yres); - aspect(&out_width,&out_height,A_ZOOM); + aspect(&out_width,&out_height,A_NOZOOM); } else if(flags&VOFLAG_FULLSCREEN) { out_width = xres; out_height = yres; Modified: mplayerxp/libvo/vo_opengl.cpp =================================================================== --- mplayerxp/libvo/vo_opengl.cpp 2012-11-27 12:43:14 UTC (rev 462) +++ mplayerxp/libvo/vo_opengl.cpp 2012-11-27 13:18:15 UTC (rev 463) @@ -104,7 +104,6 @@ OpenGL_VO_Interface::~OpenGL_VO_Interface() { unsigned i; -// if (!vo_config_count) return; glFinish(); for(i=0;i<num_buffers;i++) glx.freeMyXImage(i); glx.saver_on(); // screen saver back on @@ -176,7 +175,7 @@ num_buffers=vo_conf.xp_buffs; aspect_save_screenres(vo_conf.screenwidth,vo_conf.screenheight); - aspect(&d_width,&d_height,flags&VOFLAG_SWSCALE?A_ZOOM:A_NOZOOM); + aspect(&d_width,&d_height,flags&VOFLAG_FULLSCREEN?A_ZOOM:A_NOZOOM); glx.calcpos(&hint,d_width,d_height,flags); hint.flags = PPosition | PSize; @@ -291,7 +290,7 @@ unsigned OpenGL_VO_Interface::get_num_frames() const { return num_buffers; } MPXP_Rc OpenGL_VO_Interface::toggle_fullscreen() { - glx.fullscreen(); + glx.fullscreen(flags); vo_rect_t r; glx.get_win_coord(r); resize(r.w,r.h); Modified: mplayerxp/libvo/vo_sdl.cpp =================================================================== --- mplayerxp/libvo/vo_sdl.cpp 2012-11-27 12:43:14 UTC (rev 462) +++ mplayerxp/libvo/vo_sdl.cpp 2012-11-27 13:18:15 UTC (rev 463) @@ -509,7 +509,7 @@ /* calculate new video size/aspect */ if(mode == YUV) { if(fulltype&VOFLAG_FULLSCREEN) aspect_save_screenres(XWidth, XHeight); - aspect(&dstwidth, &dstheight, A_ZOOM); + aspect(&dstwidth, &dstheight, A_NOZOOM); } /* try to change to given fullscreenmode */ @@ -652,7 +652,7 @@ } if(X) { aspect_save_screenres(XWidth,XHeight); - aspect(&dstwidth,&dstheight,flags&VOFLAG_SWSCALE?A_ZOOM:A_NOZOOM); + aspect(&dstwidth,&dstheight,flags&VOFLAG_FULLSCREEN?A_ZOOM:A_NOZOOM); } windowsize.w = dstwidth; windowsize.h = dstheight; @@ -893,7 +893,7 @@ retval = VO_EVENT_RESIZE; } else if ( keypressed == SDLK_n ) { #ifdef HAVE_X11 - aspect(&dstwidth, &dstheight,flags&VOFLAG_SWSCALE?A_ZOOM:A_NOZOOM); + aspect(&dstwidth, &dstheight,flags&VOFLAG_FULLSCREEN?A_ZOOM:A_NOZOOM); #endif if (unsigned(surface->w) != dstwidth || unsigned(surface->h) != dstheight) { if(set_video_mode(dstwidth, dstheight, bpp, sdlflags)!=0) exit_player("SDL set video mode"); Modified: mplayerxp/libvo/vo_vesa.cpp =================================================================== --- mplayerxp/libvo/vo_vesa.cpp 2012-11-27 12:43:14 UTC (rev 462) +++ mplayerxp/libvo/vo_vesa.cpp 2012-11-27 13:18:15 UTC (rev 463) @@ -597,7 +597,7 @@ aspect_save_orig(width,height); aspect_save_prescale(d_width,d_height); aspect_save_screenres(vmode_info.XResolution,vmode_info.YResolution); - aspect(&dstW,&dstH,A_ZOOM); + aspect(&dstW,&dstH,A_NOZOOM); } else if(fs_mode) { dstW = vmode_info.XResolution; dstH = vmode_info.YResolution; Modified: mplayerxp/libvo/vo_x11.cpp =================================================================== --- mplayerxp/libvo/vo_x11.cpp 2012-11-27 12:43:14 UTC (rev 462) +++ mplayerxp/libvo/vo_x11.cpp 2012-11-27 13:18:15 UTC (rev 463) @@ -219,9 +219,6 @@ flags=_flags; num_buffers=vo_conf.xp_buffs; - if (!title) - title = mp_strdup("MPlayerXP X11 (XImage/Shm) render"); - in_format=format; depth=x11.depth(); @@ -235,7 +232,7 @@ aspect_save_prescale(d_width,d_height); aspect_save_screenres(vo_conf.screenwidth,vo_conf.screenheight); - aspect(&d_width,&d_height,flags&VOFLAG_SWSCALE?A_ZOOM:A_NOZOOM); + aspect(&d_width,&d_height,flags&VOFLAG_FULLSCREEN?A_ZOOM:A_NOZOOM); x11.calcpos(&hint,d_width,d_height,flags); hint.flags=PPosition | PSize; @@ -415,7 +412,7 @@ } MPXP_Rc X11_VO_Interface::toggle_fullscreen() { - x11.fullscreen(); + x11.fullscreen(flags); #ifdef CONFIG_VIDIX if(vidix) resize_vidix(); #endif Modified: mplayerxp/libvo/vo_xv.cpp =================================================================== --- mplayerxp/libvo/vo_xv.cpp 2012-11-27 12:43:14 UTC (rev 462) +++ mplayerxp/libvo/vo_xv.cpp 2012-11-27 13:18:15 UTC (rev 463) @@ -165,7 +165,7 @@ xv.match_visual( &vinfo ); aspect_save_screenres(vo_conf.screenwidth,vo_conf.screenheight); - aspect(&d_width,&d_height,flags&VOFLAG_SWSCALE?A_ZOOM:A_NOZOOM); + aspect(&d_width,&d_height,flags&VOFLAG_FULLSCREEN?A_ZOOM:A_NOZOOM); xv.calcpos(&hint,d_width,d_height,flags); hint.flags = PPosition | PSize; @@ -214,7 +214,7 @@ set_gamma_correction(); - aspect(&dwidth,&dheight,flags&VOFLAG_SWSCALE?A_ZOOM:A_NOZOOM); + aspect(&dwidth,&dheight,flags&VOFLAG_FULLSCREEN?A_ZOOM:A_NOZOOM); return MPXP_Ok; } @@ -246,7 +246,7 @@ MSG_V( "[xv-resize] dx: %d dy: %d dw: %d dh: %d\n", winc.x,winc.y,winc.w,winc.h); - aspect(&dwidth,&dheight,flags&VOFLAG_SWSCALE?A_ZOOM:A_NOZOOM); + aspect(&dwidth,&dheight,flags&VOFLAG_FULLSCREEN?A_ZOOM:A_NOZOOM); } if ( e & VO_EVENT_EXPOSE ) { vo_rect_t r,r2; @@ -321,7 +321,7 @@ unsigned Xv_VO_Interface::get_num_frames() const { return num_buffers; } MPXP_Rc Xv_VO_Interface::toggle_fullscreen() { - xv.fullscreen(); + xv.fullscreen(flags); return MPXP_True; } Modified: mplayerxp/libvo/x11_system.cpp =================================================================== --- mplayerxp/libvo/x11_system.cpp 2012-11-27 12:43:14 UTC (rev 462) +++ mplayerxp/libvo/x11_system.cpp 2012-11-27 13:18:15 UTC (rev 463) @@ -774,9 +774,9 @@ } } -int X11_System::fullscreen() +int X11_System::fullscreen(unsigned& flags) { - int is_fs=(curr.w==vo_conf.screenwidth && curr.h==vo_conf.screenheight); + int is_fs=flags&VOFLAG_FULLSCREEN; ::XUnmapWindow( mDisplay,window ); if ( !is_fs ) { prev=curr; @@ -790,6 +790,7 @@ ::XMoveResizeWindow( mDisplay,window,curr.x,curr.y,curr.w,curr.h ); ::XMapWindow( mDisplay,window ); ::XSync( mDisplay,False ); + flags^=VOFLAG_FULLSCREEN; return !is_fs; } Modified: mplayerxp/libvo/x11_system.h =================================================================== --- mplayerxp/libvo/x11_system.h 2012-11-27 12:43:14 UTC (rev 462) +++ mplayerxp/libvo/x11_system.h 2012-11-27 13:18:15 UTC (rev 463) @@ -57,7 +57,7 @@ void sizehint(int x, int y, int width, int height) const; 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(); + int fullscreen(unsigned& flags); void saver_off(); void saver_on(); Modified: mplayerxp/mplayerxp.cpp =================================================================== --- mplayerxp/mplayerxp.cpp 2012-11-27 12:43:14 UTC (rev 462) +++ mplayerxp/mplayerxp.cpp 2012-11-27 13:18:15 UTC (rev 463) @@ -1185,15 +1185,16 @@ MPXP_Rc rc=MPXP_Ok; MP_UNIT("init_video_codec"); sh_video->inited=0; + vo_data->flags=0; + /* configure flags */ + if(vo_conf.fullscreen) vo_FS_SET(vo_data); + if(vo_conf.softzoom) vo_ZOOM_SET(vo_data); + if(vo_conf.flip>0) vo_FLIP_SET(vo_data); + if(vo_conf.vidmode) vo_VM_SET(vo_data); if((sh_video->decoder=mpcv_init(sh_video,mp_conf.video_codec,mp_conf.video_family,-1,MPXPSys->libinput()))) sh_video->inited=1; #ifdef ENABLE_WIN32LOADER if(!sh_video->inited) { /* Go through the codec.conf and find the best codec...*/ - vo_data->flags=0; - if(vo_conf.fullscreen) vo_FS_SET(vo_data); - if(vo_conf.softzoom) vo_ZOOM_SET(vo_data); - if(vo_conf.flip>0) vo_FLIP_SET(vo_data); - if(vo_conf.vidmode) vo_VM_SET(vo_data); codecs_reset_selection(0); if(mp_conf.video_codec) { /* forced codec by name: */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |