Implemented a large number of the msvideo dll routines.

This commit is contained in:
Bradley Baetz 2000-07-08 12:50:26 +00:00 committed by Alexandre Julliard
parent 19cef6ca10
commit a1491dea90
10 changed files with 1422 additions and 218 deletions

View File

@ -1,3 +1,4 @@
*.glue.c
*.spec.c
*.spec.glue.s
Makefile

View File

@ -8,7 +8,10 @@ ALTNAMES = msvideo
IMPORTS = winmm
C_SRCS = \
msvideo_main.c
msvideo_main.c \
drawdib.c
GLUE = msvideo_main.c
@MAKE_DLL_RULES@

450
dlls/msvideo/drawdib.c Normal file
View File

@ -0,0 +1,450 @@
/*
* Copyright 2000 Bradley Baetz
*
* Fixme: Some flags are ignored
* Should be doing buffering when requested
* Handle palettes
*/
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
#include "winbase.h"
#include "debugtools.h"
#include "driver.h"
#include "vfw.h"
#include "windef.h"
DEFAULT_DEBUG_CHANNEL(msvideo);
typedef struct {
HDC hdc;
INT dxDst;
INT dyDst;
LPBITMAPINFOHEADER lpbi;
INT dxSrc;
INT dySrc;
HPALETTE hpal; /* Palette to use for the DIB */
BOOL begun; /* DrawDibBegin has been called */
LPBITMAPINFOHEADER lpbiOut; /* Output format */
HIC hic; /* HIC for decompression */
HDC hMemDC; /* DC for buffering */
HBITMAP hOldDib; /* Original Dib */
HBITMAP hDib; /* DibSection */
LPVOID lpvbits; /* Buffer for holding decompressed dib */
} WINE_HDD;
/***********************************************************************
* DrawDibOpen [MSVFW32.10]
*/
HDRAWDIB VFWAPI DrawDibOpen(void) {
HDRAWDIB hdd;
TRACE("(void)\n");
hdd = GlobalAlloc16(GHND,sizeof(WINE_HDD));
TRACE("=> %d\n",hdd);
return hdd;
}
/***********************************************************************
* DrawDibOpen [MSVIDEO.102]
*/
HDRAWDIB16 VFWAPI DrawDibOpen16(void) {
return (HDRAWDIB16)DrawDibOpen();
}
/***********************************************************************
* DrawDibClose [MSVFW32.5]
*/
BOOL VFWAPI DrawDibClose(HDRAWDIB hdd) {
WINE_HDD *whdd = GlobalLock16(hdd);
TRACE("(0x%08lx)\n",(DWORD)hdd);
if (!whdd)
return FALSE;
if (whdd->begun)
DrawDibEnd(hdd);
GlobalUnlock16(hdd);
GlobalFree16(hdd);
return TRUE;
}
/***********************************************************************
* DrawDibClose [MSVIDEO.103]
*/
BOOL16 VFWAPI DrawDibClose16(HDRAWDIB16 hdd) {
return DrawDibClose(hdd);
}
/***********************************************************************
* DrawDibEnd [MSVFW32.7]
*/
BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd) {
BOOL ret = TRUE;
WINE_HDD *whdd = GlobalLock16(hdd);
TRACE("(0x%08lx)\n",(DWORD)hdd);
whdd->hpal = 0; /* Do not free this */
whdd->hdc = 0;
if (whdd->lpbi) {
HeapFree(GetProcessHeap(),0,whdd->lpbi);
whdd->lpbi = NULL;
}
if (whdd->lpbiOut) {
HeapFree(GetProcessHeap(),0,whdd->lpbiOut);
whdd->lpbiOut = NULL;
}
whdd->begun = FALSE;
/*if (whdd->lpvbits)
HeapFree(GetProcessHeap(),0,whdd->lpvbuf);*/
if (whdd->hMemDC) {
SelectObject(whdd->hMemDC,whdd->hOldDib);
DeleteDC(whdd->hMemDC);
}
if (whdd->hDib)
DeleteObject(whdd->hDib);
if (whdd->hic) {
ICDecompressEnd(whdd->hic);
ICClose(whdd->hic);
}
whdd->lpvbits = NULL;
GlobalUnlock16(hdd);
return ret;
}
/***********************************************************************
* DrawDibEnd [MSVIDEO.105]
*/
BOOL16 VFWAPI DrawDibEnd16(HDRAWDIB16 hdd) {
return DrawDibEnd(hdd);
}
/***********************************************************************
* DrawDibBegin [MSVFW32.3]
*/
BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd,
HDC hdc,
INT dxDst,
INT dyDst,
LPBITMAPINFOHEADER lpbi,
INT dxSrc,
INT dySrc,
UINT wFlags) {
BOOL ret = TRUE;
WINE_HDD *whdd;
TRACE("(%d,0x%lx,%d,%d,%p,%d,%d,0x%08lx)\n",
hdd,(DWORD)hdc,dxDst,dyDst,lpbi,dxSrc,dySrc,(DWORD)wFlags
);
if (wFlags)
FIXME("wFlags == 0x%08lx not handled\n",(DWORD)wFlags);
whdd = (WINE_HDD*)GlobalLock16(hdd);
if (whdd->begun)
DrawDibEnd(hdd);
if (lpbi->biCompression) {
DWORD size;
whdd->hic = ICOpen(ICTYPE_VIDEO,lpbi->biCompression,ICMODE_DECOMPRESS);
if (!whdd->hic) {
ERR("Could not open IC. biCompression == 0x%08lx\n",lpbi->biCompression);
ret = FALSE;
}
if (ret) {
size = ICDecompressGetFormat(whdd->hic,lpbi,NULL);
if (size == ICERR_UNSUPPORTED) {
FIXME("Codec doesn't support GetFormat, giving up.\n");
ret = FALSE;
}
}
if (ret) {
whdd->lpbiOut = HeapAlloc(GetProcessHeap(),0,size);
if (ICDecompressGetFormat(whdd->hic,lpbi,whdd->lpbiOut) != ICERR_OK)
ret = FALSE;
}
if (ret) {
/* FIXME: Use Ex functions if available? */
if (ICDecompressBegin(whdd->hic,lpbi,whdd->lpbiOut) != ICERR_OK)
ret = FALSE;
TRACE("biSizeImage == %ld\n",whdd->lpbiOut->biSizeImage);
TRACE("biCompression == %ld\n",whdd->lpbiOut->biCompression);
TRACE("biBitCount == %d\n",whdd->lpbiOut->biBitCount);
}
} else {
/* No compression */
TRACE("Not compressed!\n");
whdd->lpbiOut = HeapAlloc(GetProcessHeap(),0,lpbi->biSize);
memcpy(whdd->lpbiOut,lpbi,lpbi->biSize);
}
if (ret) {
/*whdd->lpvbuf = HeapAlloc(GetProcessHeap(),0,whdd->lpbiOut->biSizeImage);*/
whdd->hMemDC = CreateCompatibleDC(hdc);
TRACE("Creating: %ld,%p\n",whdd->lpbiOut->biSize,whdd->lpvbits);
whdd->hDib = CreateDIBSection(whdd->hMemDC,(BITMAPINFO *)whdd->lpbiOut,DIB_RGB_COLORS,&(whdd->lpvbits),0,0);
if (!whdd->hDib) {
TRACE("Error: %ld\n",GetLastError());
}
TRACE("Created: %d,%p\n",whdd->hDib,whdd->lpvbits);
whdd->hOldDib = SelectObject(whdd->hMemDC,whdd->hDib);
}
if (ret) {
whdd->hdc = hdc;
whdd->dxDst = dxDst;
whdd->dyDst = dyDst;
whdd->lpbi = HeapAlloc(GetProcessHeap(),0,lpbi->biSize);
memcpy(whdd->lpbi,lpbi,lpbi->biSize);
whdd->dxSrc = dxSrc;
whdd->dySrc = dySrc;
whdd->begun = TRUE;
whdd->hpal = 0;
} else {
if (whdd->hic)
ICClose(whdd->hic);
if (whdd->lpbiOut) {
HeapFree(GetProcessHeap(),0,whdd->lpbiOut);
whdd->lpbiOut = NULL;
}
}
GlobalUnlock16(hdd);
return ret;
}
/************************************************************************
* DrawDibBegin [MSVIDEO.104]
*/
BOOL16 VFWAPI DrawDibBegin16(HDRAWDIB16 hdd,
HDC16 hdc,
INT16 dxDst,
INT16 dyDst,
LPBITMAPINFOHEADER lpbi,
INT16 dxSrc,
INT16 dySrc,
UINT16 wFlags) {
return DrawDibBegin(hdd,hdc,dxDst,dyDst,lpbi,dxSrc,dySrc,wFlags);
}
/**********************************************************************
* DrawDibDraw [MSVFW32.6]
*/
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) {
WINE_HDD *whdd;
BOOL ret = TRUE;
TRACE("(%d,0x%lx,%d,%d,%d,%d,%p,%p,%d,%d,%d,%d,0x%08lx)\n",
hdd,(DWORD)hdc,xDst,yDst,dxDst,dyDst,lpbi,lpBits,xSrc,ySrc,dxSrc,dySrc,(DWORD)wFlags
);
if (wFlags & ~(DDF_SAME_HDC | DDF_SAME_DRAW | DDF_NOTKEYFRAME))
FIXME("wFlags == 0x%08lx not handled\n",(DWORD)wFlags);
if (!lpBits) {
/* Undocumented? */
lpBits = (LPSTR)lpbi + (WORD)(lpbi->biSize) + (WORD)(lpbi->biClrUsed*sizeof(RGBQUAD));
}
whdd = GlobalLock16(hdd);
#define CHANGED(x) (whdd->##x != ##x)
if ((!whdd->begun) || (!(wFlags & DDF_SAME_HDC) && CHANGED(hdc)) || (!(wFlags & DDF_SAME_DRAW) &&
(CHANGED(lpbi) || CHANGED(dxSrc) || CHANGED(dySrc) || CHANGED(dxDst) || CHANGED(dyDst)))) {
TRACE("Something changed!\n");
ret = DrawDibBegin(hdd,hdc,dxDst,dyDst,lpbi,dxSrc,dySrc,0);
}
#undef CHANGED
if ((dxDst == -1) && (dyDst == -1)) {
dxDst = dxSrc;
dyDst = dySrc;
}
if (lpbi->biCompression) {
DWORD flags = 0;
TRACE("Compression == 0x%08lx\n",lpbi->biCompression);
if (wFlags & DDF_NOTKEYFRAME)
flags |= ICDECOMPRESS_NOTKEYFRAME;
ICDecompress(whdd->hic,flags,lpbi,lpBits,whdd->lpbiOut,whdd->lpvbits);
} else {
memcpy(whdd->lpvbits,lpBits,lpbi->biSizeImage);
}
SelectPalette(hdc,whdd->hpal,FALSE);
StretchBlt(whdd->hdc,xDst,yDst,dxDst,dyDst,whdd->hMemDC,xSrc,ySrc,dxSrc,dySrc,SRCCOPY);
GlobalUnlock16(hdd);
return ret;
}
/**********************************************************************
* DrawDibDraw [MSVIDEO.106]
*/
BOOL16 VFWAPI DrawDibDraw16(HDRAWDIB16 hdd,
HDC16 hdc,
INT16 xDst,
INT16 yDst,
INT16 dxDst,
INT16 dyDst,
LPBITMAPINFOHEADER lpbi,
LPVOID lpBits,
INT16 xSrc,
INT16 ySrc,
INT16 dxSrc,
INT16 dySrc,
UINT16 wFlags) {
return DrawDibDraw(hdd,hdc,xDst,yDst,dxDst,dyDst,lpbi,lpBits,xSrc,ySrc,dxSrc,dySrc,wFlags);
}
/*************************************************************************
* DrawDibStart [MSVFW32.14]
*/
BOOL VFWAPI DrawDibStart(HDRAWDIB hdd, DWORD rate) {
FIXME("(0x%08lx,%ld), stub\n",(DWORD)hdd,rate);
return TRUE;
}
/*************************************************************************
* DrawDibStart [MSVIDEO.118]
*/
BOOL16 VFWAPI DrawDibStart16(HDRAWDIB16 hdd, DWORD rate) {
return DrawDibStart(hdd,rate);
}
/*************************************************************************
* DrawDibStop [MSVFW32.15]
*/
BOOL VFWAPI DrawDibStop(HDRAWDIB hdd) {
FIXME("(0x%08lx), stub\n",(DWORD)hdd);
return TRUE;
}
/*************************************************************************
* DrawDibStop [MSVIDEO.119]
*/
BOOL16 DrawDibStop16(HDRAWDIB16 hdd) {
return DrawDibStop(hdd);
}
/***********************************************************************
* DrawDibSetPalette [MSVFW32.13]
*/
BOOL VFWAPI DrawDibSetPalette(HDRAWDIB hdd, HPALETTE hpal) {
WINE_HDD *whdd;
TRACE("(0x%08lx,0x%08lx)\n",(DWORD)hdd,(DWORD)hpal);
whdd = GlobalLock16(hdd);
whdd->hpal = hpal;
if (whdd->begun) {
SelectPalette(whdd->hdc,hpal,0);
RealizePalette(whdd->hdc);
}
GlobalUnlock16(hdd);
return TRUE;
}
/***********************************************************************
* DrawDibSetPalette [MSVIDEO.110]
*/
BOOL16 VFWAPI DrawDibSetPalette16(HDRAWDIB16 hdd, HPALETTE16 hpal) {
return DrawDibSetPalette(hdd,hpal);
}
/***********************************************************************
* DrawDibGetPalette [MSVFW32.9]
*/
HPALETTE VFWAPI DrawDibGetPalette(HDRAWDIB hdd) {
WINE_HDD *whdd;
HPALETTE ret;
TRACE("(0x%08lx)\n",(DWORD)hdd);
whdd = GlobalLock16(hdd);
ret = whdd->hpal;
GlobalUnlock16(hdd);
return ret;
}
/***********************************************************************
* DrawDibGetPalette [MSVIDEO.108]]
*/
HPALETTE16 VFWAPI DrawDibGetPalette16(HDRAWDIB16 hdd) {
return (HPALETTE16)DrawDibGetPalette(hdd);
}
/***********************************************************************
* DrawDibRealize [MSVFW32.12]
*/
UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground) {
WINE_HDD *whdd;
HPALETTE oldPal;
UINT ret = 0;
FIXME("(%d,0x%08lx,%d), stub\n",hdd,(DWORD)hdc,fBackground);
whdd = GlobalLock16(hdd);
if (!whdd || !(whdd->begun)) {
ret = 0;
goto out;
}
if (!whdd->hpal)
whdd->hpal = CreateHalftonePalette(hdc);
oldPal = SelectPalette(hdc,whdd->hpal,fBackground);
ret = RealizePalette(hdc);
out:
GlobalUnlock16(hdd);
TRACE("=> %u\n",ret);
return ret;
}
/***********************************************************************
* DrawDibRealize [MSVIDEO.112]
*/
UINT16 VFWAPI DrawDibRealize16(HDRAWDIB16 hdd, HDC16 hdc, BOOL16 fBackground) {
return (UINT16)DrawDibRealize(hdd,hdc,fBackground);
}

View File

@ -10,16 +10,16 @@ import winmm.dll
3 stdcall DrawDibBegin(long long long long ptr long long long) DrawDibBegin
4 stub DrawDibChangePalette
5 stdcall DrawDibClose(long) DrawDibClose
6 stub DrawDibDraw
7 stub DrawDibEnd
6 stdcall DrawDibDraw(long long long long long long ptr ptr long long long long long) DrawDibDraw
7 stdcall DrawDibEnd(long) DrawDibEnd
8 stub DrawDibGetBuffer
9 stub DrawDibGetPalette
9 stdcall DrawDibGetPalette(long) DrawDibGetPalette
10 stdcall DrawDibOpen() DrawDibOpen
11 stub DrawDibProfileDisplay
12 stdcall DrawDibRealize(long long long) DrawDibRealize
13 stdcall DrawDibSetPalette(long long) DrawDibSetPalette
14 stub DrawDibStart
15 stub DrawDibStop
14 stdcall DrawDibStart(long long) DrawDibStart
15 stdcall DrawDibStop(long) DrawDibStop
16 stub DrawDibTime
17 stub GetOpenFileNamePreview
18 stub GetOpenFileNamePreviewA

View File

@ -26,36 +26,36 @@ type win16
52 stub VIDEOSTREAMALLOCHDRANDBUFFER
53 stub VIDEOSTREAMFREEHDRANDBUFFER
60 stub VIDEOMESSAGE
102 stub DRAWDIBOPEN
103 stub DRAWDIBCLOSE
104 stub DRAWDIBBEGIN
105 stub DRAWDIBEND
106 stub DRAWDIBDRAW
108 stub DRAWDIBGETPALETTE
110 stub DRAWDIBSETPALETTE
102 pascal16 DrawDibOpen() DrawDibOpen16
103 pascal16 DrawDibClose(word) DrawDibClose16
104 pascal16 DrawDibBegin(word word s_word s_word ptr s_word s_word word) DrawDibBegin16
105 pascal16 DrawDibEnd(word) DrawDibEnd16
106 pascal16 DrawDibDraw(word word s_word s_word s_word s_word ptr ptr s_word s_word s_word s_word word) DrawDibDraw16
108 pascal16 DrawDibGetPalette(word) DrawDibGetPalette16
110 pascal16 DrawDibSetPalette(word word) DrawDibSetPalette16
111 stub DRAWDIBCHANGEPALETTE
112 stub DRAWDIBREALIZE
112 pascal16 DrawDibRealize(word word word) DrawDibRealize16
113 stub DRAWDIBTIME
114 stub DRAWDIBPROFILEDISPLAY
115 stub STRETCHDIB
118 stub DRAWDIBSTART
119 stub DRAWDIBSTOP
118 pascal16 DrawDibStart(word long) DrawDibStart16
119 pascal16 DrawDibStop(word) DrawDibStop16
120 stub DRAWDIBGETBUFFER
200 stub ICINFO
200 pascal16 ICInfo(long long segptr) ICInfo16
201 stub ICINSTALL
202 stub ICREMOVE
203 stub ICOPEN
204 stub ICCLOSE
205 stub ICSENDMESSAGE
206 stub ICOPENFUNCTION
207 stub _ICMESSAGE
212 stub ICGETINFO
213 stub ICLOCATE
224 stub _ICCOMPRESS
230 stub _ICDECOMPRESS
232 stub _ICDRAWBEGIN
234 stub _ICDRAW
239 stub ICGETDISPLAYFORMAT
203 pascal16 ICOpen(long long word) ICOpen16
204 pascal ICClose(word) ICClose16
205 pascal ICSendMessage(word word long long) ICSendMessage16
206 pascal16 ICOpenFunction(long long word segptr) ICOpenFunction16
207 pascal _ICMessage() ICMessage16
212 pascal ICGetInfo(word segptr long) ICGetInfo16
213 pascal16 ICLocate(long long ptr ptr word) ICLocate16
224 cdecl _ICCompress(word long segptr segptr segptr segptr segptr segptr long long long segptr segptr) ICCompress16
230 cdecl _ICDecompress(word long segptr segptr segptr segptr) ICDecompress16
232 cdecl _ICDrawBegin(word long word word word s_word s_word s_word s_word segptr s_word s_word s_word s_word long long) ICDrawBegin16
234 cdecl _ICDraw(word long segptr segptr long long) ICDraw16
239 pascal16 ICGetDisplayFormat(word ptr ptr s_word s_word s_word) ICGetDisplayFormat16
240 stub ICIMAGECOMPRESS
241 stub ICIMAGEDECOMPRESS
242 stub ICCOMPRESSORCHOOSE

File diff suppressed because it is too large Load Diff

View File

@ -10,13 +10,9 @@
#define VFWAPI WINAPI
#define VFWAPIV WINAPIV
typedef HANDLE16 HDRAWDIB16;
typedef HANDLE HDRAWDIB;
BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, HDC hdc, INT dxDest, INT dyDest, LPBITMAPINFOHEADER lpbi, INT dxSrc, INT dySrc, UINT wFlags);
BOOL VFWAPI DrawDibClose(HDRAWDIB hdd);
HDRAWDIB VFWAPI DrawDibOpen(void);
UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground);
BOOL VFWAPI DrawDibSetPalette(HDRAWDIB hdd, HPALETTE hpal);
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)
@ -42,7 +38,7 @@ typedef struct IAVIStream IAVIStream,*PAVISTREAM;
typedef struct IAVIFile IAVIFile,*PAVIFILE;
typedef struct IGetFrame IGetFrame,*PGETFRAME;
/* Installable Compressor M? */
/* Installable Compressor Manager */
DECLARE_HANDLE(HIC);
@ -162,6 +158,11 @@ typedef struct tagWINE_HIC {
/* structs */
/* NOTE: Only the 16 bit structs are packed. Structs that are packed anyway
* have not been changed. If a structure is later extended, you may need to create
* two versions of it.
*/
typedef struct {
DWORD dwSize; /* 00: size */
DWORD fccType; /* 04: type 'vidc' usually */
@ -278,6 +279,25 @@ typedef struct {
/* 238: */
} ICINFO;
#include "pshpack1.h"
typedef struct {
DWORD dwSize;
DWORD fccType;
DWORD fccHandler;
DWORD dwFlags;
DWORD dwVersion;
DWORD dwVersionICM;
/*
* under Win16, normal chars are used
*/
CHAR szName[16];
CHAR szDescription[128];
CHAR szDriver[128];
} ICINFO16;
#include "poppack.h"
/* ICINFO.dwFlags */
#define VIDCF_QUALITY 0x0001 /* supports quality */
#define VIDCF_CRUNCH 0x0002 /* supports crunching to a frame size */
@ -343,8 +363,29 @@ typedef struct {
INT dySrc;
} ICDECOMPRESSEX;
DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,LPVOID lpData,LPBITMAPINFOHEADER lpbi,LPVOID lpBits);
#include "pshpack1.h"
typedef struct {
DWORD dwFlags;
LPBITMAPINFOHEADER lpbiSrc;
LPVOID lpSrc;
LPBITMAPINFOHEADER lpbiDst;
LPVOID lpDst;
INT16 xDst; /* destination rectangle */
INT16 yDst;
INT16 dxDst;
INT16 dyDst;
INT16 xSrc; /* source rectangle */
INT16 ySrc;
INT16 dxSrc;
INT16 dySrc;
} ICDECOMPRESSEX16;
#include "poppack.h"
DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,LPVOID lpData,LPBITMAPINFOHEADER lpbi,LPVOID lpBits);
#define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \
ICSendMessage( \
@ -389,11 +430,37 @@ DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,L
BOOL VFWAPI ICInfo(DWORD fccType, DWORD fccHandler, ICINFO * lpicinfo);
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);
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);
/* As passed to ICM_DRAW_SUGGESTFORMAT */
typedef struct {
DWORD dwFlags;
LPBITMAPINFOHEADER lpbiIn;
LPBITMAPINFOHEADER lpbiSuggest;
INT dxSrc;
INT dySrc;
INT dxDst;
INT dyDst;
HIC hicDecompressor;
} ICDRAWSUGGEST;
typedef struct {
DWORD dwFlags;
LPBITMAPINFOHEADER lpbiIn;
LPBITMAPINFOHEADER lpbiSuggest;
INT16 dxSrc;
INT16 dySrc;
INT16 dxDst;
INT16 dyDst;
HIC16 hicDecompressor;
} ICDRAWSUGGEST16;
DWORD VFWAPIV ICDrawBegin(
HIC hic,
@ -414,7 +481,26 @@ DWORD VFWAPIV ICDrawBegin(
DWORD dwScale
);
/* as passed to ICM_DRAW_BEGIN (FIXME: correct only for Win32?) */
DWORD VFWAPIV ICDrawBegin16(
HIC16 hic,
DWORD dwFlags,/* flags */
HPALETTE16 hpal, /* palette to draw with */
HWND16 hwnd, /* window to draw to */
HDC16 hdc, /* HDC to draw to */
INT16 xDst, /* destination rectangle */
INT16 yDst,
INT16 dxDst,
INT16 dyDst,
LPBITMAPINFOHEADER lpbi, /* format of frame to draw */
INT16 xSrc, /* source rectangle */
INT16 ySrc,
INT16 dxSrc,
INT16 dySrc,
DWORD dwRate, /* frames/second = (dwRate/dwScale) */
DWORD dwScale
);
/* as passed to ICM_DRAW_BEGIN */
typedef struct {
DWORD dwFlags;
HPALETTE hpal;
@ -433,6 +519,28 @@ typedef struct {
DWORD dwScale;
} ICDRAWBEGIN;
#include "pshpack1.h"
typedef struct {
DWORD dwFlags;
HPALETTE16 hpal;
HWND16 hwnd;
HDC16 hdc;
INT16 xDst;
INT16 yDst;
INT16 dxDst;
INT16 dyDst;
LPBITMAPINFOHEADER lpbi;
INT16 xSrc;
INT16 ySrc;
INT16 dxSrc;
INT16 dySrc;
DWORD dwRate;
DWORD dwScale;
} ICDRAWBEGIN16;
#include "poppack.h"
#define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */
#define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */
#define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */
@ -815,5 +923,55 @@ ICOM_DEFINE(IGetFrame,IUnknown)
#define AVIERR_USERABORT MAKE_AVIERR(198)
#define AVIERR_ERROR MAKE_AVIERR(199)
/********************************************
* DrawDib declarations
*/
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 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_SAME_HDC 0x0004
#define DDF_SAME_DRAW 0x0008
#define DDF_DONTDRAW 0x0010
#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_HALFTONE 0x1000
BOOL VFWAPI DrawDibSetPalette(HDRAWDIB hdd, HPALETTE hpal);
HPALETTE VFWAPI DrawDibGetPalette(HDRAWDIB hdd);
BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd);
BOOL VFWAPI DrawDibClose(HDRAWDIB hdd);
#endif /* __WINE_VFW_H */

View File

@ -1,11 +1,28 @@
%long
DWORD
LONG
LRESULT
%ptr
LPBITMAPINFOHEADER
LPDWORD
LPVOID
%word
BOOL16
INT16
HDC16
HDRAWDIB16
HIC16
HPALETTE16
HWND16
UINT16
WORD
%segptr
ICINFO16 *
FARPROC16

View File

@ -3,10 +3,10 @@
BOOL
DWORD
HDC
HDRAWDIB
HIC
HINSTANCE
HPALETTE
HDRAWDIB
HWND
INT
LONG

View File

@ -220,8 +220,8 @@ static int DRIVER_MapMsg16To32(WORD wMsg, DWORD* lParam1, DWORD* lParam2)
}
break;
default:
if (wMsg >= 0x800 && wMsg < 0x900) {
/* FIXME: another hack to handle MCI messages...
if ((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100 )) {
/* FIXME: another hack to handle MCI and ICM messages...
* should find a *NICE* way to integrate DRIVER_ and
* MCI_ mapping/unmapping functions
*/
@ -286,8 +286,8 @@ static int DRIVER_UnMapMsg16To32(WORD wMsg, DWORD lParam1, DWORD lParam2)
ret = 0;
break;
default:
if (wMsg >= 0x800 && wMsg < 0x900) {
/* FIXME: another hack to handle MCI messages...
if ((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100 )) {
/* FIXME: another hack to handle MCI and ICM messages...
* should find a *NICE* way to integrate DRIVER_ and
* MCI_ mapping/unmapping functions
*/
@ -396,8 +396,8 @@ static int DRIVER_MapMsg32To16(WORD wMsg, DWORD* lParam1, DWORD* lParam2)
}
break;
default:
if (wMsg >= 0x800 && wMsg < 0x900) {
/* FIXME: another hack to handle MCI messages...
if ((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100 )) {
/* FIXME: another hack to handle MCI and ICM messages...
* should find a *NICE* way to integrate DRIVER_ and
* MCI_ mapping/unmapping functions
*/
@ -466,8 +466,8 @@ static int DRIVER_UnMapMsg32To16(WORD wMsg, DWORD lParam1, DWORD lParam2)
ret = 0;
break;
default:
if (wMsg >= 0x800 && wMsg < 0x900) {
/* FIXME: another hack to handle MCI messages...
if ((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100 )) {
/* FIXME: another hack to handle MCI and ICM messages...
* should find a *NICE* way to integrate DRIVER_ and
* MCI_ mapping/unmapping functions
*/
@ -617,7 +617,6 @@ static BOOL DRIVER_AddToList(LPWINE_DRIVER lpNewDrv, LPARAM lParam, BOOL bCallFr
lpDrv->lpNextItem = lpNewDrv;
lpNewDrv->lpPrevItem = lpDrv;
}
/* Now just open a new instance of a driver on this module */
if (bCallFrom32) {
lpNewDrv->dwDriverID = SendDriverMessage((HDRVR)lpNewDrv, DRV_OPEN, 0L, lParam);