changeset 10818:fa41f83edff0

ViVD v2 codec (fourcc gxve) support with vfw dll ViVD2.dll Codec by http://www.softmediachina.com
author rtognimp
date Fri, 05 Sep 2003 22:08:23 +0000
parents 59ac254c2541
children 47a90985950d
files etc/codecs.conf loader/win32.c
diffstat 2 files changed, 40 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/etc/codecs.conf	Fri Sep 05 18:45:12 2003 +0000
+++ b/etc/codecs.conf	Fri Sep 05 22:08:23 2003 +0000
@@ -1158,6 +1158,14 @@
   dll "sp5x_32.dll"
   out BGR24,BGR15 flip
 
+videocodec vivd2
+  status working
+  fourcc GXVE,gxve
+  driver vfw
+  dll "ViVD2.dll"
+  out YUY2,YV12,I420,YVU9
+  out BGR32,BGR24,BGR15
+
 ; quicktime codecs:
 
 videocodec qt3ivx
--- a/loader/win32.c	Fri Sep 05 18:45:12 2003 +0000
+++ b/loader/win32.c	Fri Sep 05 22:08:23 2003 +0000
@@ -533,6 +533,10 @@
 #define	MODULE_HANDLE_ddraw	((HMODULE)0x123)
 #define	MODULE_HANDLE_advapi32	((HMODULE)0x124)
 #endif
+#define	MODULE_HANDLE_comdlg32	((HMODULE)0x125)
+#define	MODULE_HANDLE_msvcrt	((HMODULE)0x126)
+#define	MODULE_HANDLE_ole32	((HMODULE)0x127)
+#define	MODULE_HANDLE_winmm	((HMODULE)0x128)
 
 static HMODULE WINAPI expGetModuleHandleA(const char* name)
 {
@@ -2293,6 +2297,15 @@
 	return MODULE_HANDLE_advapi32;
 #endif
 
+    if (strcasecmp(name, "comdlg32.dll") == 0 || strcasecmp(name, "comdlg32") == 0)
+	return MODULE_HANDLE_comdlg32;
+    if (strcasecmp(name, "msvcrt.dll") == 0 || strcasecmp(name, "msvcrt") == 0)
+	return MODULE_HANDLE_msvcrt;
+    if (strcasecmp(name, "ole32.dll") == 0 || strcasecmp(name, "ole32") == 0)
+	return MODULE_HANDLE_ole32;
+    if (strcasecmp(name, "winmm.dll") == 0 || strcasecmp(name, "winmm") == 0)
+	return MODULE_HANDLE_winmm;
+
     result=LoadLibraryA(name);
     dbgprintf("Returned LoadLibraryA(0x%x='%s'), def_path=%s => 0x%x\n", name, name, def_path, result);
 
@@ -2326,6 +2339,14 @@
     case MODULE_HANDLE_advapi32:
 	result=LookupExternalByName("advapi32.dll", name); break;
 #endif
+    case MODULE_HANDLE_comdlg32:
+	result=LookupExternalByName("comdlg32.dll", name); break;
+    case MODULE_HANDLE_msvcrt:
+	result=LookupExternalByName("msvcrt.dll", name); break;
+    case MODULE_HANDLE_ole32:
+	result=LookupExternalByName("ole32.dll", name); break;
+    case MODULE_HANDLE_winmm:
+	result=LookupExternalByName("winmm.dll", name); break;
     default:
 	result=GetProcAddress(mod, name);
     }
@@ -4585,6 +4606,12 @@
 	return my_realloc(ptr, size);        
 }
 
+/* Fake GetOpenFileNameA from comdlg32.dll for ViVD codec */
+static WIN_BOOL WINAPI expGetOpenFileNameA(/*LPOPENFILENAMEA*/ void* lpfn)
+{
+    return 1;
+}
+
 struct exports
 {
     char name[64];
@@ -4975,6 +5002,10 @@
 };
 #endif
 
+struct exports exp_comdlg32[]={
+    FF(GetOpenFileNameA, -1)
+};
+
 #define LL(X) \
     {#X".dll", sizeof(exp_##X)/sizeof(struct exports), exp_##X},
 
@@ -4998,6 +5029,7 @@
 #ifdef QTX
     LL(ddraw)
 #endif
+    LL(comdlg32)
 };
 
 static void ext_stubs(void)