10 #define VFWAPIV WINAPIV
14 #endif /* __cplusplus */
16 typedef HANDLE HDRAWDIB
;
18 HWND VFWAPIV
MCIWndCreateA(HWND hwndParent
, HINSTANCE hInstance
, DWORD dwStyle
, LPCSTR szFile
);
19 HWND VFWAPIV
MCIWndCreateW(HWND hwndParent
, HINSTANCE hInstance
, DWORD dwStyle
, LPCWSTR szFile
);
20 #define MCIWndCreate WINELIB_NAME_AW(MCIWndCreate)
21 DWORD VFWAPI
VideoForWindowsVersion(void);
22 LONG VFWAPI
InitVFW(void);
23 LONG VFWAPI
TermVFW(void);
26 #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
27 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
28 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
32 #define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8))
35 #define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c')
36 #define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c')
38 /*****************************************************************************
39 * Predeclare the interfaces
41 typedef struct IAVIStream IAVIStream
,*PAVISTREAM
;
42 typedef struct IAVIFile IAVIFile
,*PAVIFILE
;
43 typedef struct IGetFrame IGetFrame
,*PGETFRAME
;
45 /* Installable Compressor Manager */
50 /* HIC struct (same layout as Win95 one) */
51 typedef struct tagWINE_HIC
{
52 DWORD magic
; /* 00: 'Smag' */
53 HANDLE curthread
; /* 04: */
55 DWORD handler
; /* 0C: */
57 DWORD
private; /* 14:(handled by SendDriverMessage)*/
58 FARPROC driverproc
; /* 18:(handled by SendDriverMessage)*/
59 DWORD x1
; /* 1c: name? */
66 /* error return codes */
68 #define ICERR_DONTDRAW 1
69 #define ICERR_NEWPALETTE 2
70 #define ICERR_GOTOKEYFRAME 3
71 #define ICERR_STOPDRAWING 4
73 #define ICERR_UNSUPPORTED -1
74 #define ICERR_BADFORMAT -2
75 #define ICERR_MEMORY -3
76 #define ICERR_INTERNAL -4
77 #define ICERR_BADFLAGS -5
78 #define ICERR_BADPARAM -6
79 #define ICERR_BADSIZE -7
80 #define ICERR_BADHANDLE -8
81 #define ICERR_CANTUPDATE -9
82 #define ICERR_ABORT -10
83 #define ICERR_ERROR -100
84 #define ICERR_BADBITDEPTH -200
85 #define ICERR_BADIMAGESIZE -201
87 #define ICERR_CUSTOM -400
90 #define ICM_USER (DRV_USER+0x0000)
92 /* ICM driver message range */
93 #define ICM_RESERVED_LOW (DRV_USER+0x1000)
94 #define ICM_RESERVED_HIGH (DRV_USER+0x2000)
95 #define ICM_RESERVED ICM_RESERVED_LOW
97 #define ICM_GETSTATE (ICM_RESERVED+0)
98 #define ICM_SETSTATE (ICM_RESERVED+1)
99 #define ICM_GETINFO (ICM_RESERVED+2)
101 #define ICM_CONFIGURE (ICM_RESERVED+10)
102 #define ICM_ABOUT (ICM_RESERVED+11)
105 #define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30)
106 #define ICM_GETQUALITY (ICM_RESERVED+31)
107 #define ICM_SETQUALITY (ICM_RESERVED+32)
109 #define ICM_SET (ICM_RESERVED+40)
110 #define ICM_GET (ICM_RESERVED+41)
112 /* 2 constant FOURCC codes */
113 #define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
114 #define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
116 #define ICM_COMPRESS_GET_FORMAT (ICM_USER+4)
117 #define ICM_COMPRESS_GET_SIZE (ICM_USER+5)
118 #define ICM_COMPRESS_QUERY (ICM_USER+6)
119 #define ICM_COMPRESS_BEGIN (ICM_USER+7)
120 #define ICM_COMPRESS (ICM_USER+8)
121 #define ICM_COMPRESS_END (ICM_USER+9)
123 #define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10)
124 #define ICM_DECOMPRESS_QUERY (ICM_USER+11)
125 #define ICM_DECOMPRESS_BEGIN (ICM_USER+12)
126 #define ICM_DECOMPRESS (ICM_USER+13)
127 #define ICM_DECOMPRESS_END (ICM_USER+14)
128 #define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29)
129 #define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30)
131 #define ICM_DRAW_QUERY (ICM_USER+31)
132 #define ICM_DRAW_BEGIN (ICM_USER+15)
133 #define ICM_DRAW_GET_PALETTE (ICM_USER+16)
134 #define ICM_DRAW_START (ICM_USER+18)
135 #define ICM_DRAW_STOP (ICM_USER+19)
136 #define ICM_DRAW_END (ICM_USER+21)
137 #define ICM_DRAW_GETTIME (ICM_USER+32)
138 #define ICM_DRAW (ICM_USER+33)
139 #define ICM_DRAW_WINDOW (ICM_USER+34)
140 #define ICM_DRAW_SETTIME (ICM_USER+35)
141 #define ICM_DRAW_REALIZE (ICM_USER+36)
142 #define ICM_DRAW_FLUSH (ICM_USER+37)
143 #define ICM_DRAW_RENDERBUFFER (ICM_USER+38)
145 #define ICM_DRAW_START_PLAY (ICM_USER+39)
146 #define ICM_DRAW_STOP_PLAY (ICM_USER+40)
148 #define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50)
149 #define ICM_DRAW_CHANGEPALETTE (ICM_USER+51)
151 #define ICM_GETBUFFERSWANTED (ICM_USER+41)
153 #define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42)
155 #define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60)
156 #define ICM_DECOMPRESSEX_QUERY (ICM_USER+61)
157 #define ICM_DECOMPRESSEX (ICM_USER+62)
158 #define ICM_DECOMPRESSEX_END (ICM_USER+63)
160 #define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70)
161 #define ICM_SET_STATUS_PROC (ICM_USER+72)
165 /* NOTE: Only the 16 bit structs are packed. Structs that are packed anyway
166 * have not been changed. If a structure is later extended, you may need to create
167 * two versions of it.
171 DWORD dwSize
; /* 00: size */
172 DWORD fccType
; /* 04: type 'vidc' usually */
173 DWORD fccHandler
; /* 08: */
174 DWORD dwVersion
; /* 0c: version of compman opening you */
175 DWORD dwFlags
; /* 10: LOWORD is type specific */
176 LRESULT dwError
; /* 14: */
177 LPVOID pV1Reserved
; /* 18: */
178 LPVOID pV2Reserved
; /* 1c: */
179 DWORD dnDevNode
; /* 20: */
183 #define ICCOMPRESS_KEYFRAME 0x00000001L
187 LPBITMAPINFOHEADER lpbiOutput
;
189 LPBITMAPINFOHEADER lpbiInput
;
196 LPBITMAPINFOHEADER lpbiPrev
;
200 DWORD VFWAPIV
ICCompress(
201 HIC hic
,DWORD dwFlags
,LPBITMAPINFOHEADER lpbiOutput
,LPVOID lpData
,
202 LPBITMAPINFOHEADER lpbiInput
,LPVOID lpBits
,LPDWORD lpckid
,
203 LPDWORD lpdwFlags
,LONG lFrameNum
,DWORD dwFrameSize
,DWORD dwQuality
,
204 LPBITMAPINFOHEADER lpbiPrev
,LPVOID lpPrev
207 #define ICCompressGetFormat(hic, lpbiInput, lpbiOutput) \
209 hic,ICM_COMPRESS_GET_FORMAT,(DWORD)(LPVOID)(lpbiInput), \
210 (DWORD)(LPVOID)(lpbiOutput) \
213 #define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
215 #define ICCompressBegin(hic, lpbiInput, lpbiOutput) \
217 hic, ICM_COMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
218 (DWORD)(LPVOID)(lpbiOutput) \
221 #define ICCompressGetSize(hic, lpbiInput, lpbiOutput) \
223 hic, ICM_COMPRESS_GET_SIZE, (DWORD)(LPVOID)(lpbiInput), \
224 (DWORD)(LPVOID)(lpbiOutput) \
227 #define ICCompressQuery(hic, lpbiInput, lpbiOutput) \
229 hic, ICM_COMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
230 (DWORD)(LPVOID)(lpbiOutput) \
233 #define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0)
235 /* ICCOMPRESSFRAMES.dwFlags */
236 #define ICCOMPRESSFRAMES_PADDING 0x00000001
239 LPBITMAPINFOHEADER lpbiOutput
;
241 LPBITMAPINFOHEADER lpbiInput
;
250 DWORD dwOverheadPerFrame
;
252 LONG
CALLBACK (*GetData
)(LPARAM lInput
,LONG lFrame
,LPVOID lpBits
,LONG len
);
253 LONG
CALLBACK (*PutData
)(LPARAM lOutput
,LONG lFrame
,LPVOID lpBits
,LONG len
);
259 /* messages for Status callback */
260 #define ICSTATUS_START 0
261 #define ICSTATUS_STATUS 1
262 #define ICSTATUS_END 2
263 #define ICSTATUS_ERROR 3
264 #define ICSTATUS_YIELD 4
265 /* FIXME: some X11 libs define Status as int... */
266 /* LONG CALLBACK (*zStatus)(LPARAM lParam, UINT message, LONG l); */
267 LONG
CALLBACK (*zStatus
)(LPARAM lParam
, UINT message
, LONG l
);
270 /* Values for wMode of ICOpen() */
271 #define ICMODE_COMPRESS 1
272 #define ICMODE_DECOMPRESS 2
273 #define ICMODE_FASTDECOMPRESS 3
274 #define ICMODE_QUERY 4
275 #define ICMODE_FASTCOMPRESS 5
276 #define ICMODE_DRAW 8
279 #define ICQUALITY_LOW 0
280 #define ICQUALITY_HIGH 10000
281 #define ICQUALITY_DEFAULT -1
284 DWORD dwSize
; /* 00: */
285 DWORD fccType
; /* 04:compressor type 'vidc' 'audc' */
286 DWORD fccHandler
; /* 08:compressor sub-type 'rle ' 'jpeg' 'pcm '*/
287 DWORD dwFlags
; /* 0c:flags LOWORD is type specific */
288 DWORD dwVersion
; /* 10:version of the driver */
289 DWORD dwVersionICM
; /* 14:version of the ICM used */
291 * under Win32, the driver always returns UNICODE strings.
293 WCHAR szName
[16]; /* 18:short name */
294 WCHAR szDescription
[128]; /* 38:long name */
295 WCHAR szDriver
[128]; /* 138:driver that contains compressor*/
300 #define VIDCF_QUALITY 0x0001 /* supports quality */
301 #define VIDCF_CRUNCH 0x0002 /* supports crunching to a frame size */
302 #define VIDCF_TEMPORAL 0x0004 /* supports inter-frame compress */
303 #define VIDCF_COMPRESSFRAMES 0x0008 /* wants the compress all frames message */
304 #define VIDCF_DRAW 0x0010 /* supports drawing */
305 #define VIDCF_FASTTEMPORALC 0x0020 /* does not need prev frame on compress */
306 #define VIDCF_FASTTEMPORALD 0x0080 /* does not need prev frame on decompress */
307 #define VIDCF_QUALITYTIME 0x0040 /* supports temporal quality */
309 #define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
312 /* function shortcuts */
314 #define ICMF_ABOUT_QUERY 0x00000001
316 #define ICQueryAbout(hic) \
317 (ICSendMessage(hic,ICM_ABOUT,(DWORD)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
319 #define ICAbout(hic, hwnd) ICSendMessage(hic,ICM_ABOUT,(DWORD)(UINT)(hwnd),0)
322 #define ICMF_CONFIGURE_QUERY 0x00000001
323 #define ICQueryConfigure(hic) \
324 (ICSendMessage(hic,ICM_CONFIGURE,(DWORD)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
326 #define ICConfigure(hic,hwnd) \
327 ICSendMessage(hic,ICM_CONFIGURE,(DWORD)(UINT)(hwnd),0)
329 /* Decompression stuff */
330 #define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */
331 #define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */
332 #define ICDECOMPRESS_PREROLL 0x20000000 /* this frame is before real start */
333 #define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */
334 #define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */
337 DWORD dwFlags
; /* flags (from AVI index...) */
338 LPBITMAPINFOHEADER lpbiInput
; /* BITMAPINFO of compressed data */
339 LPVOID lpInput
; /* compressed data */
340 LPBITMAPINFOHEADER lpbiOutput
; /* DIB to decompress to */
342 DWORD ckid
; /* ckid from AVI file */
347 LPBITMAPINFOHEADER lpbiSrc
;
349 LPBITMAPINFOHEADER lpbiDst
;
352 /* changed for ICM_DECOMPRESSEX */
353 INT xDst
; /* destination rectangle */
358 INT xSrc
; /* source rectangle */
364 DWORD VFWAPIV
ICDecompress(HIC hic
,DWORD dwFlags
,LPBITMAPINFOHEADER lpbiFormat
,LPVOID lpData
,LPBITMAPINFOHEADER lpbi
,LPVOID lpBits
);
366 #define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \
368 hic, ICM_DECOMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
369 (DWORD)(LPVOID)(lpbiOutput) \
372 #define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \
374 hic,ICM_DECOMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
375 (DWORD) (LPVOID)(lpbiOutput) \
378 #define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \
379 ((LONG)ICSendMessage( \
380 hic,ICM_DECOMPRESS_GET_FORMAT, (DWORD)(LPVOID)(lpbiInput), \
381 (DWORD)(LPVOID)(lpbiOutput) \
384 #define ICDecompressGetFormatSize(hic, lpbi) \
385 ICDecompressGetFormat(hic, lpbi, NULL)
387 #define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput) \
389 hic, ICM_DECOMPRESS_GET_PALETTE, (DWORD)(LPVOID)(lpbiInput), \
390 (DWORD)(LPVOID)(lpbiOutput) \
393 #define ICDecompressSetPalette(hic,lpbiPalette) \
395 hic,ICM_DECOMPRESS_SET_PALETTE, \
396 (DWORD)(LPVOID)(lpbiPalette),0 \
399 #define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)
401 LRESULT VFWAPI
ICSendMessage(HIC hic
, UINT msg
, DWORD dw1
, DWORD dw2
);
403 inline static LRESULT VFWAPI
ICDecompressEx(HIC hic
, DWORD dwFlags
,
404 LPBITMAPINFOHEADER lpbiSrc
, LPVOID lpSrc
,
405 int xSrc
, int ySrc
, int dxSrc
, int dySrc
,
406 LPBITMAPINFOHEADER lpbiDst
, LPVOID lpDst
,
407 int xDst
, int yDst
, int dxDst
, int dyDst
)
411 ic
.dwFlags
= dwFlags
;
412 ic
.lpbiSrc
= lpbiSrc
;
418 ic
.lpbiDst
= lpbiDst
;
424 return ICSendMessage(hic
, ICM_DECOMPRESSEX
, (DWORD
)&ic
, sizeof(ic
));
427 inline static LRESULT VFWAPI
ICDecompressExBegin(HIC hic
, DWORD dwFlags
,
428 LPBITMAPINFOHEADER lpbiSrc
,
430 int xSrc
, int ySrc
, int dxSrc
, int dySrc
,
431 LPBITMAPINFOHEADER lpbiDst
,
440 ic
.dwFlags
= dwFlags
;
441 ic
.lpbiSrc
= lpbiSrc
;
447 ic
.lpbiDst
= lpbiDst
;
453 return ICSendMessage(hic
, ICM_DECOMPRESSEX_BEGIN
, (DWORD
)&ic
, sizeof(ic
));
455 inline static LRESULT VFWAPI
ICDecompressExQuery(HIC hic
, DWORD dwFlags
,
456 LPBITMAPINFOHEADER lpbiSrc
,
458 int xSrc
, int ySrc
, int dxSrc
, int dySrc
,
459 LPBITMAPINFOHEADER lpbiDst
,
468 ic
.dwFlags
= dwFlags
;
469 ic
.lpbiSrc
= lpbiSrc
;
475 ic
.lpbiDst
= lpbiDst
;
481 return ICSendMessage(hic
, ICM_DECOMPRESSEX_QUERY
, (DWORD
)&ic
, sizeof(ic
));
484 #define ICDecompressExEnd(hic) \
485 ICSendMessage(hic, ICM_DECOMPRESSEX_END, 0, 0)
487 #define ICDRAW_QUERY 0x00000001L /* test for support */
488 #define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */
489 #define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */
490 #define ICDRAW_ANIMATE 0x00000008L /* expect palette animation */
491 #define ICDRAW_CONTINUE 0x00000010L /* draw is a continuation of previous draw */
492 #define ICDRAW_MEMORYDC 0x00000020L /* DC is offscreen, by the way */
493 #define ICDRAW_UPDATING 0x00000040L /* We're updating, as opposed to playing */
494 #define ICDRAW_RENDER 0x00000080L /* used to render data not draw it */
495 #define ICDRAW_BUFFER 0x00000100L /* buffer data offscreen, we will need to update it */
497 #define ICDecompressOpen(fccType, fccHandler, lpbiIn, lpbiOut) \
498 ICLocate(fccType, fccHandler, lpbiIn, lpbiOut, ICMODE_DECOMPRESS)
500 #define ICDrawOpen(fccType, fccHandler, lpbiIn) \
501 ICLocate(fccType, fccHandler, lpbiIn, NULL, ICMODE_DRAW)
503 HANDLE VFWAPI
ICImageCompress(HIC hic
, UINT uiFlags
, LPBITMAPINFO lpbiIn
,
504 LPVOID lpBits
, LPBITMAPINFO lpbiOut
, LONG lQuality
,
507 HANDLE VFWAPI
ICImageDecompress(HIC hic
, UINT uiFlags
, LPBITMAPINFO lpbiIn
,
508 LPVOID lpBits
, LPBITMAPINFO lpbiOut
);
510 BOOL VFWAPI
ICInfo(DWORD fccType
, DWORD fccHandler
, ICINFO
* lpicinfo
);
511 BOOL VFWAPI
ICInstall(DWORD fccType
, DWORD fccHandler
, LPARAM lParam
, LPSTR szDesc
, UINT wFlags
);
512 BOOL VFWAPI
ICRemove(DWORD fccType
, DWORD fccHandler
, UINT wFlags
);
513 LRESULT VFWAPI
ICGetInfo(HIC hic
,ICINFO
*picinfo
, DWORD cb
);
514 HIC VFWAPI
ICOpen(DWORD fccType
, DWORD fccHandler
, UINT wMode
);
515 HIC VFWAPI
ICOpenFunction(DWORD fccType
, DWORD fccHandler
, UINT wMode
, FARPROC lpfnHandler
);
517 LRESULT VFWAPI
ICClose(HIC hic
);
518 HIC VFWAPI
ICLocate(DWORD fccType
, DWORD fccHandler
, LPBITMAPINFOHEADER lpbiIn
, LPBITMAPINFOHEADER lpbiOut
, WORD wFlags
);
519 HIC VFWAPI
ICGetDisplayFormat(HIC hic
, LPBITMAPINFOHEADER lpbiIn
, LPBITMAPINFOHEADER lpbiOut
, int BitDepth
, int dx
, int dy
);
521 /* Values for wFlags of ICInstall() */
522 #define ICINSTALL_UNICODE 0x8000
523 #define ICINSTALL_FUNCTION 0x0001
524 #define ICINSTALL_DRIVER 0x0002
525 #define ICINSTALL_HDRV 0x0004
526 #define ICINSTALL_DRIVERW 0x8002
528 #define ICGetState(hic, pv, cb) \
529 ICSendMessage(hic, ICM_GETSTATE, (DWORD)(LPVOID)(pv), (DWORD)(cb))
530 #define ICSetState(hic, pv, cb) \
531 ICSendMessage(hic, ICM_SETSTATE, (DWORD)(LPVOID)(pv), (DWORD)(cb))
532 #define ICGetStateSize(hic) \
533 ICGetState(hic, NULL, 0)
535 inline static DWORD
ICGetDefaultQuality(HIC hic
)
538 ICSendMessage(hic
, ICM_GETDEFAULTQUALITY
, (DWORD
)(LPVOID
)&dwICValue
, sizeof(DWORD
));
542 inline static DWORD
ICGetDefaultKeyFrameRate(HIC hic
)
545 ICSendMessage(hic
, ICM_GETDEFAULTKEYFRAMERATE
, (DWORD
)(LPVOID
)&dwICValue
, sizeof(DWORD
));
549 #define ICDrawWindow(hic, prc) \
550 ICSendMessage(hic, ICM_DRAW_WINDOW, (DWORD)(LPVOID)(prc), sizeof(RECT))
552 /* As passed to ICM_DRAW_SUGGESTFORMAT */
555 LPBITMAPINFOHEADER lpbiIn
;
556 LPBITMAPINFOHEADER lpbiSuggest
;
571 DWORD VFWAPIV
ICDrawBegin(
573 DWORD dwFlags
,/* flags */
574 HPALETTE hpal
, /* palette to draw with */
575 HWND hwnd
, /* window to draw to */
576 HDC hdc
, /* HDC to draw to */
577 INT xDst
, /* destination rectangle */
581 LPBITMAPINFOHEADER lpbi
, /* format of frame to draw */
582 INT xSrc
, /* source rectangle */
586 DWORD dwRate
, /* frames/second = (dwRate/dwScale) */
590 /* as passed to ICM_DRAW_BEGIN */
600 LPBITMAPINFOHEADER lpbi
;
609 #define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */
610 #define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */
611 #define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */
612 #define ICDRAW_NULLFRAME 0x10000000L /* repeat last frame */
613 #define ICDRAW_NOTKEYFRAME 0x08000000L /* this frame is not a key frame */
623 DWORD VFWAPIV
ICDraw(HIC hic
,DWORD dwFlags
,LPVOID lpFormat
,LPVOID lpData
,DWORD cbData
,LONG lTime
);
625 inline static LRESULT VFWAPI
ICDrawSuggestFormat(HIC hic
, LPBITMAPINFOHEADER lpbiIn
,
626 LPBITMAPINFOHEADER lpbiOut
,
627 int dxSrc
, int dySrc
,
628 int dxDst
, int dyDst
,
634 ic
.lpbiSuggest
= lpbiOut
;
639 ic
.hicDecompressor
= hicDecomp
;
640 return ICSendMessage(hic
, ICM_DRAW_SUGGESTFORMAT
, (DWORD
)&ic
, sizeof(ic
));
643 #define ICDrawQuery(hic, lpbiInput) \
644 ICSendMessage(hic, ICM_DRAW_QUERY, (DWORD)(LPVOID)(lpbiInput), 0L)
646 #define ICDrawChangePalette(hic, lpbiInput) \
647 ICSendMessage(hic, ICM_DRAW_CHANGEPALETTE, (DWORD)(LPVOID)(lpbiInput), 0L)
649 #define ICGetBuffersWanted(hic, lpdwBuffers) \
650 ICSendMessage(hic, ICM_GETBUFFERSWANTED, (DWORD)(LPVOID)(lpdwBuffers), 0)
652 #define ICDrawEnd(hic) \
653 ICSendMessage(hic, ICM_DRAW_END, 0, 0)
655 #define ICDrawStart(hic) \
656 ICSendMessage(hic, ICM_DRAW_START, 0, 0)
658 #define ICDrawStartPlay(hic, lFrom, lTo) \
659 ICSendMessage(hic, ICM_DRAW_START_PLAY, (DWORD)(lFrom), (DWORD)(lTo))
661 #define ICDrawStop(hic) \
662 ICSendMessage(hic, ICM_DRAW_STOP, 0, 0)
664 #define ICDrawStopPlay(hic) \
665 ICSendMessage(hic, ICM_DRAW_STOP_PLAY, 0, 0)
667 #define ICDrawGetTime(hic, lplTime) \
668 ICSendMessage(hic, ICM_DRAW_GETTIME, (DWORD)(LPVOID)(lplTime), 0)
670 #define ICDrawSetTime(hic, lTime) \
671 ICSendMessage(hic, ICM_DRAW_SETTIME, (DWORD)lTime, 0)
673 #define ICDrawRealize(hic, hdc, fBackground) \
674 ICSendMessage(hic, ICM_DRAW_REALIZE, (DWORD)(UINT)(HDC)(hdc), (DWORD)(BOOL)(fBackground))
676 #define ICDrawFlush(hic) \
677 ICSendMessage(hic, ICM_DRAW_FLUSH, 0, 0)
679 #define ICDrawRenderBuffer(hic) \
680 ICSendMessage(hic, ICM_DRAW_RENDERBUFFER, 0, 0)
682 inline static LRESULT VFWAPI
ICSetStatusProc(HIC hic
, DWORD dwFlags
, LRESULT lParam
,
683 LONG (CALLBACK
*fpfnStatus
)(LPARAM
, UINT
, LONG
))
687 ic
.dwFlags
= dwFlags
;
689 /* FIXME: see comment in ICSETSTATUSPROC definition */
690 ic
.zStatus
= fpfnStatus
;
692 return ICSendMessage(hic
, ICM_SET_STATUS_PROC
, (DWORD
)&ic
, sizeof(ic
));
702 LPBITMAPINFO lpbiOut
;
712 } COMPVARS
, *PCOMPVARS
;
714 #define ICMF_COMPVARS_VALID 0x00000001
716 BOOL VFWAPI
ICCompressorChoose(HWND hwnd
, UINT uiFlags
, LPVOID pvIn
, LPVOID lpData
,
717 PCOMPVARS pc
, LPSTR lpszTitle
);
719 #define ICMF_CHOOSE_KEYFRAME 0x0001
720 #define ICMF_CHOOSE_DATARATE 0x0002
721 #define ICMF_CHOOSE_PREVIEW 0x0004
722 #define ICMF_CHOOSE_ALLCOMPRESSORS 0x0008
724 BOOL VFWAPI
ICSeqCompressFrameStart(PCOMPVARS pc
, LPBITMAPINFO lpbiIn
);
725 void VFWAPI
ICSeqCompressFrameEnd(PCOMPVARS pc
);
727 LPVOID VFWAPI
ICSeqCompressFrame(PCOMPVARS pc
, UINT uiFlags
, LPVOID lpBits
,
728 BOOL
*pfKey
, LONG
*plSize
);
729 void VFWAPI
ICCompressorFree(PCOMPVARS pc
);
731 /********************* AVIFILE function declarations *************************/
732 #define formtypeAVI mmioFOURCC('A', 'V', 'I', ' ')
733 #define listtypeAVIHEADER mmioFOURCC('h', 'd', 'r', 'l')
734 #define ckidAVIMAINHDR mmioFOURCC('a', 'v', 'i', 'h')
735 #define listtypeSTREAMHEADER mmioFOURCC('s', 't', 'r', 'l')
736 #define ckidSTREAMHEADER mmioFOURCC('s', 't', 'r', 'h')
737 #define ckidSTREAMFORMAT mmioFOURCC('s', 't', 'r', 'f')
738 #define ckidSTREAMHANDLERDATA mmioFOURCC('s', 't', 'r', 'd')
739 #define ckidSTREAMNAME mmioFOURCC('s', 't', 'r', 'n')
741 #define listtypeAVIMOVIE mmioFOURCC('m', 'o', 'v', 'i')
742 #define listtypeAVIRECORD mmioFOURCC('r', 'e', 'c', ' ')
744 #define ckidAVINEWINDEX mmioFOURCC('i', 'd', 'x', '1')
746 #define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's')
747 #define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's')
748 #define streamtypeMIDI mmioFOURCC('m', 'i', 'd', 's')
749 #define streamtypeTEXT mmioFOURCC('t', 'x', 't', 's')
751 /* Basic chunk types */
752 #define cktypeDIBbits aviTWOCC('d', 'b')
753 #define cktypeDIBcompressed aviTWOCC('d', 'c')
754 #define cktypePALchange aviTWOCC('p', 'c')
755 #define cktypeWAVEbytes aviTWOCC('w', 'b')
757 /* Chunk id to use for extra chunks for padding. */
758 #define ckidAVIPADDING mmioFOURCC('J', 'U', 'N', 'K')
760 /* AVIFileHdr.dwFlags */
761 #define AVIF_HASINDEX 0x00000010 /* Index at end of file? */
762 #define AVIF_MUSTUSEINDEX 0x00000020
763 #define AVIF_ISINTERLEAVED 0x00000100
764 #define AVIF_TRUSTCKTYPE 0x00000800 /* Use CKType to find key frames*/
765 #define AVIF_WASCAPTUREFILE 0x00010000
766 #define AVIF_COPYRIGHTED 0x00020000
768 #define AVI_HEADERSIZE 2048
770 typedef struct _MainAVIHeader
772 DWORD dwMicroSecPerFrame
;
773 DWORD dwMaxBytesPerSec
;
774 DWORD dwPaddingGranularity
;
777 DWORD dwInitialFrames
;
779 DWORD dwSuggestedBufferSize
;
785 /* AVIStreamHeader.dwFlags */
786 #define AVISF_DISABLED 0x00000001
787 #define AVISF_VIDEO_PALCHANGES 0x00010000
792 DWORD dwFlags
; /* AVISF_* */
795 DWORD dwInitialFrames
;
797 DWORD dwRate
; /* dwRate / dwScale == samples/second */
799 DWORD dwLength
; /* In units above... */
800 DWORD dwSuggestedBufferSize
;
803 struct { SHORT left
, top
, right
, bottom
; } rcFrame
; /* word.word - word.word in file */
806 /* AVIINDEXENTRY.dwFlags */
807 #define AVIIF_LIST 0x00000001 /* chunk is a 'LIST' */
808 #define AVIIF_TWOCC 0x00000002
809 #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
811 #define AVIIF_NOTIME 0x00000100 /* this frame doesn't take any time */
812 #define AVIIF_COMPUSE 0x0FFF0000
814 typedef struct _AVIINDEXENTRY
{
821 typedef struct _AVIPALCHANGE
{
824 WORD wFlags
; /* pad */
825 PALETTEENTRY peNew
[1];
828 #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
830 #define AVIGETFRAMEF_BESTDISPLAYFMT 1
832 typedef struct _AVISTREAMINFOA
{
835 DWORD dwFlags
; /* AVIIF_* */
840 DWORD dwRate
; /* dwRate / dwScale == samples/second */
842 DWORD dwLength
; /* In units above... */
843 DWORD dwInitialFrames
;
844 DWORD dwSuggestedBufferSize
;
849 DWORD dwFormatChangeCount
;
851 } AVISTREAMINFOA
, * LPAVISTREAMINFOA
, *PAVISTREAMINFOA
;
853 typedef struct _AVISTREAMINFOW
{
861 DWORD dwRate
; /* dwRate / dwScale == samples/second */
863 DWORD dwLength
; /* In units above... */
864 DWORD dwInitialFrames
;
865 DWORD dwSuggestedBufferSize
;
870 DWORD dwFormatChangeCount
;
872 } AVISTREAMINFOW
, * LPAVISTREAMINFOW
, *PAVISTREAMINFOW
;
873 DECL_WINELIB_TYPE_AW(AVISTREAMINFO
)
874 DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO
)
875 DECL_WINELIB_TYPE_AW(PAVISTREAMINFO
)
877 #define AVISTREAMINFO_DISABLED 0x00000001
878 #define AVISTREAMINFO_FORMATCHANGES 0x00010000
880 /* AVIFILEINFO.dwFlags */
881 #define AVIFILEINFO_HASINDEX 0x00000010
882 #define AVIFILEINFO_MUSTUSEINDEX 0x00000020
883 #define AVIFILEINFO_ISINTERLEAVED 0x00000100
884 #define AVIFILEINFO_WASCAPTUREFILE 0x00010000
885 #define AVIFILEINFO_COPYRIGHTED 0x00020000
887 /* AVIFILEINFO.dwCaps */
888 #define AVIFILECAPS_CANREAD 0x00000001
889 #define AVIFILECAPS_CANWRITE 0x00000002
890 #define AVIFILECAPS_ALLKEYFRAMES 0x00000010
891 #define AVIFILECAPS_NOCOMPRESSION 0x00000020
893 typedef struct _AVIFILEINFOW
{
894 DWORD dwMaxBytesPerSec
;
898 DWORD dwSuggestedBufferSize
;
905 WCHAR szFileType
[64];
906 } AVIFILEINFOW
, * LPAVIFILEINFOW
, *PAVIFILEINFOW
;
907 typedef struct _AVIFILEINFOA
{
908 DWORD dwMaxBytesPerSec
;
912 DWORD dwSuggestedBufferSize
;
920 } AVIFILEINFOA
, * LPAVIFILEINFOA
, *PAVIFILEINFOA
;
921 DECL_WINELIB_TYPE_AW(AVIFILEINFO
)
922 DECL_WINELIB_TYPE_AW(PAVIFILEINFO
)
923 DECL_WINELIB_TYPE_AW(LPAVIFILEINFO
)
925 /* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
926 #define AVICOMPRESSF_INTERLEAVE 0x00000001
927 #define AVICOMPRESSF_DATARATE 0x00000002
928 #define AVICOMPRESSF_KEYFRAMES 0x00000004
929 #define AVICOMPRESSF_VALID 0x00000008
932 DWORD fccType
; /* stream type, for consistency */
933 DWORD fccHandler
; /* compressor */
934 DWORD dwKeyFrameEvery
; /* keyframe rate */
935 DWORD dwQuality
; /* compress quality 0-10,000 */
936 DWORD dwBytesPerSecond
; /* bytes per second */
937 DWORD dwFlags
; /* flags... see below */
938 LPVOID lpFormat
; /* save format */
940 LPVOID lpParms
; /* compressor options */
942 DWORD dwInterleaveEvery
; /* for non-video streams only */
943 } AVICOMPRESSOPTIONS
, *LPAVICOMPRESSOPTIONS
,*PAVICOMPRESSOPTIONS
;
947 #define DEFINE_AVIGUID(name, l, w1, w2) \
948 DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
950 DEFINE_AVIGUID(IID_IAVIFile
, 0x00020020, 0, 0);
951 DEFINE_AVIGUID(IID_IAVIStream
, 0x00020021, 0, 0);
952 DEFINE_AVIGUID(IID_IAVIStreaming
, 0x00020022, 0, 0);
953 DEFINE_AVIGUID(IID_IGetFrame
, 0x00020023, 0, 0);
954 DEFINE_AVIGUID(IID_IAVIEditStream
, 0x00020024, 0, 0);
956 DEFINE_AVIGUID(CLSID_AVIFile
, 0x00020000, 0, 0);
958 /*****************************************************************************
959 * IAVIStream interface
961 #define ICOM_INTERFACE IAVIStream
962 #define IAVIStream_METHODS \
963 ICOM_METHOD2(HRESULT,Create, LPARAM,lParam1, LPARAM,lParam2) \
964 ICOM_METHOD2(HRESULT,Info, AVISTREAMINFOW*,psi, LONG,lSize) \
965 ICOM_METHOD2(LONG, FindSample, LONG,lPos, LONG,lFlags) \
966 ICOM_METHOD3(HRESULT,ReadFormat, LONG,lPos, LPVOID,lpFormat, LONG*,lpcbFormat) \
967 ICOM_METHOD3(HRESULT,SetFormat, LONG,lPos, LPVOID,lpFormat, LONG,cbFormat) \
968 ICOM_METHOD6(HRESULT,Read, LONG,lStart, LONG,lSamples, LPVOID,lpBuffer, LONG,cbBuffer, LONG*,plBytes, LONG*,plSamples) \
969 ICOM_METHOD7(HRESULT,Write, LONG,lStart, LONG,lSamples, LPVOID,lpBuffer, LONG,cbBuffer, DWORD,dwFlags, LONG*,plSampWritten, LONG*,plBytesWritten) \
970 ICOM_METHOD2(HRESULT,Delete, LONG,lStart, LONG,lSamples) \
971 ICOM_METHOD3(HRESULT,ReadData, DWORD,fcc, LPVOID,lpBuffer, LONG*,lpcbBuffer) \
972 ICOM_METHOD3(HRESULT,WriteData, DWORD,fcc, LPVOID,lpBuffer, LONG,cbBuffer) \
973 ICOM_METHOD2(HRESULT,SetInfo, AVISTREAMINFOW*,plInfo, LONG,cbInfo)
974 #define IAVIStream_IMETHODS \
977 ICOM_DEFINE(IAVIStream
, IUnknown
)
978 #undef ICOM_INTERFACE
980 /*** IUnknown methods ***/
981 #define IAVIStream_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
982 #define IAVIStream_AddRef(p) ICOM_CALL (AddRef,p)
983 #define IAVIStream_Release(p) ICOM_CALL (Release,p)
984 /*** IAVIStream methods ***/
985 #define IAVIStream_Create(p,a,b) ICOM_CALL2(Create,p,a,b)
986 #define IAVIStream_Info(p,a,b) ICOM_CALL2(Info,p,a,b)
987 #define IAVIStream_FindSample(p,a,b) ICOM_CALL2(FindSample,p,a,b)
988 #define IAVIStream_ReadFormat(p,a,b,c) ICOM_CALL3(ReadFormat,p,a,b,c)
989 #define IAVIStream_SetFormat(p,a,b,c) ICOM_CALL3(SetFormat,p,a,b,c)
990 #define IAVIStream_Read(p,a,b,c,d,e,f) ICOM_CALL6(Read,p,a,b,c,d,e,f)
991 #define IAVIStream_Write(p,a,b,c,d,e,f,g) ICOM_CALL7(Write,p,a,b,c,d,e,f,g)
992 #define IAVIStream_Delete(p,a,b) ICOM_CALL2(Delete,p,a,b)
993 #define IAVIStream_ReadData(p,a,b,c) ICOM_CALL3(ReadData,p,a,b,c)
994 #define IAVIStream_WriteData(p,a,b,c) ICOM_CALL3(WriteData,p,a,b,c)
995 #define IAVIStream_SetInfo(p,a,b) ICOM_CALL2(SetInfo,p,a,b)
997 HRESULT WINAPI
AVIMakeCompressedStream(PAVISTREAM
*ppsCompressed
,PAVISTREAM ppsSource
,AVICOMPRESSOPTIONS
*lpOptions
,CLSID
*pclsidHandler
);
999 HRESULT WINAPI
AVIStreamInfoA(PAVISTREAM iface
,AVISTREAMINFOA
*asi
,LONG size
);
1000 HRESULT WINAPI
AVIStreamInfoW(PAVISTREAM iface
,AVISTREAMINFOW
*asi
,LONG size
);
1001 #define AVIStreamInfo WINELIB_NAME_AW(AVIStreamInfo)
1002 LPVOID WINAPI
AVIStreamGetFrame(PGETFRAME pg
,LONG pos
);
1003 HRESULT WINAPI
AVIStreamGetFrameClose(PGETFRAME pg
);
1004 PGETFRAME WINAPI
AVIStreamGetFrameOpen(PAVISTREAM pavi
,LPBITMAPINFOHEADER lpbiWanted
);
1005 LONG WINAPI
AVIStreamLength(PAVISTREAM iface
);
1006 HRESULT WINAPI
AVIStreamRead(PAVISTREAM iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,LONG
*bytesread
,LONG
*samplesread
);
1007 HRESULT WINAPI
AVIStreamReadData(PAVISTREAM iface
,DWORD fcc
,LPVOID lp
,LONG
*lpread
);
1008 HRESULT WINAPI
AVIStreamReadFormat(PAVISTREAM iface
,LONG pos
,LPVOID format
,LONG
*formatsize
);
1009 ULONG WINAPI
AVIStreamRelease(PAVISTREAM iface
);
1010 HRESULT WINAPI
AVIStreamSetFormat(PAVISTREAM iface
,LONG pos
,LPVOID format
,LONG formatsize
);
1011 LONG WINAPI
AVIStreamStart(PAVISTREAM iface
);
1012 HRESULT WINAPI
AVIStreamWrite(PAVISTREAM iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,DWORD flags
,LONG
*sampwritten
,LONG
*byteswritten
);
1013 HRESULT WINAPI
AVIStreamWriteData(PAVISTREAM iface
,DWORD fcc
,LPVOID lp
,LONG size
);
1014 HRESULT WINAPI
AVIStreamOpenFromFileA(PAVISTREAM
*ppavi
, LPCSTR szFile
,
1015 DWORD fccType
, LONG lParam
,
1016 UINT mode
, CLSID
*pclsidHandler
);
1017 HRESULT WINAPI
AVIStreamOpenFromFileW(PAVISTREAM
*ppavi
, LPCWSTR szFile
,
1018 DWORD fccType
, LONG lParam
,
1019 UINT mode
, CLSID
*pclsidHandler
);
1020 #define AVIStreamOpenFromFile WINELIB_NAME_AW(AVIStreamOpenFromFile)
1022 #define AVIStreamFormatSize(pavi, lPos, plSize) \
1023 AVIStreamReadFormat(pavi, lPos, NULL, plSize)
1025 /*****************************************************************************
1026 * IAVIFile interface
1028 /* In Win32 this interface uses UNICODE only */
1029 #define ICOM_INTERFACE IAVIFile
1030 #define IAVIFile_METHODS \
1031 ICOM_METHOD2(HRESULT,Info, AVIFILEINFOW*,pfi, LONG,lSize) \
1032 ICOM_METHOD3(HRESULT,GetStream, PAVISTREAM*,ppStream, DWORD,fccType, LONG,lParam) \
1033 ICOM_METHOD2(HRESULT,CreateStream, PAVISTREAM*,ppStream, AVISTREAMINFOW*,psi) \
1034 ICOM_METHOD3(HRESULT,WriteData, DWORD,fcc, LPVOID,lpBuffer, LONG,cbBuffer) \
1035 ICOM_METHOD3(HRESULT,ReadData, DWORD,fcc, LPVOID,lpBuffer, LONG*,lpcbBuffer) \
1036 ICOM_METHOD (HRESULT,EndRecord) \
1037 ICOM_METHOD2(HRESULT,DeleteStream, DWORD,fccType, LONG,lParam)
1038 #define IAVIFile_IMETHODS \
1041 ICOM_DEFINE(IAVIFile
,IUnknown
)
1042 #undef ICOM_INTERFACE
1044 /*** IUnknown methods ***/
1045 #define IAVIFile_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1046 #define IAVIFile_AddRef(p) ICOM_CALL (AddRef,p)
1047 #define IAVIFile_Release(p) ICOM_CALL (Release,p)
1048 /*** IAVIFile methods ***/
1049 #define IAVIFile_Info(p,a,b) ICOM_CALL2(Info,p,a,b)
1050 #define IAVIFile_GetStream(p,a,b,c) ICOM_CALL3(GetStream,p,a,b,c)
1051 #define IAVIFile_CreateStream(p,a,b) ICOM_CALL2(CreateStream,p,a,b)
1052 #define IAVIFile_WriteData(p,a,b,c) ICOM_CALL3(WriteData,p,a,b,c)
1053 #define IAVIFile_ReadData(p,a,b,c) ICOM_CALL3(ReadData,p,a,b,c)
1054 #define IAVIFile_EndRecord(p) ICOM_CALL (EndRecord,p)
1055 #define IAVIFile_DeleteStream(p,a,b) ICOM_CALL2(DeleteStream,p,a,b)
1057 HRESULT WINAPI
AVIFileCreateStreamA(PAVIFILE pfile
,PAVISTREAM
* ppavi
,AVISTREAMINFOA
* psi
);
1058 HRESULT WINAPI
AVIFileCreateStreamW(PAVIFILE pfile
,PAVISTREAM
* ppavi
,AVISTREAMINFOW
* psi
);
1059 #define AVIFileCreateStream WINELIB_NAME_AW(AVIFileCreateStream)
1060 void WINAPI
AVIFileExit(void);
1061 HRESULT WINAPI
AVIFileGetStream(PAVIFILE pfile
,PAVISTREAM
* avis
,DWORD fccType
,LONG lParam
);
1062 HRESULT WINAPI
AVIFileInfoA(PAVIFILE pfile
,PAVIFILEINFOA pfi
,LONG lSize
);
1063 HRESULT WINAPI
AVIFileInfoW(PAVIFILE pfile
,PAVIFILEINFOW pfi
,LONG lSize
);
1064 #define AVIFileInfo WINELIB_NAME_AW(AVIFileInfo)
1065 void WINAPI
AVIFileInit(void);
1066 HRESULT WINAPI
AVIFileOpenA(PAVIFILE
* ppfile
,LPCSTR szFile
,UINT uMode
,LPCLSID lpHandler
);
1067 HRESULT WINAPI
AVIFileOpenW(PAVIFILE
* ppfile
,LPCWSTR szFile
,UINT uMode
,LPCLSID lpHandler
);
1068 #define AVIFileOpen WINELIB_NAME_AW(AVIFileOpen)
1069 ULONG WINAPI
AVIFileRelease(PAVIFILE iface
);
1072 /*****************************************************************************
1073 * IGetFrame interface
1075 #define ICOM_INTERFACE IGetFrame
1076 #define IGetFrame_METHODS \
1077 ICOM_METHOD1(LPVOID, GetFrame, LONG,lPos) \
1078 ICOM_METHOD3(HRESULT,Begin, LONG,lStart, LONG,lEnd, LONG,lRate) \
1079 ICOM_METHOD (HRESULT,End) \
1080 ICOM_METHOD6(HRESULT,SetFormat, LPBITMAPINFOHEADER,lpbi, LPVOID,lpBits, INT,x, INT,y, INT,dx, INT,dy)
1081 #define IGetFrame_IMETHODS \
1084 ICOM_DEFINE(IGetFrame
,IUnknown
)
1085 #undef ICOM_INTERFACE
1087 /*** IUnknown methods ***/
1088 #define IGetFrame_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1089 #define IGetFrame_AddRef(p) ICOM_CALL (AddRef,p)
1090 #define IGetFrame_Release(p) ICOM_CALL (Release,p)
1091 /*** IGetFrame methods ***/
1092 #define IGetFrame_GetFrame(p,a) ICOM_CALL1(GetFrame,p,a)
1093 #define IGetFrame_Begin(p,a,b,c) ICOM_CALL3(Begin,p,a,b,c)
1094 #define IGetFrame_End(p) ICOM_CALL (End,p)
1095 #define IGetFrame_SetFormat(p,a,b,c,d,e,f) ICOM_CALL6(SetFormat,p,a,b,c,d,e,f)
1098 #define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)
1100 #define AVIERR_UNSUPPORTED MAKE_AVIERR(101)
1101 #define AVIERR_BADFORMAT MAKE_AVIERR(102)
1102 #define AVIERR_MEMORY MAKE_AVIERR(103)
1103 #define AVIERR_INTERNAL MAKE_AVIERR(104)
1104 #define AVIERR_BADFLAGS MAKE_AVIERR(105)
1105 #define AVIERR_BADPARAM MAKE_AVIERR(106)
1106 #define AVIERR_BADSIZE MAKE_AVIERR(107)
1107 #define AVIERR_BADHANDLE MAKE_AVIERR(108)
1108 #define AVIERR_FILEREAD MAKE_AVIERR(109)
1109 #define AVIERR_FILEWRITE MAKE_AVIERR(110)
1110 #define AVIERR_FILEOPEN MAKE_AVIERR(111)
1111 #define AVIERR_COMPRESSOR MAKE_AVIERR(112)
1112 #define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)
1113 #define AVIERR_READONLY MAKE_AVIERR(114)
1114 #define AVIERR_NODATA MAKE_AVIERR(115)
1115 #define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)
1116 #define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)
1117 #define AVIERR_USERABORT MAKE_AVIERR(198)
1118 #define AVIERR_ERROR MAKE_AVIERR(199)
1120 /********************************************
1121 * DrawDib declarations
1124 HDRAWDIB VFWAPI
DrawDibOpen( void );
1125 UINT VFWAPI
DrawDibRealize(HDRAWDIB hdd
, HDC hdc
, BOOL fBackground
);
1127 BOOL VFWAPI
DrawDibBegin(HDRAWDIB hdd
, HDC hdc
, INT dxDst
, INT dyDst
,
1128 LPBITMAPINFOHEADER lpbi
, INT dxSrc
, INT dySrc
, UINT wFlags
);
1130 BOOL VFWAPI
DrawDibDraw(HDRAWDIB hdd
, HDC hdc
, INT xDst
, INT yDst
, INT dxDst
, INT dyDst
,
1131 LPBITMAPINFOHEADER lpbi
, LPVOID lpBits
,
1132 INT xSrc
, INT ySrc
, INT dxSrc
, INT dySrc
, UINT wFlags
);
1134 /* DrawDibDraw flags */
1136 #define DDF_UPDATE 0x0002
1137 #define DDF_SAME_HDC 0x0004
1138 #define DDF_SAME_DRAW 0x0008
1139 #define DDF_DONTDRAW 0x0010
1140 #define DDF_ANIMATE 0x0020
1141 #define DDF_BUFFER 0x0040
1142 #define DDF_JUSTDRAWIT 0x0080
1143 #define DDF_FULLSCREEN 0x0100
1144 #define DDF_BACKGROUNDPAL 0x0200
1145 #define DDF_NOTKEYFRAME 0x0400
1146 #define DDF_HURRYUP 0x0800
1147 #define DDF_HALFTONE 0x1000
1149 #define DDF_PREROLL DDF_DONTDRAW
1150 #define DDF_SAME_DIB DDF_SAME_DRAW
1151 #define DDF_SAME_SIZE DDF_SAME_DRAW
1153 BOOL VFWAPI
DrawDibSetPalette(HDRAWDIB hdd
, HPALETTE hpal
);
1154 HPALETTE VFWAPI
DrawDibGetPalette(HDRAWDIB hdd
);
1155 BOOL VFWAPI
DrawDibChangePalette(HDRAWDIB hdd
, int iStart
, int iLen
, LPPALETTEENTRY lppe
);
1156 LPVOID VFWAPI
DrawDibGetBuffer(HDRAWDIB hdd
, LPBITMAPINFOHEADER lpbi
, DWORD dwSize
, DWORD dwFlags
);
1158 BOOL VFWAPI
DrawDibStart(HDRAWDIB hdd
, DWORD rate
);
1159 BOOL VFWAPI
DrawDibStop(HDRAWDIB hdd
);
1160 #define DrawDibUpdate(hdd, hdc, x, y) \
1161 DrawDibDraw(hdd, hdc, x, y, 0, 0, NULL, NULL, 0, 0, 0, 0, DDF_UPDATE)
1163 BOOL VFWAPI
DrawDibEnd(HDRAWDIB hdd
);
1164 BOOL VFWAPI
DrawDibClose(HDRAWDIB hdd
);
1166 /* display profiling */
1167 #define PD_CAN_DRAW_DIB 0x0001
1168 #define PD_CAN_STRETCHDIB 0x0002
1169 #define PD_STRETCHDIB_1_1_OK 0x0004
1170 #define PD_STRETCHDIB_1_2_OK 0x0008
1171 #define PD_STRETCHDIB_1_N_OK 0x0010
1173 DWORD VFWAPI
DrawDibProfileDisplay(LPBITMAPINFOHEADER lpbi
);
1177 #endif /* __cplusplus */
1179 #endif /* __WINE_VFW_H */