1
|
1 #ifndef __WINE_VFW_H
|
|
2 #define __WINE_VFW_H
|
|
3 //#include "pshpack1.h"
|
|
4 #ifdef __cplusplus
|
|
5 extern "C" {
|
|
6 #endif
|
|
7 #ifndef __WINE_WINGDI_H
|
|
8
|
|
9 typedef struct
|
|
10 {
|
|
11 short bfType;
|
|
12 long bfSize;
|
|
13 short bfReserved1;
|
|
14 short bfReserved2;
|
|
15 long bfOffBits;
|
|
16 } BITMAPFILEHEADER;
|
|
17
|
|
18 typedef struct
|
|
19 {
|
|
20 long biSize;
|
|
21 long biWidth;
|
|
22 long biHeight;
|
|
23 short biPlanes;
|
|
24 short biBitCount;
|
|
25 long biCompression;
|
|
26 long biSizeImage;
|
|
27 long biXPelsPerMeter;
|
|
28 long biYPelsPerMeter;
|
|
29 long biClrUsed;
|
|
30 long biClrImportant;
|
|
31 } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
|
|
32 typedef struct {
|
|
33 BITMAPINFOHEADER bmiHeader;
|
|
34 int bmiColors[1];
|
|
35 } BITMAPINFO, *LPBITMAPINFO;
|
|
36 #endif
|
|
37 #define VFWAPI
|
|
38 #define VFWAPIV
|
|
39 #ifndef __WINE_WINDEF_H
|
|
40 typedef long (__stdcall__ *DRIVERPROC)(long,HDRVR,unsigned int,long,long);
|
|
41 #endif
|
|
42
|
|
43
|
|
44
|
|
45 #ifndef mmioFOURCC
|
|
46 #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
|
|
47 ( (long)(unsigned char)(ch0) | ( (long)(unsigned char)(ch1) << 8 ) | \
|
|
48 ( (long)(unsigned char)(ch2) << 16 ) | ( (long)(unsigned char)(ch3) << 24 ) )
|
|
49 #endif
|
|
50
|
|
51 #ifndef aviTWOCC
|
|
52 #define aviTWOCC(ch0, ch1) ((short)(unsigned char)(ch0) | ((short)(unsigned char)(ch1) << 8))
|
|
53 #endif
|
|
54
|
|
55 #define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c')
|
|
56 #define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c')
|
|
57
|
|
58
|
|
59 /* Installable Compressor M? */
|
|
60
|
|
61 /* HIC struct (same layout as Win95 one) */
|
|
62 typedef struct tagWINE_HIC {
|
|
63 long magic; /* 00: 'Smag' */
|
|
64 HANDLE curthread; /* 04: */
|
|
65 long type; /* 08: */
|
|
66 long handler; /* 0C: */
|
|
67 HDRVR hdrv; /* 10: */
|
|
68 #ifndef __cplusplus
|
|
69 long private; /* 14:(handled by SendDriverMessage)*/
|
|
70 #else
|
|
71 long _private; /* 14:(handled by SendDriverMessage)*/
|
|
72 #endif
|
|
73 DRIVERPROC driverproc; /* 18:(handled by SendDriverMessage)*/
|
|
74 long x1; /* 1c: name? */
|
|
75 short x2; /* 20: */
|
|
76 long x3; /* 22: */
|
|
77 /* 26: */
|
|
78 } WINE_HIC;
|
|
79
|
|
80 /* error return codes */
|
|
81 #define ICERR_OK 0
|
|
82 #define ICERR_DONTDRAW 1
|
|
83 #define ICERR_NEWPALETTE 2
|
|
84 #define ICERR_GOTOKEYFRAME 3
|
|
85 #define ICERR_STOPDRAWING 4
|
|
86
|
|
87 #define ICERR_UNSUPPORTED -1
|
|
88 #define ICERR_BADFORMAT -2
|
|
89 #define ICERR_MEMORY -3
|
|
90 #define ICERR_INTERNAL -4
|
|
91 #define ICERR_BADFLAGS -5
|
|
92 #define ICERR_BADPARAM -6
|
|
93 #define ICERR_BADSIZE -7
|
|
94 #define ICERR_BADHANDLE -8
|
|
95 #define ICERR_CANTUPDATE -9
|
|
96 #define ICERR_ABORT -10
|
|
97 #define ICERR_ERROR -100
|
|
98 #define ICERR_BADBITDEPTH -200
|
|
99 #define ICERR_BADIMAGESIZE -201
|
|
100
|
|
101 #define ICERR_CUSTOM -400
|
|
102
|
|
103 /* ICM Messages */
|
|
104 #define ICM_USER (DRV_USER+0x0000)
|
|
105
|
|
106 /* ICM driver message range */
|
|
107 #define ICM_RESERVED_LOW (DRV_USER+0x1000)
|
|
108 #define ICM_RESERVED_HIGH (DRV_USER+0x2000)
|
|
109 #define ICM_RESERVED ICM_RESERVED_LOW
|
|
110
|
|
111 #define ICM_GETSTATE (ICM_RESERVED+0)
|
|
112 #define ICM_SETSTATE (ICM_RESERVED+1)
|
|
113 #define ICM_GETINFO (ICM_RESERVED+2)
|
|
114
|
|
115 #define ICM_CONFIGURE (ICM_RESERVED+10)
|
|
116 #define ICM_ABOUT (ICM_RESERVED+11)
|
|
117 /* */
|
|
118
|
|
119 #define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30)
|
|
120 #define ICM_GETQUALITY (ICM_RESERVED+31)
|
|
121 #define ICM_SETQUALITY (ICM_RESERVED+32)
|
|
122
|
|
123 #define ICM_SET (ICM_RESERVED+40)
|
|
124 #define ICM_GET (ICM_RESERVED+41)
|
|
125
|
|
126 /* 2 constant FOURCC codes */
|
|
127 #define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
|
|
128 #define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
|
|
129
|
|
130 #define ICM_COMPRESS_GET_FORMAT (ICM_USER+4)
|
|
131 #define ICM_COMPRESS_GET_SIZE (ICM_USER+5)
|
|
132 #define ICM_COMPRESS_QUERY (ICM_USER+6)
|
|
133 #define ICM_COMPRESS_BEGIN (ICM_USER+7)
|
|
134 #define ICM_COMPRESS (ICM_USER+8)
|
|
135 #define ICM_COMPRESS_END (ICM_USER+9)
|
|
136
|
|
137 #define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10)
|
|
138 #define ICM_DECOMPRESS_QUERY (ICM_USER+11)
|
|
139 #define ICM_DECOMPRESS_BEGIN (ICM_USER+12)
|
|
140 #define ICM_DECOMPRESS (ICM_USER+13)
|
|
141 #define ICM_DECOMPRESS_END (ICM_USER+14)
|
|
142 #define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29)
|
|
143 #define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30)
|
|
144
|
|
145 #define ICM_DRAW_QUERY (ICM_USER+31)
|
|
146 #define ICM_DRAW_BEGIN (ICM_USER+15)
|
|
147 #define ICM_DRAW_GET_PALETTE (ICM_USER+16)
|
|
148 #define ICM_DRAW_START (ICM_USER+18)
|
|
149 #define ICM_DRAW_STOP (ICM_USER+19)
|
|
150 #define ICM_DRAW_END (ICM_USER+21)
|
|
151 #define ICM_DRAW_GETTIME (ICM_USER+32)
|
|
152 #define ICM_DRAW (ICM_USER+33)
|
|
153 #define ICM_DRAW_WINDOW (ICM_USER+34)
|
|
154 #define ICM_DRAW_SETTIME (ICM_USER+35)
|
|
155 #define ICM_DRAW_REALIZE (ICM_USER+36)
|
|
156 #define ICM_DRAW_FLUSH (ICM_USER+37)
|
|
157 #define ICM_DRAW_RENDERBUFFER (ICM_USER+38)
|
|
158
|
|
159 #define ICM_DRAW_START_PLAY (ICM_USER+39)
|
|
160 #define ICM_DRAW_STOP_PLAY (ICM_USER+40)
|
|
161
|
|
162 #define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50)
|
|
163 #define ICM_DRAW_CHANGEPALETTE (ICM_USER+51)
|
|
164
|
|
165 #define ICM_GETBUFFERSWANTED (ICM_USER+41)
|
|
166
|
|
167 #define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42)
|
|
168
|
|
169 #define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60)
|
|
170 #define ICM_DECOMPRESSEX_QUERY (ICM_USER+61)
|
|
171 #define ICM_DECOMPRESSEX (ICM_USER+62)
|
|
172 #define ICM_DECOMPRESSEX_END (ICM_USER+63)
|
|
173
|
|
174 #define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70)
|
|
175 #define ICM_SET_STATUS_PROC (ICM_USER+72)
|
|
176
|
|
177 /* structs */
|
|
178
|
|
179 typedef struct {
|
|
180 long dwSize; /* 00: size */
|
|
181 long fccType; /* 04: type 'vidc' usually */
|
|
182 long fccHandler; /* 08: */
|
|
183 long dwVersion; /* 0c: version of compman opening you */
|
|
184 long dwFlags; /* 10: LOshort is type specific */
|
|
185 LRESULT dwError; /* 14: */
|
|
186 void* pV1Reserved; /* 18: */
|
|
187 void* pV2Reserved; /* 1c: */
|
|
188 long dnDevNode; /* 20: */
|
|
189 /* 24: */
|
|
190 } ICOPEN,*LPICOPEN;
|
|
191
|
|
192 #define ICCOMPRESS_KEYFRAME 0x00000001L
|
|
193
|
|
194 typedef struct {
|
|
195 long dwFlags;
|
|
196 LPBITMAPINFOHEADER lpbiOutput;
|
|
197 void* lpOutput;
|
|
198 LPBITMAPINFOHEADER lpbiInput;
|
|
199 void* lpInput;
|
|
200 long* lpckid;
|
|
201 long* lpdwFlags;
|
|
202 long lFrameNum;
|
|
203 long dwFrameSize;
|
|
204 long dwQuality;
|
|
205 LPBITMAPINFOHEADER lpbiPrev;
|
|
206 void* lpPrev;
|
|
207 } ICCOMPRESS;
|
|
208
|
|
209 long VFWAPIV ICCompress(
|
|
210 HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiOutput,void* lpData,
|
|
211 LPBITMAPINFOHEADER lpbiInput,void* lpBits,long* lpckid,
|
|
212 long* lpdwFlags,long lFrameNum,long dwFrameSize,long dwQuality,
|
|
213 LPBITMAPINFOHEADER lpbiPrev,void* lpPrev
|
|
214 );
|
|
215
|
|
216
|
|
217 #define ICCompressGetFormat(hic, lpbiInput, lpbiOutput) \
|
|
218 ICSendMessage( \
|
|
219 hic,ICM_COMPRESS_GET_FORMAT,(long)(void*)(lpbiInput), \
|
|
220 (long)(void*)(lpbiOutput) \
|
|
221 )
|
|
222
|
|
223 #define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
|
|
224
|
|
225 #define ICGetDefaultKeyFrameRate(hic,lpint) \
|
|
226 ICSendMessage( \
|
|
227 hic, ICM_GETDEFAULTKEYFRAMERATE, \
|
|
228 (long)(void*)(lpint), \
|
|
229 0 )
|
|
230
|
|
231 #define ICGetDefaultQuality(hic,lpint) \
|
|
232 ICSendMessage( \
|
|
233 hic, ICM_GETDEFAULTQUALITY, \
|
|
234 (long)(void*)(lpint), \
|
|
235 0 )
|
|
236
|
|
237
|
|
238 #define ICCompressBegin(hic, lpbiInput, lpbiOutput) \
|
|
239 ICSendMessage( \
|
|
240 hic, ICM_COMPRESS_BEGIN, (long)(void*)(lpbiInput), \
|
|
241 (long)(void*)(lpbiOutput) \
|
|
242 )
|
|
243
|
|
244 #define ICCompressGetSize(hic, lpbiInput, lpbiOutput) \
|
|
245 ICSendMessage( \
|
|
246 hic, ICM_COMPRESS_GET_SIZE, (long)(void*)(lpbiInput), \
|
|
247 (long)(void*)(lpbiOutput) \
|
|
248 )
|
|
249
|
|
250 #define ICCompressQuery(hic, lpbiInput, lpbiOutput) \
|
|
251 ICSendMessage( \
|
|
252 hic, ICM_COMPRESS_QUERY, (long)(void*)(lpbiInput), \
|
|
253 (long)(void*)(lpbiOutput) \
|
|
254 )
|
|
255
|
|
256
|
|
257 #define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0)
|
|
258
|
|
259 /* ICCOMPRESSFRAMES.dwFlags */
|
|
260 #define ICCOMPRESSFRAMES_PADDING 0x00000001
|
|
261 typedef struct {
|
|
262 long dwFlags;
|
|
263 LPBITMAPINFOHEADER lpbiOutput;
|
|
264 LPARAM lOutput;
|
|
265 LPBITMAPINFOHEADER lpbiInput;
|
|
266 LPARAM lInput;
|
|
267 long lStartFrame;
|
|
268 long lFrameCount;
|
|
269 long lQuality;
|
|
270 long lDataRate;
|
|
271 long lKeyRate;
|
|
272 long dwRate;
|
|
273 long dwScale;
|
|
274 long dwOverheadPerFrame;
|
|
275 long dwReserved2;
|
|
276 long CALLBACK (*GetData)(LPARAM lInput,long lFrame,void* lpBits,long len);
|
|
277 long CALLBACK (*PutData)(LPARAM lOutput,long lFrame,void* lpBits,long len);
|
|
278 } ICCOMPRESSFRAMES;
|
|
279
|
|
280 /* Values for wMode of ICOpen() */
|
|
281 #define ICMODE_COMPRESS 1
|
|
282 #define ICMODE_DECOMPRESS 2
|
|
283 #define ICMODE_FASTDECOMPRESS 3
|
|
284 #define ICMODE_QUERY 4
|
|
285 #define ICMODE_FASTCOMPRESS 5
|
|
286 #define ICMODE_DRAW 8
|
|
287
|
|
288 /* quality flags */
|
|
289 #define ICQUALITY_LOW 0
|
|
290 #define ICQUALITY_HIGH 10000
|
|
291 #define ICQUALITY_DEFAULT -1
|
|
292
|
|
293 typedef struct {
|
|
294 long dwSize; /* 00: */
|
|
295 long fccType; /* 04:compressor type 'vidc' 'audc' */
|
|
296 long fccHandler; /* 08:compressor sub-type 'rle ' 'jpeg' 'pcm '*/
|
|
297 long dwFlags; /* 0c:flags LOshort is type specific */
|
|
298 long dwVersion; /* 10:version of the driver */
|
|
299 long dwVersionICM; /* 14:version of the ICM used */
|
|
300 /*
|
|
301 * under Win32, the driver always returns UNICODE strings.
|
|
302 */
|
|
303 WCHAR szName[16]; /* 18:short name */
|
|
304 WCHAR szDescription[128]; /* 38:long name */
|
|
305 WCHAR szDriver[128]; /* 138:driver that contains compressor*/
|
|
306 /* 238: */
|
|
307 } ICINFO;
|
|
308
|
|
309 /* ICINFO.dwFlags */
|
|
310 #define VIDCF_QUALITY 0x0001 /* supports quality */
|
|
311 #define VIDCF_CRUNCH 0x0002 /* supports crunching to a frame size */
|
|
312 #define VIDCF_TEMPORAL 0x0004 /* supports inter-frame compress */
|
|
313 #define VIDCF_COMPRESSFRAMES 0x0008 /* wants the compress all frames message */
|
|
314 #define VIDCF_DRAW 0x0010 /* supports drawing */
|
|
315 #define VIDCF_FASTTEMPORALC 0x0020 /* does not need prev frame on compress */
|
|
316 #define VIDCF_FASTTEMPORALD 0x0080 /* does not need prev frame on decompress */
|
|
317 #define VIDCF_QUALITYTIME 0x0040 /* supports temporal quality */
|
|
318
|
|
319 #define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
|
|
320
|
|
321
|
|
322 /* function shortcuts */
|
|
323 /* ICM_ABOUT */
|
|
324 #define ICMF_ABOUT_QUERY 0x00000001
|
|
325
|
|
326 #define ICQueryAbout(hic) \
|
|
327 (ICSendMessage(hic,ICM_ABOUT,(long)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
|
|
328
|
|
329 #define ICAbout(hic, hwnd) ICSendMessage(hic,ICM_ABOUT,(long)(unsigned int)(hwnd),0)
|
|
330
|
|
331 /* ICM_CONFIGURE */
|
|
332 #define ICMF_CONFIGURE_QUERY 0x00000001
|
|
333 #define ICQueryConfigure(hic) \
|
|
334 (ICSendMessage(hic,ICM_CONFIGURE,(long)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
|
|
335
|
|
336 #define ICConfigure(hic,hwnd) \
|
|
337 ICSendMessage(hic,ICM_CONFIGURE,(long)(unsigned int)(hwnd),0)
|
|
338
|
|
339 /* Decompression stuff */
|
|
340 #define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */
|
|
341 #define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */
|
|
342 #define ICDECOMPRESS_PREROL 0x20000000 /* this frame is before real start */
|
|
343 #define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */
|
|
344 #define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */
|
|
345
|
|
346 typedef struct {
|
|
347 long dwFlags; /* flags (from AVI index...) */
|
|
348 LPBITMAPINFOHEADER lpbiInput; /* BITMAPINFO of compressed data */
|
|
349 void* lpInput; /* compressed data */
|
|
350 LPBITMAPINFOHEADER lpbiOutput; /* DIB to decompress to */
|
|
351 void* lpOutput;
|
|
352 long ckid; /* ckid from AVI file */
|
|
353 } ICDECOMPRESS;
|
|
354
|
|
355 typedef struct {
|
|
356 long dwFlags;
|
|
357 LPBITMAPINFOHEADER lpbiSrc;
|
|
358 void* lpSrc;
|
|
359 LPBITMAPINFOHEADER lpbiDst;
|
|
360 void* lpDst;
|
|
361
|
|
362 /* changed for ICM_DECOMPRESSEX */
|
|
363 INT xDst; /* destination rectangle */
|
|
364 INT yDst;
|
|
365 INT dxDst;
|
|
366 INT dyDst;
|
|
367
|
|
368 INT xSrc; /* source rectangle */
|
|
369 INT ySrc;
|
|
370 INT dxSrc;
|
|
371 INT dySrc;
|
|
372 } ICDECOMPRESSEX;
|
|
373
|
|
374
|
|
375 long VFWAPIV ICDecompress(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits);
|
|
376
|
|
377
|
|
378 #define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \
|
|
379 ICSendMessage( \
|
|
380 hic, ICM_DECOMPRESS_BEGIN, (long)(void*)(lpbiInput), \
|
|
381 (long)(void*)(lpbiOutput) \
|
|
382 )
|
|
383
|
|
384 #define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \
|
|
385 ICSendMessage( \
|
|
386 hic,ICM_DECOMPRESS_QUERY, (long)(void*)(lpbiInput), \
|
|
387 (long) (void*)(lpbiOutput) \
|
|
388 )
|
|
389
|
|
390 #define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \
|
|
391 ((long)ICSendMessage( \
|
|
392 hic,ICM_DECOMPRESS_GET_FORMAT, (long)(void*)(lpbiInput), \
|
|
393 (long)(void*)(lpbiOutput) \
|
|
394 ))
|
|
395
|
|
396 #define ICDecompressGetFormatSize(hic, lpbi) \
|
|
397 ICDecompressGetFormat(hic, lpbi, NULL)
|
|
398
|
|
399 #define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput) \
|
|
400 ICSendMessage( \
|
|
401 hic, ICM_DECOMPRESS_GET_PALETTE, (long)(void*)(lpbiInput), \
|
|
402 (long)(void*)(lpbiOutput) \
|
|
403 )
|
|
404
|
|
405 #define ICDecompressSetPalette(hic,lpbiPalette) \
|
|
406 ICSendMessage( \
|
|
407 hic,ICM_DECOMPRESS_SET_PALETTE, \
|
|
408 (long)(void*)(lpbiPalette),0 \
|
|
409 )
|
|
410
|
|
411 #define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)
|
|
412
|
|
413
|
|
414 #define ICDRAW_QUERY 0x00000001L /* test for support */
|
|
415 #define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */
|
|
416 #define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */
|
|
417
|
|
418
|
|
419 WIN_BOOL VFWAPI ICInfo(long fccType, long fccHandler, ICINFO * lpicinfo);
|
|
420 LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, long cb);
|
|
421 HIC VFWAPI ICOpen(long fccType, long fccHandler, UINT wMode);
|
|
422 HIC VFWAPI ICOpenFunction(long fccType, long fccHandler, unsigned int wMode, void* lpfnHandler);
|
|
423
|
|
424 LRESULT VFWAPI ICClose(HIC hic);
|
|
425 LRESULT VFWAPI ICSendMessage(HIC hic, unsigned int msg, long dw1, long dw2);
|
|
426 HIC VFWAPI ICLocate(long fccType, long fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, short wFlags);
|
|
427
|
|
428 int VFWAPI ICDoSomething();
|
|
429
|
|
430 long VFWAPIV ICDrawBegin(
|
|
431 HIC hic,
|
|
432 long dwFlags,/* flags */
|
|
433 HPALETTE hpal, /* palette to draw with */
|
|
434 HWND hwnd, /* window to draw to */
|
|
435 HDC hdc, /* HDC to draw to */
|
|
436 INT xDst, /* destination rectangle */
|
|
437 INT yDst,
|
|
438 INT dxDst,
|
|
439 INT dyDst,
|
|
440 LPBITMAPINFOHEADER lpbi, /* format of frame to draw */
|
|
441 INT xSrc, /* source rectangle */
|
|
442 INT ySrc,
|
|
443 INT dxSrc,
|
|
444 INT dySrc,
|
|
445 long dwRate, /* frames/second = (dwRate/dwScale) */
|
|
446 long dwScale
|
|
447 );
|
|
448
|
|
449 /* as passed to ICM_DRAW_BEGIN (FIXME: correct only for Win32?) */
|
|
450 typedef struct {
|
|
451 long dwFlags;
|
|
452 HPALETTE hpal;
|
|
453 HWND hwnd;
|
|
454 HDC hdc;
|
|
455 INT xDst;
|
|
456 INT yDst;
|
|
457 INT dxDst;
|
|
458 INT dyDst;
|
|
459 LPBITMAPINFOHEADER lpbi;
|
|
460 INT xSrc;
|
|
461 INT ySrc;
|
|
462 INT dxSrc;
|
|
463 INT dySrc;
|
|
464 long dwRate;
|
|
465 long dwScale;
|
|
466 } ICDRAWBEGIN;
|
|
467
|
|
468 #define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */
|
|
469 #define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */
|
|
470 #define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */
|
|
471 #define ICDRAW_NULLFRAME 0x10000000L /* repeat last frame */
|
|
472 #define ICDRAW_NOTKEYFRAME 0x08000000L /* this frame is not a key frame */
|
|
473
|
|
474 typedef struct {
|
|
475 long dwFlags;
|
|
476 void* lpFormat;
|
|
477 void* lpData;
|
|
478 long cbData;
|
|
479 long lTime;
|
|
480 } ICDRAW;
|
|
481
|
|
482 long VFWAPIV ICDraw(HIC hic,long dwFlags,void* lpFormat,void* lpData,long cbData,long lTime);
|
|
483
|
|
484
|
|
485 #define AVIGETFRAMEF_BESTDISPLAYFMT 1
|
|
486
|
|
487 typedef struct _AVISTREAMINFOA {
|
|
488 long fccType;
|
|
489 long fccHandler;
|
|
490 long dwFlags; /* AVIIF_* */
|
|
491 long dwCaps;
|
|
492 short wPriority;
|
|
493 short wLanguage;
|
|
494 long dwScale;
|
|
495 long dwRate; /* dwRate / dwScale == samples/second */
|
|
496 long dwStart;
|
|
497 long dwLength; /* In units above... */
|
|
498 long dwInitialFrames;
|
|
499 long dwSuggestedBufferSize;
|
|
500 long dwQuality;
|
|
501 long dwSampleSize;
|
|
502 RECT rcFrame;
|
|
503 long dwEditCount;
|
|
504 long dwFormatChangeCount;
|
|
505 char szName[64];
|
|
506 } AVISTREAMINFOA, * LPAVISTREAMINFOA, *PAVISTREAMINFOA;
|
|
507
|
|
508 typedef struct _AVISTREAMINFOW {
|
|
509 long fccType;
|
|
510 long fccHandler;
|
|
511 long dwFlags;
|
|
512 long dwCaps;
|
|
513 short wPriority;
|
|
514 short wLanguage;
|
|
515 long dwScale;
|
|
516 long dwRate; /* dwRate / dwScale == samples/second */
|
|
517 long dwStart;
|
|
518 long dwLength; /* In units above... */
|
|
519 long dwInitialFrames;
|
|
520 long dwSuggestedBufferSize;
|
|
521 long dwQuality;
|
|
522 long dwSampleSize;
|
|
523 RECT rcFrame;
|
|
524 long dwEditCount;
|
|
525 long dwFormatChangeCount;
|
|
526 short szName[64];
|
|
527 } AVISTREAMINFOW, * LPAVISTREAMINFOW, *PAVISTREAMINFOW;
|
|
528 DECL_WINELIB_TYPE_AW(AVISTREAMINFO)
|
|
529 DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO)
|
|
530 DECL_WINELIB_TYPE_AW(PAVISTREAMINFO)
|
|
531
|
|
532 #define AVISTREAMINFO_DISABLED 0x00000001
|
|
533 #define AVISTREAMINFO_FORMATCHANGES 0x00010000
|
|
534
|
|
535 /* AVIFILEINFO.dwFlags */
|
|
536 #define AVIFILEINFO_HASINDEX 0x00000010
|
|
537 #define AVIFILEINFO_MUSTUSEINDEX 0x00000020
|
|
538 #define AVIFILEINFO_ISINTERLEAVED 0x00000100
|
|
539 #define AVIFILEINFO_WASCAPTUREFILE 0x00010000
|
|
540 #define AVIFILEINFO_COPYRIGHTED 0x00020000
|
|
541
|
|
542 /* AVIFILEINFO.dwCaps */
|
|
543 #define AVIFILECAPS_CANREAD 0x00000001
|
|
544 #define AVIFILECAPS_CANWRITE 0x00000002
|
|
545 #define AVIFILECAPS_ALLKEYFRAMES 0x00000010
|
|
546 #define AVIFILECAPS_NOCOMPRESSION 0x00000020
|
|
547
|
|
548 typedef struct _AVIFILEINFOW {
|
|
549 long dwMaxBytesPerSec;
|
|
550 long dwFlags;
|
|
551 long dwCaps;
|
|
552 long dwStreams;
|
|
553 long dwSuggestedBufferSize;
|
|
554 long dwWidth;
|
|
555 long dwHeight;
|
|
556 long dwScale;
|
|
557 long dwRate;
|
|
558 long dwLength;
|
|
559 long dwEditCount;
|
|
560 short szFileType[64];
|
|
561 } AVIFILEINFOW, * LPAVIFILEINFOW, *PAVIFILEINFOW;
|
|
562
|
|
563 typedef struct _AVIFILEINFOA {
|
|
564 long dwMaxBytesPerSec;
|
|
565 long dwFlags;
|
|
566 long dwCaps;
|
|
567 long dwStreams;
|
|
568 long dwSuggestedBufferSize;
|
|
569 long dwWidth;
|
|
570 long dwHeight;
|
|
571 long dwScale;
|
|
572 long dwRate;
|
|
573 long dwLength;
|
|
574 long dwEditCount;
|
|
575 char szFileType[64];
|
|
576 } AVIFILEINFOA, * LPAVIFILEINFOA, *PAVIFILEINFOA;
|
|
577
|
|
578 DECL_WINELIB_TYPE_AW(AVIFILEINFO)
|
|
579 DECL_WINELIB_TYPE_AW(PAVIFILEINFO)
|
|
580 DECL_WINELIB_TYPE_AW(LPAVIFILEINFO)
|
|
581
|
|
582 /* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
|
|
583 #define AVICOMPRESSF_INTERLEAVE 0x00000001
|
|
584 #define AVICOMPRESSF_DATARATE 0x00000002
|
|
585 #define AVICOMPRESSF_KEYFRAMES 0x00000004
|
|
586 #define AVICOMPRESSF_VALID 0x00000008
|
|
587
|
|
588 typedef struct {
|
|
589 long fccType; /* stream type, for consistency */
|
|
590 long fccHandler; /* compressor */
|
|
591 long dwKeyFrameEvery; /* keyframe rate */
|
|
592 long dwQuality; /* compress quality 0-10,000 */
|
|
593 long dwBytesPerSecond; /* unsigned chars per second */
|
|
594 long dwFlags; /* flags... see below */
|
|
595 void* lpFormat; /* save format */
|
|
596 long cbFormat;
|
|
597 void* lpParms; /* compressor options */
|
|
598 long cbParms;
|
|
599 long dwInterleaveEvery; /* for non-video streams only */
|
|
600 } AVICOMPRESSOPTIONS, *LPAVICOMPRESSOPTIONS,*PAVICOMPRESSOPTIONS;
|
|
601
|
|
602
|
|
603
|
|
604 typedef struct {
|
|
605 long cbSize; // set to sizeof(COMPVARS) before
|
|
606 // calling ICCompressorChoose
|
|
607 long dwFlags; // see below...
|
|
608 HIC hic; // HIC of chosen compressor
|
|
609 long fccType; // basically ICTYPE_VIDEO
|
|
610 long fccHandler; // handler of chosen compressor or
|
|
611 // "" or "DIB "
|
|
612 LPBITMAPINFO lpbiIn; // input format
|
|
613 LPBITMAPINFO lpbiOut; // output format - will compress to this
|
|
614 void* lpBitsOut;
|
|
615 void* lpBitsPrev;
|
|
616 long lFrame;
|
|
617 long lKey; // key frames how often?
|
|
618 long lDataRate; // desired data rate KB/Sec
|
|
619 long lQ; // desired quality
|
|
620 long lKeyCount;
|
|
621 void* lpState; // state of compressor
|
|
622 long cbState; // size of the state
|
|
623 } COMPVARS, *PCOMPVARS;
|
|
624
|
|
625 // FLAGS for dwFlags element of COMPVARS structure:
|
|
626
|
|
627
|
|
628 #define AVIERR_OK 0
|
|
629 #define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)
|
|
630
|
|
631 #define AVIERR_UNSUPPORTED MAKE_AVIERR(101)
|
|
632 #define AVIERR_BADFORMAT MAKE_AVIERR(102)
|
|
633 #define AVIERR_MEMORY MAKE_AVIERR(103)
|
|
634 #define AVIERR_INTERNAL MAKE_AVIERR(104)
|
|
635 #define AVIERR_BADFLAGS MAKE_AVIERR(105)
|
|
636 #define AVIERR_BADPARAM MAKE_AVIERR(106)
|
|
637 #define AVIERR_BADSIZE MAKE_AVIERR(107)
|
|
638 #define AVIERR_BADHANDLE MAKE_AVIERR(108)
|
|
639 #define AVIERR_FILEREAD MAKE_AVIERR(109)
|
|
640 #define AVIERR_FILEWRITE MAKE_AVIERR(110)
|
|
641 #define AVIERR_FILEOPEN MAKE_AVIERR(111)
|
|
642 #define AVIERR_COMPRESSOR MAKE_AVIERR(112)
|
|
643 #define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)
|
|
644 #define AVIERR_READONLY MAKE_AVIERR(114)
|
|
645 #define AVIERR_NODATA MAKE_AVIERR(115)
|
|
646 #define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)
|
|
647 #define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)
|
|
648 #define AVIERR_USERABORT MAKE_AVIERR(198)
|
|
649 #define AVIERR_ERROR MAKE_AVIERR(199)
|
|
650
|
|
651 #ifdef __cplusplus
|
|
652 }
|
|
653 #endif
|
|
654 #endif /* __WINE_VFW_H */
|