wine/dlls/iccvid Makefile.in iccvid.c iccvid_E ...

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 28 05:01:56 CST 2005


ChangeSet ID:	21462
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/28 05:01:56

Modified files:
	dlls/iccvid    : Makefile.in iccvid.c 
Added files:
	dlls/iccvid    : iccvid_En.rc iccvid_private.h rsrc.rc 

Log message:
	Dmitry Timoshkov <dmitry at codeweavers.com>
	Add support for ICM_GETINFO in iccvid codec (based on msrle32).

Patch: http://cvs.winehq.org/patch.py?id=21462

Old revision  New revision  Changes     Path
 1.3           1.4           +3 -1       wine/dlls/iccvid/Makefile.in
 1.7           1.8           +43 -2      wine/dlls/iccvid/iccvid.c
 Added         1.1           +0 -0       wine/dlls/iccvid/iccvid_En.rc
 Added         1.1           +0 -0       wine/dlls/iccvid/iccvid_private.h
 Added         1.1           +0 -0       wine/dlls/iccvid/rsrc.rc

Index: wine/dlls/iccvid/Makefile.in
diff -u -p wine/dlls/iccvid/Makefile.in:1.3 wine/dlls/iccvid/Makefile.in:1.4
--- wine/dlls/iccvid/Makefile.in:1.3	28 Nov 2005 11: 1:56 -0000
+++ wine/dlls/iccvid/Makefile.in	28 Nov 2005 11: 1:56 -0000
@@ -3,11 +3,13 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = iccvid.dll
-IMPORTS   = kernel32
+IMPORTS   = user32 kernel32
 
 C_SRCS = \
 	iccvid.c
 
+RC_SRCS = rsrc.rc
+
 @MAKE_DLL_RULES@
 
 ### Dependencies:
Index: wine/dlls/iccvid/iccvid.c
diff -u -p wine/dlls/iccvid/iccvid.c:1.7 wine/dlls/iccvid/iccvid.c:1.8
--- wine/dlls/iccvid/iccvid.c:1.7	28 Nov 2005 11: 1:56 -0000
+++ wine/dlls/iccvid/iccvid.c	28 Nov 2005 11: 1:56 -0000
@@ -47,13 +47,15 @@
 #include "winuser.h"
 #include "commdlg.h"
 #include "vfw.h"
-
 #include "mmsystem.h"
+#include "iccvid_private.h"
 
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(iccvid);
 
+static HINSTANCE ICCVID_hModule;
+
 #define ICCVID_MAGIC mmioFOURCC('c', 'v', 'i', 'd')
 
 #define DBUG    0
@@ -910,8 +912,27 @@ static LRESULT ICCVID_Close( ICCVID_Info
     return 1;
 }
 
+static LRESULT ICCVID_GetInfo( ICCVID_Info *info, ICINFO *icinfo, DWORD dwSize )
+{
+    if (!icinfo) return sizeof(ICINFO);
+    if (dwSize < sizeof(ICINFO)) return 0;
+
+    icinfo->dwSize = sizeof(ICINFO);
+    icinfo->fccType = ICTYPE_VIDEO;
+    icinfo->fccHandler = info ? info->dwMagic : ICCVID_MAGIC;
+    icinfo->dwFlags = 0;
+    icinfo->dwVersion = 0x00010000; /* Version 1.0 build 0 */
+    icinfo->dwVersionICM = 0x01040000; /* Version 1.4 build 0 */
+
+    LoadStringW(ICCVID_hModule, IDS_NAME, icinfo->szName, sizeof(icinfo->szName)/sizeof(WCHAR));
+    LoadStringW(ICCVID_hModule, IDS_DESCRIPTION, icinfo->szDescription, sizeof(icinfo->szDescription)/sizeof(WCHAR));
+    /* msvfw32 will fill icinfo->szDriver for us */
+
+    return sizeof(ICINFO);
+}
+
 LRESULT WINAPI ICCVID_DriverProc( DWORD dwDriverId, HDRVR hdrvr, UINT msg,
-                                  LONG lParam1, LONG lParam2)
+                                  LPARAM lParam1, LPARAM lParam2)
 {
     ICCVID_Info *info = (ICCVID_Info *) dwDriverId;
 
@@ -939,6 +960,9 @@ LRESULT WINAPI ICCVID_DriverProc( DWORD 
         }
         return (LRESULT) info;
 
+    case ICM_GETINFO:
+        return ICCVID_GetInfo( info, (ICINFO *)lParam1, (DWORD)lParam2 );
+
     case ICM_DECOMPRESS_QUERY:
         return ICCVID_DecompressQuery( info, (LPBITMAPINFO) lParam1,
                                        (LPBITMAPINFO) lParam2 );
@@ -963,3 +987,20 @@ LRESULT WINAPI ICCVID_DriverProc( DWORD 
     }
     return 0;
 }
+
+BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved)
+{
+    TRACE("(%p,%ld,%p)\n", hModule, dwReason, lpReserved);
+
+    switch (dwReason)
+    {
+    case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hModule);
+        ICCVID_hModule = hModule;
+        break;
+
+    case DLL_PROCESS_DETACH:
+        break;
+    }
+    return TRUE;
+}
Index: wine/dlls/iccvid/iccvid_En.rc
diff -u -p /dev/null wine/dlls/iccvid/iccvid_En.rc:1.1
--- /dev/null	28 Nov 2005 11: 1:56 -0000
+++ wine/dlls/iccvid/iccvid_En.rc	28 Nov 2005 11: 1:56 -0000
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2005 Dmitry Timoshkov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+STRINGTABLE DISCARDABLE
+{
+    IDS_NAME "Cinepak Video codec"
+    IDS_DESCRIPTION "Cinepak Video codec"
+}
Index: wine/dlls/iccvid/iccvid_private.h
diff -u -p /dev/null wine/dlls/iccvid/iccvid_private.h:1.1
--- /dev/null	28 Nov 2005 11: 1:56 -0000
+++ wine/dlls/iccvid/iccvid_private.h	28 Nov 2005 11: 1:56 -0000
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2005 Dmitry Timoshkov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef __ICCVID_PRIVATE_H
+#define __ICCVID_PRIVATE_H
+
+#define IDS_NAME        100
+#define IDS_DESCRIPTION 101
+
+#endif /* __ICCVID_PRIVATE_H */
Index: wine/dlls/iccvid/rsrc.rc
diff -u -p /dev/null wine/dlls/iccvid/rsrc.rc:1.1
--- /dev/null	28 Nov 2005 11: 1:56 -0000
+++ wine/dlls/iccvid/rsrc.rc	28 Nov 2005 11: 1:56 -0000
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2005 Dmitry Timoshkov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "windef.h"
+#include "iccvid_private.h"
+
+#include "iccvid_En.rc"



More information about the wine-cvs mailing list