source: trunk/include/win/vfw.h@ 10367

Last change on this file since 10367 was 6387, checked in by sandervl, 24 years ago

* empty log message *

File size: 51.4 KB
Line 
1#ifndef __WINE_VFW_H
2#define __WINE_VFW_H
3
4#include "windef.h"
5#include "mmsystem.h"
6#include "wingdi.h"
7#include "unknwn.h"
8
9#ifndef __cplusplus
10#ifndef inline
11#define inline
12#endif
13#endif
14
15#define VFWAPI WINAPI
16#define VFWAPIV WINAPIV
17
18#ifdef __cplusplus
19extern "C" {
20#endif /* __cplusplus */
21
22typedef HANDLE HDRAWDIB;
23
24HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCSTR szFile);
25HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile);
26#define MCIWndCreate WINELIB_NAME_AW(MCIWndCreate)
27DWORD VFWAPI VideoForWindowsVersion(void);
28LONG VFWAPI InitVFW(void);
29LONG VFWAPI TermVFW(void);
30
31#ifndef mmioFOURCC
32#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
33 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
34 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
35#endif
36
37#ifndef aviTWOCC
38#define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8))
39#endif
40
41#define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c')
42#define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c')
43
44/*****************************************************************************
45 * Predeclare the interfaces
46 */
47typedef struct IAVIStream IAVIStream,*PAVISTREAM;
48typedef struct IAVIFile IAVIFile,*PAVIFILE;
49typedef struct IGetFrame IGetFrame,*PGETFRAME;
50
51/* Installable Compressor Manager */
52
53DECLARE_HANDLE(HIC);
54
55#ifdef __WINE__
56/* HIC struct (same layout as Win95 one) */
57typedef struct tagWINE_HIC {
58 DWORD magic; /* 00: 'Smag' */
59 HANDLE curthread; /* 04: */
60 DWORD type; /* 08: */
61 DWORD handler; /* 0C: */
62 HDRVR hdrv; /* 10: */
63#ifdef __WIN32OS2__
64 DWORD privatevfw; /* 14:(handled by SendDriverMessage)*/
65#else
66 DWORD private; /* 14:(handled by SendDriverMessage)*/
67#endif
68 FARPROC driverproc; /* 18:(handled by SendDriverMessage)*/
69 DWORD x1; /* 1c: name? */
70 WORD x2; /* 20: */
71 DWORD x3; /* 22: */
72 /* 26: */
73} WINE_HIC;
74#endif
75
76/* error return codes */
77#define ICERR_OK 0
78#define ICERR_DONTDRAW 1
79#define ICERR_NEWPALETTE 2
80#define ICERR_GOTOKEYFRAME 3
81#define ICERR_STOPDRAWING 4
82
83#define ICERR_UNSUPPORTED -1
84#define ICERR_BADFORMAT -2
85#define ICERR_MEMORY -3
86#define ICERR_INTERNAL -4
87#define ICERR_BADFLAGS -5
88#define ICERR_BADPARAM -6
89#define ICERR_BADSIZE -7
90#define ICERR_BADHANDLE -8
91#define ICERR_CANTUPDATE -9
92#define ICERR_ABORT -10
93#define ICERR_ERROR -100
94#define ICERR_BADBITDEPTH -200
95#define ICERR_BADIMAGESIZE -201
96
97#define ICERR_CUSTOM -400
98
99/* ICM Messages */
100#define ICM_USER (DRV_USER+0x0000)
101
102/* ICM driver message range */
103#define ICM_RESERVED_LOW (DRV_USER+0x1000)
104#define ICM_RESERVED_HIGH (DRV_USER+0x2000)
105#define ICM_RESERVED ICM_RESERVED_LOW
106
107#define ICM_GETSTATE (ICM_RESERVED+0)
108#define ICM_SETSTATE (ICM_RESERVED+1)
109#define ICM_GETINFO (ICM_RESERVED+2)
110
111#define ICM_CONFIGURE (ICM_RESERVED+10)
112#define ICM_ABOUT (ICM_RESERVED+11)
113/* */
114
115#define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30)
116#define ICM_GETQUALITY (ICM_RESERVED+31)
117#define ICM_SETQUALITY (ICM_RESERVED+32)
118
119#define ICM_SET (ICM_RESERVED+40)
120#define ICM_GET (ICM_RESERVED+41)
121
122/* 2 constant FOURCC codes */
123#define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
124#define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
125
126#define ICM_COMPRESS_GET_FORMAT (ICM_USER+4)
127#define ICM_COMPRESS_GET_SIZE (ICM_USER+5)
128#define ICM_COMPRESS_QUERY (ICM_USER+6)
129#define ICM_COMPRESS_BEGIN (ICM_USER+7)
130#define ICM_COMPRESS (ICM_USER+8)
131#define ICM_COMPRESS_END (ICM_USER+9)
132
133#define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10)
134#define ICM_DECOMPRESS_QUERY (ICM_USER+11)
135#define ICM_DECOMPRESS_BEGIN (ICM_USER+12)
136#define ICM_DECOMPRESS (ICM_USER+13)
137#define ICM_DECOMPRESS_END (ICM_USER+14)
138#define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29)
139#define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30)
140
141#define ICM_DRAW_QUERY (ICM_USER+31)
142#define ICM_DRAW_BEGIN (ICM_USER+15)
143#define ICM_DRAW_GET_PALETTE (ICM_USER+16)
144#define ICM_DRAW_START (ICM_USER+18)
145#define ICM_DRAW_STOP (ICM_USER+19)
146#define ICM_DRAW_END (ICM_USER+21)
147#define ICM_DRAW_GETTIME (ICM_USER+32)
148#define ICM_DRAW (ICM_USER+33)
149#define ICM_DRAW_WINDOW (ICM_USER+34)
150#define ICM_DRAW_SETTIME (ICM_USER+35)
151#define ICM_DRAW_REALIZE (ICM_USER+36)
152#define ICM_DRAW_FLUSH (ICM_USER+37)
153#define ICM_DRAW_RENDERBUFFER (ICM_USER+38)
154
155#define ICM_DRAW_START_PLAY (ICM_USER+39)
156#define ICM_DRAW_STOP_PLAY (ICM_USER+40)
157
158#define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50)
159#define ICM_DRAW_CHANGEPALETTE (ICM_USER+51)
160
161#define ICM_GETBUFFERSWANTED (ICM_USER+41)
162
163#define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42)
164
165#define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60)
166#define ICM_DECOMPRESSEX_QUERY (ICM_USER+61)
167#define ICM_DECOMPRESSEX (ICM_USER+62)
168#define ICM_DECOMPRESSEX_END (ICM_USER+63)
169
170#define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70)
171#define ICM_SET_STATUS_PROC (ICM_USER+72)
172
173/* structs */
174
175/* NOTE: Only the 16 bit structs are packed. Structs that are packed anyway
176 * have not been changed. If a structure is later extended, you may need to create
177 * two versions of it.
178 */
179
180typedef struct {
181 DWORD dwSize; /* 00: size */
182 DWORD fccType; /* 04: type 'vidc' usually */
183 DWORD fccHandler; /* 08: */
184 DWORD dwVersion; /* 0c: version of compman opening you */
185 DWORD dwFlags; /* 10: LOWORD is type specific */
186 LRESULT dwError; /* 14: */
187 LPVOID pV1Reserved; /* 18: */
188 LPVOID pV2Reserved; /* 1c: */
189 DWORD dnDevNode; /* 20: */
190 /* 24: */
191} ICOPEN,*LPICOPEN;
192
193#define ICCOMPRESS_KEYFRAME 0x00000001L
194
195typedef struct {
196 DWORD dwFlags;
197 LPBITMAPINFOHEADER lpbiOutput;
198 LPVOID lpOutput;
199 LPBITMAPINFOHEADER lpbiInput;
200 LPVOID lpInput;
201 LPDWORD lpckid;
202 LPDWORD lpdwFlags;
203 LONG lFrameNum;
204 DWORD dwFrameSize;
205 DWORD dwQuality;
206 LPBITMAPINFOHEADER lpbiPrev;
207 LPVOID lpPrev;
208} ICCOMPRESS;
209
210DWORD VFWAPIV ICCompress(
211 HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiOutput,LPVOID lpData,
212 LPBITMAPINFOHEADER lpbiInput,LPVOID lpBits,LPDWORD lpckid,
213 LPDWORD lpdwFlags,LONG lFrameNum,DWORD dwFrameSize,DWORD dwQuality,
214 LPBITMAPINFOHEADER lpbiPrev,LPVOID lpPrev
215);
216
217#define ICCompressGetFormat(hic, lpbiInput, lpbiOutput) \
218 ICSendMessage( \
219 hic,ICM_COMPRESS_GET_FORMAT,(DWORD)(LPVOID)(lpbiInput), \
220 (DWORD)(LPVOID)(lpbiOutput) \
221 )
222
223#define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
224
225#define ICCompressBegin(hic, lpbiInput, lpbiOutput) \
226 ICSendMessage( \
227 hic, ICM_COMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
228 (DWORD)(LPVOID)(lpbiOutput) \
229 )
230
231#define ICCompressGetSize(hic, lpbiInput, lpbiOutput) \
232 ICSendMessage( \
233 hic, ICM_COMPRESS_GET_SIZE, (DWORD)(LPVOID)(lpbiInput), \
234 (DWORD)(LPVOID)(lpbiOutput) \
235 )
236
237#define ICCompressQuery(hic, lpbiInput, lpbiOutput) \
238 ICSendMessage( \
239 hic, ICM_COMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
240 (DWORD)(LPVOID)(lpbiOutput) \
241 )
242
243#define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0)
244
245/* ICCOMPRESSFRAMES.dwFlags */
246#define ICCOMPRESSFRAMES_PADDING 0x00000001
247typedef struct {
248 DWORD dwFlags;
249 LPBITMAPINFOHEADER lpbiOutput;
250 LPARAM lOutput;
251 LPBITMAPINFOHEADER lpbiInput;
252 LPARAM lInput;
253 LONG lStartFrame;
254 LONG lFrameCount;
255 LONG lQuality;
256 LONG lDataRate;
257 LONG lKeyRate;
258 DWORD dwRate;
259 DWORD dwScale;
260 DWORD dwOverheadPerFrame;
261 DWORD dwReserved2;
262#ifdef __WIN32OS2__
263 LONG (* CALLBACK GetData)(LPARAM lInput,LONG lFrame,LPVOID lpBits,LONG len);
264 LONG (* CALLBACK PutData)(LPARAM lOutput,LONG lFrame,LPVOID lpBits,LONG len);
265#else
266 LONG CALLBACK (*GetData)(LPARAM lInput,LONG lFrame,LPVOID lpBits,LONG len);
267 LONG CALLBACK (*PutData)(LPARAM lOutput,LONG lFrame,LPVOID lpBits,LONG len);
268#endif
269} ICCOMPRESSFRAMES;
270
271typedef struct {
272 DWORD dwFlags;
273 LPARAM lParam;
274 /* messages for Status callback */
275#define ICSTATUS_START 0
276#define ICSTATUS_STATUS 1
277#define ICSTATUS_END 2
278#define ICSTATUS_ERROR 3
279#define ICSTATUS_YIELD 4
280 /* FIXME: some X11 libs define Status as int... */
281 /* LONG CALLBACK (*zStatus)(LPARAM lParam, UINT message, LONG l); */
282#ifdef __WIN32OS2__
283 LONG (* CALLBACK zStatus)(LPARAM lParam, UINT message, LONG l);
284#else
285 LONG CALLBACK (*zStatus)(LPARAM lParam, UINT message, LONG l);
286#endif
287} ICSETSTATUSPROC;
288
289/* Values for wMode of ICOpen() */
290#define ICMODE_COMPRESS 1
291#define ICMODE_DECOMPRESS 2
292#define ICMODE_FASTDECOMPRESS 3
293#define ICMODE_QUERY 4
294#define ICMODE_FASTCOMPRESS 5
295#define ICMODE_DRAW 8
296
297/* quality flags */
298#define ICQUALITY_LOW 0
299#define ICQUALITY_HIGH 10000
300#define ICQUALITY_DEFAULT -1
301
302typedef struct {
303 DWORD dwSize; /* 00: */
304 DWORD fccType; /* 04:compressor type 'vidc' 'audc' */
305 DWORD fccHandler; /* 08:compressor sub-type 'rle ' 'jpeg' 'pcm '*/
306 DWORD dwFlags; /* 0c:flags LOWORD is type specific */
307 DWORD dwVersion; /* 10:version of the driver */
308 DWORD dwVersionICM; /* 14:version of the ICM used */
309 /*
310 * under Win32, the driver always returns UNICODE strings.
311 */
312 WCHAR szName[16]; /* 18:short name */
313 WCHAR szDescription[128]; /* 38:long name */
314 WCHAR szDriver[128]; /* 138:driver that contains compressor*/
315 /* 238: */
316} ICINFO;
317
318/* ICINFO.dwFlags */
319#define VIDCF_QUALITY 0x0001 /* supports quality */
320#define VIDCF_CRUNCH 0x0002 /* supports crunching to a frame size */
321#define VIDCF_TEMPORAL 0x0004 /* supports inter-frame compress */
322#define VIDCF_COMPRESSFRAMES 0x0008 /* wants the compress all frames message */
323#define VIDCF_DRAW 0x0010 /* supports drawing */
324#define VIDCF_FASTTEMPORALC 0x0020 /* does not need prev frame on compress */
325#define VIDCF_FASTTEMPORALD 0x0080 /* does not need prev frame on decompress */
326#define VIDCF_QUALITYTIME 0x0040 /* supports temporal quality */
327
328#define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
329
330
331/* function shortcuts */
332/* ICM_ABOUT */
333#define ICMF_ABOUT_QUERY 0x00000001
334
335#define ICQueryAbout(hic) \
336 (ICSendMessage(hic,ICM_ABOUT,(DWORD)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
337
338#define ICAbout(hic, hwnd) ICSendMessage(hic,ICM_ABOUT,(DWORD)(UINT)(hwnd),0)
339
340/* ICM_CONFIGURE */
341#define ICMF_CONFIGURE_QUERY 0x00000001
342#define ICQueryConfigure(hic) \
343 (ICSendMessage(hic,ICM_CONFIGURE,(DWORD)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
344
345#define ICConfigure(hic,hwnd) \
346 ICSendMessage(hic,ICM_CONFIGURE,(DWORD)(UINT)(hwnd),0)
347
348/* Decompression stuff */
349#define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */
350#define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */
351#define ICDECOMPRESS_PREROLL 0x20000000 /* this frame is before real start */
352#define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */
353#define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */
354
355typedef struct {
356 DWORD dwFlags; /* flags (from AVI index...) */
357 LPBITMAPINFOHEADER lpbiInput; /* BITMAPINFO of compressed data */
358 LPVOID lpInput; /* compressed data */
359 LPBITMAPINFOHEADER lpbiOutput; /* DIB to decompress to */
360 LPVOID lpOutput;
361 DWORD ckid; /* ckid from AVI file */
362} ICDECOMPRESS;
363
364typedef struct {
365 DWORD dwFlags;
366 LPBITMAPINFOHEADER lpbiSrc;
367 LPVOID lpSrc;
368 LPBITMAPINFOHEADER lpbiDst;
369 LPVOID lpDst;
370
371 /* changed for ICM_DECOMPRESSEX */
372 INT xDst; /* destination rectangle */
373 INT yDst;
374 INT dxDst;
375 INT dyDst;
376
377 INT xSrc; /* source rectangle */
378 INT ySrc;
379 INT dxSrc;
380 INT dySrc;
381} ICDECOMPRESSEX;
382
383DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,LPVOID lpData,LPBITMAPINFOHEADER lpbi,LPVOID lpBits);
384
385#define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \
386 ICSendMessage( \
387 hic, ICM_DECOMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
388 (DWORD)(LPVOID)(lpbiOutput) \
389 )
390
391#define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \
392 ICSendMessage( \
393 hic,ICM_DECOMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
394 (DWORD) (LPVOID)(lpbiOutput) \
395 )
396
397#define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \
398 ((LONG)ICSendMessage( \
399 hic,ICM_DECOMPRESS_GET_FORMAT, (DWORD)(LPVOID)(lpbiInput), \
400 (DWORD)(LPVOID)(lpbiOutput) \
401 ))
402
403#define ICDecompressGetFormatSize(hic, lpbi) \
404 ICDecompressGetFormat(hic, lpbi, NULL)
405
406#define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput) \
407 ICSendMessage( \
408 hic, ICM_DECOMPRESS_GET_PALETTE, (DWORD)(LPVOID)(lpbiInput), \
409 (DWORD)(LPVOID)(lpbiOutput) \
410 )
411
412#define ICDecompressSetPalette(hic,lpbiPalette) \
413 ICSendMessage( \
414 hic,ICM_DECOMPRESS_SET_PALETTE, \
415 (DWORD)(LPVOID)(lpbiPalette),0 \
416 )
417
418#define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)
419
420LRESULT VFWAPI ICSendMessage(HIC hic, UINT msg, DWORD dw1, DWORD dw2);
421
422inline static LRESULT VFWAPI ICDecompressEx(HIC hic, DWORD dwFlags,
423 LPBITMAPINFOHEADER lpbiSrc, LPVOID lpSrc,
424 int xSrc, int ySrc, int dxSrc, int dySrc,
425 LPBITMAPINFOHEADER lpbiDst, LPVOID lpDst,
426 int xDst, int yDst, int dxDst, int dyDst)
427{
428 ICDECOMPRESSEX ic;
429
430 ic.dwFlags = dwFlags;
431 ic.lpbiSrc = lpbiSrc;
432 ic.lpSrc = lpSrc;
433 ic.xSrc = xSrc;
434 ic.ySrc = ySrc;
435 ic.dxSrc = dxSrc;
436 ic.dySrc = dySrc;
437 ic.lpbiDst = lpbiDst;
438 ic.lpDst = lpDst;
439 ic.xDst = xDst;
440 ic.yDst = yDst;
441 ic.dxDst = dxDst;
442 ic.dyDst = dyDst;
443 return ICSendMessage(hic, ICM_DECOMPRESSEX, (DWORD)&ic, sizeof(ic));
444}
445
446inline static LRESULT VFWAPI ICDecompressExBegin(HIC hic, DWORD dwFlags,
447 LPBITMAPINFOHEADER lpbiSrc,
448 LPVOID lpSrc,
449 int xSrc, int ySrc, int dxSrc, int dySrc,
450 LPBITMAPINFOHEADER lpbiDst,
451 LPVOID lpDst,
452 int xDst,
453 int yDst,
454 int dxDst,
455 int dyDst)
456{
457 ICDECOMPRESSEX ic;
458
459 ic.dwFlags = dwFlags;
460 ic.lpbiSrc = lpbiSrc;
461 ic.lpSrc = lpSrc;
462 ic.xSrc = xSrc;
463 ic.ySrc = ySrc;
464 ic.dxSrc = dxSrc;
465 ic.dySrc = dySrc;
466 ic.lpbiDst = lpbiDst;
467 ic.lpDst = lpDst;
468 ic.xDst = xDst;
469 ic.yDst = yDst;
470 ic.dxDst = dxDst;
471 ic.dyDst = dyDst;
472 return ICSendMessage(hic, ICM_DECOMPRESSEX_BEGIN, (DWORD)&ic, sizeof(ic));
473}
474inline static LRESULT VFWAPI ICDecompressExQuery(HIC hic, DWORD dwFlags,
475 LPBITMAPINFOHEADER lpbiSrc,
476 LPVOID lpSrc,
477 int xSrc, int ySrc, int dxSrc, int dySrc,
478 LPBITMAPINFOHEADER lpbiDst,
479 LPVOID lpDst,
480 int xDst,
481 int yDst,
482 int dxDst,
483 int dyDst)
484{
485 ICDECOMPRESSEX ic;
486
487 ic.dwFlags = dwFlags;
488 ic.lpbiSrc = lpbiSrc;
489 ic.lpSrc = lpSrc;
490 ic.xSrc = xSrc;
491 ic.ySrc = ySrc;
492 ic.dxSrc = dxSrc;
493 ic.dySrc = dySrc;
494 ic.lpbiDst = lpbiDst;
495 ic.lpDst = lpDst;
496 ic.xDst = xDst;
497 ic.yDst = yDst;
498 ic.dxDst = dxDst;
499 ic.dyDst = dyDst;
500 return ICSendMessage(hic, ICM_DECOMPRESSEX_QUERY, (DWORD)&ic, sizeof(ic));
501}
502
503#define ICDecompressExEnd(hic) \
504 ICSendMessage(hic, ICM_DECOMPRESSEX_END, 0, 0)
505
506#define ICDRAW_QUERY 0x00000001L /* test for support */
507#define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */
508#define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */
509#define ICDRAW_ANIMATE 0x00000008L /* expect palette animation */
510#define ICDRAW_CONTINUE 0x00000010L /* draw is a continuation of previous draw */
511#define ICDRAW_MEMORYDC 0x00000020L /* DC is offscreen, by the way */
512#define ICDRAW_UPDATING 0x00000040L /* We're updating, as opposed to playing */
513#define ICDRAW_RENDER 0x00000080L /* used to render data not draw it */
514#define ICDRAW_BUFFER 0x00000100L /* buffer data offscreen, we will need to update it */
515
516#define ICDecompressOpen(fccType, fccHandler, lpbiIn, lpbiOut) \
517 ICLocate(fccType, fccHandler, lpbiIn, lpbiOut, ICMODE_DECOMPRESS)
518
519#define ICDrawOpen(fccType, fccHandler, lpbiIn) \
520 ICLocate(fccType, fccHandler, lpbiIn, NULL, ICMODE_DRAW)
521
522HANDLE VFWAPI ICImageCompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn,
523 LPVOID lpBits, LPBITMAPINFO lpbiOut, LONG lQuality,
524 LONG* plSize);
525
526HANDLE VFWAPI ICImageDecompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn,
527 LPVOID lpBits, LPBITMAPINFO lpbiOut);
528
529BOOL VFWAPI ICInfo(DWORD fccType, DWORD fccHandler, ICINFO * lpicinfo);
530BOOL VFWAPI ICInstall(DWORD fccType, DWORD fccHandler, LPARAM lParam, LPSTR szDesc, UINT wFlags);
531BOOL VFWAPI ICRemove(DWORD fccType, DWORD fccHandler, UINT wFlags);
532LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, DWORD cb);
533HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode);
534HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHandler);
535
536LRESULT VFWAPI ICClose(HIC hic);
537HIC VFWAPI ICLocate(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags);
538HIC VFWAPI ICGetDisplayFormat(HIC hic, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, int BitDepth, int dx, int dy);
539
540/* Values for wFlags of ICInstall() */
541#define ICINSTALL_UNICODE 0x8000
542#define ICINSTALL_FUNCTION 0x0001
543#define ICINSTALL_DRIVER 0x0002
544#define ICINSTALL_HDRV 0x0004
545#define ICINSTALL_DRIVERW 0x8002
546
547#define ICGetState(hic, pv, cb) \
548 ICSendMessage(hic, ICM_GETSTATE, (DWORD)(LPVOID)(pv), (DWORD)(cb))
549#define ICSetState(hic, pv, cb) \
550 ICSendMessage(hic, ICM_SETSTATE, (DWORD)(LPVOID)(pv), (DWORD)(cb))
551#define ICGetStateSize(hic) \
552 ICGetState(hic, NULL, 0)
553
554inline static DWORD ICGetDefaultQuality(HIC hic)
555{
556 DWORD dwICValue;
557 ICSendMessage(hic, ICM_GETDEFAULTQUALITY, (DWORD)(LPVOID)&dwICValue, sizeof(DWORD));
558 return dwICValue;
559}
560
561inline static DWORD ICGetDefaultKeyFrameRate(HIC hic)
562{
563 DWORD dwICValue;
564 ICSendMessage(hic, ICM_GETDEFAULTKEYFRAMERATE, (DWORD)(LPVOID)&dwICValue, sizeof(DWORD));
565 return dwICValue;
566}
567
568#define ICDrawWindow(hic, prc) \
569 ICSendMessage(hic, ICM_DRAW_WINDOW, (DWORD)(LPVOID)(prc), sizeof(RECT))
570
571/* As passed to ICM_DRAW_SUGGESTFORMAT */
572typedef struct {
573 DWORD dwFlags;
574 LPBITMAPINFOHEADER lpbiIn;
575 LPBITMAPINFOHEADER lpbiSuggest;
576 INT dxSrc;
577 INT dySrc;
578 INT dxDst;
579 INT dyDst;
580 HIC hicDecompressor;
581} ICDRAWSUGGEST;
582
583typedef struct {
584 DWORD dwFlags;
585 int iStart;
586 int iLen;
587 LPPALETTEENTRY lppe;
588} ICPALETTE;
589
590DWORD VFWAPIV ICDrawBegin(
591 HIC hic,
592 DWORD dwFlags,/* flags */
593 HPALETTE hpal, /* palette to draw with */
594 HWND hwnd, /* window to draw to */
595 HDC hdc, /* HDC to draw to */
596 INT xDst, /* destination rectangle */
597 INT yDst,
598 INT dxDst,
599 INT dyDst,
600 LPBITMAPINFOHEADER lpbi, /* format of frame to draw */
601 INT xSrc, /* source rectangle */
602 INT ySrc,
603 INT dxSrc,
604 INT dySrc,
605 DWORD dwRate, /* frames/second = (dwRate/dwScale) */
606 DWORD dwScale
607);
608
609/* as passed to ICM_DRAW_BEGIN */
610typedef struct {
611 DWORD dwFlags;
612 HPALETTE hpal;
613 HWND hwnd;
614 HDC hdc;
615 INT xDst;
616 INT yDst;
617 INT dxDst;
618 INT dyDst;
619 LPBITMAPINFOHEADER lpbi;
620 INT xSrc;
621 INT ySrc;
622 INT dxSrc;
623 INT dySrc;
624 DWORD dwRate;
625 DWORD dwScale;
626} ICDRAWBEGIN;
627
628#define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */
629#define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */
630#define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */
631#define ICDRAW_NULLFRAME 0x10000000L /* repeat last frame */
632#define ICDRAW_NOTKEYFRAME 0x08000000L /* this frame is not a key frame */
633
634typedef struct {
635 DWORD dwFlags;
636 LPVOID lpFormat;
637 LPVOID lpData;
638 DWORD cbData;
639 LONG lTime;
640} ICDRAW;
641
642DWORD VFWAPIV ICDraw(HIC hic,DWORD dwFlags,LPVOID lpFormat,LPVOID lpData,DWORD cbData,LONG lTime);
643
644inline static LRESULT VFWAPI ICDrawSuggestFormat(HIC hic, LPBITMAPINFOHEADER lpbiIn,
645 LPBITMAPINFOHEADER lpbiOut,
646 int dxSrc, int dySrc,
647 int dxDst, int dyDst,
648 HIC hicDecomp)
649{
650 ICDRAWSUGGEST ic;
651
652 ic.lpbiIn = lpbiIn;
653 ic.lpbiSuggest = lpbiOut;
654 ic.dxSrc = dxSrc;
655 ic.dySrc = dySrc;
656 ic.dxDst = dxDst;
657 ic.dyDst = dyDst;
658 ic.hicDecompressor = hicDecomp;
659 return ICSendMessage(hic, ICM_DRAW_SUGGESTFORMAT, (DWORD)&ic, sizeof(ic));
660}
661
662#define ICDrawQuery(hic, lpbiInput) \
663 ICSendMessage(hic, ICM_DRAW_QUERY, (DWORD)(LPVOID)(lpbiInput), 0L)
664
665#define ICDrawChangePalette(hic, lpbiInput) \
666 ICSendMessage(hic, ICM_DRAW_CHANGEPALETTE, (DWORD)(LPVOID)(lpbiInput), 0L)
667
668#define ICGetBuffersWanted(hic, lpdwBuffers) \
669 ICSendMessage(hic, ICM_GETBUFFERSWANTED, (DWORD)(LPVOID)(lpdwBuffers), 0)
670
671#define ICDrawEnd(hic) \
672 ICSendMessage(hic, ICM_DRAW_END, 0, 0)
673
674#define ICDrawStart(hic) \
675 ICSendMessage(hic, ICM_DRAW_START, 0, 0)
676
677#define ICDrawStartPlay(hic, lFrom, lTo) \
678 ICSendMessage(hic, ICM_DRAW_START_PLAY, (DWORD)(lFrom), (DWORD)(lTo))
679
680#define ICDrawStop(hic) \
681 ICSendMessage(hic, ICM_DRAW_STOP, 0, 0)
682
683#define ICDrawStopPlay(hic) \
684 ICSendMessage(hic, ICM_DRAW_STOP_PLAY, 0, 0)
685
686#define ICDrawGetTime(hic, lplTime) \
687 ICSendMessage(hic, ICM_DRAW_GETTIME, (DWORD)(LPVOID)(lplTime), 0)
688
689#define ICDrawSetTime(hic, lTime) \
690 ICSendMessage(hic, ICM_DRAW_SETTIME, (DWORD)lTime, 0)
691
692#define ICDrawRealize(hic, hdc, fBackground) \
693 ICSendMessage(hic, ICM_DRAW_REALIZE, (DWORD)(UINT)(HDC)(hdc), (DWORD)(BOOL)(fBackground))
694
695#define ICDrawFlush(hic) \
696 ICSendMessage(hic, ICM_DRAW_FLUSH, 0, 0)
697
698#define ICDrawRenderBuffer(hic) \
699 ICSendMessage(hic, ICM_DRAW_RENDERBUFFER, 0, 0)
700
701inline static LRESULT VFWAPI ICSetStatusProc(HIC hic, DWORD dwFlags, LRESULT lParam,
702#ifdef __WIN32OS2__
703 LONG (* CALLBACK fpfnStatus)(LPARAM, UINT, LONG))
704#else
705 LONG (CALLBACK *fpfnStatus)(LPARAM, UINT, LONG))
706#endif
707{
708 ICSETSTATUSPROC ic;
709
710 ic.dwFlags = dwFlags;
711 ic.lParam = lParam;
712 /* FIXME: see comment in ICSETSTATUSPROC definition */
713 ic.zStatus = fpfnStatus;
714
715 return ICSendMessage(hic, ICM_SET_STATUS_PROC, (DWORD)&ic, sizeof(ic));
716}
717
718typedef struct {
719 LONG cbSize;
720 DWORD dwFlags;
721 HIC hic;
722 DWORD fccType;
723 DWORD fccHandler;
724 LPBITMAPINFO lpbiIn;
725 LPBITMAPINFO lpbiOut;
726 LPVOID lpBitsOut;
727 LPVOID lpBitsPrev;
728 LONG lFrame;
729 LONG lKey;
730 LONG lDataRate;
731 LONG lQ;
732 LONG lKeyCount;
733 LPVOID lpState;
734 LONG cbState;
735} COMPVARS, *PCOMPVARS;
736
737#define ICMF_COMPVARS_VALID 0x00000001
738
739BOOL VFWAPI ICCompressorChoose(HWND hwnd, UINT uiFlags, LPVOID pvIn, LPVOID lpData,
740 PCOMPVARS pc, LPSTR lpszTitle);
741
742#define ICMF_CHOOSE_KEYFRAME 0x0001
743#define ICMF_CHOOSE_DATARATE 0x0002
744#define ICMF_CHOOSE_PREVIEW 0x0004
745#define ICMF_CHOOSE_ALLCOMPRESSORS 0x0008
746
747BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn);
748void VFWAPI ICSeqCompressFrameEnd(PCOMPVARS pc);
749
750LPVOID VFWAPI ICSeqCompressFrame(PCOMPVARS pc, UINT uiFlags, LPVOID lpBits,
751 BOOL *pfKey, LONG *plSize);
752void VFWAPI ICCompressorFree(PCOMPVARS pc);
753
754/********************* AVIFILE function declarations *************************/
755#define formtypeAVI mmioFOURCC('A', 'V', 'I', ' ')
756#define listtypeAVIHEADER mmioFOURCC('h', 'd', 'r', 'l')
757#define ckidAVIMAINHDR mmioFOURCC('a', 'v', 'i', 'h')
758#define listtypeSTREAMHEADER mmioFOURCC('s', 't', 'r', 'l')
759#define ckidSTREAMHEADER mmioFOURCC('s', 't', 'r', 'h')
760#define ckidSTREAMFORMAT mmioFOURCC('s', 't', 'r', 'f')
761#define ckidSTREAMHANDLERDATA mmioFOURCC('s', 't', 'r', 'd')
762#define ckidSTREAMNAME mmioFOURCC('s', 't', 'r', 'n')
763
764#define listtypeAVIMOVIE mmioFOURCC('m', 'o', 'v', 'i')
765#define listtypeAVIRECORD mmioFOURCC('r', 'e', 'c', ' ')
766
767#define ckidAVINEWINDEX mmioFOURCC('i', 'd', 'x', '1')
768
769#define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's')
770#define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's')
771#define streamtypeMIDI mmioFOURCC('m', 'i', 'd', 's')
772#define streamtypeTEXT mmioFOURCC('t', 'x', 't', 's')
773
774/* Basic chunk types */
775#define cktypeDIBbits aviTWOCC('d', 'b')
776#define cktypeDIBcompressed aviTWOCC('d', 'c')
777#define cktypePALchange aviTWOCC('p', 'c')
778#define cktypeWAVEbytes aviTWOCC('w', 'b')
779
780/* Chunk id to use for extra chunks for padding. */
781#define ckidAVIPADDING mmioFOURCC('J', 'U', 'N', 'K')
782
783/* AVIFileHdr.dwFlags */
784#define AVIF_HASINDEX 0x00000010 /* Index at end of file? */
785#define AVIF_MUSTUSEINDEX 0x00000020
786#define AVIF_ISINTERLEAVED 0x00000100
787#define AVIF_TRUSTCKTYPE 0x00000800 /* Use CKType to find key frames*/
788#define AVIF_WASCAPTUREFILE 0x00010000
789#define AVIF_COPYRIGHTED 0x00020000
790
791#define AVI_HEADERSIZE 2048
792
793typedef struct _MainAVIHeader
794{
795 DWORD dwMicroSecPerFrame;
796 DWORD dwMaxBytesPerSec;
797 DWORD dwPaddingGranularity;
798 DWORD dwFlags;
799 DWORD dwTotalFrames;
800 DWORD dwInitialFrames;
801 DWORD dwStreams;
802 DWORD dwSuggestedBufferSize;
803 DWORD dwWidth;
804 DWORD dwHeight;
805 DWORD dwReserved[4];
806} MainAVIHeader;
807
808/* AVIStreamHeader.dwFlags */
809#define AVISF_DISABLED 0x00000001
810#define AVISF_VIDEO_PALCHANGES 0x00010000
811
812typedef struct {
813 FOURCC fccType;
814 FOURCC fccHandler;
815 DWORD dwFlags; /* AVISF_* */
816 WORD wPriority;
817 WORD wLanguage;
818 DWORD dwInitialFrames;
819 DWORD dwScale;
820 DWORD dwRate; /* dwRate / dwScale == samples/second */
821 DWORD dwStart;
822 DWORD dwLength; /* In units above... */
823 DWORD dwSuggestedBufferSize;
824 DWORD dwQuality;
825 DWORD dwSampleSize;
826 struct { SHORT left, top, right, bottom; } rcFrame; /* word.word - word.word in file */
827} AVIStreamHeader;
828
829/* AVIINDEXENTRY.dwFlags */
830#define AVIIF_LIST 0x00000001 /* chunk is a 'LIST' */
831#define AVIIF_TWOCC 0x00000002
832#define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
833
834#define AVIIF_NOTIME 0x00000100 /* this frame doesn't take any time */
835#define AVIIF_COMPUSE 0x0FFF0000
836
837typedef struct _AVIINDEXENTRY {
838 DWORD ckid;
839 DWORD dwFlags;
840 DWORD dwChunkOffset;
841 DWORD dwChunkLength;
842} AVIINDEXENTRY;
843
844typedef struct _AVIPALCHANGE {
845 BYTE bFirstEntry;
846 BYTE bNumEntries;
847 WORD wFlags; /* pad */
848 PALETTEENTRY peNew[1];
849} AVIPALCHANGE;
850
851#define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
852
853#define AVIGETFRAMEF_BESTDISPLAYFMT 1
854
855typedef struct _AVISTREAMINFOA {
856 DWORD fccType;
857 DWORD fccHandler;
858 DWORD dwFlags; /* AVIIF_* */
859 DWORD dwCaps;
860 WORD wPriority;
861 WORD wLanguage;
862 DWORD dwScale;
863 DWORD dwRate; /* dwRate / dwScale == samples/second */
864 DWORD dwStart;
865 DWORD dwLength; /* In units above... */
866 DWORD dwInitialFrames;
867 DWORD dwSuggestedBufferSize;
868 DWORD dwQuality;
869 DWORD dwSampleSize;
870 RECT rcFrame;
871 DWORD dwEditCount;
872 DWORD dwFormatChangeCount;
873 CHAR szName[64];
874} AVISTREAMINFOA, * LPAVISTREAMINFOA, *PAVISTREAMINFOA;
875
876typedef struct _AVISTREAMINFOW {
877 DWORD fccType;
878 DWORD fccHandler;
879 DWORD dwFlags;
880 DWORD dwCaps;
881 WORD wPriority;
882 WORD wLanguage;
883 DWORD dwScale;
884 DWORD dwRate; /* dwRate / dwScale == samples/second */
885 DWORD dwStart;
886 DWORD dwLength; /* In units above... */
887 DWORD dwInitialFrames;
888 DWORD dwSuggestedBufferSize;
889 DWORD dwQuality;
890 DWORD dwSampleSize;
891 RECT rcFrame;
892 DWORD dwEditCount;
893 DWORD dwFormatChangeCount;
894 WCHAR szName[64];
895} AVISTREAMINFOW, * LPAVISTREAMINFOW, *PAVISTREAMINFOW;
896DECL_WINELIB_TYPE_AW(AVISTREAMINFO)
897DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO)
898DECL_WINELIB_TYPE_AW(PAVISTREAMINFO)
899
900#define AVISTREAMINFO_DISABLED 0x00000001
901#define AVISTREAMINFO_FORMATCHANGES 0x00010000
902
903/* AVIFILEINFO.dwFlags */
904#define AVIFILEINFO_HASINDEX 0x00000010
905#define AVIFILEINFO_MUSTUSEINDEX 0x00000020
906#define AVIFILEINFO_ISINTERLEAVED 0x00000100
907#define AVIFILEINFO_WASCAPTUREFILE 0x00010000
908#define AVIFILEINFO_COPYRIGHTED 0x00020000
909
910/* AVIFILEINFO.dwCaps */
911#define AVIFILECAPS_CANREAD 0x00000001
912#define AVIFILECAPS_CANWRITE 0x00000002
913#define AVIFILECAPS_ALLKEYFRAMES 0x00000010
914#define AVIFILECAPS_NOCOMPRESSION 0x00000020
915
916typedef struct _AVIFILEINFOW {
917 DWORD dwMaxBytesPerSec;
918 DWORD dwFlags;
919 DWORD dwCaps;
920 DWORD dwStreams;
921 DWORD dwSuggestedBufferSize;
922 DWORD dwWidth;
923 DWORD dwHeight;
924 DWORD dwScale;
925 DWORD dwRate;
926 DWORD dwLength;
927 DWORD dwEditCount;
928 WCHAR szFileType[64];
929} AVIFILEINFOW, * LPAVIFILEINFOW, *PAVIFILEINFOW;
930typedef struct _AVIFILEINFOA {
931 DWORD dwMaxBytesPerSec;
932 DWORD dwFlags;
933 DWORD dwCaps;
934 DWORD dwStreams;
935 DWORD dwSuggestedBufferSize;
936 DWORD dwWidth;
937 DWORD dwHeight;
938 DWORD dwScale;
939 DWORD dwRate;
940 DWORD dwLength;
941 DWORD dwEditCount;
942 CHAR szFileType[64];
943} AVIFILEINFOA, * LPAVIFILEINFOA, *PAVIFILEINFOA;
944DECL_WINELIB_TYPE_AW(AVIFILEINFO)
945DECL_WINELIB_TYPE_AW(PAVIFILEINFO)
946DECL_WINELIB_TYPE_AW(LPAVIFILEINFO)
947
948/* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
949#define AVICOMPRESSF_INTERLEAVE 0x00000001
950#define AVICOMPRESSF_DATARATE 0x00000002
951#define AVICOMPRESSF_KEYFRAMES 0x00000004
952#define AVICOMPRESSF_VALID 0x00000008
953
954typedef struct {
955 DWORD fccType; /* stream type, for consistency */
956 DWORD fccHandler; /* compressor */
957 DWORD dwKeyFrameEvery; /* keyframe rate */
958 DWORD dwQuality; /* compress quality 0-10,000 */
959 DWORD dwBytesPerSecond; /* bytes per second */
960 DWORD dwFlags; /* flags... see below */
961 LPVOID lpFormat; /* save format */
962 DWORD cbFormat;
963 LPVOID lpParms; /* compressor options */
964 DWORD cbParms;
965 DWORD dwInterleaveEvery; /* for non-video streams only */
966} AVICOMPRESSOPTIONS, *LPAVICOMPRESSOPTIONS,*PAVICOMPRESSOPTIONS;
967
968
969
970#define DEFINE_AVIGUID(name, l, w1, w2) \
971 DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
972
973DEFINE_AVIGUID(IID_IAVIFile, 0x00020020, 0, 0);
974DEFINE_AVIGUID(IID_IAVIStream, 0x00020021, 0, 0);
975DEFINE_AVIGUID(IID_IAVIStreaming, 0x00020022, 0, 0);
976DEFINE_AVIGUID(IID_IGetFrame, 0x00020023, 0, 0);
977DEFINE_AVIGUID(IID_IAVIEditStream, 0x00020024, 0, 0);
978
979DEFINE_AVIGUID(CLSID_AVIFile, 0x00020000, 0, 0);
980
981/*****************************************************************************
982 * IAVIStream interface
983 */
984#define ICOM_INTERFACE IAVIStream
985#define IAVIStream_METHODS \
986 ICOM_METHOD2(HRESULT,Create, LPARAM,lParam1, LPARAM,lParam2) \
987 ICOM_METHOD2(HRESULT,Info, AVISTREAMINFOW*,psi, LONG,lSize) \
988 ICOM_METHOD2(LONG, FindSample, LONG,lPos, LONG,lFlags) \
989 ICOM_METHOD3(HRESULT,ReadFormat, LONG,lPos, LPVOID,lpFormat, LONG*,lpcbFormat) \
990 ICOM_METHOD3(HRESULT,SetFormat, LONG,lPos, LPVOID,lpFormat, LONG,cbFormat) \
991 ICOM_METHOD6(HRESULT,Read, LONG,lStart, LONG,lSamples, LPVOID,lpBuffer, LONG,cbBuffer, LONG*,plBytes, LONG*,plSamples) \
992 ICOM_METHOD7(HRESULT,Write, LONG,lStart, LONG,lSamples, LPVOID,lpBuffer, LONG,cbBuffer, DWORD,dwFlags, LONG*,plSampWritten, LONG*,plBytesWritten) \
993 ICOM_METHOD2(HRESULT,Delete, LONG,lStart, LONG,lSamples) \
994 ICOM_METHOD3(HRESULT,ReadData, DWORD,fcc, LPVOID,lpBuffer, LONG*,lpcbBuffer) \
995 ICOM_METHOD3(HRESULT,WriteData, DWORD,fcc, LPVOID,lpBuffer, LONG,cbBuffer) \
996 ICOM_METHOD2(HRESULT,SetInfo, AVISTREAMINFOW*,plInfo, LONG,cbInfo)
997#define IAVIStream_IMETHODS \
998 IUnknown_IMETHODS \
999 IAVIStream_METHODS
1000ICOM_DEFINE(IAVIStream, IUnknown)
1001#undef ICOM_INTERFACE
1002
1003/*** IUnknown methods ***/
1004#define IAVIStream_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1005#define IAVIStream_AddRef(p) ICOM_CALL (AddRef,p)
1006#define IAVIStream_Release(p) ICOM_CALL (Release,p)
1007/*** IAVIStream methods ***/
1008#define IAVIStream_Create(p,a,b) ICOM_CALL2(Create,p,a,b)
1009#define IAVIStream_Info(p,a,b) ICOM_CALL2(Info,p,a,b)
1010#define IAVIStream_FindSample(p,a,b) ICOM_CALL2(FindSample,p,a,b)
1011#define IAVIStream_ReadFormat(p,a,b,c) ICOM_CALL3(ReadFormat,p,a,b,c)
1012#define IAVIStream_SetFormat(p,a,b,c) ICOM_CALL3(SetFormat,p,a,b,c)
1013#define IAVIStream_Read(p,a,b,c,d,e,f) ICOM_CALL6(Read,p,a,b,c,d,e,f)
1014#define IAVIStream_Write(p,a,b,c,d,e,f,g) ICOM_CALL7(Write,p,a,b,c,d,e,f,g)
1015#define IAVIStream_Delete(p,a,b) ICOM_CALL2(Delete,p,a,b)
1016#define IAVIStream_ReadData(p,a,b,c) ICOM_CALL3(ReadData,p,a,b,c)
1017#define IAVIStream_WriteData(p,a,b,c) ICOM_CALL3(WriteData,p,a,b,c)
1018#define IAVIStream_SetInfo(p,a,b) ICOM_CALL2(SetInfo,p,a,b)
1019
1020HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM*ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *lpOptions,CLSID*pclsidHandler);
1021
1022HRESULT WINAPI AVIStreamCreate(PAVISTREAM*,LONG,LONG,CLSID*);
1023HRESULT WINAPI AVIStreamInfoA(PAVISTREAM iface,AVISTREAMINFOA *asi,LONG size);
1024HRESULT WINAPI AVIStreamInfoW(PAVISTREAM iface,AVISTREAMINFOW *asi,LONG size);
1025#define AVIStreamInfo WINELIB_NAME_AW(AVIStreamInfo)
1026LPVOID WINAPI AVIStreamGetFrame(PGETFRAME pg,LONG pos);
1027HRESULT WINAPI AVIStreamGetFrameClose(PGETFRAME pg);
1028PGETFRAME WINAPI AVIStreamGetFrameOpen(PAVISTREAM pavi,LPBITMAPINFOHEADER lpbiWanted);
1029LONG WINAPI AVIStreamLength(PAVISTREAM iface);
1030HRESULT WINAPI AVIStreamRead(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread);
1031HRESULT WINAPI AVIStreamReadData(PAVISTREAM iface,DWORD fcc,LPVOID lp,LONG *lpread);
1032HRESULT WINAPI AVIStreamReadFormat(PAVISTREAM iface,LONG pos,LPVOID format,LONG *formatsize);
1033ULONG WINAPI AVIStreamRelease(PAVISTREAM iface);
1034HRESULT WINAPI AVIStreamSetFormat(PAVISTREAM iface,LONG pos,LPVOID format,LONG formatsize);
1035LONG WINAPI AVIStreamStart(PAVISTREAM iface);
1036HRESULT WINAPI AVIStreamWrite(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,DWORD flags,LONG *sampwritten,LONG *byteswritten);
1037HRESULT WINAPI AVIStreamWriteData(PAVISTREAM iface,DWORD fcc,LPVOID lp,LONG size);
1038HRESULT WINAPI AVIStreamOpenFromFileA(PAVISTREAM *ppavi, LPCSTR szFile,
1039 DWORD fccType, LONG lParam,
1040 UINT mode, CLSID *pclsidHandler);
1041HRESULT WINAPI AVIStreamOpenFromFileW(PAVISTREAM *ppavi, LPCWSTR szFile,
1042 DWORD fccType, LONG lParam,
1043 UINT mode, CLSID *pclsidHandler);
1044#define AVIStreamOpenFromFile WINELIB_NAME_AW(AVIStreamOpenFromFile)
1045
1046#define AVIStreamFormatSize(pavi, lPos, plSize) \
1047 AVIStreamReadFormat(pavi, lPos, NULL, plSize)
1048
1049/*****************************************************************************
1050 * IAVIFile interface
1051 */
1052/* In Win32 this interface uses UNICODE only */
1053#define ICOM_INTERFACE IAVIFile
1054#define IAVIFile_METHODS \
1055 ICOM_METHOD2(HRESULT,Info, AVIFILEINFOW*,pfi, LONG,lSize) \
1056 ICOM_METHOD3(HRESULT,GetStream, PAVISTREAM*,ppStream, DWORD,fccType, LONG,lParam) \
1057 ICOM_METHOD2(HRESULT,CreateStream, PAVISTREAM*,ppStream, AVISTREAMINFOW*,psi) \
1058 ICOM_METHOD3(HRESULT,WriteData, DWORD,fcc, LPVOID,lpBuffer, LONG,cbBuffer) \
1059 ICOM_METHOD3(HRESULT,ReadData, DWORD,fcc, LPVOID,lpBuffer, LONG*,lpcbBuffer) \
1060 ICOM_METHOD (HRESULT,EndRecord) \
1061 ICOM_METHOD2(HRESULT,DeleteStream, DWORD,fccType, LONG,lParam)
1062#define IAVIFile_IMETHODS \
1063 IUnknown_IMETHODS \
1064 IAVIFile_METHODS
1065ICOM_DEFINE(IAVIFile,IUnknown)
1066#undef ICOM_INTERFACE
1067
1068/*** IUnknown methods ***/
1069#define IAVIFile_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1070#define IAVIFile_AddRef(p) ICOM_CALL (AddRef,p)
1071#define IAVIFile_Release(p) ICOM_CALL (Release,p)
1072/*** IAVIFile methods ***/
1073#define IAVIFile_Info(p,a,b) ICOM_CALL2(Info,p,a,b)
1074#define IAVIFile_GetStream(p,a,b,c) ICOM_CALL3(GetStream,p,a,b,c)
1075#define IAVIFile_CreateStream(p,a,b) ICOM_CALL2(CreateStream,p,a,b)
1076#define IAVIFile_WriteData(p,a,b,c) ICOM_CALL3(WriteData,p,a,b,c)
1077#define IAVIFile_ReadData(p,a,b,c) ICOM_CALL3(ReadData,p,a,b,c)
1078#define IAVIFile_EndRecord(p) ICOM_CALL (EndRecord,p)
1079#define IAVIFile_DeleteStream(p,a,b) ICOM_CALL2(DeleteStream,p,a,b)
1080
1081HRESULT WINAPI AVIFileCreateStreamA(PAVIFILE pfile,PAVISTREAM* ppavi,AVISTREAMINFOA* psi);
1082HRESULT WINAPI AVIFileCreateStreamW(PAVIFILE pfile,PAVISTREAM* ppavi,AVISTREAMINFOW* psi);
1083#define AVIFileCreateStream WINELIB_NAME_AW(AVIFileCreateStream)
1084void WINAPI AVIFileExit(void);
1085HRESULT WINAPI AVIFileGetStream(PAVIFILE pfile,PAVISTREAM* avis,DWORD fccType,LONG lParam);
1086HRESULT WINAPI AVIFileInfoA(PAVIFILE pfile,PAVIFILEINFOA pfi,LONG lSize);
1087HRESULT WINAPI AVIFileInfoW(PAVIFILE pfile,PAVIFILEINFOW pfi,LONG lSize);
1088#define AVIFileInfo WINELIB_NAME_AW(AVIFileInfo)
1089void WINAPI AVIFileInit(void);
1090HRESULT WINAPI AVIFileOpenA(PAVIFILE* ppfile,LPCSTR szFile,UINT uMode,LPCLSID lpHandler);
1091HRESULT WINAPI AVIFileOpenW(PAVIFILE* ppfile,LPCWSTR szFile,UINT uMode,LPCLSID lpHandler);
1092#define AVIFileOpen WINELIB_NAME_AW(AVIFileOpen)
1093ULONG WINAPI AVIFileRelease(PAVIFILE iface);
1094
1095
1096/*****************************************************************************
1097 * IGetFrame interface
1098 */
1099#define ICOM_INTERFACE IGetFrame
1100#define IGetFrame_METHODS \
1101 ICOM_METHOD1(LPVOID, GetFrame, LONG,lPos) \
1102 ICOM_METHOD3(HRESULT,Begin, LONG,lStart, LONG,lEnd, LONG,lRate) \
1103 ICOM_METHOD (HRESULT,End) \
1104 ICOM_METHOD6(HRESULT,SetFormat, LPBITMAPINFOHEADER,lpbi, LPVOID,lpBits, INT,x, INT,y, INT,dx, INT,dy)
1105#define IGetFrame_IMETHODS \
1106 IUnknown_IMETHODS \
1107 IGetFrame_METHODS
1108ICOM_DEFINE(IGetFrame,IUnknown)
1109#undef ICOM_INTERFACE
1110
1111/*** IUnknown methods ***/
1112#define IGetFrame_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1113#define IGetFrame_AddRef(p) ICOM_CALL (AddRef,p)
1114#define IGetFrame_Release(p) ICOM_CALL (Release,p)
1115/*** IGetFrame methods ***/
1116#define IGetFrame_GetFrame(p,a) ICOM_CALL1(GetFrame,p,a)
1117#define IGetFrame_Begin(p,a,b,c) ICOM_CALL3(Begin,p,a,b,c)
1118#define IGetFrame_End(p) ICOM_CALL (End,p)
1119#define IGetFrame_SetFormat(p,a,b,c,d,e,f) ICOM_CALL6(SetFormat,p,a,b,c,d,e,f)
1120
1121#define AVIERR_OK 0
1122#define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)
1123
1124#define AVIERR_UNSUPPORTED MAKE_AVIERR(101)
1125#define AVIERR_BADFORMAT MAKE_AVIERR(102)
1126#define AVIERR_MEMORY MAKE_AVIERR(103)
1127#define AVIERR_INTERNAL MAKE_AVIERR(104)
1128#define AVIERR_BADFLAGS MAKE_AVIERR(105)
1129#define AVIERR_BADPARAM MAKE_AVIERR(106)
1130#define AVIERR_BADSIZE MAKE_AVIERR(107)
1131#define AVIERR_BADHANDLE MAKE_AVIERR(108)
1132#define AVIERR_FILEREAD MAKE_AVIERR(109)
1133#define AVIERR_FILEWRITE MAKE_AVIERR(110)
1134#define AVIERR_FILEOPEN MAKE_AVIERR(111)
1135#define AVIERR_COMPRESSOR MAKE_AVIERR(112)
1136#define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)
1137#define AVIERR_READONLY MAKE_AVIERR(114)
1138#define AVIERR_NODATA MAKE_AVIERR(115)
1139#define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)
1140#define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)
1141#define AVIERR_USERABORT MAKE_AVIERR(198)
1142#define AVIERR_ERROR MAKE_AVIERR(199)
1143
1144HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCSTR szFile);
1145HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile);
1146#define MCIWndCreate WINELIB_NAME_AW(MCIWndCreate)
1147
1148#define MCIWNDOPENF_NEW 0x0001
1149
1150#define MCIWNDF_NOAUTOSIZEWINDOW 0x0001
1151#define MCIWNDF_NOPLAYBAR 0x0002
1152#define MCIWNDF_NOAUTOSIZEMOVIE 0x0004
1153#define MCIWNDF_NOMENU 0x0008
1154#define MCIWNDF_SHOWNAME 0x0010
1155#define MCIWNDF_SHOWPOS 0x0020
1156#define MCIWNDF_SHOWMODE 0x0040
1157#define MCIWNDF_SHOWALL 0x0070
1158
1159#define MCIWNDF_NOTIFYMODE 0x0100
1160#define MCIWNDF_NOTIFYPOS 0x0200
1161#define MCIWNDF_NOTIFYSIZE 0x0400
1162#define MCIWNDF_NOTIFYERROR 0x1000
1163#define MCIWNDF_NOTIFYALL 0x1F00
1164
1165#define MCIWNDF_NOTIFYANSI 0x0080
1166
1167#define MCIWNDF_NOTIFYMEDIAA 0x0880
1168#define MCIWNDF_NOTIFYMEDIAW 0x0800
1169#define MCIWNDF_NOTIFYMEDIA WINELIB_NAME_AW(MCIWNDF_NOTIFYMEDIA)
1170
1171#define MCIWNDF_RECORD 0x2000
1172#define MCIWNDF_NOERRORDLG 0x4000
1173#define MCIWNDF_NOOPEN 0x8000
1174
1175#ifdef __cplusplus
1176#define MCIWndSM ::SendMessage
1177#else
1178#define MCIWndSM SendMessage
1179#endif
1180
1181#define MCIWndCanPlay(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_PLAY,0,0)
1182#define MCIWndCanRecord(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_RECORD,0,0)
1183#define MCIWndCanSave(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_SAVE,0,0)
1184#define MCIWndCanWindow(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_WINDOW,0,0)
1185#define MCIWndCanEject(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_EJECT,0,0)
1186#define MCIWndCanConfig(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_CONFIG,0,0)
1187#define MCIWndPaletteKick(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_PALETTEKICK,0,0)
1188
1189#define MCIWndSave(hWnd,szFile) (LONG)MCIWndSM(hWnd,MCI_SAVE,0,(LPARAM)(LPVOID)(szFile))
1190#define MCIWndSaveDialog(hWnd) MCIWndSave(hWnd,-1)
1191
1192#define MCIWndNew(hWnd,lp) (LONG)MCIWndSM(hWnd,MCIWNDM_NEW,0,(LPARAM)(LPVOID)(lp))
1193
1194#define MCIWndRecord(hWnd) (LONG)MCIWndSM(hWnd,MCI_RECORD,0,0)
1195#define MCIWndOpen(hWnd,sz,f) (LONG)MCIWndSM(hWnd,MCIWNDM_OPEN,(WPARAM)(UINT)(f),(LPARAM)(LPVOID)(sz))
1196#define MCIWndOpenDialog(hWnd) MCIWndOpen(hWnd,-1,0)
1197#define MCIWndClose(hWnd) (LONG)MCIWndSM(hWnd,MCI_CLOSE,0,0)
1198#define MCIWndPlay(hWnd) (LONG)MCIWndSM(hWnd,MCI_PLAY,0,0)
1199#define MCIWndStop(hWnd) (LONG)MCIWndSM(hWnd,MCI_STOP,0,0)
1200#define MCIWndPause(hWnd) (LONG)MCIWndSM(hWnd,MCI_PAUSE,0,0)
1201#define MCIWndResume(hWnd) (LONG)MCIWndSM(hWnd,MCI_RESUME,0,0)
1202#define MCIWndSeek(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCI_SEEK,0,(LPARAM)(LONG)(lPos))
1203#define MCIWndEject(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_EJECT,0,0)
1204
1205#define MCIWndHome(hWnd) MCIWndSeek(hWnd,MCIWND_START)
1206#define MCIWndEnd(hWnd) MCIWndSeek(hWnd,MCIWND_END)
1207
1208#define MCIWndGetSource(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_GET_SOURCE,0,(LPARAM)(LPRECT)(prc))
1209#define MCIWndPutSource(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_PUT_SOURCE,0,(LPARAM)(LPRECT)(prc))
1210
1211#define MCIWndGetDest(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_GET_DEST,0,(LPARAM)(LPRECT)(prc))
1212#define MCIWndPutDest(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_PUT_DEST,0,(LPARAM)(LPRECT)(prc))
1213
1214#define MCIWndPlayReverse(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYREVERSE,0,0)
1215#define MCIWndPlayFrom(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYFROM,0,(LPARAM)(LONG)(lPos))
1216#define MCIWndPlayTo(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYTO, 0,(LPARAM)(LONG)(lPos))
1217#define MCIWndPlayFromTo(hWnd,lStart,lEnd) (MCIWndSeek(hWnd,lStart),MCIWndPlayTo(hWnd,lEnd))
1218
1219#define MCIWndGetDeviceID(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETDEVICEID,0,0)
1220#define MCIWndGetAlias(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETALIAS,0,0)
1221#define MCIWndGetMode(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETMODE,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
1222#define MCIWndGetPosition(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETPOSITION,0,0)
1223#define MCIWndGetPositionString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETPOSITION,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
1224#define MCIWndGetStart(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETSTART,0,0)
1225#define MCIWndGetLength(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETLENGTH,0,0)
1226#define MCIWndGetEnd(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETEND,0,0)
1227
1228#define MCIWndStep(hWnd,n) (LONG)MCIWndSM(hWnd,MCI_STEP,0,(LPARAM)(long)(n))
1229
1230#define MCIWndDestroy(hWnd) (VOID)MCIWndSM(hWnd,WM_CLOSE,0,0)
1231#define MCIWndSetZoom(hWnd,iZoom) (VOID)MCIWndSM(hWnd,MCIWNDM_SETZOOM,0,(LPARAM)(UINT)(iZoom))
1232#define MCIWndGetZoom(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETZOOM,0,0)
1233#define MCIWndSetVolume(hWnd,iVol) (LONG)MCIWndSM(hWnd,MCIWNDM_SETVOLUME,0,(LPARAM)(UINT)(iVol))
1234#define MCIWndGetVolume(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETVOLUME,0,0)
1235#define MCIWndSetSpeed(hWnd,iSpeed) (LONG)MCIWndSM(hWnd,MCIWNDM_SETSPEED,0,(LPARAM)(UINT)(iSpeed))
1236#define MCIWndGetSpeed(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETSPEED,0,0)
1237#define MCIWndSetTimeFormat(hWnd,lp) (LONG)MCIWndSM(hWnd,MCIWNDM_SETTIMEFORMAT,0,(LPARAM)(LPTSTR)(lp))
1238#define MCIWndGetTimeFormat(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETTIMEFORMAT,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
1239#define MCIWndValidateMedia(hWnd) (VOID)MCIWndSM(hWnd,MCIWNDM_VALIDATEMEDIA,0,0)
1240
1241#define MCIWndSetRepeat(hWnd,f) (void)MCIWndSM(hWnd,MCIWNDM_SETREPEAT,0,(LPARAM)(BOOL)(f))
1242#define MCIWndGetRepeat(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_GETREPEAT,0,0)
1243
1244#define MCIWndUseFrames(hWnd) MCIWndSetTimeFormat(hWnd,TEXT("frames"))
1245#define MCIWndUseTime(hWnd) MCIWndSetTimeFormat(hWnd,TEXT("ms"))
1246
1247#define MCIWndSetActiveTimer(hWnd,active) \
1248 (VOID)MCIWndSM(hWnd,MCIWNDM_SETACTIVETIMER, \
1249 (WPARAM)(UINT)(active),0L)
1250#define MCIWndSetInactiveTimer(hWnd,inactive) \
1251 (VOID)MCIWndSM(hWnd,MCIWNDM_SETINACTIVETIMER, \
1252 (WPARAM)(UINT)(inactive),0L)
1253#define MCIWndSetTimers(hWnd,active,inactive) \
1254 (VOID)MCIWndSM(hWnd,MCIWNDM_SETTIMERS,(WPARAM)(UINT)(active),\
1255 (LPARAM)(UINT)(inactive))
1256#define MCIWndGetActiveTimer(hWnd) \
1257 (UINT)MCIWndSM(hWnd,MCIWNDM_GETACTIVETIMER,0,0L);
1258#define MCIWndGetInactiveTimer(hWnd) \
1259 (UINT)MCIWndSM(hWnd,MCIWNDM_GETINACTIVETIMER,0,0L);
1260
1261#define MCIWndRealize(hWnd,fBkgnd) (LONG)MCIWndSM(hWnd,MCIWNDM_REALIZE,(WPARAM)(BOOL)(fBkgnd),0)
1262
1263#define MCIWndSendString(hWnd,sz) (LONG)MCIWndSM(hWnd,MCIWNDM_SENDSTRING,0,(LPARAM)(LPTSTR)(sz))
1264#define MCIWndReturnString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_RETURNSTRING,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1265#define MCIWndGetError(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETERROR,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1266
1267#define MCIWndGetPalette(hWnd) (HPALETTE)MCIWndSM(hWnd,MCIWNDM_GETPALETTE,0,0)
1268#define MCIWndSetPalette(hWnd,hpal) (LONG)MCIWndSM(hWnd,MCIWNDM_SETPALETTE,(WPARAM)(HPALETTE)(hpal),0)
1269
1270#define MCIWndGetFileName(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETFILENAME,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1271#define MCIWndGetDevice(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETDEVICE,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1272
1273#define MCIWndGetStyles(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETSTYLES,0,0L)
1274#define MCIWndChangeStyles(hWnd,mask,value) (LONG)MCIWndSM(hWnd,MCIWNDM_CHANGESTYLES,(WPARAM)(UINT)(mask),(LPARAM)(LONG)(value))
1275
1276#define MCIWndOpenInterface(hWnd,pUnk) (LONG)MCIWndSM(hWnd,MCIWNDM_OPENINTERFACE,0,(LPARAM)(LPUNKNOWN)(pUnk))
1277
1278#define MCIWndSetOwner(hWnd,hWndP) (LONG)MCIWndSM(hWnd,MCIWNDM_SETOWNER,(WPARAM)(hWndP),0)
1279
1280#define MCIWNDM_GETDEVICEID (WM_USER + 100)
1281#define MCIWNDM_GETSTART (WM_USER + 103)
1282#define MCIWNDM_GETLENGTH (WM_USER + 104)
1283#define MCIWNDM_GETEND (WM_USER + 105)
1284#define MCIWNDM_EJECT (WM_USER + 107)
1285#define MCIWNDM_SETZOOM (WM_USER + 108)
1286#define MCIWNDM_GETZOOM (WM_USER + 109)
1287#define MCIWNDM_SETVOLUME (WM_USER + 110)
1288#define MCIWNDM_GETVOLUME (WM_USER + 111)
1289#define MCIWNDM_SETSPEED (WM_USER + 112)
1290#define MCIWNDM_GETSPEED (WM_USER + 113)
1291#define MCIWNDM_SETREPEAT (WM_USER + 114)
1292#define MCIWNDM_GETREPEAT (WM_USER + 115)
1293#define MCIWNDM_REALIZE (WM_USER + 118)
1294#define MCIWNDM_VALIDATEMEDIA (WM_USER + 121)
1295#define MCIWNDM_PLAYFROM (WM_USER + 122)
1296#define MCIWNDM_PLAYTO (WM_USER + 123)
1297#define MCIWNDM_GETPALETTE (WM_USER + 126)
1298#define MCIWNDM_SETPALETTE (WM_USER + 127)
1299#define MCIWNDM_SETTIMERS (WM_USER + 129)
1300#define MCIWNDM_SETACTIVETIMER (WM_USER + 130)
1301#define MCIWNDM_SETINACTIVETIMER (WM_USER + 131)
1302#define MCIWNDM_GETACTIVETIMER (WM_USER + 132)
1303#define MCIWNDM_GETINACTIVETIMER (WM_USER + 133)
1304#define MCIWNDM_CHANGESTYLES (WM_USER + 135)
1305#define MCIWNDM_GETSTYLES (WM_USER + 136)
1306#define MCIWNDM_GETALIAS (WM_USER + 137)
1307#define MCIWNDM_PLAYREVERSE (WM_USER + 139)
1308#define MCIWNDM_GET_SOURCE (WM_USER + 140)
1309#define MCIWNDM_PUT_SOURCE (WM_USER + 141)
1310#define MCIWNDM_GET_DEST (WM_USER + 142)
1311#define MCIWNDM_PUT_DEST (WM_USER + 143)
1312#define MCIWNDM_CAN_PLAY (WM_USER + 144)
1313#define MCIWNDM_CAN_WINDOW (WM_USER + 145)
1314#define MCIWNDM_CAN_RECORD (WM_USER + 146)
1315#define MCIWNDM_CAN_SAVE (WM_USER + 147)
1316#define MCIWNDM_CAN_EJECT (WM_USER + 148)
1317#define MCIWNDM_CAN_CONFIG (WM_USER + 149)
1318#define MCIWNDM_PALETTEKICK (WM_USER + 150)
1319#define MCIWNDM_OPENINTERFACE (WM_USER + 151)
1320#define MCIWNDM_SETOWNER (WM_USER + 152)
1321
1322#define MCIWNDM_SENDSTRINGA (WM_USER + 101)
1323#define MCIWNDM_GETPOSITIONA (WM_USER + 102)
1324#define MCIWNDM_GETMODEA (WM_USER + 106)
1325#define MCIWNDM_SETTIMEFORMATA (WM_USER + 119)
1326#define MCIWNDM_GETTIMEFORMATA (WM_USER + 120)
1327#define MCIWNDM_GETFILENAMEA (WM_USER + 124)
1328#define MCIWNDM_GETDEVICEA (WM_USER + 125)
1329#define MCIWNDM_GETERRORA (WM_USER + 128)
1330#define MCIWNDM_NEWA (WM_USER + 134)
1331#define MCIWNDM_RETURNSTRINGA (WM_USER + 138)
1332#define MCIWNDM_OPENA (WM_USER + 153)
1333
1334#define MCIWNDM_SENDSTRINGW (WM_USER + 201)
1335#define MCIWNDM_GETPOSITIONW (WM_USER + 202)
1336#define MCIWNDM_GETMODEW (WM_USER + 206)
1337#define MCIWNDM_SETTIMEFORMATW (WM_USER + 219)
1338#define MCIWNDM_GETTIMEFORMATW (WM_USER + 220)
1339#define MCIWNDM_GETFILENAMEW (WM_USER + 224)
1340#define MCIWNDM_GETDEVICEW (WM_USER + 225)
1341#define MCIWNDM_GETERRORW (WM_USER + 228)
1342#define MCIWNDM_NEWW (WM_USER + 234)
1343#define MCIWNDM_RETURNSTRINGW (WM_USER + 238)
1344#define MCIWNDM_OPENW (WM_USER + 252)
1345
1346#define MCIWNDM_SENDSTRING WINELIB_NAME_AW(MCIWNDM_SENDSTRING)
1347#define MCIWNDM_GETPOSITION WINELIB_NAME_AW(MCIWNDM_GETPOSITION)
1348#define MCIWNDM_GETMODE WINELIB_NAME_AW(MCIWNDM_GETMODE)
1349#define MCIWNDM_SETTIMEFORMAT WINELIB_NAME_AW(MCIWNDM_SETTIMEFORMAT)
1350#define MCIWNDM_GETTIMEFORMAT WINELIB_NAME_AW(MCIWNDM_GETTIMEFORMAT)
1351#define MCIWNDM_GETFILENAME WINELIB_NAME_AW(MCIWNDM_GETFILENAME)
1352#define MCIWNDM_GETDEVICE WINELIB_NAME_AW(MCIWNDM_GETDEVICE)
1353#define MCIWNDM_GETERROR WINELIB_NAME_AW(MCIWNDM_GETERROR)
1354#define MCIWNDM_NEW WINELIB_NAME_AW(MCIWNDM_NEW)
1355#define MCIWNDM_RETURNSTRING WINELIB_NAME_AW(MCIWNDM_RETURNSTRING)
1356#define MCIWNDM_OPEN WINELIB_NAME_AW(MCIWNDM_OPEN)
1357
1358#define MCIWNDM_NOTIFYMODE (WM_USER + 200)
1359#define MCIWNDM_NOTIFYPOS (WM_USER + 201)
1360#define MCIWNDM_NOTIFYSIZE (WM_USER + 202)
1361#define MCIWNDM_NOTIFYMEDIA (WM_USER + 203)
1362#define MCIWNDM_NOTIFYERROR (WM_USER + 205)
1363
1364#define MCIWND_START -1
1365#define MCIWND_END -2
1366
1367/********************************************
1368 * DrawDib declarations
1369 */
1370
1371HDRAWDIB VFWAPI DrawDibOpen( void );
1372UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground);
1373
1374BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, HDC hdc, INT dxDst, INT dyDst,
1375 LPBITMAPINFOHEADER lpbi, INT dxSrc, INT dySrc, UINT wFlags);
1376
1377BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, INT xDst, INT yDst, INT dxDst, INT dyDst,
1378 LPBITMAPINFOHEADER lpbi, LPVOID lpBits,
1379 INT xSrc, INT ySrc, INT dxSrc, INT dySrc, UINT wFlags);
1380
1381/* DrawDibDraw flags */
1382
1383#define DDF_UPDATE 0x0002
1384#define DDF_SAME_HDC 0x0004
1385#define DDF_SAME_DRAW 0x0008
1386#define DDF_DONTDRAW 0x0010
1387#define DDF_ANIMATE 0x0020
1388#define DDF_BUFFER 0x0040
1389#define DDF_JUSTDRAWIT 0x0080
1390#define DDF_FULLSCREEN 0x0100
1391#define DDF_BACKGROUNDPAL 0x0200
1392#define DDF_NOTKEYFRAME 0x0400
1393#define DDF_HURRYUP 0x0800
1394#define DDF_HALFTONE 0x1000
1395
1396#define DDF_PREROLL DDF_DONTDRAW
1397#define DDF_SAME_DIB DDF_SAME_DRAW
1398#define DDF_SAME_SIZE DDF_SAME_DRAW
1399
1400BOOL VFWAPI DrawDibSetPalette(HDRAWDIB hdd, HPALETTE hpal);
1401HPALETTE VFWAPI DrawDibGetPalette(HDRAWDIB hdd);
1402BOOL VFWAPI DrawDibChangePalette(HDRAWDIB hdd, int iStart, int iLen, LPPALETTEENTRY lppe);
1403LPVOID VFWAPI DrawDibGetBuffer(HDRAWDIB hdd, LPBITMAPINFOHEADER lpbi, DWORD dwSize, DWORD dwFlags);
1404
1405BOOL VFWAPI DrawDibStart(HDRAWDIB hdd, DWORD rate);
1406BOOL VFWAPI DrawDibStop(HDRAWDIB hdd);
1407#define DrawDibUpdate(hdd, hdc, x, y) \
1408 DrawDibDraw(hdd, hdc, x, y, 0, 0, NULL, NULL, 0, 0, 0, 0, DDF_UPDATE)
1409
1410BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd);
1411BOOL VFWAPI DrawDibClose(HDRAWDIB hdd);
1412
1413/* display profiling */
1414#define PD_CAN_DRAW_DIB 0x0001
1415#define PD_CAN_STRETCHDIB 0x0002
1416#define PD_STRETCHDIB_1_1_OK 0x0004
1417#define PD_STRETCHDIB_1_2_OK 0x0008
1418#define PD_STRETCHDIB_1_N_OK 0x0010
1419
1420DWORD VFWAPI DrawDibProfileDisplay(LPBITMAPINFOHEADER lpbi);
1421
1422
1423#ifdef __cplusplus
1424}
1425#endif /* __cplusplus */
1426
1427#endif /* __WINE_VFW_H */
Note: See TracBrowser for help on using the repository browser.