Mercurial > mplayer.hg
annotate loader/wine/vfw.h @ 3721:66da035c4ee2
some quick updates for the prerelease
author | gabucino |
---|---|
date | Mon, 24 Dec 2001 23:00:07 +0000 |
parents | 633a8d6e40dc |
children | ccc0fd9ff352 |
rev | line source |
---|---|
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 | |
3131 | 9 typedef struct __attribute__((__packed__)) |
1 | 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_ | |
3131 | 20 typedef struct __attribute__((__packed__)) |
1 | 21 { |
3536
633a8d6e40dc
workaround for Alpha - by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
arpi
parents:
3131
diff
changeset
|
22 int biSize; |
633a8d6e40dc
workaround for Alpha - by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
arpi
parents:
3131
diff
changeset
|
23 int biWidth; |
633a8d6e40dc
workaround for Alpha - by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
arpi
parents:
3131
diff
changeset
|
24 int biHeight; |
1 | 25 short biPlanes; |
26 short biBitCount; | |
3536
633a8d6e40dc
workaround for Alpha - by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
arpi
parents:
3131
diff
changeset
|
27 int biCompression; |
633a8d6e40dc
workaround for Alpha - by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
arpi
parents:
3131
diff
changeset
|
28 int biSizeImage; |
633a8d6e40dc
workaround for Alpha - by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
arpi
parents:
3131
diff
changeset
|
29 int biXPelsPerMeter; |
633a8d6e40dc
workaround for Alpha - by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
arpi
parents:
3131
diff
changeset
|
30 int biYPelsPerMeter; |
633a8d6e40dc
workaround for Alpha - by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
arpi
parents:
3131
diff
changeset
|
31 int biClrUsed; |
633a8d6e40dc
workaround for Alpha - by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
arpi
parents:
3131
diff
changeset
|
32 int biClrImportant; |
1 | 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); | |
1297 | 380 long VFWAPIV ICDecompressEx(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits); |
1312 | 381 long VFWAPIV ICUniversalEx(HIC hic,int command,LPBITMAPINFOHEADER lpbiFormat,LPBITMAPINFOHEADER lpbi); |
1 | 382 |
383 | |
384 #define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \ | |
385 ICSendMessage( \ | |
386 hic, ICM_DECOMPRESS_BEGIN, (long)(void*)(lpbiInput), \ | |
387 (long)(void*)(lpbiOutput) \ | |
388 ) | |
389 | |
1297 | 390 #define ICDecompressBeginEx(hic, lpbiInput, lpbiOutput) \ |
391 ICUniversalEx( \ | |
1321
2712e787f872
Remove some superfluous casts. Fixes a few compile warnings.
jkeil
parents:
1312
diff
changeset
|
392 hic, ICM_DECOMPRESSEX_BEGIN, (lpbiInput), \ |
2712e787f872
Remove some superfluous casts. Fixes a few compile warnings.
jkeil
parents:
1312
diff
changeset
|
393 (lpbiOutput) \ |
1297 | 394 ) |
395 | |
1321
2712e787f872
Remove some superfluous casts. Fixes a few compile warnings.
jkeil
parents:
1312
diff
changeset
|
396 #define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \ |
1 | 397 ICSendMessage( \ |
398 hic,ICM_DECOMPRESS_QUERY, (long)(void*)(lpbiInput), \ | |
399 (long) (void*)(lpbiOutput) \ | |
400 ) | |
401 | |
1297 | 402 #define ICDecompressQueryEx(hic, lpbiInput, lpbiOutput) \ |
403 ICUniversalEx( \ | |
1321
2712e787f872
Remove some superfluous casts. Fixes a few compile warnings.
jkeil
parents:
1312
diff
changeset
|
404 hic,ICM_DECOMPRESSEX_QUERY, (lpbiInput), \ |
2712e787f872
Remove some superfluous casts. Fixes a few compile warnings.
jkeil
parents:
1312
diff
changeset
|
405 (lpbiOutput) \ |
1297 | 406 ) |
407 | |
1 | 408 #define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \ |
409 ((long)ICSendMessage( \ | |
410 hic,ICM_DECOMPRESS_GET_FORMAT, (long)(void*)(lpbiInput), \ | |
411 (long)(void*)(lpbiOutput) \ | |
412 )) | |
413 | |
414 #define ICDecompressGetFormatSize(hic, lpbi) \ | |
415 ICDecompressGetFormat(hic, lpbi, NULL) | |
416 | |
417 #define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput) \ | |
418 ICSendMessage( \ | |
419 hic, ICM_DECOMPRESS_GET_PALETTE, (long)(void*)(lpbiInput), \ | |
420 (long)(void*)(lpbiOutput) \ | |
421 ) | |
422 | |
423 #define ICDecompressSetPalette(hic,lpbiPalette) \ | |
424 ICSendMessage( \ | |
425 hic,ICM_DECOMPRESS_SET_PALETTE, \ | |
426 (long)(void*)(lpbiPalette),0 \ | |
427 ) | |
428 | |
429 #define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0) | |
430 | |
431 | |
432 #define ICDRAW_QUERY 0x00000001L /* test for support */ | |
433 #define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */ | |
434 #define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */ | |
435 | |
436 | |
437 WIN_BOOL VFWAPI ICInfo(long fccType, long fccHandler, ICINFO * lpicinfo); | |
438 LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, long cb); | |
439 HIC VFWAPI ICOpen(long fccType, long fccHandler, UINT wMode); | |
440 HIC VFWAPI ICOpenFunction(long fccType, long fccHandler, unsigned int wMode, void* lpfnHandler); | |
441 | |
442 LRESULT VFWAPI ICClose(HIC hic); | |
443 LRESULT VFWAPI ICSendMessage(HIC hic, unsigned int msg, long dw1, long dw2); | |
444 HIC VFWAPI ICLocate(long fccType, long fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, short wFlags); | |
445 | |
1307
d8c1b0b38edc
Add prototypes to wine/loader stuff, so that we can catch __stdcall function
jkeil
parents:
1297
diff
changeset
|
446 int VFWAPI ICDoSomething(void); |
1 | 447 |
448 long VFWAPIV ICDrawBegin( | |
449 HIC hic, | |
450 long dwFlags,/* flags */ | |
451 HPALETTE hpal, /* palette to draw with */ | |
452 HWND hwnd, /* window to draw to */ | |
453 HDC hdc, /* HDC to draw to */ | |
454 INT xDst, /* destination rectangle */ | |
455 INT yDst, | |
456 INT dxDst, | |
457 INT dyDst, | |
458 LPBITMAPINFOHEADER lpbi, /* format of frame to draw */ | |
459 INT xSrc, /* source rectangle */ | |
460 INT ySrc, | |
461 INT dxSrc, | |
462 INT dySrc, | |
463 long dwRate, /* frames/second = (dwRate/dwScale) */ | |
464 long dwScale | |
465 ); | |
466 | |
467 /* as passed to ICM_DRAW_BEGIN (FIXME: correct only for Win32?) */ | |
468 typedef struct { | |
469 long dwFlags; | |
470 HPALETTE hpal; | |
471 HWND hwnd; | |
472 HDC hdc; | |
473 INT xDst; | |
474 INT yDst; | |
475 INT dxDst; | |
476 INT dyDst; | |
477 LPBITMAPINFOHEADER lpbi; | |
478 INT xSrc; | |
479 INT ySrc; | |
480 INT dxSrc; | |
481 INT dySrc; | |
482 long dwRate; | |
483 long dwScale; | |
484 } ICDRAWBEGIN; | |
485 | |
486 #define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */ | |
487 #define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */ | |
488 #define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */ | |
489 #define ICDRAW_NULLFRAME 0x10000000L /* repeat last frame */ | |
490 #define ICDRAW_NOTKEYFRAME 0x08000000L /* this frame is not a key frame */ | |
491 | |
492 typedef struct { | |
493 long dwFlags; | |
494 void* lpFormat; | |
495 void* lpData; | |
496 long cbData; | |
497 long lTime; | |
498 } ICDRAW; | |
499 | |
500 long VFWAPIV ICDraw(HIC hic,long dwFlags,void* lpFormat,void* lpData,long cbData,long lTime); | |
501 | |
502 | |
503 #define AVIGETFRAMEF_BESTDISPLAYFMT 1 | |
504 | |
505 typedef struct _AVISTREAMINFOA { | |
506 long fccType; | |
507 long fccHandler; | |
508 long dwFlags; /* AVIIF_* */ | |
509 long dwCaps; | |
510 short wPriority; | |
511 short wLanguage; | |
512 long dwScale; | |
513 long dwRate; /* dwRate / dwScale == samples/second */ | |
514 long dwStart; | |
515 long dwLength; /* In units above... */ | |
516 long dwInitialFrames; | |
517 long dwSuggestedBufferSize; | |
518 long dwQuality; | |
519 long dwSampleSize; | |
520 RECT rcFrame; | |
521 long dwEditCount; | |
522 long dwFormatChangeCount; | |
523 char szName[64]; | |
524 } AVISTREAMINFOA, * LPAVISTREAMINFOA, *PAVISTREAMINFOA; | |
525 | |
526 typedef struct _AVISTREAMINFOW { | |
527 long fccType; | |
528 long fccHandler; | |
529 long dwFlags; | |
530 long dwCaps; | |
531 short wPriority; | |
532 short wLanguage; | |
533 long dwScale; | |
534 long dwRate; /* dwRate / dwScale == samples/second */ | |
535 long dwStart; | |
536 long dwLength; /* In units above... */ | |
537 long dwInitialFrames; | |
538 long dwSuggestedBufferSize; | |
539 long dwQuality; | |
540 long dwSampleSize; | |
541 RECT rcFrame; | |
542 long dwEditCount; | |
543 long dwFormatChangeCount; | |
544 short szName[64]; | |
545 } AVISTREAMINFOW, * LPAVISTREAMINFOW, *PAVISTREAMINFOW; | |
546 DECL_WINELIB_TYPE_AW(AVISTREAMINFO) | |
547 DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO) | |
548 DECL_WINELIB_TYPE_AW(PAVISTREAMINFO) | |
549 | |
550 #define AVISTREAMINFO_DISABLED 0x00000001 | |
551 #define AVISTREAMINFO_FORMATCHANGES 0x00010000 | |
552 | |
553 /* AVIFILEINFO.dwFlags */ | |
554 #define AVIFILEINFO_HASINDEX 0x00000010 | |
555 #define AVIFILEINFO_MUSTUSEINDEX 0x00000020 | |
556 #define AVIFILEINFO_ISINTERLEAVED 0x00000100 | |
557 #define AVIFILEINFO_WASCAPTUREFILE 0x00010000 | |
558 #define AVIFILEINFO_COPYRIGHTED 0x00020000 | |
559 | |
560 /* AVIFILEINFO.dwCaps */ | |
561 #define AVIFILECAPS_CANREAD 0x00000001 | |
562 #define AVIFILECAPS_CANWRITE 0x00000002 | |
563 #define AVIFILECAPS_ALLKEYFRAMES 0x00000010 | |
564 #define AVIFILECAPS_NOCOMPRESSION 0x00000020 | |
565 | |
566 typedef struct _AVIFILEINFOW { | |
567 long dwMaxBytesPerSec; | |
568 long dwFlags; | |
569 long dwCaps; | |
570 long dwStreams; | |
571 long dwSuggestedBufferSize; | |
572 long dwWidth; | |
573 long dwHeight; | |
574 long dwScale; | |
575 long dwRate; | |
576 long dwLength; | |
577 long dwEditCount; | |
578 short szFileType[64]; | |
579 } AVIFILEINFOW, * LPAVIFILEINFOW, *PAVIFILEINFOW; | |
580 | |
581 typedef struct _AVIFILEINFOA { | |
582 long dwMaxBytesPerSec; | |
583 long dwFlags; | |
584 long dwCaps; | |
585 long dwStreams; | |
586 long dwSuggestedBufferSize; | |
587 long dwWidth; | |
588 long dwHeight; | |
589 long dwScale; | |
590 long dwRate; | |
591 long dwLength; | |
592 long dwEditCount; | |
593 char szFileType[64]; | |
594 } AVIFILEINFOA, * LPAVIFILEINFOA, *PAVIFILEINFOA; | |
595 | |
596 DECL_WINELIB_TYPE_AW(AVIFILEINFO) | |
597 DECL_WINELIB_TYPE_AW(PAVIFILEINFO) | |
598 DECL_WINELIB_TYPE_AW(LPAVIFILEINFO) | |
599 | |
600 /* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */ | |
601 #define AVICOMPRESSF_INTERLEAVE 0x00000001 | |
602 #define AVICOMPRESSF_DATARATE 0x00000002 | |
603 #define AVICOMPRESSF_KEYFRAMES 0x00000004 | |
604 #define AVICOMPRESSF_VALID 0x00000008 | |
605 | |
606 typedef struct { | |
607 long fccType; /* stream type, for consistency */ | |
608 long fccHandler; /* compressor */ | |
609 long dwKeyFrameEvery; /* keyframe rate */ | |
610 long dwQuality; /* compress quality 0-10,000 */ | |
611 long dwBytesPerSecond; /* unsigned chars per second */ | |
612 long dwFlags; /* flags... see below */ | |
613 void* lpFormat; /* save format */ | |
614 long cbFormat; | |
615 void* lpParms; /* compressor options */ | |
616 long cbParms; | |
617 long dwInterleaveEvery; /* for non-video streams only */ | |
618 } AVICOMPRESSOPTIONS, *LPAVICOMPRESSOPTIONS,*PAVICOMPRESSOPTIONS; | |
619 | |
620 | |
621 | |
622 typedef struct { | |
623 long cbSize; // set to sizeof(COMPVARS) before | |
624 // calling ICCompressorChoose | |
625 long dwFlags; // see below... | |
626 HIC hic; // HIC of chosen compressor | |
627 long fccType; // basically ICTYPE_VIDEO | |
628 long fccHandler; // handler of chosen compressor or | |
629 // "" or "DIB " | |
630 LPBITMAPINFO lpbiIn; // input format | |
631 LPBITMAPINFO lpbiOut; // output format - will compress to this | |
632 void* lpBitsOut; | |
633 void* lpBitsPrev; | |
634 long lFrame; | |
635 long lKey; // key frames how often? | |
636 long lDataRate; // desired data rate KB/Sec | |
637 long lQ; // desired quality | |
638 long lKeyCount; | |
639 void* lpState; // state of compressor | |
640 long cbState; // size of the state | |
641 } COMPVARS, *PCOMPVARS; | |
642 | |
643 // FLAGS for dwFlags element of COMPVARS structure: | |
644 | |
645 | |
646 #define AVIERR_OK 0 | |
647 #define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error) | |
648 | |
649 #define AVIERR_UNSUPPORTED MAKE_AVIERR(101) | |
650 #define AVIERR_BADFORMAT MAKE_AVIERR(102) | |
651 #define AVIERR_MEMORY MAKE_AVIERR(103) | |
652 #define AVIERR_INTERNAL MAKE_AVIERR(104) | |
653 #define AVIERR_BADFLAGS MAKE_AVIERR(105) | |
654 #define AVIERR_BADPARAM MAKE_AVIERR(106) | |
655 #define AVIERR_BADSIZE MAKE_AVIERR(107) | |
656 #define AVIERR_BADHANDLE MAKE_AVIERR(108) | |
657 #define AVIERR_FILEREAD MAKE_AVIERR(109) | |
658 #define AVIERR_FILEWRITE MAKE_AVIERR(110) | |
659 #define AVIERR_FILEOPEN MAKE_AVIERR(111) | |
660 #define AVIERR_COMPRESSOR MAKE_AVIERR(112) | |
661 #define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113) | |
662 #define AVIERR_READONLY MAKE_AVIERR(114) | |
663 #define AVIERR_NODATA MAKE_AVIERR(115) | |
664 #define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116) | |
665 #define AVIERR_CANTCOMPRESS MAKE_AVIERR(117) | |
666 #define AVIERR_USERABORT MAKE_AVIERR(198) | |
667 #define AVIERR_ERROR MAKE_AVIERR(199) | |
668 | |
669 #ifdef __cplusplus | |
670 } | |
671 #endif | |
672 #endif /* __WINE_VFW_H */ |