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