[Mplayer-cvslog] CVS: main/libvo vo_dga.c,1.11,1.12

Andreas Ackermann acki2 at users.sourceforge.net
Sat Apr 14 00:11:10 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv21546

Modified Files:
	vo_dga.c 
Log Message:
- fixed bug with depth and mpg when current bpp of XServer was != 32
- when -bpp is selected, I accept only query_modes() for THIS particular depth
  (if it's supported by hardware)


Index: vo_dga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dga.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** vo_dga.c	2001/04/13 18:49:59	1.11
--- vo_dga.c	2001/04/13 22:11:08	1.12
***************
*** 24,32 ****
   *
   * $Log$
!  * Revision 1.11  2001/04/13 18:49:59  acki2
!  * - completely rewrote depth switching
!  * - support for -bpp
!  *   (needs at least mplayer.c 1.53 and cfg-mplayer.h 1.18 and latest stuff from
!  *   libvo to work)
   *
   * Revision 1.10  2001/04/01 22:01:28  acki2
--- 24,31 ----
   *
   * $Log$
!  * Revision 1.12  2001/04/13 22:11:08  acki2
!  * - fixed bug with depth and mpg when current bpp of XServer was != 32
!  * - when -bpp is selected, I accept only query_modes() for THIS particular depth
!  *   (if it's supported by hardware)
   *
   * Revision 1.10  2001/04/01 22:01:28  acki2
***************
*** 155,158 ****
--- 154,169 ----
  
  
+ int vd_ValidateMode( int mplayer_depth){
+   int i;
+   if(mplayer_depth == 0)return 0;
+   for(i=1; i<vo_dga_mode_num; i++){
+     if(vo_dga_modes[i].vdm_mplayer_depth == mplayer_depth ){ 
+       vo_dga_modes[i].vdm_supported = 1;
+       return i;
+     }
+   }
+   return 0;
+ }
+ 
  int vd_ModeValid( int mplayer_depth){
    int i;
***************
*** 362,371 ****
       return 0;
     }
! 
!    vo_dga_XServer_mode = vd_EnableMode(  DefaultDepth(qdisp, DefaultScreen(qdisp)),
!                        BitmapUnit(qdisp),
!                        DefaultVisual(qdisp, DefaultScreen(qdisp))->red_mask,
!                        DefaultVisual(qdisp, DefaultScreen(qdisp))->green_mask,
!                        DefaultVisual(qdisp, DefaultScreen(qdisp))->blue_mask);
     if(vo_dga_XServer_mode ==0){
  #ifndef HAVE_DGA2
--- 373,382 ----
       return 0;
     }
!    if( !vo_init() ){
!     vd_printf(VD_ERR, "vo_dga: vo_init() failed!\n");
!     return 1; 
!   }
!   vo_dga_XServer_mode = vd_ValidateMode(vo_depthonscreen);
!  
     if(vo_dga_XServer_mode ==0){
  #ifndef HAVE_DGA2
***************
*** 389,393 ****
  		modelines[i].greenMask,
  	        modelines[i].blueMask,
! 		modelines[i].viewportWidth,
  		modelines[i].viewportHeight);			  
          vd_EnableMode(
--- 400,404 ----
  		modelines[i].greenMask,
  	        modelines[i].blueMask,
! 	 	modelines[i].viewportWidth,
  		modelines[i].viewportHeight);			  
          vd_EnableMode(
***************
*** 407,411 ****
     for(i=0; i<vo_dga_mode_num; i++){
       if(vo_dga_modes[i].vdm_supported != 0){
!        vd_printf(VD_INFO, "vo_dga: Supporting mode: %s\n", vd_GetModeString(i));
       }
     }
--- 418,427 ----
     for(i=0; i<vo_dga_mode_num; i++){
       if(vo_dga_modes[i].vdm_supported != 0){
!        vd_printf(VD_INFO, "vo_dga: Supporting mode: %s", vd_GetModeString(i));
!        if(vo_dbpp && vo_dbpp != vo_dga_modes[i].vdm_mplayer_depth){
!          vo_dga_modes[i].vdm_supported = 0;
!          vd_printf(VD_INFO, " ...disabled by -bpp %d", vo_dbpp );
!        }
!        vd_printf(VD_INFO, "\n");
       }
     }
***************
*** 436,444 ****
      XUngrabKeyboard (vo_dga_dpy, CurrentTime);
  #ifdef HAVE_DGA2
      dgadevice = XDGASetMode(vo_dga_dpy, XDefaultScreen(vo_dga_dpy), 0);
      if(dgadevice != NULL){
        XFree(dgadevice);	
      }
-     XDGACloseFramebuffer(vo_dga_dpy, XDefaultScreen(vo_dga_dpy));
  #else
      XF86DGADirectVideo (vo_dga_dpy, XDefaultScreen(vo_dga_dpy), 0);
--- 452,460 ----
      XUngrabKeyboard (vo_dga_dpy, CurrentTime);
  #ifdef HAVE_DGA2
+     XDGACloseFramebuffer(vo_dga_dpy, XDefaultScreen(vo_dga_dpy));
      dgadevice = XDGASetMode(vo_dga_dpy, XDefaultScreen(vo_dga_dpy), 0);
      if(dgadevice != NULL){
        XFree(dgadevice);	
      }
  #else
      XF86DGADirectVideo (vo_dga_dpy, XDefaultScreen(vo_dga_dpy), 0);


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list