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