2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #define VFWAPIV WINAPIV
31 #endif /* __cplusplus */
33 typedef HANDLE HDRAWDIB;
35 DWORD VFWAPI VideoForWindowsVersion(void);
36 LONG VFWAPI InitVFW(void);
37 LONG VFWAPI TermVFW(void);
39 /*****************************************************************************
40 * Predeclare the interfaces
42 typedef struct IAVIStream IAVIStream,*PAVISTREAM;
43 typedef struct IAVIFile IAVIFile,*PAVIFILE;
44 typedef struct IGetFrame IGetFrame,*PGETFRAME;
46 /* Installable Compressor Manager */
50 /* error return codes */
52 #define ICERR_DONTDRAW 1
53 #define ICERR_NEWPALETTE 2
54 #define ICERR_GOTOKEYFRAME 3
55 #define ICERR_STOPDRAWING 4
57 #define ICERR_UNSUPPORTED -1
58 #define ICERR_BADFORMAT -2
59 #define ICERR_MEMORY -3
60 #define ICERR_INTERNAL -4
61 #define ICERR_BADFLAGS -5
62 #define ICERR_BADPARAM -6
63 #define ICERR_BADSIZE -7
64 #define ICERR_BADHANDLE -8
65 #define ICERR_CANTUPDATE -9
66 #define ICERR_ABORT -10
67 #define ICERR_ERROR -100
68 #define ICERR_BADBITDEPTH -200
69 #define ICERR_BADIMAGESIZE -201
71 #define ICERR_CUSTOM -400
74 #define ICM_USER (DRV_USER+0x0000)
76 /* ICM driver message range */
77 #define ICM_RESERVED_LOW (DRV_USER+0x1000)
78 #define ICM_RESERVED_HIGH (DRV_USER+0x2000)
79 #define ICM_RESERVED ICM_RESERVED_LOW
81 #define ICM_GETSTATE (ICM_RESERVED+0)
82 #define ICM_SETSTATE (ICM_RESERVED+1)
83 #define ICM_GETINFO (ICM_RESERVED+2)
85 #define ICM_CONFIGURE (ICM_RESERVED+10)
86 #define ICM_ABOUT (ICM_RESERVED+11)
89 #define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30)
90 #define ICM_GETQUALITY (ICM_RESERVED+31)
91 #define ICM_SETQUALITY (ICM_RESERVED+32)
93 #define ICM_SET (ICM_RESERVED+40)
94 #define ICM_GET (ICM_RESERVED+41)
96 /* 2 constant FOURCC codes */
97 #define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
98 #define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
100 #define ICM_COMPRESS_GET_FORMAT (ICM_USER+4)
101 #define ICM_COMPRESS_GET_SIZE (ICM_USER+5)
102 #define ICM_COMPRESS_QUERY (ICM_USER+6)
103 #define ICM_COMPRESS_BEGIN (ICM_USER+7)
104 #define ICM_COMPRESS (ICM_USER+8)
105 #define ICM_COMPRESS_END (ICM_USER+9)
107 #define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10)
108 #define ICM_DECOMPRESS_QUERY (ICM_USER+11)
109 #define ICM_DECOMPRESS_BEGIN (ICM_USER+12)
110 #define ICM_DECOMPRESS (ICM_USER+13)
111 #define ICM_DECOMPRESS_END (ICM_USER+14)
112 #define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29)
113 #define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30)
115 #define ICM_DRAW_QUERY (ICM_USER+31)
116 #define ICM_DRAW_BEGIN (ICM_USER+15)
117 #define ICM_DRAW_GET_PALETTE (ICM_USER+16)
118 #define ICM_DRAW_START (ICM_USER+18)
119 #define ICM_DRAW_STOP (ICM_USER+19)
120 #define ICM_DRAW_END (ICM_USER+21)
121 #define ICM_DRAW_GETTIME (ICM_USER+32)
122 #define ICM_DRAW (ICM_USER+33)
123 #define ICM_DRAW_WINDOW (ICM_USER+34)
124 #define ICM_DRAW_SETTIME (ICM_USER+35)
125 #define ICM_DRAW_REALIZE (ICM_USER+36)
126 #define ICM_DRAW_FLUSH (ICM_USER+37)
127 #define ICM_DRAW_RENDERBUFFER (ICM_USER+38)
129 #define ICM_DRAW_START_PLAY (ICM_USER+39)
130 #define ICM_DRAW_STOP_PLAY (ICM_USER+40)
132 #define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50)
133 #define ICM_DRAW_CHANGEPALETTE (ICM_USER+51)
135 #define ICM_GETBUFFERSWANTED (ICM_USER+41)
137 #define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42)
139 #define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60)
140 #define ICM_DECOMPRESSEX_QUERY (ICM_USER+61)
141 #define ICM_DECOMPRESSEX (ICM_USER+62)
142 #define ICM_DECOMPRESSEX_END (ICM_USER+63)
144 #define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70)
145 #define ICM_SET_STATUS_PROC (ICM_USER+72)
149 /* NOTE: Only the 16 bit structs are packed. Structs that are packed anyway
150 * have not been changed. If a structure is later extended, you may need to create
151 * two versions of it.
155 DWORD dwSize; /* 00: size */
156 DWORD fccType; /* 04: type 'vidc' usually */
157 DWORD fccHandler; /* 08: */
158 DWORD dwVersion; /* 0c: version of compman opening you */
159 DWORD dwFlags; /* 10: LOWORD is type specific */
160 LRESULT dwError; /* 14: */
161 LPVOID pV1Reserved; /* 18: */
162 LPVOID pV2Reserved; /* 1c: */
163 DWORD dnDevNode; /* 20: */
167 #define ICCOMPRESS_KEYFRAME 0x00000001L
171 LPBITMAPINFOHEADER lpbiOutput;
173 LPBITMAPINFOHEADER lpbiInput;
180 LPBITMAPINFOHEADER lpbiPrev;
184 DWORD VFWAPIV ICCompress(
185 HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiOutput,LPVOID lpData,
186 LPBITMAPINFOHEADER lpbiInput,LPVOID lpBits,LPDWORD lpckid,
187 LPDWORD lpdwFlags,LONG lFrameNum,DWORD dwFrameSize,DWORD dwQuality,
188 LPBITMAPINFOHEADER lpbiPrev,LPVOID lpPrev
191 #define ICCompressGetFormat(hic, lpbiInput, lpbiOutput) \
193 hic,ICM_COMPRESS_GET_FORMAT,(DWORD)(LPVOID)(lpbiInput), \
194 (DWORD)(LPVOID)(lpbiOutput) \
197 #define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
199 #define ICCompressBegin(hic, lpbiInput, lpbiOutput) \
201 hic, ICM_COMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
202 (DWORD)(LPVOID)(lpbiOutput) \
205 #define ICCompressGetSize(hic, lpbiInput, lpbiOutput) \
207 hic, ICM_COMPRESS_GET_SIZE, (DWORD)(LPVOID)(lpbiInput), \
208 (DWORD)(LPVOID)(lpbiOutput) \
211 #define ICCompressQuery(hic, lpbiInput, lpbiOutput) \
213 hic, ICM_COMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
214 (DWORD)(LPVOID)(lpbiOutput) \
217 #define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0)
219 /* ICCOMPRESSFRAMES.dwFlags */
220 #define ICCOMPRESSFRAMES_PADDING 0x00000001
223 LPBITMAPINFOHEADER lpbiOutput;
225 LPBITMAPINFOHEADER lpbiInput;
234 DWORD dwOverheadPerFrame;
236 LONG (CALLBACK *GetData)(LPARAM lInput,LONG lFrame,LPVOID lpBits,LONG len);
237 LONG (CALLBACK *PutData)(LPARAM lOutput,LONG lFrame,LPVOID lpBits,LONG len);
243 /* messages for Status callback */
244 #define ICSTATUS_START 0
245 #define ICSTATUS_STATUS 1
246 #define ICSTATUS_END 2
247 #define ICSTATUS_ERROR 3
248 #define ICSTATUS_YIELD 4
249 /* FIXME: some X11 libs define Status as int... */
250 /* LONG (CALLBACK *zStatus)(LPARAM lParam, UINT message, LONG l); */
251 LONG (CALLBACK *zStatus)(LPARAM lParam, UINT message, LONG l);
254 /* Values for wMode of ICOpen() */
255 #define ICMODE_COMPRESS 1
256 #define ICMODE_DECOMPRESS 2
257 #define ICMODE_FASTDECOMPRESS 3
258 #define ICMODE_QUERY 4
259 #define ICMODE_FASTCOMPRESS 5
260 #define ICMODE_DRAW 8
263 #define ICQUALITY_LOW 0
264 #define ICQUALITY_HIGH 10000
265 #define ICQUALITY_DEFAULT -1
268 DWORD dwSize; /* 00: */
269 DWORD fccType; /* 04:compressor type 'vidc' 'audc' */
270 DWORD fccHandler; /* 08:compressor sub-type 'rle ' 'jpeg' 'pcm '*/
271 DWORD dwFlags; /* 0c:flags LOWORD is type specific */
272 DWORD dwVersion; /* 10:version of the driver */
273 DWORD dwVersionICM; /* 14:version of the ICM used */
275 * under Win32, the driver always returns UNICODE strings.
277 WCHAR szName[16]; /* 18:short name */
278 WCHAR szDescription[128]; /* 38:long name */
279 WCHAR szDriver[128]; /* 138:driver that contains compressor*/
284 #define VIDCF_QUALITY 0x0001 /* supports quality */
285 #define VIDCF_CRUNCH 0x0002 /* supports crunching to a frame size */
286 #define VIDCF_TEMPORAL 0x0004 /* supports inter-frame compress */
287 #define VIDCF_COMPRESSFRAMES 0x0008 /* wants the compress all frames message */
288 #define VIDCF_DRAW 0x0010 /* supports drawing */
289 #define VIDCF_FASTTEMPORALC 0x0020 /* does not need prev frame on compress */
290 #define VIDCF_FASTTEMPORALD 0x0080 /* does not need prev frame on decompress */
291 #define VIDCF_QUALITYTIME 0x0040 /* supports temporal quality */
293 #define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
296 /* function shortcuts */
298 #define ICMF_ABOUT_QUERY 0x00000001
300 #define ICQueryAbout(hic) \
301 (ICSendMessage(hic,ICM_ABOUT,(DWORD)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
303 #define ICAbout(hic, hwnd) ICSendMessage(hic,ICM_ABOUT,(DWORD)(UINT)(hwnd),0)
306 #define ICMF_CONFIGURE_QUERY 0x00000001
307 #define ICQueryConfigure(hic) \
308 (ICSendMessage(hic,ICM_CONFIGURE,(DWORD)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
310 #define ICConfigure(hic,hwnd) \
311 ICSendMessage(hic,ICM_CONFIGURE,(DWORD)(UINT)(hwnd),0)
313 /* Decompression stuff */
314 #define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */
315 #define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */
316 #define ICDECOMPRESS_PREROLL 0x20000000 /* this frame is before real start */
317 #define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */
318 #define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */
321 DWORD dwFlags; /* flags (from AVI index...) */
322 LPBITMAPINFOHEADER lpbiInput; /* BITMAPINFO of compressed data */
323 LPVOID lpInput; /* compressed data */
324 LPBITMAPINFOHEADER lpbiOutput; /* DIB to decompress to */
326 DWORD ckid; /* ckid from AVI file */
331 LPBITMAPINFOHEADER lpbiSrc;
333 LPBITMAPINFOHEADER lpbiDst;
336 /* changed for ICM_DECOMPRESSEX */
337 INT xDst; /* destination rectangle */
342 INT xSrc; /* source rectangle */
348 DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,LPVOID lpData,LPBITMAPINFOHEADER lpbi,LPVOID lpBits);
350 #define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \
352 hic, ICM_DECOMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
353 (DWORD)(LPVOID)(lpbiOutput) \
356 #define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \
358 hic,ICM_DECOMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
359 (DWORD) (LPVOID)(lpbiOutput) \
362 #define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \
363 ((LONG)ICSendMessage( \
364 hic,ICM_DECOMPRESS_GET_FORMAT, (DWORD)(LPVOID)(lpbiInput), \
365 (DWORD)(LPVOID)(lpbiOutput) \
368 #define ICDecompressGetFormatSize(hic, lpbi) \
369 ICDecompressGetFormat(hic, lpbi, NULL)
371 #define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput) \
373 hic, ICM_DECOMPRESS_GET_PALETTE, (DWORD)(LPVOID)(lpbiInput), \
374 (DWORD)(LPVOID)(lpbiOutput) \
377 #define ICDecompressSetPalette(hic,lpbiPalette) \
379 hic,ICM_DECOMPRESS_SET_PALETTE, \
380 (DWORD)(LPVOID)(lpbiPalette),0 \
383 #define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)
385 LRESULT VFWAPI ICSendMessage(HIC hic, UINT msg, DWORD dw1, DWORD dw2);
387 inline static LRESULT VFWAPI ICDecompressEx(HIC hic, DWORD dwFlags,
388 LPBITMAPINFOHEADER lpbiSrc, LPVOID lpSrc,
389 int xSrc, int ySrc, int dxSrc, int dySrc,
390 LPBITMAPINFOHEADER lpbiDst, LPVOID lpDst,
391 int xDst, int yDst, int dxDst, int dyDst)
395 ic.dwFlags = dwFlags;
396 ic.lpbiSrc = lpbiSrc;
402 ic.lpbiDst = lpbiDst;
408 return ICSendMessage(hic, ICM_DECOMPRESSEX, (DWORD)&ic, sizeof(ic));
411 inline static LRESULT VFWAPI ICDecompressExBegin(HIC hic, DWORD dwFlags,
412 LPBITMAPINFOHEADER lpbiSrc,
414 int xSrc, int ySrc, int dxSrc, int dySrc,
415 LPBITMAPINFOHEADER lpbiDst,
424 ic.dwFlags = dwFlags;
425 ic.lpbiSrc = lpbiSrc;
431 ic.lpbiDst = lpbiDst;
437 return ICSendMessage(hic, ICM_DECOMPRESSEX_BEGIN, (DWORD)&ic, sizeof(ic));
439 inline static LRESULT VFWAPI ICDecompressExQuery(HIC hic, DWORD dwFlags,
440 LPBITMAPINFOHEADER lpbiSrc,
442 int xSrc, int ySrc, int dxSrc, int dySrc,
443 LPBITMAPINFOHEADER lpbiDst,
452 ic.dwFlags = dwFlags;
453 ic.lpbiSrc = lpbiSrc;
459 ic.lpbiDst = lpbiDst;
465 return ICSendMessage(hic, ICM_DECOMPRESSEX_QUERY, (DWORD)&ic, sizeof(ic));
468 #define ICDecompressExEnd(hic) \
469 ICSendMessage(hic, ICM_DECOMPRESSEX_END, 0, 0)
471 #define ICDRAW_QUERY 0x00000001L /* test for support */
472 #define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */
473 #define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */
474 #define ICDRAW_ANIMATE 0x00000008L /* expect palette animation */
475 #define ICDRAW_CONTINUE 0x00000010L /* draw is a continuation of previous draw */
476 #define ICDRAW_MEMORYDC 0x00000020L /* DC is offscreen, by the way */
477 #define ICDRAW_UPDATING 0x00000040L /* We're updating, as opposed to playing */
478 #define ICDRAW_RENDER 0x00000080L /* used to render data not draw it */
479 #define ICDRAW_BUFFER 0x00000100L /* buffer data offscreen, we will need to update it */
481 #define ICDecompressOpen(fccType, fccHandler, lpbiIn, lpbiOut) \
482 ICLocate(fccType, fccHandler, lpbiIn, lpbiOut, ICMODE_DECOMPRESS)
484 #define ICDrawOpen(fccType, fccHandler, lpbiIn) \
485 ICLocate(fccType, fccHandler, lpbiIn, NULL, ICMODE_DRAW)
487 HANDLE VFWAPI ICImageCompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn,
488 LPVOID lpBits, LPBITMAPINFO lpbiOut, LONG lQuality,
491 HANDLE VFWAPI ICImageDecompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn,
492 LPVOID lpBits, LPBITMAPINFO lpbiOut);
494 BOOL VFWAPI ICInfo(DWORD fccType, DWORD fccHandler, ICINFO * lpicinfo);
495 BOOL VFWAPI ICInstall(DWORD fccType, DWORD fccHandler, LPARAM lParam, LPSTR szDesc, UINT wFlags);
496 BOOL VFWAPI ICRemove(DWORD fccType, DWORD fccHandler, UINT wFlags);
497 LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, DWORD cb);
498 HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode);
499 HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHandler);
501 LRESULT VFWAPI ICClose(HIC hic);
502 HIC VFWAPI ICLocate(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags);
503 HIC VFWAPI ICGetDisplayFormat(HIC hic, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, int BitDepth, int dx, int dy);
505 /* Values for wFlags of ICInstall() */
506 #define ICINSTALL_UNICODE 0x8000
507 #define ICINSTALL_FUNCTION 0x0001
508 #define ICINSTALL_DRIVER 0x0002
509 #define ICINSTALL_HDRV 0x0004
510 #define ICINSTALL_DRIVERW 0x8002
512 #define ICGetState(hic, pv, cb) \
513 ICSendMessage(hic, ICM_GETSTATE, (DWORD)(LPVOID)(pv), (DWORD)(cb))
514 #define ICSetState(hic, pv, cb) \
515 ICSendMessage(hic, ICM_SETSTATE, (DWORD)(LPVOID)(pv), (DWORD)(cb))
516 #define ICGetStateSize(hic) \
517 ICGetState(hic, NULL, 0)
519 inline static DWORD ICGetDefaultQuality(HIC hic)
522 ICSendMessage(hic, ICM_GETDEFAULTQUALITY, (DWORD)(LPVOID)&dwICValue, sizeof(DWORD));
526 inline static DWORD ICGetDefaultKeyFrameRate(HIC hic)
529 ICSendMessage(hic, ICM_GETDEFAULTKEYFRAMERATE, (DWORD)(LPVOID)&dwICValue, sizeof(DWORD));
533 #define ICDrawWindow(hic, prc) \
534 ICSendMessage(hic, ICM_DRAW_WINDOW, (DWORD)(LPVOID)(prc), sizeof(RECT))
536 /* As passed to ICM_DRAW_SUGGESTFORMAT */
539 LPBITMAPINFOHEADER lpbiIn;
540 LPBITMAPINFOHEADER lpbiSuggest;
555 DWORD VFWAPIV ICDrawBegin(
557 DWORD dwFlags,/* flags */
558 HPALETTE hpal, /* palette to draw with */
559 HWND hwnd, /* window to draw to */
560 HDC hdc, /* HDC to draw to */
561 INT xDst, /* destination rectangle */
565 LPBITMAPINFOHEADER lpbi, /* format of frame to draw */
566 INT xSrc, /* source rectangle */
570 DWORD dwRate, /* frames/second = (dwRate/dwScale) */
574 /* as passed to ICM_DRAW_BEGIN */
584 LPBITMAPINFOHEADER lpbi;
593 #define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */
594 #define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */
595 #define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */
596 #define ICDRAW_NULLFRAME 0x10000000L /* repeat last frame */
597 #define ICDRAW_NOTKEYFRAME 0x08000000L /* this frame is not a key frame */
607 DWORD VFWAPIV ICDraw(HIC hic,DWORD dwFlags,LPVOID lpFormat,LPVOID lpData,DWORD cbData,LONG lTime);
609 inline static LRESULT VFWAPI ICDrawSuggestFormat(HIC hic, LPBITMAPINFOHEADER lpbiIn,
610 LPBITMAPINFOHEADER lpbiOut,
611 int dxSrc, int dySrc,
612 int dxDst, int dyDst,
618 ic.lpbiSuggest = lpbiOut;
623 ic.hicDecompressor = hicDecomp;
624 return ICSendMessage(hic, ICM_DRAW_SUGGESTFORMAT, (DWORD)&ic, sizeof(ic));
627 #define ICDrawQuery(hic, lpbiInput) \
628 ICSendMessage(hic, ICM_DRAW_QUERY, (DWORD)(LPVOID)(lpbiInput), 0L)
630 #define ICDrawChangePalette(hic, lpbiInput) \
631 ICSendMessage(hic, ICM_DRAW_CHANGEPALETTE, (DWORD)(LPVOID)(lpbiInput), 0L)
633 #define ICGetBuffersWanted(hic, lpdwBuffers) \
634 ICSendMessage(hic, ICM_GETBUFFERSWANTED, (DWORD)(LPVOID)(lpdwBuffers), 0)
636 #define ICDrawEnd(hic) \
637 ICSendMessage(hic, ICM_DRAW_END, 0, 0)
639 #define ICDrawStart(hic) \
640 ICSendMessage(hic, ICM_DRAW_START, 0, 0)
642 #define ICDrawStartPlay(hic, lFrom, lTo) \
643 ICSendMessage(hic, ICM_DRAW_START_PLAY, (DWORD)(lFrom), (DWORD)(lTo))
645 #define ICDrawStop(hic) \
646 ICSendMessage(hic, ICM_DRAW_STOP, 0, 0)
648 #define ICDrawStopPlay(hic) \
649 ICSendMessage(hic, ICM_DRAW_STOP_PLAY, 0, 0)
651 #define ICDrawGetTime(hic, lplTime) \
652 ICSendMessage(hic, ICM_DRAW_GETTIME, (DWORD)(LPVOID)(lplTime), 0)
654 #define ICDrawSetTime(hic, lTime) \
655 ICSendMessage(hic, ICM_DRAW_SETTIME, (DWORD)lTime, 0)
657 #define ICDrawRealize(hic, hdc, fBackground) \
658 ICSendMessage(hic, ICM_DRAW_REALIZE, (DWORD)(UINT)(HDC)(hdc), (DWORD)(BOOL)(fBackground))
660 #define ICDrawFlush(hic) \
661 ICSendMessage(hic, ICM_DRAW_FLUSH, 0, 0)
663 #define ICDrawRenderBuffer(hic) \
664 ICSendMessage(hic, ICM_DRAW_RENDERBUFFER, 0, 0)
666 inline static LRESULT VFWAPI ICSetStatusProc(HIC hic, DWORD dwFlags, LRESULT lParam,
667 LONG (CALLBACK *fpfnStatus)(LPARAM, UINT, LONG))
671 ic.dwFlags = dwFlags;
673 /* FIXME: see comment in ICSETSTATUSPROC definition */
674 ic.zStatus = fpfnStatus;
676 return ICSendMessage(hic, ICM_SET_STATUS_PROC, (DWORD)&ic, sizeof(ic));
686 LPBITMAPINFO lpbiOut;
696 } COMPVARS, *PCOMPVARS;
698 #define ICMF_COMPVARS_VALID 0x00000001
700 BOOL VFWAPI ICCompressorChoose(HWND hwnd, UINT uiFlags, LPVOID pvIn, LPVOID lpData,
701 PCOMPVARS pc, LPSTR lpszTitle);
703 #define ICMF_CHOOSE_KEYFRAME 0x0001
704 #define ICMF_CHOOSE_DATARATE 0x0002
705 #define ICMF_CHOOSE_PREVIEW 0x0004
706 #define ICMF_CHOOSE_ALLCOMPRESSORS 0x0008
708 BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn);
709 void VFWAPI ICSeqCompressFrameEnd(PCOMPVARS pc);
711 LPVOID VFWAPI ICSeqCompressFrame(PCOMPVARS pc, UINT uiFlags, LPVOID lpBits,
712 BOOL *pfKey, LONG *plSize);
713 void VFWAPI ICCompressorFree(PCOMPVARS pc);
715 /********************* AVIFILE function declarations *************************/
718 #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
719 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
720 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
724 #define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8))
729 #define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c')
730 #define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c')
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 #define FromHex(n) (((n) >= 'A') ? ((n) + 10 - 'A') : ((n) - '0'))
761 #define StreamFromFOURCC(fcc) ((WORD)((FromHex(LOBYTE(LOWORD(fcc))) << 4) + \
762 (FromHex(HIBYTE(LOWORD(fcc))))))
763 #define TWOCCFromFOURCC(fcc) HIWORD(fcc)
764 #define ToHex(n) ((BYTE)(((n) > 9) ? ((n) - 10 + 'A') : ((n) + '0')))
765 #define MAKEAVICKID(tcc, stream) \
766 MAKELONG((ToHex((stream) & 0x0f) << 8) | \
767 (ToHex(((stream) & 0xf0) >> 4)), tcc)
769 /* AVIFileHdr.dwFlags */
770 #define AVIF_HASINDEX 0x00000010 /* Index at end of file? */
771 #define AVIF_MUSTUSEINDEX 0x00000020
772 #define AVIF_ISINTERLEAVED 0x00000100
773 #define AVIF_TRUSTCKTYPE 0x00000800 /* Use CKType to find key frames*/
774 #define AVIF_WASCAPTUREFILE 0x00010000
775 #define AVIF_COPYRIGHTED 0x00020000
777 #define AVI_HEADERSIZE 2048
779 typedef BOOL (CALLBACK *AVISAVECALLBACK)(INT);
781 typedef struct _MainAVIHeader
783 DWORD dwMicroSecPerFrame;
784 DWORD dwMaxBytesPerSec;
785 DWORD dwPaddingGranularity;
788 DWORD dwInitialFrames;
790 DWORD dwSuggestedBufferSize;
796 /* AVIStreamHeader.dwFlags */
797 #define AVISF_DISABLED 0x00000001
798 #define AVISF_VIDEO_PALCHANGES 0x00010000
803 DWORD dwFlags; /* AVISF_* */
806 DWORD dwInitialFrames;
808 DWORD dwRate; /* dwRate / dwScale == samples/second */
810 DWORD dwLength; /* In units above... */
811 DWORD dwSuggestedBufferSize;
814 struct { SHORT left, top, right, bottom; } rcFrame; /* word.word - word.word in file */
817 /* AVIINDEXENTRY.dwFlags */
818 #define AVIIF_LIST 0x00000001 /* chunk is a 'LIST' */
819 #define AVIIF_TWOCC 0x00000002
820 #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
822 #define AVIIF_NOTIME 0x00000100 /* this frame doesn't take any time */
823 #define AVIIF_COMPUSE 0x0FFF0000
825 typedef struct _AVIINDEXENTRY {
832 typedef struct _AVIPALCHANGE {
835 WORD wFlags; /* pad */
836 PALETTEENTRY peNew[1];
839 #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
841 #define AVIGETFRAMEF_BESTDISPLAYFMT 1
843 typedef struct _AVISTREAMINFOA {
846 DWORD dwFlags; /* AVIIF_* */
851 DWORD dwRate; /* dwRate / dwScale == samples/second */
853 DWORD dwLength; /* In units above... */
854 DWORD dwInitialFrames;
855 DWORD dwSuggestedBufferSize;
860 DWORD dwFormatChangeCount;
862 } AVISTREAMINFOA, * LPAVISTREAMINFOA, *PAVISTREAMINFOA;
864 typedef struct _AVISTREAMINFOW {
872 DWORD dwRate; /* dwRate / dwScale == samples/second */
874 DWORD dwLength; /* In units above... */
875 DWORD dwInitialFrames;
876 DWORD dwSuggestedBufferSize;
881 DWORD dwFormatChangeCount;
883 } AVISTREAMINFOW, * LPAVISTREAMINFOW, *PAVISTREAMINFOW;
884 DECL_WINELIB_TYPE_AW(AVISTREAMINFO)
885 DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO)
886 DECL_WINELIB_TYPE_AW(PAVISTREAMINFO)
888 #define AVISTREAMINFO_DISABLED 0x00000001
889 #define AVISTREAMINFO_FORMATCHANGES 0x00010000
891 /* AVIFILEINFO.dwFlags */
892 #define AVIFILEINFO_HASINDEX 0x00000010
893 #define AVIFILEINFO_MUSTUSEINDEX 0x00000020
894 #define AVIFILEINFO_ISINTERLEAVED 0x00000100
895 #define AVIFILEINFO_TRUSTCKTYPE 0x00000800
896 #define AVIFILEINFO_WASCAPTUREFILE 0x00010000
897 #define AVIFILEINFO_COPYRIGHTED 0x00020000
899 /* AVIFILEINFO.dwCaps */
900 #define AVIFILECAPS_CANREAD 0x00000001
901 #define AVIFILECAPS_CANWRITE 0x00000002
902 #define AVIFILECAPS_ALLKEYFRAMES 0x00000010
903 #define AVIFILECAPS_NOCOMPRESSION 0x00000020
905 typedef struct _AVIFILEINFOW {
906 DWORD dwMaxBytesPerSec;
910 DWORD dwSuggestedBufferSize;
917 WCHAR szFileType[64];
918 } AVIFILEINFOW, * LPAVIFILEINFOW, *PAVIFILEINFOW;
919 typedef struct _AVIFILEINFOA {
920 DWORD dwMaxBytesPerSec;
924 DWORD dwSuggestedBufferSize;
932 } AVIFILEINFOA, * LPAVIFILEINFOA, *PAVIFILEINFOA;
933 DECL_WINELIB_TYPE_AW(AVIFILEINFO)
934 DECL_WINELIB_TYPE_AW(PAVIFILEINFO)
935 DECL_WINELIB_TYPE_AW(LPAVIFILEINFO)
937 /* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
938 #define AVICOMPRESSF_INTERLEAVE 0x00000001
939 #define AVICOMPRESSF_DATARATE 0x00000002
940 #define AVICOMPRESSF_KEYFRAMES 0x00000004
941 #define AVICOMPRESSF_VALID 0x00000008
944 DWORD fccType; /* stream type, for consistency */
945 DWORD fccHandler; /* compressor */
946 DWORD dwKeyFrameEvery; /* keyframe rate */
947 DWORD dwQuality; /* compress quality 0-10,000 */
948 DWORD dwBytesPerSecond; /* bytes per second */
949 DWORD dwFlags; /* flags... see below */
950 LPVOID lpFormat; /* save format */
952 LPVOID lpParms; /* compressor options */
954 DWORD dwInterleaveEvery; /* for non-video streams only */
955 } AVICOMPRESSOPTIONS, *LPAVICOMPRESSOPTIONS,*PAVICOMPRESSOPTIONS;
957 #define FIND_DIR 0x0000000FL /* direction mask */
958 #define FIND_NEXT 0x00000001L /* search forward */
959 #define FIND_PREV 0x00000004L /* search backward */
960 #define FIND_FROM_START 0x00000008L /* start at the logical beginning */
962 #define FIND_TYPE 0x000000F0L /* type mask */
963 #define FIND_KEY 0x00000010L /* find a key frame */
964 #define FIND_ANY 0x00000020L /* find any (non-empty) sample */
965 #define FIND_FORMAT 0x00000040L /* find a formatchange */
967 #define FIND_RET 0x0000F000L /* return mask */
968 #define FIND_POS 0x00000000L /* return logical position */
969 #define FIND_LENGTH 0x00001000L /* return logical size */
970 #define FIND_OFFSET 0x00002000L /* return physical position */
971 #define FIND_SIZE 0x00003000L /* return physical size */
972 #define FIND_INDEX 0x00004000L /* return physical index position */
976 #define DEFINE_AVIGUID(name, l, w1, w2) \
977 DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
979 DEFINE_AVIGUID(IID_IAVIFile, 0x00020020, 0, 0);
980 DEFINE_AVIGUID(IID_IAVIStream, 0x00020021, 0, 0);
981 DEFINE_AVIGUID(IID_IAVIStreaming, 0x00020022, 0, 0);
982 DEFINE_AVIGUID(IID_IGetFrame, 0x00020023, 0, 0);
983 DEFINE_AVIGUID(IID_IAVIEditStream, 0x00020024, 0, 0);
985 DEFINE_AVIGUID(CLSID_AVIFile, 0x00020000, 0, 0);
987 /*****************************************************************************
988 * IAVIStream interface
990 #define INTERFACE IAVIStream
991 #define IAVIStream_METHODS \
993 STDMETHOD(Create)(THIS_ LPARAM lParam1, LPARAM lParam2) PURE; \
994 STDMETHOD(Info)(THIS_ AVISTREAMINFOW *psi, LONG lSize) PURE; \
995 STDMETHOD_(LONG,FindSample)(THIS_ LONG lPos, LONG lFlags) PURE; \
996 STDMETHOD(ReadFormat)(THIS_ LONG lPos, LPVOID lpFormat, LONG *lpcbFormat) PURE; \
997 STDMETHOD(SetFormat)(THIS_ LONG lPos, LPVOID lpFormat, LONG cbFormat) PURE; \
998 STDMETHOD(Read)(THIS_ LONG lStart, LONG lSamples, LPVOID lpBuffer, LONG cbBuffer, LONG *plBytes, LONG *plSamples) PURE; \
999 STDMETHOD(Write)(THIS_ LONG lStart, LONG lSamples, LPVOID lpBuffer, LONG cbBuffer, DWORD dwFlags, LONG *plSampWritten, LONG *plBytesWritten) PURE; \
1000 STDMETHOD(Delete)(THIS_ LONG lStart, LONG lSamples) PURE; \
1001 STDMETHOD(ReadData)(THIS_ DWORD fcc, LPVOID lpBuffer, LONG *lpcbBuffer) PURE; \
1002 STDMETHOD(WriteData)(THIS_ DWORD fcc, LPVOID lpBuffer, LONG cbBuffer) PURE; \
1003 STDMETHOD(SetInfo)(THIS_ AVISTREAMINFOW *plInfo, LONG cbInfo) PURE;
1004 ICOM_DEFINE(IAVIStream, IUnknown)
1008 /*** IUnknown methods ***/
1009 #define IAVIStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1010 #define IAVIStream_AddRef(p) (p)->lpVtbl->AddRef(p)
1011 #define IAVIStream_Release(p) (p)->lpVtbl->Release(p)
1012 /*** IAVIStream methods ***/
1013 #define IAVIStream_Create(p,a,b) (p)->lpVtbl->Create(p,a,b)
1014 #define IAVIStream_Info(p,a,b) (p)->lpVtbl->Info(p,a,b)
1015 #define IAVIStream_FindSample(p,a,b) (p)->lpVtbl->FindSample(p,a,b)
1016 #define IAVIStream_ReadFormat(p,a,b,c) (p)->lpVtbl->ReadFormat(p,a,b,c)
1017 #define IAVIStream_SetFormat(p,a,b,c) (p)->lpVtbl->SetFormat(p,a,b,c)
1018 #define IAVIStream_Read(p,a,b,c,d,e,f) (p)->lpVtbl->Read(p,a,b,c,d,e,f)
1019 #define IAVIStream_Write(p,a,b,c,d,e,f,g) (p)->lpVtbl->Write(p,a,b,c,d,e,f,g)
1020 #define IAVIStream_Delete(p,a,b) (p)->lpVtbl->Delete(p,a,b)
1021 #define IAVIStream_ReadData(p,a,b,c) (p)->lpVtbl->ReadData(p,a,b,c)
1022 #define IAVIStream_WriteData(p,a,b,c) (p)->lpVtbl->WriteData(p,a,b,c)
1023 #define IAVIStream_SetInfo(p,a,b) (p)->lpVtbl->SetInfo(p,a,b)
1026 ULONG WINAPI AVIStreamAddRef(PAVISTREAM iface);
1027 ULONG WINAPI AVIStreamRelease(PAVISTREAM iface);
1028 HRESULT WINAPI AVIStreamCreate(PAVISTREAM*,LONG,LONG,CLSID*);
1029 HRESULT WINAPI AVIStreamInfoA(PAVISTREAM iface,AVISTREAMINFOA *asi,LONG size);
1030 HRESULT WINAPI AVIStreamInfoW(PAVISTREAM iface,AVISTREAMINFOW *asi,LONG size);
1031 #define AVIStreamInfo WINELIB_NAME_AW(AVIStreamInfo)
1032 HRESULT WINAPI AVIStreamFindSample(PAVISTREAM pstream, LONG pos, DWORD flags);
1033 HRESULT WINAPI AVIStreamReadFormat(PAVISTREAM iface,LONG pos,LPVOID format,LONG *formatsize);
1034 HRESULT WINAPI AVIStreamSetFormat(PAVISTREAM iface,LONG pos,LPVOID format,LONG formatsize);
1035 HRESULT WINAPI AVIStreamRead(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread);
1036 HRESULT WINAPI AVIStreamWrite(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,DWORD flags,LONG *sampwritten,LONG *byteswritten);
1037 HRESULT WINAPI AVIStreamReadData(PAVISTREAM iface,DWORD fcc,LPVOID lp,LONG *lpread);
1038 HRESULT WINAPI AVIStreamWriteData(PAVISTREAM iface,DWORD fcc,LPVOID lp,LONG size);
1040 PGETFRAME WINAPI AVIStreamGetFrameOpen(PAVISTREAM pavi,LPBITMAPINFOHEADER lpbiWanted);
1041 LPVOID WINAPI AVIStreamGetFrame(PGETFRAME pg,LONG pos);
1042 HRESULT WINAPI AVIStreamGetFrameClose(PGETFRAME pg);
1044 HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM*ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *lpOptions,CLSID*pclsidHandler);
1046 HRESULT WINAPI AVIStreamOpenFromFileA(PAVISTREAM *ppavi, LPCSTR szFile,
1047 DWORD fccType, LONG lParam,
1048 UINT mode, CLSID *pclsidHandler);
1049 HRESULT WINAPI AVIStreamOpenFromFileW(PAVISTREAM *ppavi, LPCWSTR szFile,
1050 DWORD fccType, LONG lParam,
1051 UINT mode, CLSID *pclsidHandler);
1052 #define AVIStreamOpenFromFile WINELIB_NAME_AW(AVIStreamOpenFromFile)
1054 HRESULT WINAPI AVIBuildFilterA(LPSTR szFilter, LONG cbFilter, BOOL fSaving);
1055 HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving);
1056 #define AVIBuildFilter WINELIB_NAME_AW(AVIBuildFilter)
1058 BOOL WINAPI AVISaveOptions(HWND hWnd,UINT uFlags,INT nStream,
1059 PAVISTREAM *ppavi,LPAVICOMPRESSOPTIONS *ppOptions);
1060 HRESULT WINAPI AVISaveOptionsFree(INT nStreams,LPAVICOMPRESSOPTIONS*ppOptions);
1062 LONG WINAPI AVIStreamStart(PAVISTREAM iface);
1063 LONG WINAPI AVIStreamLength(PAVISTREAM iface);
1064 LONG WINAPI AVIStreamSampleToTime(PAVISTREAM pstream, LONG lSample);
1065 LONG WINAPI AVIStreamTimeToSample(PAVISTREAM pstream, LONG lTime);
1067 #define AVIFileClose(pavi) \
1068 AVIFileRelease(pavi)
1069 #define AVIStreamClose(pavi) \
1070 AVIStreamRelease(pavi);
1071 #define AVIStreamEnd(pavi) \
1072 (AVIStreamStart(pavi) + AVIStreamLength(pavi))
1073 #define AVIStreamEndTime(pavi) \
1074 AVIStreamSampleToTime(pavi, AVIStreamEnd(pavi))
1075 #define AVIStreamFormatSize(pavi, lPos, plSize) \
1076 AVIStreamReadFormat(pavi, lPos, NULL, plSize)
1077 #define AVIStreamLengthTime(pavi) \
1078 AVIStreamSampleToTime(pavi, AVIStreamLength(pavi))
1079 #define AVIStreamSampleSize(pavi,pos,psize) \
1080 AVIStreamRead(pavi,pos,1,NULL,0,psize,NULL)
1081 #define AVIStreamSampleToSample(pavi1, pavi2, samp2) \
1082 AVIStreamTimeToSample(pavi1, AVIStreamSampleToTime(pavi2, samp2))
1083 #define AVIStreamStartTime(pavi) \
1084 AVIStreamSampleToTime(pavi, AVIStreamStart(pavi))
1086 /*****************************************************************************
1087 * IAVIFile interface
1089 /* In Win32 this interface uses UNICODE only */
1090 #define INTERFACE IAVIFile
1091 #define IAVIFile_METHODS \
1093 STDMETHOD(Info)(THIS_ AVIFILEINFOW *pfi, LONG lSize) PURE; \
1094 STDMETHOD(GetStream)(THIS_ PAVISTREAM *ppStream, DWORD fccType, LONG lParam) PURE; \
1095 STDMETHOD(CreateStream)(THIS_ PAVISTREAM *ppStream, AVISTREAMINFOW *psi) PURE; \
1096 STDMETHOD(WriteData)(THIS_ DWORD fcc, LPVOID lpBuffer, LONG cbBuffer) PURE; \
1097 STDMETHOD(ReadData)(THIS_ DWORD fcc, LPVOID lpBuffer, LONG *lpcbBuffer) PURE; \
1098 STDMETHOD(EndRecord)(THIS) PURE; \
1099 STDMETHOD(DeleteStream)(THIS_ DWORD fccType, LONG lParam) PURE;
1100 ICOM_DEFINE(IAVIFile,IUnknown)
1104 /*** IUnknown methods ***/
1105 #define IAVIFile_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1106 #define IAVIFile_AddRef(p) (p)->lpVtbl->AddRef(p)
1107 #define IAVIFile_Release(p) (p)->lpVtbl->Release(p)
1108 /*** IAVIFile methods ***/
1109 #define IAVIFile_Info(p,a,b) (p)->lpVtbl->Info(p,a,b)
1110 #define IAVIFile_GetStream(p,a,b,c) (p)->lpVtbl->GetStream(p,a,b,c)
1111 #define IAVIFile_CreateStream(p,a,b) (p)->lpVtbl->CreateStream(p,a,b)
1112 #define IAVIFile_WriteData(p,a,b,c) (p)->lpVtbl->WriteData(p,a,b,c)
1113 #define IAVIFile_ReadData(p,a,b,c) (p)->lpVtbl->ReadData(p,a,b,c)
1114 #define IAVIFile_EndRecord(p) (p)->lpVtbl->EndRecord(p)
1115 #define IAVIFile_DeleteStream(p,a,b) (p)->lpVtbl->DeleteStream(p,a,b)
1118 void WINAPI AVIFileInit(void);
1119 void WINAPI AVIFileExit(void);
1121 HRESULT WINAPI AVIFileOpenA(PAVIFILE* ppfile,LPCSTR szFile,UINT uMode,LPCLSID lpHandler);
1122 HRESULT WINAPI AVIFileOpenW(PAVIFILE* ppfile,LPCWSTR szFile,UINT uMode,LPCLSID lpHandler);
1123 #define AVIFileOpen WINELIB_NAME_AW(AVIFileOpen)
1125 ULONG WINAPI AVIFileAddRef(PAVIFILE pfile);
1126 ULONG WINAPI AVIFileRelease(PAVIFILE pfile);
1127 HRESULT WINAPI AVIFileInfoA(PAVIFILE pfile,PAVIFILEINFOA pfi,LONG lSize);
1128 HRESULT WINAPI AVIFileInfoW(PAVIFILE pfile,PAVIFILEINFOW pfi,LONG lSize);
1129 #define AVIFileInfo WINELIB_NAME_AW(AVIFileInfo)
1130 HRESULT WINAPI AVIFileGetStream(PAVIFILE pfile,PAVISTREAM* avis,DWORD fccType,LONG lParam);
1131 HRESULT WINAPI AVIFileCreateStreamA(PAVIFILE pfile,PAVISTREAM* ppavi,AVISTREAMINFOA* psi);
1132 HRESULT WINAPI AVIFileCreateStreamW(PAVIFILE pfile,PAVISTREAM* ppavi,AVISTREAMINFOW* psi);
1133 #define AVIFileCreateStream WINELIB_NAME_AW(AVIFileCreateStream)
1134 HRESULT WINAPI AVIFileWriteData(PAVIFILE pfile,DWORD fcc,LPVOID lp,LONG size);
1135 HRESULT WINAPI AVIFileReadData(PAVIFILE pfile,DWORD fcc,LPVOID lp,LPLONG size);
1136 HRESULT WINAPI AVIFileEndRecord(PAVIFILE pfile);
1138 /*****************************************************************************
1139 * IGetFrame interface
1141 #define INTERFACE IGetFrame
1142 #define IGetFrame_METHODS \
1144 STDMETHOD_(LPVOID,GetFrame)(THIS_ LONG lPos) PURE; \
1145 STDMETHOD(Begin)(THIS_ LONG lStart, LONG lEnd, LONG lRate) PURE; \
1146 STDMETHOD(End)(THIS) PURE; \
1147 STDMETHOD(SetFormat)(THIS_ LPBITMAPINFOHEADER lpbi, LPVOID lpBits, INT x, INT y, INT dx, INT dy) PURE;
1148 ICOM_DEFINE(IGetFrame,IUnknown)
1152 /*** IUnknown methods ***/
1153 #define IGetFrame_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1154 #define IGetFrame_AddRef(p) (p)->lpVtbl->AddRef(p)
1155 #define IGetFrame_Release(p) (p)->lpVtbl->Release(p)
1156 /*** IGetFrame methods ***/
1157 #define IGetFrame_GetFrame(p,a) (p)->lpVtbl->GetFrame(p,a)
1158 #define IGetFrame_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
1159 #define IGetFrame_End(p) (p)->lpVtbl->End(p)
1160 #define IGetFrame_SetFormat(p,a,b,c,d,e,f) (p)->lpVtbl->SetFormat(p,a,b,c,d,e,f)
1164 #define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)
1166 #define AVIERR_UNSUPPORTED MAKE_AVIERR(101)
1167 #define AVIERR_BADFORMAT MAKE_AVIERR(102)
1168 #define AVIERR_MEMORY MAKE_AVIERR(103)
1169 #define AVIERR_INTERNAL MAKE_AVIERR(104)
1170 #define AVIERR_BADFLAGS MAKE_AVIERR(105)
1171 #define AVIERR_BADPARAM MAKE_AVIERR(106)
1172 #define AVIERR_BADSIZE MAKE_AVIERR(107)
1173 #define AVIERR_BADHANDLE MAKE_AVIERR(108)
1174 #define AVIERR_FILEREAD MAKE_AVIERR(109)
1175 #define AVIERR_FILEWRITE MAKE_AVIERR(110)
1176 #define AVIERR_FILEOPEN MAKE_AVIERR(111)
1177 #define AVIERR_COMPRESSOR MAKE_AVIERR(112)
1178 #define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)
1179 #define AVIERR_READONLY MAKE_AVIERR(114)
1180 #define AVIERR_NODATA MAKE_AVIERR(115)
1181 #define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)
1182 #define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)
1183 #define AVIERR_USERABORT MAKE_AVIERR(198)
1184 #define AVIERR_ERROR MAKE_AVIERR(199)
1186 HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCSTR szFile);
1187 HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile);
1188 #define MCIWndCreate WINELIB_NAME_AW(MCIWndCreate)
1190 #define MCIWNDOPENF_NEW 0x0001
1192 #define MCIWNDF_NOAUTOSIZEWINDOW 0x0001
1193 #define MCIWNDF_NOPLAYBAR 0x0002
1194 #define MCIWNDF_NOAUTOSIZEMOVIE 0x0004
1195 #define MCIWNDF_NOMENU 0x0008
1196 #define MCIWNDF_SHOWNAME 0x0010
1197 #define MCIWNDF_SHOWPOS 0x0020
1198 #define MCIWNDF_SHOWMODE 0x0040
1199 #define MCIWNDF_SHOWALL 0x0070
1201 #define MCIWNDF_NOTIFYMODE 0x0100
1202 #define MCIWNDF_NOTIFYPOS 0x0200
1203 #define MCIWNDF_NOTIFYSIZE 0x0400
1204 #define MCIWNDF_NOTIFYERROR 0x1000
1205 #define MCIWNDF_NOTIFYALL 0x1F00
1207 #define MCIWNDF_NOTIFYANSI 0x0080
1209 #define MCIWNDF_NOTIFYMEDIAA 0x0880
1210 #define MCIWNDF_NOTIFYMEDIAW 0x0800
1211 #define MCIWNDF_NOTIFYMEDIA WINELIB_NAME_AW(MCIWNDF_NOTIFYMEDIA)
1213 #define MCIWNDF_RECORD 0x2000
1214 #define MCIWNDF_NOERRORDLG 0x4000
1215 #define MCIWNDF_NOOPEN 0x8000
1218 #define MCIWndSM ::SendMessage
1220 #define MCIWndSM SendMessage
1223 #define MCIWndCanPlay(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_PLAY,0,0)
1224 #define MCIWndCanRecord(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_RECORD,0,0)
1225 #define MCIWndCanSave(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_SAVE,0,0)
1226 #define MCIWndCanWindow(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_WINDOW,0,0)
1227 #define MCIWndCanEject(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_EJECT,0,0)
1228 #define MCIWndCanConfig(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_CONFIG,0,0)
1229 #define MCIWndPaletteKick(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_PALETTEKICK,0,0)
1231 #define MCIWndSave(hWnd,szFile) (LONG)MCIWndSM(hWnd,MCI_SAVE,0,(LPARAM)(LPVOID)(szFile))
1232 #define MCIWndSaveDialog(hWnd) MCIWndSave(hWnd,-1)
1234 #define MCIWndNew(hWnd,lp) (LONG)MCIWndSM(hWnd,MCIWNDM_NEW,0,(LPARAM)(LPVOID)(lp))
1236 #define MCIWndRecord(hWnd) (LONG)MCIWndSM(hWnd,MCI_RECORD,0,0)
1237 #define MCIWndOpen(hWnd,sz,f) (LONG)MCIWndSM(hWnd,MCIWNDM_OPEN,(WPARAM)(UINT)(f),(LPARAM)(LPVOID)(sz))
1238 #define MCIWndOpenDialog(hWnd) MCIWndOpen(hWnd,-1,0)
1239 #define MCIWndClose(hWnd) (LONG)MCIWndSM(hWnd,MCI_CLOSE,0,0)
1240 #define MCIWndPlay(hWnd) (LONG)MCIWndSM(hWnd,MCI_PLAY,0,0)
1241 #define MCIWndStop(hWnd) (LONG)MCIWndSM(hWnd,MCI_STOP,0,0)
1242 #define MCIWndPause(hWnd) (LONG)MCIWndSM(hWnd,MCI_PAUSE,0,0)
1243 #define MCIWndResume(hWnd) (LONG)MCIWndSM(hWnd,MCI_RESUME,0,0)
1244 #define MCIWndSeek(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCI_SEEK,0,(LPARAM)(LONG)(lPos))
1245 #define MCIWndEject(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_EJECT,0,0)
1247 #define MCIWndHome(hWnd) MCIWndSeek(hWnd,MCIWND_START)
1248 #define MCIWndEnd(hWnd) MCIWndSeek(hWnd,MCIWND_END)
1250 #define MCIWndGetSource(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_GET_SOURCE,0,(LPARAM)(LPRECT)(prc))
1251 #define MCIWndPutSource(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_PUT_SOURCE,0,(LPARAM)(LPRECT)(prc))
1253 #define MCIWndGetDest(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_GET_DEST,0,(LPARAM)(LPRECT)(prc))
1254 #define MCIWndPutDest(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_PUT_DEST,0,(LPARAM)(LPRECT)(prc))
1256 #define MCIWndPlayReverse(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYREVERSE,0,0)
1257 #define MCIWndPlayFrom(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYFROM,0,(LPARAM)(LONG)(lPos))
1258 #define MCIWndPlayTo(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYTO, 0,(LPARAM)(LONG)(lPos))
1259 #define MCIWndPlayFromTo(hWnd,lStart,lEnd) (MCIWndSeek(hWnd,lStart),MCIWndPlayTo(hWnd,lEnd))
1261 #define MCIWndGetDeviceID(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETDEVICEID,0,0)
1262 #define MCIWndGetAlias(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETALIAS,0,0)
1263 #define MCIWndGetMode(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETMODE,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
1264 #define MCIWndGetPosition(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETPOSITION,0,0)
1265 #define MCIWndGetPositionString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETPOSITION,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
1266 #define MCIWndGetStart(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETSTART,0,0)
1267 #define MCIWndGetLength(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETLENGTH,0,0)
1268 #define MCIWndGetEnd(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETEND,0,0)
1270 #define MCIWndStep(hWnd,n) (LONG)MCIWndSM(hWnd,MCI_STEP,0,(LPARAM)(long)(n))
1272 #define MCIWndDestroy(hWnd) (VOID)MCIWndSM(hWnd,WM_CLOSE,0,0)
1273 #define MCIWndSetZoom(hWnd,iZoom) (VOID)MCIWndSM(hWnd,MCIWNDM_SETZOOM,0,(LPARAM)(UINT)(iZoom))
1274 #define MCIWndGetZoom(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETZOOM,0,0)
1275 #define MCIWndSetVolume(hWnd,iVol) (LONG)MCIWndSM(hWnd,MCIWNDM_SETVOLUME,0,(LPARAM)(UINT)(iVol))
1276 #define MCIWndGetVolume(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETVOLUME,0,0)
1277 #define MCIWndSetSpeed(hWnd,iSpeed) (LONG)MCIWndSM(hWnd,MCIWNDM_SETSPEED,0,(LPARAM)(UINT)(iSpeed))
1278 #define MCIWndGetSpeed(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETSPEED,0,0)
1279 #define MCIWndSetTimeFormat(hWnd,lp) (LONG)MCIWndSM(hWnd,MCIWNDM_SETTIMEFORMAT,0,(LPARAM)(LPTSTR)(lp))
1280 #define MCIWndGetTimeFormat(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETTIMEFORMAT,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
1281 #define MCIWndValidateMedia(hWnd) (VOID)MCIWndSM(hWnd,MCIWNDM_VALIDATEMEDIA,0,0)
1283 #define MCIWndSetRepeat(hWnd,f) (void)MCIWndSM(hWnd,MCIWNDM_SETREPEAT,0,(LPARAM)(BOOL)(f))
1284 #define MCIWndGetRepeat(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_GETREPEAT,0,0)
1286 #define MCIWndUseFrames(hWnd) MCIWndSetTimeFormat(hWnd,TEXT("frames"))
1287 #define MCIWndUseTime(hWnd) MCIWndSetTimeFormat(hWnd,TEXT("ms"))
1289 #define MCIWndSetActiveTimer(hWnd,active) \
1290 (VOID)MCIWndSM(hWnd,MCIWNDM_SETACTIVETIMER, \
1291 (WPARAM)(UINT)(active),0L)
1292 #define MCIWndSetInactiveTimer(hWnd,inactive) \
1293 (VOID)MCIWndSM(hWnd,MCIWNDM_SETINACTIVETIMER, \
1294 (WPARAM)(UINT)(inactive),0L)
1295 #define MCIWndSetTimers(hWnd,active,inactive) \
1296 (VOID)MCIWndSM(hWnd,MCIWNDM_SETTIMERS,(WPARAM)(UINT)(active),\
1297 (LPARAM)(UINT)(inactive))
1298 #define MCIWndGetActiveTimer(hWnd) \
1299 (UINT)MCIWndSM(hWnd,MCIWNDM_GETACTIVETIMER,0,0L);
1300 #define MCIWndGetInactiveTimer(hWnd) \
1301 (UINT)MCIWndSM(hWnd,MCIWNDM_GETINACTIVETIMER,0,0L);
1303 #define MCIWndRealize(hWnd,fBkgnd) (LONG)MCIWndSM(hWnd,MCIWNDM_REALIZE,(WPARAM)(BOOL)(fBkgnd),0)
1305 #define MCIWndSendString(hWnd,sz) (LONG)MCIWndSM(hWnd,MCIWNDM_SENDSTRING,0,(LPARAM)(LPTSTR)(sz))
1306 #define MCIWndReturnString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_RETURNSTRING,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1307 #define MCIWndGetError(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETERROR,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1309 #define MCIWndGetPalette(hWnd) (HPALETTE)MCIWndSM(hWnd,MCIWNDM_GETPALETTE,0,0)
1310 #define MCIWndSetPalette(hWnd,hpal) (LONG)MCIWndSM(hWnd,MCIWNDM_SETPALETTE,(WPARAM)(HPALETTE)(hpal),0)
1312 #define MCIWndGetFileName(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETFILENAME,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1313 #define MCIWndGetDevice(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETDEVICE,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1315 #define MCIWndGetStyles(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETSTYLES,0,0L)
1316 #define MCIWndChangeStyles(hWnd,mask,value) (LONG)MCIWndSM(hWnd,MCIWNDM_CHANGESTYLES,(WPARAM)(UINT)(mask),(LPARAM)(LONG)(value))
1318 #define MCIWndOpenInterface(hWnd,pUnk) (LONG)MCIWndSM(hWnd,MCIWNDM_OPENINTERFACE,0,(LPARAM)(LPUNKNOWN)(pUnk))
1320 #define MCIWndSetOwner(hWnd,hWndP) (LONG)MCIWndSM(hWnd,MCIWNDM_SETOWNER,(WPARAM)(hWndP),0)
1322 #define MCIWNDM_GETDEVICEID (WM_USER + 100)
1323 #define MCIWNDM_GETSTART (WM_USER + 103)
1324 #define MCIWNDM_GETLENGTH (WM_USER + 104)
1325 #define MCIWNDM_GETEND (WM_USER + 105)
1326 #define MCIWNDM_EJECT (WM_USER + 107)
1327 #define MCIWNDM_SETZOOM (WM_USER + 108)
1328 #define MCIWNDM_GETZOOM (WM_USER + 109)
1329 #define MCIWNDM_SETVOLUME (WM_USER + 110)
1330 #define MCIWNDM_GETVOLUME (WM_USER + 111)
1331 #define MCIWNDM_SETSPEED (WM_USER + 112)
1332 #define MCIWNDM_GETSPEED (WM_USER + 113)
1333 #define MCIWNDM_SETREPEAT (WM_USER + 114)
1334 #define MCIWNDM_GETREPEAT (WM_USER + 115)
1335 #define MCIWNDM_REALIZE (WM_USER + 118)
1336 #define MCIWNDM_VALIDATEMEDIA (WM_USER + 121)
1337 #define MCIWNDM_PLAYFROM (WM_USER + 122)
1338 #define MCIWNDM_PLAYTO (WM_USER + 123)
1339 #define MCIWNDM_GETPALETTE (WM_USER + 126)
1340 #define MCIWNDM_SETPALETTE (WM_USER + 127)
1341 #define MCIWNDM_SETTIMERS (WM_USER + 129)
1342 #define MCIWNDM_SETACTIVETIMER (WM_USER + 130)
1343 #define MCIWNDM_SETINACTIVETIMER (WM_USER + 131)
1344 #define MCIWNDM_GETACTIVETIMER (WM_USER + 132)
1345 #define MCIWNDM_GETINACTIVETIMER (WM_USER + 133)
1346 #define MCIWNDM_CHANGESTYLES (WM_USER + 135)
1347 #define MCIWNDM_GETSTYLES (WM_USER + 136)
1348 #define MCIWNDM_GETALIAS (WM_USER + 137)
1349 #define MCIWNDM_PLAYREVERSE (WM_USER + 139)
1350 #define MCIWNDM_GET_SOURCE (WM_USER + 140)
1351 #define MCIWNDM_PUT_SOURCE (WM_USER + 141)
1352 #define MCIWNDM_GET_DEST (WM_USER + 142)
1353 #define MCIWNDM_PUT_DEST (WM_USER + 143)
1354 #define MCIWNDM_CAN_PLAY (WM_USER + 144)
1355 #define MCIWNDM_CAN_WINDOW (WM_USER + 145)
1356 #define MCIWNDM_CAN_RECORD (WM_USER + 146)
1357 #define MCIWNDM_CAN_SAVE (WM_USER + 147)
1358 #define MCIWNDM_CAN_EJECT (WM_USER + 148)
1359 #define MCIWNDM_CAN_CONFIG (WM_USER + 149)
1360 #define MCIWNDM_PALETTEKICK (WM_USER + 150)
1361 #define MCIWNDM_OPENINTERFACE (WM_USER + 151)
1362 #define MCIWNDM_SETOWNER (WM_USER + 152)
1364 #define MCIWNDM_SENDSTRINGA (WM_USER + 101)
1365 #define MCIWNDM_GETPOSITIONA (WM_USER + 102)
1366 #define MCIWNDM_GETMODEA (WM_USER + 106)
1367 #define MCIWNDM_SETTIMEFORMATA (WM_USER + 119)
1368 #define MCIWNDM_GETTIMEFORMATA (WM_USER + 120)
1369 #define MCIWNDM_GETFILENAMEA (WM_USER + 124)
1370 #define MCIWNDM_GETDEVICEA (WM_USER + 125)
1371 #define MCIWNDM_GETERRORA (WM_USER + 128)
1372 #define MCIWNDM_NEWA (WM_USER + 134)
1373 #define MCIWNDM_RETURNSTRINGA (WM_USER + 138)
1374 #define MCIWNDM_OPENA (WM_USER + 153)
1376 #define MCIWNDM_SENDSTRINGW (WM_USER + 201)
1377 #define MCIWNDM_GETPOSITIONW (WM_USER + 202)
1378 #define MCIWNDM_GETMODEW (WM_USER + 206)
1379 #define MCIWNDM_SETTIMEFORMATW (WM_USER + 219)
1380 #define MCIWNDM_GETTIMEFORMATW (WM_USER + 220)
1381 #define MCIWNDM_GETFILENAMEW (WM_USER + 224)
1382 #define MCIWNDM_GETDEVICEW (WM_USER + 225)
1383 #define MCIWNDM_GETERRORW (WM_USER + 228)
1384 #define MCIWNDM_NEWW (WM_USER + 234)
1385 #define MCIWNDM_RETURNSTRINGW (WM_USER + 238)
1386 #define MCIWNDM_OPENW (WM_USER + 252)
1388 #define MCIWNDM_SENDSTRING WINELIB_NAME_AW(MCIWNDM_SENDSTRING)
1389 #define MCIWNDM_GETPOSITION WINELIB_NAME_AW(MCIWNDM_GETPOSITION)
1390 #define MCIWNDM_GETMODE WINELIB_NAME_AW(MCIWNDM_GETMODE)
1391 #define MCIWNDM_SETTIMEFORMAT WINELIB_NAME_AW(MCIWNDM_SETTIMEFORMAT)
1392 #define MCIWNDM_GETTIMEFORMAT WINELIB_NAME_AW(MCIWNDM_GETTIMEFORMAT)
1393 #define MCIWNDM_GETFILENAME WINELIB_NAME_AW(MCIWNDM_GETFILENAME)
1394 #define MCIWNDM_GETDEVICE WINELIB_NAME_AW(MCIWNDM_GETDEVICE)
1395 #define MCIWNDM_GETERROR WINELIB_NAME_AW(MCIWNDM_GETERROR)
1396 #define MCIWNDM_NEW WINELIB_NAME_AW(MCIWNDM_NEW)
1397 #define MCIWNDM_RETURNSTRING WINELIB_NAME_AW(MCIWNDM_RETURNSTRING)
1398 #define MCIWNDM_OPEN WINELIB_NAME_AW(MCIWNDM_OPEN)
1400 #define MCIWNDM_NOTIFYMODE (WM_USER + 200)
1401 #define MCIWNDM_NOTIFYPOS (WM_USER + 201)
1402 #define MCIWNDM_NOTIFYSIZE (WM_USER + 202)
1403 #define MCIWNDM_NOTIFYMEDIA (WM_USER + 203)
1404 #define MCIWNDM_NOTIFYERROR (WM_USER + 205)
1406 #define MCIWND_START -1
1407 #define MCIWND_END -2
1409 /********************************************
1410 * DrawDib declarations
1413 HDRAWDIB VFWAPI DrawDibOpen( void );
1414 UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground);
1416 BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, HDC hdc, INT dxDst, INT dyDst,
1417 LPBITMAPINFOHEADER lpbi, INT dxSrc, INT dySrc, UINT wFlags);
1419 BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, INT xDst, INT yDst, INT dxDst, INT dyDst,
1420 LPBITMAPINFOHEADER lpbi, LPVOID lpBits,
1421 INT xSrc, INT ySrc, INT dxSrc, INT dySrc, UINT wFlags);
1423 /* DrawDibDraw flags */
1425 #define DDF_UPDATE 0x0002
1426 #define DDF_SAME_HDC 0x0004
1427 #define DDF_SAME_DRAW 0x0008
1428 #define DDF_DONTDRAW 0x0010
1429 #define DDF_ANIMATE 0x0020
1430 #define DDF_BUFFER 0x0040
1431 #define DDF_JUSTDRAWIT 0x0080
1432 #define DDF_FULLSCREEN 0x0100
1433 #define DDF_BACKGROUNDPAL 0x0200
1434 #define DDF_NOTKEYFRAME 0x0400
1435 #define DDF_HURRYUP 0x0800
1436 #define DDF_HALFTONE 0x1000
1438 #define DDF_PREROLL DDF_DONTDRAW
1439 #define DDF_SAME_DIB DDF_SAME_DRAW
1440 #define DDF_SAME_SIZE DDF_SAME_DRAW
1442 BOOL VFWAPI DrawDibSetPalette(HDRAWDIB hdd, HPALETTE hpal);
1443 HPALETTE VFWAPI DrawDibGetPalette(HDRAWDIB hdd);
1444 BOOL VFWAPI DrawDibChangePalette(HDRAWDIB hdd, int iStart, int iLen, LPPALETTEENTRY lppe);
1445 LPVOID VFWAPI DrawDibGetBuffer(HDRAWDIB hdd, LPBITMAPINFOHEADER lpbi, DWORD dwSize, DWORD dwFlags);
1447 BOOL VFWAPI DrawDibStart(HDRAWDIB hdd, DWORD rate);
1448 BOOL VFWAPI DrawDibStop(HDRAWDIB hdd);
1449 #define DrawDibUpdate(hdd, hdc, x, y) \
1450 DrawDibDraw(hdd, hdc, x, y, 0, 0, NULL, NULL, 0, 0, 0, 0, DDF_UPDATE)
1452 BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd);
1453 BOOL VFWAPI DrawDibClose(HDRAWDIB hdd);
1455 /* display profiling */
1456 #define PD_CAN_DRAW_DIB 0x0001
1457 #define PD_CAN_STRETCHDIB 0x0002
1458 #define PD_STRETCHDIB_1_1_OK 0x0004
1459 #define PD_STRETCHDIB_1_2_OK 0x0008
1460 #define PD_STRETCHDIB_1_N_OK 0x0010
1462 DWORD VFWAPI DrawDibProfileDisplay(LPBITMAPINFOHEADER lpbi);
1466 #endif /* __cplusplus */
1468 #endif /* __WINE_VFW_H */