Add support for ICM_GETINFO in iccvid codec (based on msrle32).
This commit is contained in:
parent
e1e83cac75
commit
5f6cf2a342
|
@ -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:
|
||||
|
|
|
@ -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 *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 dwDriverId, HDRVR hdrvr, UINT msg,
|
|||
}
|
||||
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 dwDriverId, HDRVR hdrvr, UINT msg,
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
}
|
|
@ -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 */
|
|
@ -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"
|
Loading…
Reference in New Issue