diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index fa79bda5b7..d017fe96a7 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -8,7 +8,6 @@ #include "winbase.h" #include "vfw.h" #include "wine/winestring.h" -#include "driver.h" #include "mmsystem.h" #include "winerror.h" #include "debugtools.h" diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c index c6bbeb5a5e..df05d795dd 100644 --- a/dlls/comctl32/animate.c +++ b/dlls/comctl32/animate.c @@ -19,7 +19,6 @@ #include "winbase.h" #include "commctrl.h" -#include "driver.h" #include "animate.h" #include "mmsystem.h" #include "services.h" diff --git a/dlls/msacm/driver.c b/dlls/msacm/driver.c index 1a60d8e4fd..f02c902393 100644 --- a/dlls/msacm/driver.c +++ b/dlls/msacm/driver.c @@ -13,7 +13,6 @@ #include "wingdi.h" #include "winuser.h" #include "debugtools.h" -#include "driver.h" #include "heap.h" #include "mmsystem.h" #include "msacm.h" diff --git a/dlls/msacm/internal.c b/dlls/msacm/internal.c index c1db520229..0e8b405b71 100644 --- a/dlls/msacm/internal.c +++ b/dlls/msacm/internal.c @@ -14,7 +14,6 @@ #include "wingdi.h" #include "winuser.h" #include "winerror.h" -#include "driver.h" #include "heap.h" #include "mmsystem.h" #include "msacm.h" diff --git a/dlls/msvideo/drawdib.c b/dlls/msvideo/drawdib.c index e7c9517283..1777f772b9 100644 --- a/dlls/msvideo/drawdib.c +++ b/dlls/msvideo/drawdib.c @@ -11,7 +11,6 @@ #include "winuser.h" #include "winbase.h" #include "debugtools.h" -#include "driver.h" #include "vfw.h" #include "windef.h" diff --git a/dlls/msvideo/msvideo_main.c b/dlls/msvideo/msvideo_main.c index 71e1cb1edd..cb45dab396 100644 --- a/dlls/msvideo/msvideo_main.c +++ b/dlls/msvideo/msvideo_main.c @@ -16,7 +16,6 @@ #include "winuser.h" #include "vfw.h" #include "wine/winestring.h" -#include "driver.h" #include "debugtools.h" #include "ldt.h" #include "heap.h" diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c index e119c72429..ed89597035 100644 --- a/dlls/winmm/joystick.c +++ b/dlls/winmm/joystick.c @@ -18,7 +18,6 @@ #include "winbase.h" #include "wingdi.h" #include "winuser.h" -#include "driver.h" #include "winemm.h" #include "debugtools.h" diff --git a/dlls/winmm/joystick/joystick.c b/dlls/winmm/joystick/joystick.c index 256fdc7240..9ef0abb869 100644 --- a/dlls/winmm/joystick/joystick.c +++ b/dlls/winmm/joystick/joystick.c @@ -40,7 +40,6 @@ #include "wingdi.h" #include "winuser.h" #include "mmddk.h" -#include "driver.h" #include "debugtools.h" DEFAULT_DEBUG_CHANNEL(joystick); diff --git a/dlls/winmm/lolvldrv.c b/dlls/winmm/lolvldrv.c index 0d19c9cc73..c29ee36ca9 100644 --- a/dlls/winmm/lolvldrv.c +++ b/dlls/winmm/lolvldrv.c @@ -11,7 +11,6 @@ #include "heap.h" #include "user.h" /* should be removed asap; used in MMDRV_(Get|Alloc|Free) */ #include "selectors.h" -#include "driver.h" #include "winver.h" #include "module.h" #include "winemm.h" @@ -2365,7 +2364,6 @@ BOOL MMDRV_Init(void) if (MMDRV_Install("msacm.drv", num, TRUE )) num++; if (MMDRV_Install("midimap.drv", num, TRUE )) num++; - /* be sure that size of MMDrvs matches the max number of loadable drivers !! * if not just increase size of MMDrvs */ assert(num <= sizeof(MMDrvs)/sizeof(MMDrvs[0])); diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c index 632c4e8f29..59bea9cb14 100644 --- a/dlls/winmm/mci.c +++ b/dlls/winmm/mci.c @@ -14,7 +14,6 @@ #include "wingdi.h" #include "winuser.h" #include "heap.h" -#include "driver.h" #include "winemm.h" #include "selectors.h" #include "digitalv.h" diff --git a/dlls/winmm/mcianim/mcianim.c b/dlls/winmm/mcianim/mcianim.c index de9468f222..5700c8ba6b 100644 --- a/dlls/winmm/mcianim/mcianim.c +++ b/dlls/winmm/mcianim/mcianim.c @@ -8,7 +8,6 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" -#include "driver.h" #include "mmddk.h" #include "debugtools.h" diff --git a/dlls/winmm/mciavi/mciavi.c b/dlls/winmm/mciavi/mciavi.c index fdbeeaba4b..cb486b0be3 100644 --- a/dlls/winmm/mciavi/mciavi.c +++ b/dlls/winmm/mciavi/mciavi.c @@ -12,7 +12,6 @@ #include "winuser.h" #include "mmddk.h" #include "user.h" -#include "driver.h" #include "digitalv.h" #include "debugtools.h" diff --git a/dlls/winmm/mcicda/mcicda.c b/dlls/winmm/mcicda/mcicda.c index 691c59fea8..c3566453f3 100644 --- a/dlls/winmm/mcicda/mcicda.c +++ b/dlls/winmm/mcicda/mcicda.c @@ -12,7 +12,6 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" -#include "driver.h" #include "mmddk.h" #include "cdrom.h" #include "debugtools.h" diff --git a/dlls/winmm/mciseq/mcimidi.c b/dlls/winmm/mciseq/mcimidi.c index deebb4e8ff..c504d34483 100644 --- a/dlls/winmm/mciseq/mcimidi.c +++ b/dlls/winmm/mciseq/mcimidi.c @@ -21,7 +21,6 @@ #include "wingdi.h" #include "winuser.h" #include "mmddk.h" -#include "driver.h" #include "heap.h" #include "debugtools.h" diff --git a/dlls/winmm/mciwave/mciwave.c b/dlls/winmm/mciwave/mciwave.c index c777786c33..9263b12984 100644 --- a/dlls/winmm/mciwave/mciwave.c +++ b/dlls/winmm/mciwave/mciwave.c @@ -13,7 +13,6 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" -#include "driver.h" #include "mmddk.h" #include "heap.h" #include "debugtools.h" diff --git a/dlls/winmm/midimap/midimap.c b/dlls/winmm/midimap/midimap.c index ec51e7ab88..0ba927cc21 100644 --- a/dlls/winmm/midimap/midimap.c +++ b/dlls/winmm/midimap/midimap.c @@ -8,7 +8,6 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" -#include "driver.h" #include "mmddk.h" #include "debugtools.h" diff --git a/dlls/winmm/mmsystem.c b/dlls/winmm/mmsystem.c index e13bc8f4e6..99c0673168 100644 --- a/dlls/winmm/mmsystem.c +++ b/dlls/winmm/mmsystem.c @@ -22,15 +22,14 @@ #include "winbase.h" #include "wine/winbase16.h" -#include "wownt32.h" #include "heap.h" -#include "driver.h" #include "winemm.h" #include "syslevel.h" #include "callback.h" #include "selectors.h" #include "module.h" #include "debugtools.h" +#include "ntddk.h" DEFAULT_DEBUG_CHANNEL(mmsys) @@ -59,7 +58,8 @@ LPWINE_MM_IDATA MULTIMEDIA_GetIData(void) LPWINE_MM_IDATA iData = MULTIMEDIA_GetIDataNoCheck(); if (!iData) { - ERR("IData not found. Suicide !!!\n"); + ERR("IData not found for pid=%08lx. Suicide !!!\n", GetCurrentProcessId()); + DbgBreakPoint(); ExitProcess(0); } return iData; @@ -81,6 +81,7 @@ static BOOL MULTIMEDIA_CreateIData(HINSTANCE hInstDLL) iData->lpNextIData = lpFirstIData; lpFirstIData = iData; InitializeCriticalSection(&iData->cs); + TRACE("Created IData (%p) for pid %08lx\n", iData, iData->dwThisProcess); return TRUE; } @@ -156,8 +157,8 @@ BOOL WINAPI MMSYSTEM_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds, switch (fdwReason) { case DLL_PROCESS_ATTACH: /* need to load WinMM in order to: - * - correctly initiates shared variables (MULTIMEDIA_Init()) - * - correctly creates the per process WINE_MM_IDATA chunk + * - initiate correctly shared variables (MULTIMEDIA_Init()) + * - create correctly the per process WINE_MM_IDATA chunk */ hndl = LoadLibraryA("WINMM.DLL"); @@ -562,7 +563,7 @@ BOOL WINAPI PlaySoundW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound) !((DWORD)pszSound >> 16)) || !pszSound)) { pszSoundA = HEAP_strdupWtoA(GetProcessHeap(), 0,pszSound); bSound = PlaySoundA(pszSoundA, hmod, fdwSound); - HeapFree(GetProcessHeap(), 0,pszSoundA); + HeapFree(GetProcessHeap(), 0, pszSoundA); } else bSound = PlaySoundA((LPCSTR)pszSound, hmod, fdwSound); @@ -3335,7 +3336,7 @@ static MMRESULT WINAPI MMSYSTEM_MidiStream_Open(HMIDISTRM* lphMidiStrm, LPUINT l *lphMidiStrm = hMidiOut; /* FIXME: is lpuDevice initialized upon entering midiStreamOpen ? */ - FIXME("*lpuDeviceID=%u\n", *lpuDeviceID); + FIXME("*lpuDeviceID=%x\n", *lpuDeviceID); lpwm->mld.uDeviceID = *lpuDeviceID = 0; ret = MMDRV_Open(&lpwm->mld, MODM_OPEN, (DWORD)&lpwm->mod, fdwOpen); diff --git a/dlls/winmm/wavemap/wavemap.c b/dlls/winmm/wavemap/wavemap.c index fd038e716e..9938a9329f 100644 --- a/dlls/winmm/wavemap/wavemap.c +++ b/dlls/winmm/wavemap/wavemap.c @@ -14,7 +14,6 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" -#include "driver.h" #include "mmddk.h" #include "msacm.h" #include "debugtools.h" diff --git a/dlls/winmm/wineoss/audio.c b/dlls/winmm/wineoss/audio.c index cc5f952568..ce80b69a12 100644 --- a/dlls/winmm/wineoss/audio.c +++ b/dlls/winmm/wineoss/audio.c @@ -32,7 +32,6 @@ #include "wingdi.h" #include "winerror.h" #include "wine/winuser16.h" -#include "driver.h" #include "mmddk.h" #include "dsound.h" #include "dsdriver.h" diff --git a/dlls/winmm/wineoss/midi.c b/dlls/winmm/wineoss/midi.c index 3fe5b78842..9fdbeebe75 100644 --- a/dlls/winmm/wineoss/midi.c +++ b/dlls/winmm/wineoss/midi.c @@ -23,7 +23,6 @@ #include "winuser.h" #include "mmddk.h" #include "oss.h" -#include "driver.h" #include "debugtools.h" #include "heap.h" #include "ldt.h" diff --git a/dlls/winmm/wineoss/mixer.c b/dlls/winmm/wineoss/mixer.c index 063ac095a8..0c6a0ec890 100644 --- a/dlls/winmm/wineoss/mixer.c +++ b/dlls/winmm/wineoss/mixer.c @@ -17,7 +17,6 @@ #include #include "windef.h" #include "user.h" -#include "driver.h" #include "mmddk.h" #include "oss.h" #include "debugtools.h" diff --git a/dlls/winmm/wineoss/mmaux.c b/dlls/winmm/wineoss/mmaux.c index 718c4c56db..b62f0944d3 100644 --- a/dlls/winmm/wineoss/mmaux.c +++ b/dlls/winmm/wineoss/mmaux.c @@ -15,7 +15,6 @@ #include #include #include "windef.h" -#include "driver.h" #include "mmddk.h" #include "oss.h" #include "debugtools.h" diff --git a/dlls/winmm/wineoss/oss.c b/dlls/winmm/wineoss/oss.c index e015889066..225df59893 100644 --- a/dlls/winmm/wineoss/oss.c +++ b/dlls/winmm/wineoss/oss.c @@ -8,7 +8,6 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" -#include "driver.h" #include "mmddk.h" #include "oss.h" diff --git a/include/driver.h b/include/driver.h deleted file mode 100644 index deb20bc798..0000000000 --- a/include/driver.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Drivers definitions - */ - -#ifndef __WINE_DRIVER_H -#define __WINE_DRIVER_H - -#include "windef.h" - -#define DRV_LOAD 0x0001 -#define DRV_ENABLE 0x0002 -#define DRV_OPEN 0x0003 -#define DRV_CLOSE 0x0004 -#define DRV_DISABLE 0x0005 -#define DRV_FREE 0x0006 -#define DRV_CONFIGURE 0x0007 -#define DRV_QUERYCONFIGURE 0x0008 -#define DRV_INSTALL 0x0009 -#define DRV_REMOVE 0x000A -#define DRV_EXITSESSION 0x000B -#define DRV_EXITAPPLICATION 0x000C -#define DRV_POWER 0x000F - -#define DRV_RESERVED 0x0800 -#define DRV_USER 0x4000 - -#define DRVCNF_CANCEL 0x0000 -#define DRVCNF_OK 0x0001 -#define DRVCNF_RESTART 0x0002 - -#define DRVEA_NORMALEXIT 0x0001 -#define DRVEA_ABNORMALEXIT 0x0002 - -#define DRV_SUCCESS 0x0001 -#define DRV_FAILURE 0x0000 - -#define GND_FIRSTINSTANCEONLY 0x00000001 - -#define GND_FORWARD 0x00000000 -#define GND_REVERSE 0x00000002 - -typedef struct { - DWORD dwDCISize; - LPCSTR lpszDCISectionName; - LPCSTR lpszDCIAliasName; -} DRVCONFIGINFO16, *LPDRVCONFIGINFO16; - -typedef struct { - DWORD dwDCISize; - LPCWSTR lpszDCISectionName; - LPCWSTR lpszDCIAliasName; -} DRVCONFIGINFO, *LPDRVCONFIGINFO; - - -/* GetDriverInfo16 references this structure, so this a struct defined - * in the Win16 API. - * GetDriverInfo has been deprecated in Win32. - */ -typedef struct -{ - UINT16 length; - HDRVR16 hDriver; - HINSTANCE16 hModule; - CHAR szAliasName[128]; -} DRIVERINFOSTRUCT16, *LPDRIVERINFOSTRUCT16; - -LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg, - LPARAM dwParam1, LPARAM dwParam2); -LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr, - UINT Msg, LPARAM lParam1, LPARAM lParam2); -HDRVR16 WINAPI OpenDriver16(LPCSTR szDriverName, LPCSTR szSectionName, - LPARAM lParam2); -HDRVR WINAPI OpenDriverA(LPCSTR szDriverName, LPCSTR szSectionName, - LPARAM lParam2); -HDRVR WINAPI OpenDriverW(LPCWSTR szDriverName, LPCWSTR szSectionName, - LPARAM lParam2); -#define OpenDriver WINELIB_NAME_AW(OpenDriver) -LRESULT WINAPI CloseDriver16(HDRVR16 hDriver, LPARAM lParam1, LPARAM lParam2); -LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2); -LRESULT WINAPI SendDriverMessage16( HDRVR16 hDriver, UINT16 message, - LPARAM lParam1, LPARAM lParam2 ); -LRESULT WINAPI SendDriverMessage( HDRVR hDriver, UINT message, - LPARAM lParam1, LPARAM lParam2 ); -HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDriver); -HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver); - -/* only win31 version for those exist */ -HDRVR16 WINAPI GetNextDriver16(HDRVR16, DWORD); -BOOL16 WINAPI GetDriverInfo16(HDRVR16, DRIVERINFOSTRUCT16 *); - -DWORD WINAPI GetDriverFlags( HDRVR hDriver ); -#ifdef __WINE__ -/* this call (GetDriverFlags) is not documented, nor the flags returned. - * here are Wine only definitions - */ -#define WINE_GDF_EXIST 0x80000000 -#define WINE_GDF_16BIT 0x10000000 -#endif - -#endif /* __WINE_DRIVER_H */ diff --git a/include/mmsystem.h b/include/mmsystem.h index 2f5829df8c..723df7df2e 100644 --- a/include/mmsystem.h +++ b/include/mmsystem.h @@ -151,6 +151,96 @@ typedef struct { #define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */ #define CALLBACK_EVENT 0x00050000l /* dwCallback is an EVENT Handler */ +#define DRV_LOAD 0x0001 +#define DRV_ENABLE 0x0002 +#define DRV_OPEN 0x0003 +#define DRV_CLOSE 0x0004 +#define DRV_DISABLE 0x0005 +#define DRV_FREE 0x0006 +#define DRV_CONFIGURE 0x0007 +#define DRV_QUERYCONFIGURE 0x0008 +#define DRV_INSTALL 0x0009 +#define DRV_REMOVE 0x000A +#define DRV_EXITSESSION 0x000B +#define DRV_EXITAPPLICATION 0x000C +#define DRV_POWER 0x000F + +#define DRV_RESERVED 0x0800 +#define DRV_USER 0x4000 + +#define DRVCNF_CANCEL 0x0000 +#define DRVCNF_OK 0x0001 +#define DRVCNF_RESTART 0x0002 + +#define DRVEA_NORMALEXIT 0x0001 +#define DRVEA_ABNORMALEXIT 0x0002 + +#define DRV_SUCCESS 0x0001 +#define DRV_FAILURE 0x0000 + +#define GND_FIRSTINSTANCEONLY 0x00000001 + +#define GND_FORWARD 0x00000000 +#define GND_REVERSE 0x00000002 + +typedef struct { + DWORD dwDCISize; + LPCSTR lpszDCISectionName; + LPCSTR lpszDCIAliasName; +} DRVCONFIGINFO16, *LPDRVCONFIGINFO16; + +typedef struct { + DWORD dwDCISize; + LPCWSTR lpszDCISectionName; + LPCWSTR lpszDCIAliasName; +} DRVCONFIGINFO, *LPDRVCONFIGINFO; + + +/* GetDriverInfo16 references this structure, so this a struct defined + * in the Win16 API. + * GetDriverInfo has been deprecated in Win32. + */ +typedef struct +{ + UINT16 length; + HDRVR16 hDriver; + HINSTANCE16 hModule; + CHAR szAliasName[128]; +} DRIVERINFOSTRUCT16, *LPDRIVERINFOSTRUCT16; + +LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg, + LPARAM dwParam1, LPARAM dwParam2); +LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr, + UINT Msg, LPARAM lParam1, LPARAM lParam2); +HDRVR16 WINAPI OpenDriver16(LPCSTR szDriverName, LPCSTR szSectionName, + LPARAM lParam2); +HDRVR WINAPI OpenDriverA(LPCSTR szDriverName, LPCSTR szSectionName, + LPARAM lParam2); +HDRVR WINAPI OpenDriverW(LPCWSTR szDriverName, LPCWSTR szSectionName, + LPARAM lParam2); +#define OpenDriver WINELIB_NAME_AW(OpenDriver) +LRESULT WINAPI CloseDriver16(HDRVR16 hDriver, LPARAM lParam1, LPARAM lParam2); +LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2); +LRESULT WINAPI SendDriverMessage16(HDRVR16 hDriver, UINT16 message, + LPARAM lParam1, LPARAM lParam2); +LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, + LPARAM lParam1, LPARAM lParam2); +HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDriver); +HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver); + +/* only win31 version for those exist */ +HDRVR16 WINAPI GetNextDriver16(HDRVR16, DWORD); +BOOL16 WINAPI GetDriverInfo16(HDRVR16, DRIVERINFOSTRUCT16 *); + +DWORD WINAPI GetDriverFlags(HDRVR hDriver); +#ifdef __WINE__ +/* this call (GetDriverFlags) is not documented, nor the flags returned. + * here are Wine only definitions + */ +#define WINE_GDF_EXIST 0x80000000 +#define WINE_GDF_16BIT 0x10000000 +#endif + typedef void CALLBACK (*LPDRVCALLBACK16) (HDRVR16 h, UINT16 uMessage, DWORD dwUser, DWORD dw1, DWORD dw2); typedef void CALLBACK (*LPDRVCALLBACK) (HDRVR h, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2); diff --git a/include/msacm.h b/include/msacm.h index 5f55bcbf3d..37a277748d 100644 --- a/include/msacm.h +++ b/include/msacm.h @@ -6,7 +6,6 @@ #define __WINE_MSACM_H #include "windef.h" -#include "driver.h" #include "mmsystem.h" #include "mmreg.h" diff --git a/include/vfw.h b/include/vfw.h index 9ef93d19a1..466f82f6a7 100644 --- a/include/vfw.h +++ b/include/vfw.h @@ -10,13 +10,19 @@ #define VFWAPI WINAPI #define VFWAPIV WINAPIV +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + typedef HANDLE16 HDRAWDIB16; typedef HANDLE HDRAWDIB; HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCSTR szFile); HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile); #define MCIWndCreate WINELIB_NAME_AW(MCIWndCreate) -DWORD VFWAPI VideoForWindowsVersion(void); +DWORD VFWAPI VideoForWindowsVersion(void); +LONG VFWAPI InitVFW(void); +LONG VFWAPI TermVFW(void); #ifndef mmioFOURCC #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \ @@ -46,12 +52,12 @@ DECLARE_HANDLE(HIC); /* HIC struct (same layout as Win95 one) */ typedef struct tagWINE_HIC { DWORD magic; /* 00: 'Smag' */ - HANDLE curthread; /* 04: */ + HANDLE curthread; /* 04: */ DWORD type; /* 08: */ DWORD handler; /* 0C: */ HDRVR hdrv; /* 10: */ DWORD private; /* 14:(handled by SendDriverMessage)*/ - FARPROC driverproc; /* 18:(handled by SendDriverMessage)*/ + FARPROC driverproc; /* 18:(handled by SendDriverMessage)*/ DWORD x1; /* 1c: name? */ WORD x2; /* 20: */ DWORD x3; /* 22: */ @@ -201,7 +207,7 @@ DWORD VFWAPIV ICCompress( ); #define ICCompressGetFormat(hic, lpbiInput, lpbiOutput) \ - ICSendMessage( \ + ICSendMessage( \ hic,ICM_COMPRESS_GET_FORMAT,(DWORD)(LPVOID)(lpbiInput), \ (DWORD)(LPVOID)(lpbiOutput) \ ) @@ -214,7 +220,7 @@ DWORD VFWAPIV ICCompress( (DWORD)(LPVOID)(lpbiOutput) \ ) -#define ICCompressGetSize(hic, lpbiInput, lpbiOutput) \ +#define ICCompressGetSize(hic, lpbiInput, lpbiOutput) \ ICSendMessage( \ hic, ICM_COMPRESS_GET_SIZE, (DWORD)(LPVOID)(lpbiInput), \ (DWORD)(LPVOID)(lpbiOutput) \ @@ -226,7 +232,6 @@ DWORD VFWAPIV ICCompress( (DWORD)(LPVOID)(lpbiOutput) \ ) - #define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0) /* ICCOMPRESSFRAMES.dwFlags */ @@ -250,6 +255,20 @@ typedef struct { LONG CALLBACK (*PutData)(LPARAM lOutput,LONG lFrame,LPVOID lpBits,LONG len); } ICCOMPRESSFRAMES; +typedef struct { + DWORD dwFlags; + LPARAM lParam; + /* messages for Status callback */ +#define ICSTATUS_START 0 +#define ICSTATUS_STATUS 1 +#define ICSTATUS_END 2 +#define ICSTATUS_ERROR 3 +#define ICSTATUS_YIELD 4 + /* FIXME: some X11 libs define Status as int... */ + /* LONG CALLBACK (*zStatus)(LPARAM lParam, UINT message, LONG l); */ + LONG CALLBACK (*zStatus)(LPARAM lParam, UINT message, LONG l); +} ICSETSTATUSPROC; + /* Values for wMode of ICOpen() */ #define ICMODE_COMPRESS 1 #define ICMODE_DECOMPRESS 2 @@ -331,7 +350,7 @@ typedef struct { /* Decompression stuff */ #define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */ #define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */ -#define ICDECOMPRESS_PREROL 0x20000000 /* this frame is before real start */ +#define ICDECOMPRESS_PREROLL 0x20000000 /* this frame is before real start */ #define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */ #define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */ @@ -352,15 +371,15 @@ typedef struct { LPVOID lpDst; /* changed for ICM_DECOMPRESSEX */ - INT xDst; /* destination rectangle */ - INT yDst; - INT dxDst; - INT dyDst; + INT xDst; /* destination rectangle */ + INT yDst; + INT dxDst; + INT dyDst; - INT xSrc; /* source rectangle */ - INT ySrc; - INT dxSrc; - INT dySrc; + INT xSrc; /* source rectangle */ + INT ySrc; + INT dxSrc; + INT dySrc; } ICDECOMPRESSEX; #include "pshpack1.h" @@ -372,15 +391,15 @@ typedef struct { LPBITMAPINFOHEADER lpbiDst; LPVOID lpDst; - INT16 xDst; /* destination rectangle */ - INT16 yDst; - INT16 dxDst; - INT16 dyDst; + INT16 xDst; /* destination rectangle */ + INT16 yDst; + INT16 dxDst; + INT16 dyDst; - INT16 xSrc; /* source rectangle */ - INT16 ySrc; - INT16 dxSrc; - INT16 dySrc; + INT16 xSrc; /* source rectangle */ + INT16 ySrc; + INT16 dxSrc; + INT16 dySrc; } ICDECOMPRESSEX16; #include "poppack.h" @@ -422,22 +441,159 @@ DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,L #define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0) +LRESULT VFWAPI ICSendMessage(HIC hic, UINT msg, DWORD dw1, DWORD dw2); +LRESULT VFWAPI ICSendMessage16(HIC16 hic, UINT16 msg, DWORD dw1, DWORD dw2); + +static LRESULT VFWAPI inline ICDecompressEx(HIC hic, DWORD dwFlags, + LPBITMAPINFOHEADER lpbiSrc, LPVOID lpSrc, + int xSrc, int ySrc, int dxSrc, int dySrc, + LPBITMAPINFOHEADER lpbiDst, LPVOID lpDst, + int xDst, int yDst, int dxDst, int dyDst) +{ + ICDECOMPRESSEX ic; + + ic.dwFlags = dwFlags; + ic.lpbiSrc = lpbiSrc; + ic.lpSrc = lpSrc; + ic.xSrc = xSrc; + ic.ySrc = ySrc; + ic.dxSrc = dxSrc; + ic.dySrc = dySrc; + ic.lpbiDst = lpbiDst; + ic.lpDst = lpDst; + ic.xDst = xDst; + ic.yDst = yDst; + ic.dxDst = dxDst; + ic.dyDst = dyDst; + return ICSendMessage(hic, ICM_DECOMPRESSEX, (DWORD)&ic, sizeof(ic)); +} + +static LRESULT VFWAPI inline ICDecompressExBegin(HIC hic, DWORD dwFlags, + LPBITMAPINFOHEADER lpbiSrc, + LPVOID lpSrc, + int xSrc, int ySrc, int dxSrc, int dySrc, + LPBITMAPINFOHEADER lpbiDst, + LPVOID lpDst, + int xDst, + int yDst, + int dxDst, + int dyDst) +{ + ICDECOMPRESSEX ic; + + ic.dwFlags = dwFlags; + ic.lpbiSrc = lpbiSrc; + ic.lpSrc = lpSrc; + ic.xSrc = xSrc; + ic.ySrc = ySrc; + ic.dxSrc = dxSrc; + ic.dySrc = dySrc; + ic.lpbiDst = lpbiDst; + ic.lpDst = lpDst; + ic.xDst = xDst; + ic.yDst = yDst; + ic.dxDst = dxDst; + ic.dyDst = dyDst; + return ICSendMessage(hic, ICM_DECOMPRESSEX_BEGIN, (DWORD)&ic, sizeof(ic)); +} +static LRESULT VFWAPI inline ICDecompressExQuery(HIC hic, DWORD dwFlags, + LPBITMAPINFOHEADER lpbiSrc, + LPVOID lpSrc, + int xSrc, int ySrc, int dxSrc, int dySrc, + LPBITMAPINFOHEADER lpbiDst, + LPVOID lpDst, + int xDst, + int yDst, + int dxDst, + int dyDst) +{ + ICDECOMPRESSEX ic; + + ic.dwFlags = dwFlags; + ic.lpbiSrc = lpbiSrc; + ic.lpSrc = lpSrc; + ic.xSrc = xSrc; + ic.ySrc = ySrc; + ic.dxSrc = dxSrc; + ic.dySrc = dySrc; + ic.lpbiDst = lpbiDst; + ic.lpDst = lpDst; + ic.xDst = xDst; + ic.yDst = yDst; + ic.dxDst = dxDst; + ic.dyDst = dyDst; + return ICSendMessage(hic, ICM_DECOMPRESSEX_QUERY, (DWORD)&ic, sizeof(ic)); +} + +#define ICDecompressExEnd(hic) \ + ICSendMessage(hic, ICM_DECOMPRESSEX_END, 0, 0) #define ICDRAW_QUERY 0x00000001L /* test for support */ #define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */ #define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */ +#define ICDRAW_ANIMATE 0x00000008L /* expect palette animation */ +#define ICDRAW_CONTINUE 0x00000010L /* draw is a continuation of previous draw */ +#define ICDRAW_MEMORYDC 0x00000020L /* DC is offscreen, by the way */ +#define ICDRAW_UPDATING 0x00000040L /* We're updating, as opposed to playing */ +#define ICDRAW_RENDER 0x00000080L /* used to render data not draw it */ +#define ICDRAW_BUFFER 0x00000100L /* buffer data offscreen, we will need to update it */ + +#define ICDecompressOpen(fccType, fccHandler, lpbiIn, lpbiOut) \ + ICLocate(fccType, fccHandler, lpbiIn, lpbiOut, ICMODE_DECOMPRESS) + +#define ICDrawOpen(fccType, fccHandler, lpbiIn) \ + ICLocate(fccType, fccHandler, lpbiIn, NULL, ICMODE_DRAW) + +HANDLE VFWAPI ICImageCompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn, + LPVOID lpBits, LPBITMAPINFO lpbiOut, LONG lQuality, + LONG* plSize); + +HANDLE VFWAPI ICImageDecompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn, + LPVOID lpBits, LPBITMAPINFO lpbiOut); BOOL VFWAPI ICInfo(DWORD fccType, DWORD fccHandler, ICINFO * lpicinfo); +BOOL VFWAPI ICInstall(DWORD fccType, DWORD fccHandler, LPARAM lParam, LPSTR szDesc, UINT wFlags); +BOOL VFWAPI ICRemove(DWORD fccType, DWORD fccHandler, UINT wFlags); LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, DWORD cb); HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode); -HIC16 VFWAPI ICOpen16(DWORD fccType, DWORD fccHangler, UINT16 wMode); +HIC16 VFWAPI ICOpen16(DWORD fccType, DWORD fccHangler, UINT16 wMode); HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHandler); -LRESULT VFWAPI ICClose(HIC hic); -LRESULT VFWAPI ICSendMessage(HIC hic, UINT msg, DWORD dw1, DWORD dw2); -LRESULT VFWAPI ICSendMessage16(HIC16 hic, UINT16 msg, DWORD dw1, DWORD dw2); -HIC VFWAPI ICLocate(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags); -HIC16 VFWAPI ICLocate16(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags); +LRESULT VFWAPI ICClose(HIC hic); +HIC VFWAPI ICLocate(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags); +HIC16 VFWAPI ICLocate16(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags); +HIC VFWAPI ICGetDisplayFormat(HIC hic, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, int BitDepth, int dx, int dy); + +/* Values for wFlags of ICInstall() */ +#define ICINSTALL_UNICODE 0x8000 +#define ICINSTALL_FUNCTION 0x0001 +#define ICINSTALL_DRIVER 0x0002 +#define ICINSTALL_HDRV 0x0004 +#define ICINSTALL_DRIVERW 0x8002 + +#define ICGetState(hic, pv, cb) \ + ICSendMessage(hic, ICM_GETSTATE, (DWORD)(LPVOID)(pv), (DWORD)(cb)) +#define ICSetState(hic, pv, cb) \ + ICSendMessage(hic, ICM_SETSTATE, (DWORD)(LPVOID)(pv), (DWORD)(cb)) +#define ICGetStateSize(hic) \ + ICGetState(hic, NULL, 0) + +static DWORD inline ICGetDefaultQuality(HIC hic) +{ + DWORD dwICValue; + ICSendMessage(hic, ICM_GETDEFAULTQUALITY, (DWORD)(LPVOID)&dwICValue, sizeof(DWORD)); + return dwICValue; +} + +static DWORD inline ICGetDefaultKeyFrameRate(HIC hic) +{ + DWORD dwICValue; + ICSendMessage(hic, ICM_GETDEFAULTKEYFRAMERATE, (DWORD)(LPVOID)&dwICValue, sizeof(DWORD)); + return dwICValue; +} + +#define ICDrawWindow(hic, prc) \ + ICSendMessage(hic, ICM_DRAW_WINDOW, (DWORD)(LPVOID)(prc), sizeof(RECT)) /* As passed to ICM_DRAW_SUGGESTFORMAT */ typedef struct { @@ -462,6 +618,13 @@ typedef struct { HIC16 hicDecompressor; } ICDRAWSUGGEST16; +typedef struct { + DWORD dwFlags; + int iStart; + int iLen; + LPPALETTEENTRY lppe; +} ICPALETTE; + DWORD VFWAPIV ICDrawBegin( HIC hic, DWORD dwFlags,/* flags */ @@ -487,7 +650,7 @@ DWORD VFWAPIV ICDrawBegin16( HPALETTE16 hpal, /* palette to draw with */ HWND16 hwnd, /* window to draw to */ HDC16 hdc, /* HDC to draw to */ - INT16 xDst, /* destination rectangle */ + INT16 xDst, /* destination rectangle */ INT16 yDst, INT16 dxDst, INT16 dyDst, @@ -557,7 +720,126 @@ typedef struct { DWORD VFWAPIV ICDraw(HIC hic,DWORD dwFlags,LPVOID lpFormat,LPVOID lpData,DWORD cbData,LONG lTime); +static LRESULT VFWAPI inline ICDrawSuggestFormat(HIC hic, LPBITMAPINFOHEADER lpbiIn, + LPBITMAPINFOHEADER lpbiOut, + int dxSrc, int dySrc, + int dxDst, int dyDst, + HIC hicDecomp) +{ + ICDRAWSUGGEST ic; + + ic.lpbiIn = lpbiIn; + ic.lpbiSuggest = lpbiOut; + ic.dxSrc = dxSrc; + ic.dySrc = dySrc; + ic.dxDst = dxDst; + ic.dyDst = dyDst; + ic.hicDecompressor = hicDecomp; + return ICSendMessage(hic, ICM_DRAW_SUGGESTFORMAT, (DWORD)&ic, sizeof(ic)); +} + +#define ICDrawQuery(hic, lpbiInput) \ + ICSendMessage(hic, ICM_DRAW_QUERY, (DWORD)(LPVOID)(lpbiInput), 0L) + +#define ICDrawChangePalette(hic, lpbiInput) \ + ICSendMessage(hic, ICM_DRAW_CHANGEPALETTE, (DWORD)(LPVOID)(lpbiInput), 0L) + +#define ICGetBuffersWanted(hic, lpdwBuffers) \ + ICSendMessage(hic, ICM_GETBUFFERSWANTED, (DWORD)(LPVOID)(lpdwBuffers), 0) + +#define ICDrawEnd(hic) \ + ICSendMessage(hic, ICM_DRAW_END, 0, 0) + +#define ICDrawStart(hic) \ + ICSendMessage(hic, ICM_DRAW_START, 0, 0) + +#define ICDrawStartPlay(hic, lFrom, lTo) \ + ICSendMessage(hic, ICM_DRAW_START_PLAY, (DWORD)(lFrom), (DWORD)(lTo)) + +#define ICDrawStop(hic) \ + ICSendMessage(hic, ICM_DRAW_STOP, 0, 0) + +#define ICDrawStopPlay(hic) \ + ICSendMessage(hic, ICM_DRAW_STOP_PLAY, 0, 0) + +#define ICDrawGetTime(hic, lplTime) \ + ICSendMessage(hic, ICM_DRAW_GETTIME, (DWORD)(LPVOID)(lplTime), 0) + +#define ICDrawSetTime(hic, lTime) \ + ICSendMessage(hic, ICM_DRAW_SETTIME, (DWORD)lTime, 0) + +#define ICDrawRealize(hic, hdc, fBackground) \ + ICSendMessage(hic, ICM_DRAW_REALIZE, (DWORD)(UINT)(HDC)(hdc), (DWORD)(BOOL)(fBackground)) + +#define ICDrawFlush(hic) \ + ICSendMessage(hic, ICM_DRAW_FLUSH, 0, 0) + +#define ICDrawRenderBuffer(hic) \ + ICSendMessage(hic, ICM_DRAW_RENDERBUFFER, 0, 0) + +static LRESULT VFWAPI inline ICSetStatusProc(HIC hic, DWORD dwFlags, LRESULT lParam, + LONG (CALLBACK *fpfnStatus)(LPARAM, UINT, LONG)) +{ + ICSETSTATUSPROC ic; + + ic.dwFlags = dwFlags; + ic.lParam = lParam; + /* FIXME: see comment in ICSETSTATUSPROC definition */ + ic.zStatus = fpfnStatus; + + return ICSendMessage(hic, ICM_SET_STATUS_PROC, (DWORD)&ic, sizeof(ic)); +} + +typedef struct { + LONG cbSize; + DWORD dwFlags; + HIC hic; + DWORD fccType; + DWORD fccHandler; + LPBITMAPINFO lpbiIn; + LPBITMAPINFO lpbiOut; + LPVOID lpBitsOut; + LPVOID lpBitsPrev; + LONG lFrame; + LONG lKey; + LONG lDataRate; + LONG lQ; + LONG lKeyCount; + LPVOID lpState; + LONG cbState; +} COMPVARS, *PCOMPVARS; + +#define ICMF_COMPVARS_VALID 0x00000001 + +BOOL VFWAPI ICCompressorChoose(HWND hwnd, UINT uiFlags, LPVOID pvIn, LPVOID lpData, + PCOMPVARS pc, LPSTR lpszTitle); + +#define ICMF_CHOOSE_KEYFRAME 0x0001 +#define ICMF_CHOOSE_DATARATE 0x0002 +#define ICMF_CHOOSE_PREVIEW 0x0004 +#define ICMF_CHOOSE_ALLCOMPRESSORS 0x0008 + +BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn); +void VFWAPI ICSeqCompressFrameEnd(PCOMPVARS pc); + +LPVOID VFWAPI ICSeqCompressFrame(PCOMPVARS pc, UINT uiFlags, LPVOID lpBits, + BOOL *pfKey, LONG *plSize); +void VFWAPI ICCompressorFree(PCOMPVARS pc); + /********************* AVIFILE function declarations *************************/ +#define formtypeAVI mmioFOURCC('A', 'V', 'I', ' ') +#define listtypeAVIHEADER mmioFOURCC('h', 'd', 'r', 'l') +#define ckidAVIMAINHDR mmioFOURCC('a', 'v', 'i', 'h') +#define listtypeSTREAMHEADER mmioFOURCC('s', 't', 'r', 'l') +#define ckidSTREAMHEADER mmioFOURCC('s', 't', 'r', 'h') +#define ckidSTREAMFORMAT mmioFOURCC('s', 't', 'r', 'f') +#define ckidSTREAMHANDLERDATA mmioFOURCC('s', 't', 'r', 'd') +#define ckidSTREAMNAME mmioFOURCC('s', 't', 'r', 'n') + +#define listtypeAVIMOVIE mmioFOURCC('m', 'o', 'v', 'i') +#define listtypeAVIRECORD mmioFOURCC('r', 'e', 'c', ' ') + +#define ckidAVINEWINDEX mmioFOURCC('i', 'd', 'x', '1') #define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's') #define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's') @@ -621,6 +903,7 @@ typedef struct { /* AVIINDEXENTRY.dwFlags */ #define AVIIF_LIST 0x00000001 /* chunk is a 'LIST' */ +#define AVIIF_TWOCC 0x00000002 #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */ #define AVIIF_NOTIME 0x00000100 /* this frame doesn't take any time */ @@ -826,7 +1109,16 @@ HRESULT WINAPI AVIStreamSetFormat(PAVISTREAM iface,LONG pos,LPVOID format,LONG f LONG WINAPI AVIStreamStart(PAVISTREAM iface); HRESULT WINAPI AVIStreamWrite(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,DWORD flags,LONG *sampwritten,LONG *byteswritten); HRESULT WINAPI AVIStreamWriteData(PAVISTREAM iface,DWORD fcc,LPVOID lp,LONG size); +HRESULT WINAPI AVIStreamOpenFromFileA(PAVISTREAM *ppavi, LPCSTR szFile, + DWORD fccType, LONG lParam, + UINT mode, CLSID *pclsidHandler); +HRESULT WINAPI AVIStreamOpenFromFileW(PAVISTREAM *ppavi, LPCWSTR szFile, + DWORD fccType, LONG lParam, + UINT mode, CLSID *pclsidHandler); +#define AVIStreamOpenFromFile WINELIB_NAME_AW(AVIStreamOpenFromFile) +#define AVIStreamFormatSize(pavi, lPos, plSize) \ + AVIStreamReadFormat(pavi, lPos, NULL, plSize) /***************************************************************************** * IAVIFile interface @@ -930,48 +1222,56 @@ ICOM_DEFINE(IGetFrame,IUnknown) HDRAWDIB VFWAPI DrawDibOpen( void ); UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground); -BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, - HDC hdc, - INT dxDst, - INT dyDst, - LPBITMAPINFOHEADER lpbi, - INT dxSrc, - INT dySrc, - UINT wFlags); +BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, HDC hdc, INT dxDst, INT dyDst, + LPBITMAPINFOHEADER lpbi, INT dxSrc, INT dySrc, UINT wFlags); -BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, - HDC hdc, - INT xDst, - INT yDst, - INT dxDst, - INT dyDst, - LPBITMAPINFOHEADER lpbi, - LPVOID lpBits, - INT xSrc, - INT ySrc, - INT dxSrc, - INT dySrc, - UINT wFlags); +BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, INT xDst, INT yDst, INT dxDst, INT dyDst, + LPBITMAPINFOHEADER lpbi, LPVOID lpBits, + INT xSrc, INT ySrc, INT dxSrc, INT dySrc, UINT wFlags); /* DrawDibDraw flags */ -#define DDF_UPDATE 0x0002 +#define DDF_UPDATE 0x0002 #define DDF_SAME_HDC 0x0004 #define DDF_SAME_DRAW 0x0008 #define DDF_DONTDRAW 0x0010 -#define DDF_ANIMATE 0x0020 -#define DDF_BUFFER 0x0040 +#define DDF_ANIMATE 0x0020 +#define DDF_BUFFER 0x0040 #define DDF_JUSTDRAWIT 0x0080 #define DDF_FULLSCREEN 0x0100 #define DDF_BACKGROUNDPAL 0x0200 #define DDF_NOTKEYFRAME 0x0400 -#define DDF_HURRYUP 0x0800 +#define DDF_HURRYUP 0x0800 #define DDF_HALFTONE 0x1000 +#define DDF_PREROLL DDF_DONTDRAW +#define DDF_SAME_DIB DDF_SAME_DRAW +#define DDF_SAME_SIZE DDF_SAME_DRAW + BOOL VFWAPI DrawDibSetPalette(HDRAWDIB hdd, HPALETTE hpal); HPALETTE VFWAPI DrawDibGetPalette(HDRAWDIB hdd); +BOOL VFWAPI DrawDibChangePalette(HDRAWDIB hdd, int iStart, int iLen, LPPALETTEENTRY lppe); +LPVOID VFWAPI DrawDibGetBuffer(HDRAWDIB hdd, LPBITMAPINFOHEADER lpbi, DWORD dwSize, DWORD dwFlags); + +BOOL VFWAPI DrawDibStart(HDRAWDIB hdd, DWORD rate); +BOOL VFWAPI DrawDibStop(HDRAWDIB hdd); +#define DrawDibUpdate(hdd, hdc, x, y) \ + DrawDibDraw(hdd, hdc, x, y, 0, 0, NULL, NULL, 0, 0, 0, 0, DDF_UPDATE) BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd); BOOL VFWAPI DrawDibClose(HDRAWDIB hdd); +/* display profiling */ +#define PD_CAN_DRAW_DIB 0x0001 +#define PD_CAN_STRETCHDIB 0x0002 +#define PD_STRETCHDIB_1_1_OK 0x0004 +#define PD_STRETCHDIB_1_2_OK 0x0008 +#define PD_STRETCHDIB_1_N_OK 0x0010 + +DWORD VFWAPI DrawDibProfileDisplay(LPBITMAPINFOHEADER lpbi); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* __WINE_VFW_H */ diff --git a/programs/avitools/icinfo.c b/programs/avitools/icinfo.c index 7ecdc1a102..742c89ba07 100644 --- a/programs/avitools/icinfo.c +++ b/programs/avitools/icinfo.c @@ -1,7 +1,6 @@ #include #include #include "windows.h" -#include "driver.h" #include "mmsystem.h" #include "vfw.h" diff --git a/windows/driver.c b/windows/driver.c index c176354b34..859b6f5e7a 100644 --- a/windows/driver.c +++ b/windows/driver.c @@ -14,7 +14,6 @@ #include "wine/winbase16.h" #include "wingdi.h" #include "winuser.h" -#include "driver.h" #include "ldt.h" #include "module.h" #include "mmddk.h" @@ -637,7 +636,7 @@ static BOOL DRIVER_AddToList(LPWINE_DRIVER lpNewDrv, LPARAM lParam, BOOL bCallFr * * Creates unique ID for 16 bit drivers. */ -static HDRVR16 DRIVER_CreateDrvr16() +static HDRVR16 DRIVER_CreateDrvr16(void) { static WORD DRIVER_hDrvr16Counter = 0;