1 | /* $Id: vfw.h,v 1.2 1999-09-04 09:07:07 sandervl Exp $ */
|
---|
2 |
|
---|
3 | #ifndef __WINE_VFW_H
|
---|
4 | #define __WINE_VFW_H
|
---|
5 |
|
---|
6 | #include "windef.h"
|
---|
7 | #include "mmsystem.h"
|
---|
8 | #include "wingdi.h"
|
---|
9 | #include "wine/obj_base.h"
|
---|
10 | #include "unknwn.h"
|
---|
11 |
|
---|
12 | #define VFWAPI WINAPI
|
---|
13 | #define VFWAPIV WINAPIV
|
---|
14 |
|
---|
15 | DWORD VFWAPI VideoForWindowsVersion(void);
|
---|
16 |
|
---|
17 | #ifndef mmioFOURCC
|
---|
18 | #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
|
---|
19 | ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
|
---|
20 | ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
|
---|
21 | #endif
|
---|
22 |
|
---|
23 | #ifndef aviTWOCC
|
---|
24 | #define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8))
|
---|
25 | #endif
|
---|
26 |
|
---|
27 | #define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c')
|
---|
28 | #define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c')
|
---|
29 |
|
---|
30 | /*****************************************************************************
|
---|
31 | * Predeclare the interfaces
|
---|
32 | */
|
---|
33 | typedef struct IAVIStream IAVIStream,*PAVISTREAM;
|
---|
34 | typedef struct IAVIFile IAVIFile,*PAVIFILE;
|
---|
35 | typedef struct IGetFrame IGetFrame,*PGETFRAME;
|
---|
36 |
|
---|
37 | /* Installable Compressor M? */
|
---|
38 |
|
---|
39 | /* HIC struct (same layout as Win95 one) */
|
---|
40 | typedef struct tagWINE_HIC {
|
---|
41 | DWORD magic; /* 00: 'Smag' */
|
---|
42 | HANDLE curthread; /* 04: */
|
---|
43 | DWORD type; /* 08: */
|
---|
44 | DWORD handler; /* 0C: */
|
---|
45 | HDRVR hdrv; /* 10: */
|
---|
46 | DWORD privatevfw; /* 14:(handled by SendDriverMessage)*/
|
---|
47 | FARPROC driverproc; /* 18:(handled by SendDriverMessage)*/
|
---|
48 | DWORD x1; /* 1c: name? */
|
---|
49 | WORD x2; /* 20: */
|
---|
50 | DWORD x3; /* 22: */
|
---|
51 | /* 26: */
|
---|
52 | } WINE_HIC, *PWINE_HIC;
|
---|
53 |
|
---|
54 | /* error return codes */
|
---|
55 | #define ICERR_OK 0
|
---|
56 | #define ICERR_DONTDRAW 1
|
---|
57 | #define ICERR_NEWPALETTE 2
|
---|
58 | #define ICERR_GOTOKEYFRAME 3
|
---|
59 | #define ICERR_STOPDRAWING 4
|
---|
60 |
|
---|
61 | #define ICERR_UNSUPPORTED -1
|
---|
62 | #define ICERR_BADFORMAT -2
|
---|
63 | #define ICERR_MEMORY -3
|
---|
64 | #define ICERR_INTERNAL -4
|
---|
65 | #define ICERR_BADFLAGS -5
|
---|
66 | #define ICERR_BADPARAM -6
|
---|
67 | #define ICERR_BADSIZE -7
|
---|
68 | #define ICERR_BADHANDLE -8
|
---|
69 | #define ICERR_CANTUPDATE -9
|
---|
70 | #define ICERR_ABORT -10
|
---|
71 | #define ICERR_ERROR -100
|
---|
72 | #define ICERR_BADBITDEPTH -200
|
---|
73 | #define ICERR_BADIMAGESIZE -201
|
---|
74 |
|
---|
75 | #define ICERR_CUSTOM -400
|
---|
76 |
|
---|
77 | /* ICM Messages */
|
---|
78 | #define ICM_USER (DRV_USER+0x0000)
|
---|
79 |
|
---|
80 | /* ICM driver message range */
|
---|
81 | #define ICM_RESERVED_LOW (DRV_USER+0x1000)
|
---|
82 | #define ICM_RESERVED_HIGH (DRV_USER+0x2000)
|
---|
83 | #define ICM_RESERVED ICM_RESERVED_LOW
|
---|
84 |
|
---|
85 | #define ICM_GETSTATE (ICM_RESERVED+0)
|
---|
86 | #define ICM_SETSTATE (ICM_RESERVED+1)
|
---|
87 | #define ICM_GETINFO (ICM_RESERVED+2)
|
---|
88 |
|
---|
89 | #define ICM_CONFIGURE (ICM_RESERVED+10)
|
---|
90 | #define ICM_ABOUT (ICM_RESERVED+11)
|
---|
91 | /* */
|
---|
92 |
|
---|
93 | #define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30)
|
---|
94 | #define ICM_GETQUALITY (ICM_RESERVED+31)
|
---|
95 | #define ICM_SETQUALITY (ICM_RESERVED+32)
|
---|
96 |
|
---|
97 | #define ICM_SET (ICM_RESERVED+40)
|
---|
98 | #define ICM_GET (ICM_RESERVED+41)
|
---|
99 |
|
---|
100 | /* 2 constant FOURCC codes */
|
---|
101 | #define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
|
---|
102 | #define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
|
---|
103 |
|
---|
104 | #define ICM_COMPRESS_GET_FORMAT (ICM_USER+4)
|
---|
105 | #define ICM_COMPRESS_GET_SIZE (ICM_USER+5)
|
---|
106 | #define ICM_COMPRESS_QUERY (ICM_USER+6)
|
---|
107 | #define ICM_COMPRESS_BEGIN (ICM_USER+7)
|
---|
108 | #define ICM_COMPRESS (ICM_USER+8)
|
---|
109 | #define ICM_COMPRESS_END (ICM_USER+9)
|
---|
110 |
|
---|
111 | #define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10)
|
---|
112 | #define ICM_DECOMPRESS_QUERY (ICM_USER+11)
|
---|
113 | #define ICM_DECOMPRESS_BEGIN (ICM_USER+12)
|
---|
114 | #define ICM_DECOMPRESS (ICM_USER+13)
|
---|
115 | #define ICM_DECOMPRESS_END (ICM_USER+14)
|
---|
116 | #define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29)
|
---|
117 | #define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30)
|
---|
118 |
|
---|
119 | #define ICM_DRAW_QUERY (ICM_USER+31)
|
---|
120 | #define ICM_DRAW_BEGIN (ICM_USER+15)
|
---|
121 | #define ICM_DRAW_GET_PALETTE (ICM_USER+16)
|
---|
122 | #define ICM_DRAW_START (ICM_USER+18)
|
---|
123 | #define ICM_DRAW_STOP (ICM_USER+19)
|
---|
124 | #define ICM_DRAW_END (ICM_USER+21)
|
---|
125 | #define ICM_DRAW_GETTIME (ICM_USER+32)
|
---|
126 | #define ICM_DRAW (ICM_USER+33)
|
---|
127 | #define ICM_DRAW_WINDOW (ICM_USER+34)
|
---|
128 | #define ICM_DRAW_SETTIME (ICM_USER+35)
|
---|
129 | #define ICM_DRAW_REALIZE (ICM_USER+36)
|
---|
130 | #define ICM_DRAW_FLUSH (ICM_USER+37)
|
---|
131 | #define ICM_DRAW_RENDERBUFFER (ICM_USER+38)
|
---|
132 |
|
---|
133 | #define ICM_DRAW_START_PLAY (ICM_USER+39)
|
---|
134 | #define ICM_DRAW_STOP_PLAY (ICM_USER+40)
|
---|
135 |
|
---|
136 | #define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50)
|
---|
137 | #define ICM_DRAW_CHANGEPALETTE (ICM_USER+51)
|
---|
138 |
|
---|
139 | #define ICM_GETBUFFERSWANTED (ICM_USER+41)
|
---|
140 |
|
---|
141 | #define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42)
|
---|
142 |
|
---|
143 | #define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60)
|
---|
144 | #define ICM_DECOMPRESSEX_QUERY (ICM_USER+61)
|
---|
145 | #define ICM_DECOMPRESSEX (ICM_USER+62)
|
---|
146 | #define ICM_DECOMPRESSEX_END (ICM_USER+63)
|
---|
147 |
|
---|
148 | #define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70)
|
---|
149 | #define ICM_SET_STATUS_PROC (ICM_USER+72)
|
---|
150 |
|
---|
151 | /* structs */
|
---|
152 |
|
---|
153 | typedef struct {
|
---|
154 | DWORD dwSize; /* 00: size */
|
---|
155 | DWORD fccType; /* 04: type 'vidc' usually */
|
---|
156 | DWORD fccHandler; /* 08: */
|
---|
157 | DWORD dwVersion; /* 0c: version of compman opening you */
|
---|
158 | DWORD dwFlags; /* 10: LOWORD is type specific */
|
---|
159 | LRESULT dwError; /* 14: */
|
---|
160 | LPVOID pV1Reserved; /* 18: */
|
---|
161 | LPVOID pV2Reserved; /* 1c: */
|
---|
162 | DWORD dnDevNode; /* 20: */
|
---|
163 | /* 24: */
|
---|
164 | } ICOPEN,*LPICOPEN;
|
---|
165 |
|
---|
166 | #define ICCOMPRESS_KEYFRAME 0x00000001L
|
---|
167 |
|
---|
168 | typedef struct {
|
---|
169 | DWORD dwFlags;
|
---|
170 | LPBITMAPINFOHEADER lpbiOutput;
|
---|
171 | LPVOID lpOutput;
|
---|
172 | LPBITMAPINFOHEADER lpbiInput;
|
---|
173 | LPVOID lpInput;
|
---|
174 | LPDWORD lpckid;
|
---|
175 | LPDWORD lpdwFlags;
|
---|
176 | LONG lFrameNum;
|
---|
177 | DWORD dwFrameSize;
|
---|
178 | DWORD dwQuality;
|
---|
179 | LPBITMAPINFOHEADER lpbiPrev;
|
---|
180 | LPVOID lpPrev;
|
---|
181 | } ICCOMPRESS;
|
---|
182 |
|
---|
183 | DWORD VFWAPIV ICCompress(
|
---|
184 | HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiOutput,LPVOID lpData,
|
---|
185 | LPBITMAPINFOHEADER lpbiInput,LPVOID lpBits,LPDWORD lpckid,
|
---|
186 | LPDWORD lpdwFlags,LONG lFrameNum,DWORD dwFrameSize,DWORD dwQuality,
|
---|
187 | LPBITMAPINFOHEADER lpbiPrev,LPVOID lpPrev
|
---|
188 | );
|
---|
189 |
|
---|
190 | #define ICCompressGetFormat(hic, lpbiInput, lpbiOutput) \
|
---|
191 | ICSendMessage( \
|
---|
192 | hic,ICM_COMPRESS_GET_FORMAT,(DWORD)(LPVOID)(lpbiInput), \
|
---|
193 | (DWORD)(LPVOID)(lpbiOutput) \
|
---|
194 | )
|
---|
195 |
|
---|
196 | #define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
|
---|
197 |
|
---|
198 | #define ICCompressBegin(hic, lpbiInput, lpbiOutput) \
|
---|
199 | ICSendMessage( \
|
---|
200 | hic, ICM_COMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
|
---|
201 | (DWORD)(LPVOID)(lpbiOutput) \
|
---|
202 | )
|
---|
203 |
|
---|
204 | #define ICCompressGetSize(hic, lpbiInput, lpbiOutput) \
|
---|
205 | ICSendMessage( \
|
---|
206 | hic, ICM_COMPRESS_GET_SIZE, (DWORD)(LPVOID)(lpbiInput), \
|
---|
207 | (DWORD)(LPVOID)(lpbiOutput) \
|
---|
208 | )
|
---|
209 |
|
---|
210 | #define ICCompressQuery(hic, lpbiInput, lpbiOutput) \
|
---|
211 | ICSendMessage( \
|
---|
212 | hic, ICM_COMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
|
---|
213 | (DWORD)(LPVOID)(lpbiOutput) \
|
---|
214 | )
|
---|
215 |
|
---|
216 |
|
---|
217 | #define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0)
|
---|
218 |
|
---|
219 | /* ICCOMPRESSFRAMES.dwFlags */
|
---|
220 | #define ICCOMPRESSFRAMES_PADDING 0x00000001
|
---|
221 | typedef struct {
|
---|
222 | DWORD dwFlags;
|
---|
223 | LPBITMAPINFOHEADER lpbiOutput;
|
---|
224 | LPARAM lOutput;
|
---|
225 | LPBITMAPINFOHEADER lpbiInput;
|
---|
226 | LPARAM lInput;
|
---|
227 | LONG lStartFrame;
|
---|
228 | LONG lFrameCount;
|
---|
229 | LONG lQuality;
|
---|
230 | LONG lDataRate;
|
---|
231 | LONG lKeyRate;
|
---|
232 | DWORD dwRate;
|
---|
233 | DWORD dwScale;
|
---|
234 | DWORD dwOverheadPerFrame;
|
---|
235 | DWORD dwReserved2;
|
---|
236 | LONG (CALLBACK *GetData)(LPARAM lInput,LONG lFrame,LPVOID lpBits,LONG len);
|
---|
237 | LONG (CALLBACK *PutData)(LPARAM lOutput,LONG lFrame,LPVOID lpBits,LONG len);
|
---|
238 | } ICCOMPRESSFRAMES;
|
---|
239 |
|
---|
240 | /* Values for wMode of ICOpen() */
|
---|
241 | #define ICMODE_COMPRESS 1
|
---|
242 | #define ICMODE_DECOMPRESS 2
|
---|
243 | #define ICMODE_FASTDECOMPRESS 3
|
---|
244 | #define ICMODE_QUERY 4
|
---|
245 | #define ICMODE_FASTCOMPRESS 5
|
---|
246 | #define ICMODE_DRAW 8
|
---|
247 |
|
---|
248 | /* quality flags */
|
---|
249 | #define ICQUALITY_LOW 0
|
---|
250 | #define ICQUALITY_HIGH 10000
|
---|
251 | #define ICQUALITY_DEFAULT -1
|
---|
252 |
|
---|
253 | typedef struct {
|
---|
254 | DWORD dwSize; /* 00: */
|
---|
255 | DWORD fccType; /* 04:compressor type 'vidc' 'audc' */
|
---|
256 | DWORD fccHandler; /* 08:compressor sub-type 'rle ' 'jpeg' 'pcm '*/
|
---|
257 | DWORD dwFlags; /* 0c:flags LOWORD is type specific */
|
---|
258 | DWORD dwVersion; /* 10:version of the driver */
|
---|
259 | DWORD dwVersionICM; /* 14:version of the ICM used */
|
---|
260 | /*
|
---|
261 | * under Win32, the driver always returns UNICODE strings.
|
---|
262 | */
|
---|
263 | WCHAR szName[16]; /* 18:short name */
|
---|
264 | WCHAR szDescription[128]; /* 38:long name */
|
---|
265 | WCHAR szDriver[128]; /* 138:driver that contains compressor*/
|
---|
266 | /* 238: */
|
---|
267 | } ICINFO;
|
---|
268 |
|
---|
269 | /* ICINFO.dwFlags */
|
---|
270 | #define VIDCF_QUALITY 0x0001 /* supports quality */
|
---|
271 | #define VIDCF_CRUNCH 0x0002 /* supports crunching to a frame size */
|
---|
272 | #define VIDCF_TEMPORAL 0x0004 /* supports inter-frame compress */
|
---|
273 | #define VIDCF_COMPRESSFRAMES 0x0008 /* wants the compress all frames message */
|
---|
274 | #define VIDCF_DRAW 0x0010 /* supports drawing */
|
---|
275 | #define VIDCF_FASTTEMPORALC 0x0020 /* does not need prev frame on compress */
|
---|
276 | #define VIDCF_FASTTEMPORALD 0x0080 /* does not need prev frame on decompress */
|
---|
277 | #define VIDCF_QUALITYTIME 0x0040 /* supports temporal quality */
|
---|
278 |
|
---|
279 | #define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
|
---|
280 |
|
---|
281 |
|
---|
282 | /* function shortcuts */
|
---|
283 | /* ICM_ABOUT */
|
---|
284 | #define ICMF_ABOUT_QUERY 0x00000001
|
---|
285 |
|
---|
286 | #define ICQueryAbout(hic) \
|
---|
287 | (ICSendMessage(hic,ICM_ABOUT,(DWORD)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
|
---|
288 |
|
---|
289 | #define ICAbout(hic, hwnd) ICSendMessage(hic,ICM_ABOUT,(DWORD)(UINT)(hwnd),0)
|
---|
290 |
|
---|
291 | /* ICM_CONFIGURE */
|
---|
292 | #define ICMF_CONFIGURE_QUERY 0x00000001
|
---|
293 | #define ICQueryConfigure(hic) \
|
---|
294 | (ICSendMessage(hic,ICM_CONFIGURE,(DWORD)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
|
---|
295 |
|
---|
296 | #define ICConfigure(hic,hwnd) \
|
---|
297 | ICSendMessage(hic,ICM_CONFIGURE,(DWORD)(UINT)(hwnd),0)
|
---|
298 |
|
---|
299 | /* Decompression stuff */
|
---|
300 | #define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */
|
---|
301 | #define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */
|
---|
302 | #define ICDECOMPRESS_PREROL 0x20000000 /* this frame is before real start */
|
---|
303 | #define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */
|
---|
304 | #define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */
|
---|
305 |
|
---|
306 | typedef struct {
|
---|
307 | DWORD dwFlags; /* flags (from AVI index...) */
|
---|
308 | LPBITMAPINFOHEADER lpbiInput; /* BITMAPINFO of compressed data */
|
---|
309 | LPVOID lpInput; /* compressed data */
|
---|
310 | LPBITMAPINFOHEADER lpbiOutput; /* DIB to decompress to */
|
---|
311 | LPVOID lpOutput;
|
---|
312 | DWORD ckid; /* ckid from AVI file */
|
---|
313 | } ICDECOMPRESS;
|
---|
314 |
|
---|
315 | typedef struct {
|
---|
316 | DWORD dwFlags;
|
---|
317 | LPBITMAPINFOHEADER lpbiSrc;
|
---|
318 | LPVOID lpSrc;
|
---|
319 | LPBITMAPINFOHEADER lpbiDst;
|
---|
320 | LPVOID lpDst;
|
---|
321 |
|
---|
322 | /* changed for ICM_DECOMPRESSEX */
|
---|
323 | INT xDst; /* destination rectangle */
|
---|
324 | INT yDst;
|
---|
325 | INT dxDst;
|
---|
326 | INT dyDst;
|
---|
327 |
|
---|
328 | INT xSrc; /* source rectangle */
|
---|
329 | INT ySrc;
|
---|
330 | INT dxSrc;
|
---|
331 | INT dySrc;
|
---|
332 | } ICDECOMPRESSEX;
|
---|
333 |
|
---|
334 | DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,LPVOID lpData,LPBITMAPINFOHEADER lpbi,LPVOID lpBits);
|
---|
335 |
|
---|
336 |
|
---|
337 | #define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \
|
---|
338 | ICSendMessage( \
|
---|
339 | hic, ICM_DECOMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
|
---|
340 | (DWORD)(LPVOID)(lpbiOutput) \
|
---|
341 | )
|
---|
342 |
|
---|
343 | #define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \
|
---|
344 | ICSendMessage( \
|
---|
345 | hic,ICM_DECOMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
|
---|
346 | (DWORD) (LPVOID)(lpbiOutput) \
|
---|
347 | )
|
---|
348 |
|
---|
349 | #define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \
|
---|
350 | ((LONG)ICSendMessage( \
|
---|
351 | hic,ICM_DECOMPRESS_GET_FORMAT, (DWORD)(LPVOID)(lpbiInput), \
|
---|
352 | (DWORD)(LPVOID)(lpbiOutput) \
|
---|
353 | ))
|
---|
354 |
|
---|
355 | #define ICDecompressGetFormatSize(hic, lpbi) \
|
---|
356 | ICDecompressGetFormat(hic, lpbi, NULL)
|
---|
357 |
|
---|
358 | #define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput) \
|
---|
359 | ICSendMessage( \
|
---|
360 | hic, ICM_DECOMPRESS_GET_PALETTE, (DWORD)(LPVOID)(lpbiInput), \
|
---|
361 | (DWORD)(LPVOID)(lpbiOutput) \
|
---|
362 | )
|
---|
363 |
|
---|
364 | #define ICDecompressSetPalette(hic,lpbiPalette) \
|
---|
365 | ICSendMessage( \
|
---|
366 | hic,ICM_DECOMPRESS_SET_PALETTE, \
|
---|
367 | (DWORD)(LPVOID)(lpbiPalette),0 \
|
---|
368 | )
|
---|
369 |
|
---|
370 | #define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)
|
---|
371 |
|
---|
372 |
|
---|
373 | #define ICDRAW_QUERY 0x00000001L /* test for support */
|
---|
374 | #define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */
|
---|
375 | #define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */
|
---|
376 |
|
---|
377 | BOOL VFWAPI ICInfo(DWORD fccType, DWORD fccHandler, ICINFO * lpicinfo);
|
---|
378 | LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, DWORD cb);
|
---|
379 | HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode);
|
---|
380 | HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHandler);
|
---|
381 |
|
---|
382 | LRESULT VFWAPI ICClose(HIC hic);
|
---|
383 | LRESULT VFWAPI ICSendMessage(HIC hic, UINT msg, DWORD dw1, DWORD dw2);
|
---|
384 | HIC VFWAPI ICLocate(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags);
|
---|
385 |
|
---|
386 | DWORD VFWAPIV ICDrawBegin(
|
---|
387 | HIC hic,
|
---|
388 | DWORD dwFlags,/* flags */
|
---|
389 | HPALETTE hpal, /* palette to draw with */
|
---|
390 | HWND hwnd, /* window to draw to */
|
---|
391 | HDC hdc, /* HDC to draw to */
|
---|
392 | INT xDst, /* destination rectangle */
|
---|
393 | INT yDst,
|
---|
394 | INT dxDst,
|
---|
395 | INT dyDst,
|
---|
396 | LPBITMAPINFOHEADER lpbi, /* format of frame to draw */
|
---|
397 | INT xSrc, /* source rectangle */
|
---|
398 | INT ySrc,
|
---|
399 | INT dxSrc,
|
---|
400 | INT dySrc,
|
---|
401 | DWORD dwRate, /* frames/second = (dwRate/dwScale) */
|
---|
402 | DWORD dwScale
|
---|
403 | );
|
---|
404 |
|
---|
405 | /* as passed to ICM_DRAW_BEGIN (FIXME: correct only for Win32?) */
|
---|
406 | typedef struct {
|
---|
407 | DWORD dwFlags;
|
---|
408 | HPALETTE hpal;
|
---|
409 | HWND hwnd;
|
---|
410 | HDC hdc;
|
---|
411 | INT xDst;
|
---|
412 | INT yDst;
|
---|
413 | INT dxDst;
|
---|
414 | INT dyDst;
|
---|
415 | LPBITMAPINFOHEADER lpbi;
|
---|
416 | INT xSrc;
|
---|
417 | INT ySrc;
|
---|
418 | INT dxSrc;
|
---|
419 | INT dySrc;
|
---|
420 | DWORD dwRate;
|
---|
421 | DWORD dwScale;
|
---|
422 | } ICDRAWBEGIN;
|
---|
423 |
|
---|
424 | #define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */
|
---|
425 | #define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */
|
---|
426 | #define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */
|
---|
427 | #define ICDRAW_NULLFRAME 0x10000000L /* repeat last frame */
|
---|
428 | #define ICDRAW_NOTKEYFRAME 0x08000000L /* this frame is not a key frame */
|
---|
429 |
|
---|
430 | typedef struct {
|
---|
431 | DWORD dwFlags;
|
---|
432 | LPVOID lpFormat;
|
---|
433 | LPVOID lpData;
|
---|
434 | DWORD cbData;
|
---|
435 | LONG lTime;
|
---|
436 | } ICDRAW;
|
---|
437 |
|
---|
438 | DWORD VFWAPIV ICDraw(HIC hic,DWORD dwFlags,LPVOID lpFormat,LPVOID lpData,DWORD cbData,LONG lTime);
|
---|
439 |
|
---|
440 | /********************* AVIFILE function declarations *************************/
|
---|
441 |
|
---|
442 | #define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's')
|
---|
443 | #define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's')
|
---|
444 | #define streamtypeMIDI mmioFOURCC('m', 'i', 'd', 's')
|
---|
445 | #define streamtypeTEXT mmioFOURCC('t', 'x', 't', 's')
|
---|
446 |
|
---|
447 | /* Basic chunk types */
|
---|
448 | #define cktypeDIBbits aviTWOCC('d', 'b')
|
---|
449 | #define cktypeDIBcompressed aviTWOCC('d', 'c')
|
---|
450 | #define cktypePALchange aviTWOCC('p', 'c')
|
---|
451 | #define cktypeWAVEbytes aviTWOCC('w', 'b')
|
---|
452 |
|
---|
453 | /* Chunk id to use for extra chunks for padding. */
|
---|
454 | #define ckidAVIPADDING mmioFOURCC('J', 'U', 'N', 'K')
|
---|
455 |
|
---|
456 | /* AVIFileHdr.dwFlags */
|
---|
457 | #define AVIF_HASINDEX 0x00000010 /* Index at end of file? */
|
---|
458 | #define AVIF_MUSTUSEINDEX 0x00000020
|
---|
459 | #define AVIF_ISINTERLEAVED 0x00000100
|
---|
460 | #define AVIF_TRUSTCKTYPE 0x00000800 /* Use CKType to find key frames*/
|
---|
461 | #define AVIF_WASCAPTUREFILE 0x00010000
|
---|
462 | #define AVIF_COPYRIGHTED 0x00020000
|
---|
463 |
|
---|
464 | #define AVI_HEADERSIZE 2048
|
---|
465 |
|
---|
466 | typedef struct _MainAVIHeader
|
---|
467 | {
|
---|
468 | DWORD dwMicroSecPerFrame;
|
---|
469 | DWORD dwMaxBytesPerSec;
|
---|
470 | DWORD dwPaddingGranularity;
|
---|
471 | DWORD dwFlags;
|
---|
472 | DWORD dwTotalFrames;
|
---|
473 | DWORD dwInitialFrames;
|
---|
474 | DWORD dwStreams;
|
---|
475 | DWORD dwSuggestedBufferSize;
|
---|
476 | DWORD dwWidth;
|
---|
477 | DWORD dwHeight;
|
---|
478 | DWORD dwReserved[4];
|
---|
479 | } MainAVIHeader;
|
---|
480 |
|
---|
481 | /* AVIStreamHeader.dwFlags */
|
---|
482 | #define AVISF_DISABLED 0x00000001
|
---|
483 | #define AVISF_VIDEO_PALCHANGES 0x00010000
|
---|
484 |
|
---|
485 | typedef struct {
|
---|
486 | FOURCC fccType;
|
---|
487 | FOURCC fccHandler;
|
---|
488 | DWORD dwFlags; /* AVISF_* */
|
---|
489 | WORD wPriority;
|
---|
490 | WORD wLanguage;
|
---|
491 | DWORD dwInitialFrames;
|
---|
492 | DWORD dwScale;
|
---|
493 | DWORD dwRate; /* dwRate / dwScale == samples/second */
|
---|
494 | DWORD dwStart;
|
---|
495 | DWORD dwLength; /* In units above... */
|
---|
496 | DWORD dwSuggestedBufferSize;
|
---|
497 | DWORD dwQuality;
|
---|
498 | DWORD dwSampleSize;
|
---|
499 | RECT16 rcFrame; /* word.word - word.word in file */
|
---|
500 | } AVIStreamHeader;
|
---|
501 |
|
---|
502 | /* AVIINDEXENTRY.dwFlags */
|
---|
503 | #define AVIIF_LIST 0x00000001 /* chunk is a 'LIST' */
|
---|
504 | #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
|
---|
505 |
|
---|
506 | #define AVIIF_NOTIME 0x00000100 /* this frame doesn't take any time */
|
---|
507 | #define AVIIF_COMPUSE 0x0FFF0000
|
---|
508 |
|
---|
509 | typedef struct _AVIINDEXENTRY {
|
---|
510 | DWORD ckid;
|
---|
511 | DWORD dwFlags;
|
---|
512 | DWORD dwChunkOffset;
|
---|
513 | DWORD dwChunkLength;
|
---|
514 | } AVIINDEXENTRY;
|
---|
515 |
|
---|
516 | typedef struct _AVIPALCHANGE {
|
---|
517 | BYTE bFirstEntry;
|
---|
518 | BYTE bNumEntries;
|
---|
519 | WORD wFlags; /* pad */
|
---|
520 | PALETTEENTRY peNew[1];
|
---|
521 | } AVIPALCHANGE;
|
---|
522 |
|
---|
523 | #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
|
---|
524 |
|
---|
525 | #define AVIGETFRAMEF_BESTDISPLAYFMT 1
|
---|
526 |
|
---|
527 | typedef struct _AVISTREAMINFOA {
|
---|
528 | DWORD fccType;
|
---|
529 | DWORD fccHandler;
|
---|
530 | DWORD dwFlags; /* AVIIF_* */
|
---|
531 | DWORD dwCaps;
|
---|
532 | WORD wPriority;
|
---|
533 | WORD wLanguage;
|
---|
534 | DWORD dwScale;
|
---|
535 | DWORD dwRate; /* dwRate / dwScale == samples/second */
|
---|
536 | DWORD dwStart;
|
---|
537 | DWORD dwLength; /* In units above... */
|
---|
538 | DWORD dwInitialFrames;
|
---|
539 | DWORD dwSuggestedBufferSize;
|
---|
540 | DWORD dwQuality;
|
---|
541 | DWORD dwSampleSize;
|
---|
542 | RECT rcFrame;
|
---|
543 | DWORD dwEditCount;
|
---|
544 | DWORD dwFormatChangeCount;
|
---|
545 | CHAR szName[64];
|
---|
546 | } AVISTREAMINFOA, * LPAVISTREAMINFOA, *PAVISTREAMINFOA;
|
---|
547 |
|
---|
548 | typedef struct _AVISTREAMINFOW {
|
---|
549 | DWORD fccType;
|
---|
550 | DWORD fccHandler;
|
---|
551 | DWORD dwFlags;
|
---|
552 | DWORD dwCaps;
|
---|
553 | WORD wPriority;
|
---|
554 | WORD wLanguage;
|
---|
555 | DWORD dwScale;
|
---|
556 | DWORD dwRate; /* dwRate / dwScale == samples/second */
|
---|
557 | DWORD dwStart;
|
---|
558 | DWORD dwLength; /* In units above... */
|
---|
559 | DWORD dwInitialFrames;
|
---|
560 | DWORD dwSuggestedBufferSize;
|
---|
561 | DWORD dwQuality;
|
---|
562 | DWORD dwSampleSize;
|
---|
563 | RECT rcFrame;
|
---|
564 | DWORD dwEditCount;
|
---|
565 | DWORD dwFormatChangeCount;
|
---|
566 | WCHAR szName[64];
|
---|
567 | } AVISTREAMINFOW, * LPAVISTREAMINFOW, *PAVISTREAMINFOW;
|
---|
568 | DECL_WINELIB_TYPE_AW(AVISTREAMINFO)
|
---|
569 | DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO)
|
---|
570 | DECL_WINELIB_TYPE_AW(PAVISTREAMINFO)
|
---|
571 |
|
---|
572 | #define AVISTREAMINFO_DISABLED 0x00000001
|
---|
573 | #define AVISTREAMINFO_FORMATCHANGES 0x00010000
|
---|
574 |
|
---|
575 | /* AVIFILEINFO.dwFlags */
|
---|
576 | #define AVIFILEINFO_HASINDEX 0x00000010
|
---|
577 | #define AVIFILEINFO_MUSTUSEINDEX 0x00000020
|
---|
578 | #define AVIFILEINFO_ISINTERLEAVED 0x00000100
|
---|
579 | #define AVIFILEINFO_WASCAPTUREFILE 0x00010000
|
---|
580 | #define AVIFILEINFO_COPYRIGHTED 0x00020000
|
---|
581 |
|
---|
582 | /* AVIFILEINFO.dwCaps */
|
---|
583 | #define AVIFILECAPS_CANREAD 0x00000001
|
---|
584 | #define AVIFILECAPS_CANWRITE 0x00000002
|
---|
585 | #define AVIFILECAPS_ALLKEYFRAMES 0x00000010
|
---|
586 | #define AVIFILECAPS_NOCOMPRESSION 0x00000020
|
---|
587 |
|
---|
588 | typedef struct _AVIFILEINFOW {
|
---|
589 | DWORD dwMaxBytesPerSec;
|
---|
590 | DWORD dwFlags;
|
---|
591 | DWORD dwCaps;
|
---|
592 | DWORD dwStreams;
|
---|
593 | DWORD dwSuggestedBufferSize;
|
---|
594 | DWORD dwWidth;
|
---|
595 | DWORD dwHeight;
|
---|
596 | DWORD dwScale;
|
---|
597 | DWORD dwRate;
|
---|
598 | DWORD dwLength;
|
---|
599 | DWORD dwEditCount;
|
---|
600 | WCHAR szFileType[64];
|
---|
601 | } AVIFILEINFOW, * LPAVIFILEINFOW, *PAVIFILEINFOW;
|
---|
602 | typedef struct _AVIFILEINFOA {
|
---|
603 | DWORD dwMaxBytesPerSec;
|
---|
604 | DWORD dwFlags;
|
---|
605 | DWORD dwCaps;
|
---|
606 | DWORD dwStreams;
|
---|
607 | DWORD dwSuggestedBufferSize;
|
---|
608 | DWORD dwWidth;
|
---|
609 | DWORD dwHeight;
|
---|
610 | DWORD dwScale;
|
---|
611 | DWORD dwRate;
|
---|
612 | DWORD dwLength;
|
---|
613 | DWORD dwEditCount;
|
---|
614 | CHAR szFileType[64];
|
---|
615 | } AVIFILEINFOA, * LPAVIFILEINFOA, *PAVIFILEINFOA;
|
---|
616 | DECL_WINELIB_TYPE_AW(AVIFILEINFO)
|
---|
617 | DECL_WINELIB_TYPE_AW(PAVIFILEINFO)
|
---|
618 | DECL_WINELIB_TYPE_AW(LPAVIFILEINFO)
|
---|
619 |
|
---|
620 | /* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
|
---|
621 | #define AVICOMPRESSF_INTERLEAVE 0x00000001
|
---|
622 | #define AVICOMPRESSF_DATARATE 0x00000002
|
---|
623 | #define AVICOMPRESSF_KEYFRAMES 0x00000004
|
---|
624 | #define AVICOMPRESSF_VALID 0x00000008
|
---|
625 |
|
---|
626 | typedef struct {
|
---|
627 | DWORD fccType; /* stream type, for consistency */
|
---|
628 | DWORD fccHandler; /* compressor */
|
---|
629 | DWORD dwKeyFrameEvery; /* keyframe rate */
|
---|
630 | DWORD dwQuality; /* compress quality 0-10,000 */
|
---|
631 | DWORD dwBytesPerSecond; /* bytes per second */
|
---|
632 | DWORD dwFlags; /* flags... see below */
|
---|
633 | LPVOID lpFormat; /* save format */
|
---|
634 | DWORD cbFormat;
|
---|
635 | LPVOID lpParms; /* compressor options */
|
---|
636 | DWORD cbParms;
|
---|
637 | DWORD dwInterleaveEvery; /* for non-video streams only */
|
---|
638 | } AVICOMPRESSOPTIONS, *LPAVICOMPRESSOPTIONS,*PAVICOMPRESSOPTIONS;
|
---|
639 |
|
---|
640 |
|
---|
641 |
|
---|
642 | #define DEFINE_AVIGUID(name, l, w1, w2) \
|
---|
643 | DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
|
---|
644 |
|
---|
645 | DEFINE_AVIGUID(IID_IAVIFile, 0x00020020, 0, 0);
|
---|
646 | DEFINE_AVIGUID(IID_IAVIStream, 0x00020021, 0, 0);
|
---|
647 | DEFINE_AVIGUID(IID_IAVIStreaming, 0x00020022, 0, 0);
|
---|
648 | DEFINE_AVIGUID(IID_IGetFrame, 0x00020023, 0, 0);
|
---|
649 | DEFINE_AVIGUID(IID_IAVIEditStream, 0x00020024, 0, 0);
|
---|
650 |
|
---|
651 | DEFINE_AVIGUID(CLSID_AVIFile, 0x00020000, 0, 0);
|
---|
652 |
|
---|
653 | /*****************************************************************************
|
---|
654 | * IAVIStream interface
|
---|
655 | */
|
---|
656 | #define ICOM_INTERFACE IAVIStream
|
---|
657 | #define IAVIStream_METHODS \
|
---|
658 | ICOM_METHOD2(HRESULT,Create, LPARAM,lParam1, LPARAM,lParam2) \
|
---|
659 | ICOM_METHOD2(HRESULT,Info, AVISTREAMINFOW*,psi, LONG,lSize) \
|
---|
660 | ICOM_METHOD2(LONG, FindSample, LONG,lPos, LONG,lFlags) \
|
---|
661 | ICOM_METHOD3(HRESULT,ReadFormat, LONG,lPos, LPVOID,lpFormat, LONG*,lpcbFormat) \
|
---|
662 | ICOM_METHOD3(HRESULT,SetFormat, LONG,lPos, LPVOID,lpFormat, LONG,cbFormat) \
|
---|
663 | ICOM_METHOD6(HRESULT,Read, LONG,lStart, LONG,lSamples, LPVOID,lpBuffer, LONG,cbBuffer, LONG*,plBytes, LONG*,plSamples) \
|
---|
664 | ICOM_METHOD7(HRESULT,Write, LONG,lStart, LONG,lSamples, LPVOID,lpBuffer, LONG,cbBuffer, DWORD,dwFlags, LONG*,plSampWritten, LONG*,plBytesWritten) \
|
---|
665 | ICOM_METHOD2(HRESULT,Delete, LONG,lStart, LONG,lSamples) \
|
---|
666 | ICOM_METHOD3(HRESULT,ReadData, DWORD,fcc, LPVOID,lpBuffer, LONG*,lpcbBuffer) \
|
---|
667 | ICOM_METHOD3(HRESULT,WriteData, DWORD,fcc, LPVOID,lpBuffer, LONG,cbBuffer) \
|
---|
668 | ICOM_METHOD2(HRESULT,SetInfo, AVISTREAMINFOW*,plInfo, LONG,cbInfo)
|
---|
669 | #define IAVIStream_IMETHODS \
|
---|
670 | IUnknown_IMETHODS \
|
---|
671 | IAVIStream_METHODS
|
---|
672 | ICOM_DEFINE(IAVIStream, IUnknown)
|
---|
673 | #undef ICOM_INTERFACE
|
---|
674 |
|
---|
675 | #ifdef ICOM_CINTERFACE
|
---|
676 | /*** IUnknown methods ***/
|
---|
677 | #define IAVIStream_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
---|
678 | #define IAVIStream_AddRef(p) ICOM_CALL (AddRef,p)
|
---|
679 | #define IAVIStream_Release(p) ICOM_CALL (Release,p)
|
---|
680 | /*** IAVIStream methods ***/
|
---|
681 | #define IAVIStream_Create(p,a,b) ICOM_CALL2(Create,p,a,b)
|
---|
682 | #define IAVIStream_Info(p,a,b) ICOM_CALL2(Info,p,a,b)
|
---|
683 | #define IAVIStream_FindSample(p,a,b) ICOM_CALL2(FindSample,p,a,b)
|
---|
684 | #define IAVIStream_ReadFormat(p,a,b,c) ICOM_CALL3(ReadFormat,p,a,b,c)
|
---|
685 | #define IAVIStream_SetFormat(p,a,b,c) ICOM_CALL3(SetFormat,p,a,b,c)
|
---|
686 | #define IAVIStream_Read(p,a,b,c,d,e,f) ICOM_CALL6(Read,p,a,b,c,d,e,f)
|
---|
687 | #define IAVIStream_Write(p,a,b,c,d,e,f,g) ICOM_CALL7(Write,p,a,b,c,d,e,f,g)
|
---|
688 | #define IAVIStream_Delete(p,a,b) ICOM_CALL2(Delete,p,a,b)
|
---|
689 | #define IAVIStream_ReadData(p,a,b,c) ICOM_CALL3(ReadData,p,a,b,c)
|
---|
690 | #define IAVIStream_WriteData(p,a,b,c) ICOM_CALL3(WriteData,p,a,b,c)
|
---|
691 | #define IAVIStream_SetInfo(p,a,b) ICOM_CALL2(SetInfo,p,a,b)
|
---|
692 | #endif
|
---|
693 |
|
---|
694 | HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM*ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *lpOptions,CLSID*pclsidHandler);
|
---|
695 |
|
---|
696 | HRESULT WINAPI AVIStreamInfoA(PAVISTREAM iface,AVISTREAMINFOA *asi,LONG size);
|
---|
697 | HRESULT WINAPI AVIStreamInfoW(PAVISTREAM iface,AVISTREAMINFOW *asi,LONG size);
|
---|
698 | #define AVIStreamInfo WINELIB_NAME_AW(AVIStreamInfo)
|
---|
699 | LPVOID WINAPI AVIStreamGetFrame(PGETFRAME pg,LONG pos);
|
---|
700 | HRESULT WINAPI AVIStreamGetFrameClose(PGETFRAME pg);
|
---|
701 | PGETFRAME WINAPI AVIStreamGetFrameOpen(PAVISTREAM pavi,LPBITMAPINFOHEADER lpbiWanted);
|
---|
702 | LONG WINAPI AVIStreamLength(PAVISTREAM iface);
|
---|
703 | HRESULT WINAPI AVIStreamRead(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread);
|
---|
704 | HRESULT WINAPI AVIStreamReadData(PAVISTREAM iface,DWORD fcc,LPVOID lp,LONG *lpread);
|
---|
705 | HRESULT WINAPI AVIStreamReadFormat(PAVISTREAM iface,LONG pos,LPVOID format,LONG *formatsize);
|
---|
706 | ULONG WINAPI AVIStreamRelease(PAVISTREAM iface);
|
---|
707 | HRESULT WINAPI AVIStreamSetFormat(PAVISTREAM iface,LONG pos,LPVOID format,LONG formatsize);
|
---|
708 | LONG WINAPI AVIStreamStart(PAVISTREAM iface);
|
---|
709 | HRESULT WINAPI AVIStreamWrite(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,DWORD flags,LONG *sampwritten,LONG *byteswritten);
|
---|
710 | HRESULT WINAPI AVIStreamWriteData(PAVISTREAM iface,DWORD fcc,LPVOID lp,LONG size);
|
---|
711 |
|
---|
712 |
|
---|
713 | /*****************************************************************************
|
---|
714 | * IAVIFile interface
|
---|
715 | */
|
---|
716 | /* In Win32 this interface uses UNICODE only */
|
---|
717 | #define ICOM_INTERFACE IAVIFile
|
---|
718 | #define IAVIFile_METHODS \
|
---|
719 | ICOM_METHOD2(HRESULT,Info, AVIFILEINFOW*,pfi, LONG,lSize) \
|
---|
720 | ICOM_METHOD3(HRESULT,GetStream, PAVISTREAM*,ppStream, DWORD,fccType, LONG,lParam) \
|
---|
721 | ICOM_METHOD2(HRESULT,CreateStream, PAVISTREAM*,ppStream, AVISTREAMINFOW*,psi) \
|
---|
722 | ICOM_METHOD3(HRESULT,WriteData, DWORD,fcc, LPVOID,lpBuffer, LONG,cbBuffer) \
|
---|
723 | ICOM_METHOD3(HRESULT,ReadData, DWORD,fcc, LPVOID,lpBuffer, LONG*,lpcbBuffer) \
|
---|
724 | ICOM_METHOD (HRESULT,EndRecord) \
|
---|
725 | ICOM_METHOD2(HRESULT,DeleteStream, DWORD,fccType, LONG,lParam)
|
---|
726 | #define IAVIFile_IMETHODS \
|
---|
727 | IUnknown_IMETHODS \
|
---|
728 | IAVIFile_METHODS
|
---|
729 | ICOM_DEFINE(IAVIFile,IUnknown)
|
---|
730 | #undef ICOM_INTERFACE
|
---|
731 |
|
---|
732 | #ifdef ICOM_CINTERFACE
|
---|
733 | /*** IUnknown methods ***/
|
---|
734 | #define IAVIFile_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
---|
735 | #define IAVIFile_AddRef(p) ICOM_CALL (AddRef,p)
|
---|
736 | #define IAVIFile_Release(p) ICOM_CALL (Release,p)
|
---|
737 | /*** IAVIFile methods ***/
|
---|
738 | #define IAVIFile_Info(p,a,b) ICOM_CALL2(Info,p,a,b)
|
---|
739 | #define IAVIFile_GetStream(p,a,b,c) ICOM_CALL3(GetStream,p,a,b,c)
|
---|
740 | #define IAVIFile_CreateStream(p,a,b) ICOM_CALL2(CreateStream,p,a,b)
|
---|
741 | #define IAVIFile_WriteData(p,a,b,c) ICOM_CALL3(WriteData,p,a,b,c)
|
---|
742 | #define IAVIFile_ReadData(p,a,b,c) ICOM_CALL3(ReadData,p,a,b,c)
|
---|
743 | #define IAVIFile_EndRecord(p) ICOM_CALL (EndRecord,p)
|
---|
744 | #define IAVIFile_DeleteStream(p,a,b) ICOM_CALL2(DeleteStream,p,a,b)
|
---|
745 | #endif
|
---|
746 |
|
---|
747 | HRESULT WINAPI AVIFileCreateStreamA(PAVIFILE pfile,PAVISTREAM* ppavi,AVISTREAMINFOA* psi);
|
---|
748 | HRESULT WINAPI AVIFileCreateStreamW(PAVIFILE pfile,PAVISTREAM* ppavi,AVISTREAMINFOW* psi);
|
---|
749 | #define AVIFileCreateStream WINELIB_NAME_AW(AVIFileCreateStream)
|
---|
750 | void WINAPI AVIFileExit(void);
|
---|
751 | HRESULT WINAPI AVIFileGetStream(PAVIFILE pfile,PAVISTREAM* avis,DWORD fccType,LONG lParam);
|
---|
752 | HRESULT WINAPI AVIFileInfoA(PAVIFILE pfile,PAVIFILEINFOA pfi,LONG lSize);
|
---|
753 | HRESULT WINAPI AVIFileInfoW(PAVIFILE pfile,PAVIFILEINFOW pfi,LONG lSize);
|
---|
754 | #define AVIFileInfo WINELIB_NAME_AW(AVIFileInfo)
|
---|
755 | void WINAPI AVIFileInit(void);
|
---|
756 | HRESULT WINAPI AVIFileOpenA(PAVIFILE* ppfile,LPCSTR szFile,UINT uMode,LPCLSID lpHandler);
|
---|
757 | HRESULT WINAPI AVIFileOpenW(PAVIFILE* ppfile,LPCWSTR szFile,UINT uMode,LPCLSID lpHandler);
|
---|
758 | #define AVIFileOpen WINELIB_NAME_AW(AVIFileOpen)
|
---|
759 | ULONG WINAPI AVIFileRelease(PAVIFILE iface);
|
---|
760 |
|
---|
761 |
|
---|
762 | /*****************************************************************************
|
---|
763 | * IGetFrame interface
|
---|
764 | */
|
---|
765 | #define ICOM_INTERFACE IGetFrame
|
---|
766 | #define IGetFrame_METHODS \
|
---|
767 | ICOM_METHOD1(LPVOID, GetFrame, LONG,lPos) \
|
---|
768 | ICOM_METHOD3(HRESULT,Begin, LONG,lStart, LONG,lEnd, LONG,lRate) \
|
---|
769 | ICOM_METHOD (HRESULT,End) \
|
---|
770 | ICOM_METHOD6(HRESULT,SetFormat, LPBITMAPINFOHEADER,lpbi, LPVOID,lpBits, INT,x, INT,y, INT,dx, INT,dy)
|
---|
771 | #define IGetFrame_IMETHODS \
|
---|
772 | IUnknown_IMETHODS \
|
---|
773 | IGetFrame_METHODS
|
---|
774 | ICOM_DEFINE(IGetFrame,IUnknown)
|
---|
775 | #undef ICOM_INTERFACE
|
---|
776 |
|
---|
777 | #ifdef ICOM_CINTERFACE
|
---|
778 | /*** IUnknown methods ***/
|
---|
779 | #define IGetFrame_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
---|
780 | #define IGetFrame_AddRef(p) ICOM_CALL (AddRef,p)
|
---|
781 | #define IGetFrame_Release(p) ICOM_CALL (Release,p)
|
---|
782 | /*** IGetFrame methods ***/
|
---|
783 | #define IGetFrame_GetFrame(p,a) ICOM_CALL1(GetFrame,p,a)
|
---|
784 | #define IGetFrame_Begin(p,a,b,c) ICOM_CALL3(Begin,p,a,b,c)
|
---|
785 | #define IGetFrame_End(p) ICOM_CALL (End,p)
|
---|
786 | #define IGetFrame_SetFormat(p,a,b,c,d,e,f) ICOM_CALL6(SetFormat,p,a,b,c,d,e,f)
|
---|
787 | #endif
|
---|
788 |
|
---|
789 | #define AVIERR_OK 0
|
---|
790 | #define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)
|
---|
791 |
|
---|
792 | #define AVIERR_UNSUPPORTED MAKE_AVIERR(101)
|
---|
793 | #define AVIERR_BADFORMAT MAKE_AVIERR(102)
|
---|
794 | #define AVIERR_MEMORY MAKE_AVIERR(103)
|
---|
795 | #define AVIERR_INTERNAL MAKE_AVIERR(104)
|
---|
796 | #define AVIERR_BADFLAGS MAKE_AVIERR(105)
|
---|
797 | #define AVIERR_BADPARAM MAKE_AVIERR(106)
|
---|
798 | #define AVIERR_BADSIZE MAKE_AVIERR(107)
|
---|
799 | #define AVIERR_BADHANDLE MAKE_AVIERR(108)
|
---|
800 | #define AVIERR_FILEREAD MAKE_AVIERR(109)
|
---|
801 | #define AVIERR_FILEWRITE MAKE_AVIERR(110)
|
---|
802 | #define AVIERR_FILEOPEN MAKE_AVIERR(111)
|
---|
803 | #define AVIERR_COMPRESSOR MAKE_AVIERR(112)
|
---|
804 | #define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)
|
---|
805 | #define AVIERR_READONLY MAKE_AVIERR(114)
|
---|
806 | #define AVIERR_NODATA MAKE_AVIERR(115)
|
---|
807 | #define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)
|
---|
808 | #define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)
|
---|
809 | #define AVIERR_USERABORT MAKE_AVIERR(198)
|
---|
810 | #define AVIERR_ERROR MAKE_AVIERR(199)
|
---|
811 |
|
---|
812 |
|
---|
813 | /* DrawDibTime */
|
---|
814 | typedef struct {
|
---|
815 | LONG timeCount;
|
---|
816 | LONG timeDraw;
|
---|
817 | LONG timeDecompress;
|
---|
818 | LONG timeDither;
|
---|
819 | LONG timeStretch;
|
---|
820 | LONG timeBlt;
|
---|
821 | LONG timeSetDIBits;
|
---|
822 | } DRAWDIBTIME, *LPDRAWDIBTIME;
|
---|
823 |
|
---|
824 | /* ICCompressorChoose; ICCompressorFree */
|
---|
825 | typedef struct {
|
---|
826 | LONG cbSize; // set to sizeof(COMPVARS) before
|
---|
827 | // calling ICCompressorChoose
|
---|
828 | DWORD dwFlags; // see below...
|
---|
829 | HIC hic; // HIC of chosen compressor
|
---|
830 | DWORD fccType; // basically ICTYPE_VIDEO
|
---|
831 | DWORD fccHandler; // handler of chosen compressor or
|
---|
832 | // "" or "DIB "
|
---|
833 | LPBITMAPINFO lpbiIn; // input format
|
---|
834 | LPBITMAPINFO lpbiOut; // output format - will compress to this
|
---|
835 | LPVOID lpBitsOut;
|
---|
836 | LPVOID lpBitsPrev;
|
---|
837 | LONG lFrame;
|
---|
838 | LONG lKey; // key frames how often?
|
---|
839 | LONG lDataRate; // desired data rate KB/Sec
|
---|
840 | LONG lQ; // desired quality
|
---|
841 | LONG lKeyCount;
|
---|
842 | LPVOID lpState; // state of compressor
|
---|
843 | LONG cbState; // size of the state
|
---|
844 | } COMPVARS, *PCOMPVARS;
|
---|
845 |
|
---|
846 | #endif /* __WINE_VFW_H */
|
---|