[Mplayer-cvslog] CVS: main/libvo vo_directx.c, 1.26, 1.27 video_out.c, 1.81, 1.82 video_out.h, 1.54, 1.55

Sascha Sommer CVS syncmail at mplayerhq.hu
Sat Mar 13 17:48:54 CET 2004


CVS change done by Sascha Sommer CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv22309/libvo

Modified Files:
	vo_directx.c video_out.c video_out.h 
Log Message:
move refreshrate and adapter_num variables to video_out because they might be usefull for other drivers, too

Index: vo_directx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_directx.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- vo_directx.c	13 Mar 2004 16:37:12 -0000	1.26
+++ vo_directx.c	13 Mar 2004 16:48:52 -0000	1.27
@@ -58,8 +58,6 @@
 static uint32_t nooverlay = 0;                      //NonOverlay mode
 static DWORD    destcolorkey;                       //colorkey for our surface
 static COLORREF windowcolor = RGB(0,0,16);          //windowcolor == colorkey
-int adapter_num=0;
-int refresh_rate=0;
 static int adapter_count=0;
 static GUID selected_guid;
 static GUID *selected_guid_ptr = NULL;
@@ -180,7 +178,7 @@
 	if(g_lpddsPrimary)g_lpddsPrimary->lpVtbl->Release(g_lpddsPrimary);
 	g_lpddsPrimary=NULL;
 	
-    if(vidmode)g_lpdd->lpVtbl->SetDisplayMode(g_lpdd,vm_width,vm_height,vm_bpp,refresh_rate,0);
+    if(vidmode)g_lpdd->lpVtbl->SetDisplayMode(g_lpdd,vm_width,vm_height,vm_bpp,vo_refresh_rate,0);
     ZeroMemory(&ddsd, sizeof(ddsd));
     ddsd.dwSize = sizeof(ddsd);
     //set flags and create a primary surface.
@@ -346,7 +344,7 @@
         mp_msg(MSGT_VO, MSGL_INFO ,"%s", lpDriverDescription);
     }
     
-    if(adapter_count == adapter_num){
+    if(adapter_count == vo_adapter_num){
         if (!lpGUID)
             selected_guid_ptr = NULL;
         else
@@ -380,7 +378,7 @@
 		return 1;
     }
 	
-	if(adapter_num){ //display other than default
+	if(vo_adapter_num){ //display other than default
         OurDirectDrawEnumerateEx = (LPDIRECTDRAWENUMERATEEX) GetProcAddress(hddraw_dll,"DirectDrawEnumerateExA");
         if (!OurDirectDrawEnumerateEx){
             FreeLibrary( hddraw_dll );
@@ -393,8 +391,8 @@
         // enumerate all display devices attached to the desktop
         OurDirectDrawEnumerateEx(EnumCallbackEx, NULL, DDENUM_ATTACHEDSECONDARYDEVICES );
 
-        if(adapter_num >= adapter_count)
-            mp_msg(MSGT_VO, MSGL_ERR,"Selected adapter (%d) doesn't exist: Default Display Adapter selected\n",adapter_num);
+        if(vo_adapter_num >= adapter_count)
+            mp_msg(MSGT_VO, MSGL_ERR,"Selected adapter (%d) doesn't exist: Default Display Adapter selected\n",vo_adapter_num);
     }
 
 	OurDirectDrawCreateEx = (void *)GetProcAddress(hddraw_dll, "DirectDrawCreateEx");
@@ -446,7 +444,7 @@
 	        mp_msg(MSGT_VO, MSGL_FATAL,"<vo_directx><FATAL ERROR>can't set displaymode\n");
 	        return 1;
 		}
-	    mp_msg(MSGT_VO, MSGL_V,"<vo_directx><INFO>Inited adapter %i for %i x %i @ %i \n",adapter_num,vm_width,vm_height,vm_bpp);	
+	    mp_msg(MSGT_VO, MSGL_V,"<vo_directx><INFO>Inited adapter %i for %i x %i @ %i \n",vo_adapter_num,vm_width,vm_height,vm_bpp);	
 	    return 0;	
 	}
 	if (g_lpdd->lpVtbl->SetCooperativeLevel(g_lpdd, hWnd, DDSCL_NORMAL) != DD_OK) // or DDSCL_SETFOCUSWINDOW

Index: video_out.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/video_out.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- video_out.c	30 Nov 2003 16:36:09 -0000	1.81
+++ video_out.c	13 Mar 2004 16:48:52 -0000	1.82
@@ -41,6 +41,8 @@
 int vo_fsmode = 0;
 float vo_panscan = 0.0f;
 int vo_ontop = 0;
+int vo_adapter_num=0;
+int vo_refresh_rate=0;
 
 int vo_pts=0; // for hw decoding
 float vo_fps=0; // for mp1e rte

Index: video_out.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/video_out.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- video_out.h	30 Nov 2003 16:36:09 -0000	1.54
+++ video_out.h	13 Mar 2004 16:48:52 -0000	1.55
@@ -196,6 +196,8 @@
 extern int vo_fs;
 extern int vo_fsmode;
 extern float vo_panscan;
+extern int vo_adapter_num;
+extern int vo_refresh_rate;
 
 extern int vo_gamma_brightness;
 extern int vo_gamma_saturation;




More information about the MPlayer-cvslog mailing list