[Mplayer-cvslog] CVS: main/loader win32.c, 1.85, 1.86 win32.h, 1.10, 1.11

Roberto Togni CVS syncmail at mplayerhq.hu
Thu Mar 25 22:36:20 CET 2004


CVS change done by Roberto Togni CVS

Update of /cvsroot/mplayer/main/loader
In directory mail:/var2/tmp/cvs-serv1370/loader

Modified Files:
	win32.c win32.h 
Log Message:
Support for Alparysoft lossless video codec (DShow and VfW)
Patch by Melisha Johnson <adland123 (at) yahoo (dot) com>


Index: win32.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/win32.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- win32.c	23 Mar 2004 20:08:28 -0000	1.85
+++ win32.c	25 Mar 2004 21:36:18 -0000	1.86
@@ -497,6 +497,37 @@
     return 0;
 }
 
+static int  WINAPI expGetVolumeInformationA( const char *root, char *label,
+                                       unsigned int label_len, unsigned int *serial,
+                                       unsigned int *filename_len,unsigned int *flags,
+                                       char *fsname, unsigned int fsname_len )
+{
+dbgprintf("GetVolumeInformationA( %s, 0x%x, %ld, 0x%x, 0x%x, 0x%x, 0x%x, %ld) => 1\n",
+		      root,label,label_len,serial,filename_len,flags,fsname,fsname_len);
+//hack Do not return any real data - do nothing
+return 1;
+}
+
+static unsigned int WINAPI expGetDriveTypeA( const char *root )
+{
+ dbgprintf("GetDriveTypeA( %s ) => %d\n",root,DRIVE_FIXED);
+ // hack return as Fixed Drive Type
+ return DRIVE_FIXED;
+}
+
+static unsigned int WINAPI expGetLogicalDriveStringsA( unsigned int len, char *buffer )
+{
+ dbgprintf("GetLogicalDriveStringsA(%d, 0x%x) => 4\n",len,buffer);
+ // hack only have one drive c:\ in this hack
+  *buffer++='c';
+  *buffer++=':';
+  *buffer++='\\';
+  *buffer++='\0';
+  *buffer= '\0';
+return 4; // 1 drive * 4 bytes (includes null)
+}
+
+
 static int WINAPI expIsBadWritePtr(void* ptr, unsigned int count)
 {
     int result = (count == 0 || ptr != 0) ? 0 : 1;
@@ -1650,6 +1681,13 @@
     dbgprintf("GlobalSize(0x%x)\n", amem);
     return size;
 }
+
+static int WINAPI expLoadIconA( long hinstance, char *name )
+{
+ dbgprintf("LoadIconA( %ld, 0x%x ) => 1\n",hinstance,name);
+ return 1;
+}
+
 static int WINAPI expLoadStringA(long instance, long  id, void* buf, long size)
 {
     int result=LoadStringA(instance, id, buf, size);
@@ -3930,6 +3968,16 @@
     return S_OK;
 }
 
+static int exp_snprintf( char *str, int size, const char *format, ... )
+{
+      int x;
+      va_list va;
+      va_start(va, format);
+      x=snprintf(str,size,format,va);
+      dbgprintf("_snprintf( 0x%x, %d, %s, ... ) => %d\n",str,size,format,x);
+      va_end(va);
+      return x;
+}
 
 #if 0
 static int exp_initterm(int v1, int v2)
@@ -3982,7 +4030,7 @@
     return NULL;
 }
 
-static int expwsprintfA(char* string, char* format, ...)
+static int expwsprintfA(char* string, const char* format, ...)
 {
     va_list va;
     int result;
@@ -3997,7 +4045,7 @@
 {
     va_list args;
     int r;
-    dbgprintf("sprintf(%s, %s)\n", str, format);
+    dbgprintf("sprintf(0x%x, %s)\n", str, format);
     va_start(args, format);
     r = vsprintf(str, format, args);
     va_end(args);
@@ -4513,13 +4561,13 @@
     return;
 }
 
-int expRegisterClassA(const void/*WNDCLASSA*/ *wc)
+static int WINAPI expRegisterClassA(const void/*WNDCLASSA*/ *wc)
 {
     dbgprintf("RegisterClassA(%p) => random id\n", wc);
     return time(NULL); /* be precise ! */
 }
 
-int expUnregisterClassA(const char *className, HINSTANCE hInstance)
+static int WINAPI expUnregisterClassA(const char *className, HINSTANCE hInstance)
 {
     dbgprintf("UnregisterClassA(%s, %p) => 0\n", className, hInstance);
     return 0;
@@ -4656,6 +4704,9 @@
 
 struct exports exp_kernel32[]=
 {
+    FF(GetVolumeInformationA,-1)
+    FF(GetDriveTypeA,-1)
+    FF(GetLogicalDriveStringsA,-1)
     FF(IsBadWritePtr, 357)
     FF(IsBadReadPtr, 354)
     FF(IsBadStringPtrW, -1)
@@ -4811,6 +4862,7 @@
     FF(malloc, -1)
     FF(_initterm, -1)
     FF(__dllonexit, -1)
+    FF(_snprintf,-1)
     FF(free, -1)
     {"??3 at YAXPAX@Z", -1, expdelete},
     {"??2 at YAPAXI@Z", -1, expnew},
@@ -4878,6 +4930,7 @@
 #endif
 };
 struct exports exp_user32[]={
+    FF(LoadIconA,-1)
     FF(LoadStringA, -1)
     FF(wsprintfA, -1)
     FF(GetDC, -1)

Index: win32.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/win32.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- win32.h	13 Sep 2002 19:43:13 -0000	1.10
+++ win32.h	25 Mar 2004 21:36:18 -0000	1.11
@@ -34,7 +34,5 @@
 
 extern void* LookupExternal(const char* library, int ordinal);
 extern void* LookupExternalByName(const char* library, const char* name);
-extern int expRegisterClassA(const void/*WNDCLASSA*/ *wc);
-extern int expUnregisterClassA(const char *className, HINSTANCE hInstance);
 
 #endif




More information about the MPlayer-cvslog mailing list