7 #include "wine/obj_base.h"
10 #define VFWAPIV WINAPIV
12 DWORD VFWAPI
VideoForWindowsVersion(void);
15 #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
16 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
17 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
21 #define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8))
24 #define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c')
25 #define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c')
27 /* Installable Compressor M? */
29 /* HIC32 struct (same layout as Win95 one) */
30 typedef struct tagWINE_HIC
{
31 DWORD magic
; /* 00: 'Smag' */
32 HANDLE curthread
; /* 04: */
34 DWORD handler
; /* 0C: */
36 DWORD
private; /* 14:(handled by SendDriverMessage32)*/
37 FARPROC driverproc
; /* 18:(handled by SendDriverMessage32)*/
38 DWORD x1
; /* 1c: name? */
44 /* error return codes */
46 #define ICERR_DONTDRAW 1
47 #define ICERR_NEWPALETTE 2
48 #define ICERR_GOTOKEYFRAME 3
49 #define ICERR_STOPDRAWING 4
51 #define ICERR_UNSUPPORTED -1
52 #define ICERR_BADFORMAT -2
53 #define ICERR_MEMORY -3
54 #define ICERR_INTERNAL -4
55 #define ICERR_BADFLAGS -5
56 #define ICERR_BADPARAM -6
57 #define ICERR_BADSIZE -7
58 #define ICERR_BADHANDLE -8
59 #define ICERR_CANTUPDATE -9
60 #define ICERR_ABORT -10
61 #define ICERR_ERROR -100
62 #define ICERR_BADBITDEPTH -200
63 #define ICERR_BADIMAGESIZE -201
65 #define ICERR_CUSTOM -400
68 #define ICM_USER (DRV_USER+0x0000)
70 /* ICM driver message range */
71 #define ICM_RESERVED_LOW (DRV_USER+0x1000)
72 #define ICM_RESERVED_HIGH (DRV_USER+0x2000)
73 #define ICM_RESERVED ICM_RESERVED_LOW
75 #define ICM_GETSTATE (ICM_RESERVED+0)
76 #define ICM_SETSTATE (ICM_RESERVED+1)
77 #define ICM_GETINFO (ICM_RESERVED+2)
79 #define ICM_CONFIGURE (ICM_RESERVED+10)
80 #define ICM_ABOUT (ICM_RESERVED+11)
83 #define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30)
84 #define ICM_GETQUALITY (ICM_RESERVED+31)
85 #define ICM_SETQUALITY (ICM_RESERVED+32)
87 #define ICM_SET (ICM_RESERVED+40)
88 #define ICM_GET (ICM_RESERVED+41)
90 /* 2 constant FOURCC codes */
91 #define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
92 #define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
94 #define ICM_COMPRESS_GET_FORMAT (ICM_USER+4)
95 #define ICM_COMPRESS_GET_SIZE (ICM_USER+5)
96 #define ICM_COMPRESS_QUERY (ICM_USER+6)
97 #define ICM_COMPRESS_BEGIN (ICM_USER+7)
98 #define ICM_COMPRESS (ICM_USER+8)
99 #define ICM_COMPRESS_END (ICM_USER+9)
101 #define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10)
102 #define ICM_DECOMPRESS_QUERY (ICM_USER+11)
103 #define ICM_DECOMPRESS_BEGIN (ICM_USER+12)
104 #define ICM_DECOMPRESS (ICM_USER+13)
105 #define ICM_DECOMPRESS_END (ICM_USER+14)
106 #define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29)
107 #define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30)
109 #define ICM_DRAW_QUERY (ICM_USER+31)
110 #define ICM_DRAW_BEGIN (ICM_USER+15)
111 #define ICM_DRAW_GET_PALETTE (ICM_USER+16)
112 #define ICM_DRAW_START (ICM_USER+18)
113 #define ICM_DRAW_STOP (ICM_USER+19)
114 #define ICM_DRAW_END (ICM_USER+21)
115 #define ICM_DRAW_GETTIME (ICM_USER+32)
116 #define ICM_DRAW (ICM_USER+33)
117 #define ICM_DRAW_WINDOW (ICM_USER+34)
118 #define ICM_DRAW_SETTIME (ICM_USER+35)
119 #define ICM_DRAW_REALIZE (ICM_USER+36)
120 #define ICM_DRAW_FLUSH (ICM_USER+37)
121 #define ICM_DRAW_RENDERBUFFER (ICM_USER+38)
123 #define ICM_DRAW_START_PLAY (ICM_USER+39)
124 #define ICM_DRAW_STOP_PLAY (ICM_USER+40)
126 #define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50)
127 #define ICM_DRAW_CHANGEPALETTE (ICM_USER+51)
129 #define ICM_GETBUFFERSWANTED (ICM_USER+41)
131 #define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42)
133 #define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60)
134 #define ICM_DECOMPRESSEX_QUERY (ICM_USER+61)
135 #define ICM_DECOMPRESSEX (ICM_USER+62)
136 #define ICM_DECOMPRESSEX_END (ICM_USER+63)
138 #define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70)
139 #define ICM_SET_STATUS_PROC (ICM_USER+72)
144 DWORD dwSize
; /* 00: size */
145 DWORD fccType
; /* 04: type 'vidc' usually */
146 DWORD fccHandler
; /* 08: */
147 DWORD dwVersion
; /* 0c: version of compman opening you */
148 DWORD dwFlags
; /* 10: LOWORD is type specific */
149 LRESULT dwError
; /* 14: */
150 LPVOID pV1Reserved
; /* 18: */
151 LPVOID pV2Reserved
; /* 1c: */
152 DWORD dnDevNode
; /* 20: */
156 #define ICCOMPRESS_KEYFRAME 0x00000001L
160 LPBITMAPINFOHEADER lpbiOutput
;
162 LPBITMAPINFOHEADER lpbiInput
;
169 LPBITMAPINFOHEADER lpbiPrev
;
173 DWORD VFWAPIV
ICCompress(
174 HIC hic
,DWORD dwFlags
,LPBITMAPINFOHEADER lpbiOutput
,LPVOID lpData
,
175 LPBITMAPINFOHEADER lpbiInput
,LPVOID lpBits
,LPDWORD lpckid
,
176 LPDWORD lpdwFlags
,LONG lFrameNum
,DWORD dwFrameSize
,DWORD dwQuality
,
177 LPBITMAPINFOHEADER lpbiPrev
,LPVOID lpPrev
180 #define ICCompressGetFormat(hic, lpbiInput, lpbiOutput) \
182 hic,ICM_COMPRESS_GET_FORMAT,(DWORD)(LPVOID)(lpbiInput), \
183 (DWORD)(LPVOID)(lpbiOutput) \
186 #define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
188 #define ICCompressBegin(hic, lpbiInput, lpbiOutput) \
190 hic, ICM_COMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
191 (DWORD)(LPVOID)(lpbiOutput) \
194 #define ICCompressGetSize(hic, lpbiInput, lpbiOutput) \
196 hic, ICM_COMPRESS_GET_SIZE, (DWORD)(LPVOID)(lpbiInput), \
197 (DWORD)(LPVOID)(lpbiOutput) \
200 #define ICCompressQuery(hic, lpbiInput, lpbiOutput) \
202 hic, ICM_COMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
203 (DWORD)(LPVOID)(lpbiOutput) \
207 #define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0)
209 /* ICCOMPRESSFRAMES.dwFlags */
210 #define ICCOMPRESSFRAMES_PADDING 0x00000001
213 LPBITMAPINFOHEADER lpbiOutput
;
215 LPBITMAPINFOHEADER lpbiInput
;
224 DWORD dwOverheadPerFrame
;
226 LONG (CALLBACK
*GetData
)(LPARAM lInput
,LONG lFrame
,LPVOID lpBits
,LONG len
);
227 LONG (CALLBACK
*PutData
)(LPARAM lOutput
,LONG lFrame
,LPVOID lpBits
,LONG len
);
230 /* Values for wMode of ICOpen() */
231 #define ICMODE_COMPRESS 1
232 #define ICMODE_DECOMPRESS 2
233 #define ICMODE_FASTDECOMPRESS 3
234 #define ICMODE_QUERY 4
235 #define ICMODE_FASTCOMPRESS 5
236 #define ICMODE_DRAW 8
239 #define ICQUALITY_LOW 0
240 #define ICQUALITY_HIGH 10000
241 #define ICQUALITY_DEFAULT -1
244 DWORD dwSize
; /* 00: */
245 DWORD fccType
; /* 04:compressor type 'vidc' 'audc' */
246 DWORD fccHandler
; /* 08:compressor sub-type 'rle ' 'jpeg' 'pcm '*/
247 DWORD dwFlags
; /* 0c:flags LOWORD is type specific */
248 DWORD dwVersion
; /* 10:version of the driver */
249 DWORD dwVersionICM
; /* 14:version of the ICM used */
251 * under Win32, the driver always returns UNICODE strings.
253 WCHAR szName
[16]; /* 18:short name */
254 WCHAR szDescription
[128]; /* 38:long name */
255 WCHAR szDriver
[128]; /* 138:driver that contains compressor*/
260 #define VIDCF_QUALITY 0x0001 /* supports quality */
261 #define VIDCF_CRUNCH 0x0002 /* supports crunching to a frame size */
262 #define VIDCF_TEMPORAL 0x0004 /* supports inter-frame compress */
263 #define VIDCF_COMPRESSFRAMES 0x0008 /* wants the compress all frames message */
264 #define VIDCF_DRAW 0x0010 /* supports drawing */
265 #define VIDCF_FASTTEMPORALC 0x0020 /* does not need prev frame on compress */
266 #define VIDCF_FASTTEMPORALD 0x0080 /* does not need prev frame on decompress */
267 #define VIDCF_QUALITYTIME 0x0040 /* supports temporal quality */
269 #define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
272 /* function shortcuts */
274 #define ICMF_ABOUT_QUERY 0x00000001
276 #define ICQueryAbout(hic) \
277 (ICSendMessage(hic,ICM_ABOUT,(DWORD)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
279 #define ICAbout(hic, hwnd) ICSendMessage(hic,ICM_ABOUT,(DWORD)(UINT)(hwnd),0)
282 #define ICMF_CONFIGURE_QUERY 0x00000001
283 #define ICQueryConfigure(hic) \
284 (ICSendMessage(hic,ICM_CONFIGURE,(DWORD)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
286 #define ICConfigure(hic,hwnd) \
287 ICSendMessage(hic,ICM_CONFIGURE,(DWORD)(UINT)(hwnd),0)
289 /* Decompression stuff */
290 #define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */
291 #define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */
292 #define ICDECOMPRESS_PREROL 0x20000000 /* this frame is before real start */
293 #define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */
294 #define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */
297 DWORD dwFlags
; /* flags (from AVI index...) */
298 LPBITMAPINFOHEADER lpbiInput
; /* BITMAPINFO of compressed data */
299 LPVOID lpInput
; /* compressed data */
300 LPBITMAPINFOHEADER lpbiOutput
; /* DIB to decompress to */
302 DWORD ckid
; /* ckid from AVI file */
307 LPBITMAPINFOHEADER lpbiSrc
;
309 LPBITMAPINFOHEADER lpbiDst
;
312 /* changed for ICM_DECOMPRESSEX */
313 INT xDst
; /* destination rectangle */
318 INT xSrc
; /* source rectangle */
324 DWORD VFWAPIV
ICDecompress(HIC hic
,DWORD dwFlags
,LPBITMAPINFOHEADER lpbiFormat
,LPVOID lpData
,LPBITMAPINFOHEADER lpbi
,LPVOID lpBits
);
327 #define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \
329 hic, ICM_DECOMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
330 (DWORD)(LPVOID)(lpbiOutput) \
333 #define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \
335 hic,ICM_DECOMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
336 (DWORD) (LPVOID)(lpbiOutput) \
339 #define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \
340 ((LONG)ICSendMessage( \
341 hic,ICM_DECOMPRESS_GET_FORMAT, (DWORD)(LPVOID)(lpbiInput), \
342 (DWORD)(LPVOID)(lpbiOutput) \
345 #define ICDecompressGetFormatSize(hic, lpbi) \
346 ICDecompressGetFormat(hic, lpbi, NULL)
348 #define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput) \
350 hic, ICM_DECOMPRESS_GET_PALETTE, (DWORD)(LPVOID)(lpbiInput), \
351 (DWORD)(LPVOID)(lpbiOutput) \
354 #define ICDecompressSetPalette(hic,lpbiPalette) \
356 hic,ICM_DECOMPRESS_SET_PALETTE, \
357 (DWORD)(LPVOID)(lpbiPalette),0 \
360 #define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)
363 #define ICDRAW_QUERY 0x00000001L /* test for support */
364 #define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */
365 #define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */
367 BOOL VFWAPI
ICInfo(DWORD fccType
, DWORD fccHandler
, ICINFO
* lpicinfo
);
368 LRESULT VFWAPI
ICGetInfo(HIC hic
,ICINFO
*picinfo
, DWORD cb
);
369 HIC VFWAPI
ICOpen(DWORD fccType
, DWORD fccHandler
, UINT wMode
);
370 LRESULT VFWAPI
ICClose(HIC hic
);
371 LRESULT VFWAPI
ICSendMessage(HIC hic
, UINT msg
, DWORD dw1
, DWORD dw2
);
372 HIC VFWAPI
ICLocate(DWORD fccType
, DWORD fccHandler
, LPBITMAPINFOHEADER lpbiIn
, LPBITMAPINFOHEADER lpbiOut
, WORD wFlags
);
374 DWORD VFWAPIV
ICDrawBegin(
376 DWORD dwFlags
,/* flags */
377 HPALETTE hpal
, /* palette to draw with */
378 HWND hwnd
, /* window to draw to */
379 HDC hdc
, /* HDC to draw to */
380 INT xDst
, /* destination rectangle */
384 LPBITMAPINFOHEADER lpbi
, /* format of frame to draw */
385 INT xSrc
, /* source rectangle */
389 DWORD dwRate
, /* frames/second = (dwRate/dwScale) */
393 /********************* AVIFILE function declarations *************************/
395 #define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's')
396 #define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's')
397 #define streamtypeMIDI mmioFOURCC('m', 'i', 'd', 's')
398 #define streamtypeTEXT mmioFOURCC('t', 'x', 't', 's')
400 /* Basic chunk types */
401 #define cktypeDIBbits aviTWOCC('d', 'b')
402 #define cktypeDIBcompressed aviTWOCC('d', 'c')
403 #define cktypePALchange aviTWOCC('p', 'c')
404 #define cktypeWAVEbytes aviTWOCC('w', 'b')
406 /* Chunk id to use for extra chunks for padding. */
407 #define ckidAVIPADDING mmioFOURCC('J', 'U', 'N', 'K')
409 /* AVIFileHdr.dwFlags */
410 #define AVIF_HASINDEX 0x00000010 /* Index at end of file? */
411 #define AVIF_MUSTUSEINDEX 0x00000020
412 #define AVIF_ISINTERLEAVED 0x00000100
413 #define AVIF_TRUSTCKTYPE 0x00000800 /* Use CKType to find key frames*/
414 #define AVIF_WASCAPTUREFILE 0x00010000
415 #define AVIF_COPYRIGHTED 0x00020000
417 #define AVI_HEADERSIZE 2048
419 typedef struct _MainAVIHeader
421 DWORD dwMicroSecPerFrame
;
422 DWORD dwMaxBytesPerSec
;
423 DWORD dwPaddingGranularity
;
426 DWORD dwInitialFrames
;
428 DWORD dwSuggestedBufferSize
;
434 /* AVIStreamHeader.dwFlags */
435 #define AVISF_DISABLED 0x00000001
436 #define AVISF_VIDEO_PALCHANGES 0x00010000
441 DWORD dwFlags
; /* AVISF_* */
444 DWORD dwInitialFrames
;
446 DWORD dwRate
; /* dwRate / dwScale == samples/second */
448 DWORD dwLength
; /* In units above... */
449 DWORD dwSuggestedBufferSize
;
452 RECT16 rcFrame
; /* word.word - word.word in file */
455 /* AVIINDEXENTRY.dwFlags */
456 #define AVIIF_LIST 0x00000001 /* chunk is a 'LIST' */
457 #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
459 #define AVIIF_NOTIME 0x00000100 /* this frame doesn't take any time */
460 #define AVIIF_COMPUSE 0x0FFF0000
462 typedef struct _AVIINDEXENTRY
{
469 typedef struct _AVIPALCHANGE
{
472 WORD wFlags
; /* pad */
473 PALETTEENTRY peNew
[1];
476 #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
478 #define AVIGETFRAMEF_BESTDISPLAYFMT 1
480 typedef struct _AVISTREAMINFOA
{
483 DWORD dwFlags
; /* AVIIF_* */
488 DWORD dwRate
; /* dwRate / dwScale == samples/second */
490 DWORD dwLength
; /* In units above... */
491 DWORD dwInitialFrames
;
492 DWORD dwSuggestedBufferSize
;
497 DWORD dwFormatChangeCount
;
499 } AVISTREAMINFOA
, * LPAVISTREAMINFOA
, *PAVISTREAMINFOA
;
501 typedef struct _AVISTREAMINFOW
{
509 DWORD dwRate
; /* dwRate / dwScale == samples/second */
511 DWORD dwLength
; /* In units above... */
512 DWORD dwInitialFrames
;
513 DWORD dwSuggestedBufferSize
;
518 DWORD dwFormatChangeCount
;
520 } AVISTREAMINFOW
, * LPAVISTREAMINFOW
, *PAVISTREAMINFOW
;
521 DECL_WINELIB_TYPE_AW(AVISTREAMINFO
)
522 DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO
)
523 DECL_WINELIB_TYPE_AW(PAVISTREAMINFO
)
525 #define AVISTREAMINFO_DISABLED 0x00000001
526 #define AVISTREAMINFO_FORMATCHANGES 0x00010000
528 /* AVIFILEINFO.dwFlags */
529 #define AVIFILEINFO_HASINDEX 0x00000010
530 #define AVIFILEINFO_MUSTUSEINDEX 0x00000020
531 #define AVIFILEINFO_ISINTERLEAVED 0x00000100
532 #define AVIFILEINFO_WASCAPTUREFILE 0x00010000
533 #define AVIFILEINFO_COPYRIGHTED 0x00020000
535 /* AVIFILEINFO.dwCaps */
536 #define AVIFILECAPS_CANREAD 0x00000001
537 #define AVIFILECAPS_CANWRITE 0x00000002
538 #define AVIFILECAPS_ALLKEYFRAMES 0x00000010
539 #define AVIFILECAPS_NOCOMPRESSION 0x00000020
541 typedef struct _AVIFILEINFOW
{
542 DWORD dwMaxBytesPerSec
;
546 DWORD dwSuggestedBufferSize
;
553 WCHAR szFileType
[64];
554 } AVIFILEINFOW
, * LPAVIFILEINFOW
, *PAVIFILEINFOW
;
555 typedef struct _AVIFILEINFOA
{
556 DWORD dwMaxBytesPerSec
;
560 DWORD dwSuggestedBufferSize
;
568 } AVIFILEINFOA
, * LPAVIFILEINFOA
, *PAVIFILEINFOA
;
569 DECL_WINELIB_TYPE_AW(AVIFILEINFO
)
570 DECL_WINELIB_TYPE_AW(PAVIFILEINFO
)
571 DECL_WINELIB_TYPE_AW(LPAVIFILEINFO
)
573 /* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
574 #define AVICOMPRESSF_INTERLEAVE 0x00000001
575 #define AVICOMPRESSF_DATARATE 0x00000002
576 #define AVICOMPRESSF_KEYFRAMES 0x00000004
577 #define AVICOMPRESSF_VALID 0x00000008
580 DWORD fccType
; /* stream type, for consistency */
581 DWORD fccHandler
; /* compressor */
582 DWORD dwKeyFrameEvery
; /* keyframe rate */
583 DWORD dwQuality
; /* compress quality 0-10,000 */
584 DWORD dwBytesPerSecond
; /* bytes per second */
585 DWORD dwFlags
; /* flags... see below */
586 LPVOID lpFormat
; /* save format */
588 LPVOID lpParms
; /* compressor options */
590 DWORD dwInterleaveEvery
; /* for non-video streams only */
591 } AVICOMPRESSOPTIONS
, *LPAVICOMPRESSOPTIONS
,*PAVICOMPRESSOPTIONS
;
595 #define DEFINE_AVIGUID(name, l, w1, w2) \
596 DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
598 DEFINE_AVIGUID(IID_IAVIFile
, 0x00020020, 0, 0);
599 DEFINE_AVIGUID(IID_IAVIStream
, 0x00020021, 0, 0);
600 DEFINE_AVIGUID(IID_IAVIStreaming
, 0x00020022, 0, 0);
601 DEFINE_AVIGUID(IID_IGetFrame
, 0x00020023, 0, 0);
602 DEFINE_AVIGUID(IID_IAVIEditStream
, 0x00020024, 0, 0);
604 DEFINE_AVIGUID(CLSID_AVIFile
, 0x00020000, 0, 0);
607 /* IAVIStream32 interface. */
608 #define ICOM_INTERFACE IAVIStream
609 typedef struct IAVIStream IAVIStream
,*PAVISTREAM
;
610 ICOM_BEGIN(IAVIStream
, IUnknown
)
611 ICOM_METHOD2(HRESULT
,Create
,LPARAM
,,LPARAM
,);
612 ICOM_METHOD2(HRESULT
,Info
,AVISTREAMINFOW
*,,LONG
,);
613 ICOM_METHOD2(LONG
,FindSample
,LONG
,,LONG
,);
614 ICOM_METHOD3(HRESULT
,ReadFormat
,LONG
,,LPVOID
,,LONG
*,);
615 ICOM_METHOD3(HRESULT
,SetFormat
,LONG
,,LPVOID
,,LONG
,);
616 ICOM_METHOD6(HRESULT
,Read
,LONG
,,LONG
,,LPVOID
,,LONG
,,LONG
*,,LONG
*,);
617 ICOM_METHOD7(HRESULT
,Write
,LONG
,,LONG
,,LPVOID
,,LONG
,,DWORD
,,LONG
*,,LONG
*,);
618 ICOM_METHOD2(HRESULT
,Delete
,LONG
,,LONG
,);
619 ICOM_METHOD3(HRESULT
,ReadData
,DWORD
,,LPVOID
,,LONG
*,);
620 ICOM_METHOD3(HRESULT
,WriteData
,DWORD
,,LPVOID
,,LONG
,);
621 ICOM_METHOD2(HRESULT
,SetInfo
,AVISTREAMINFOW
*,,LONG
,);
623 #undef ICOM_INTERFACE
626 /* IAVIFile32 interface. In Win32 this interface uses UNICODE only */
627 #define ICOM_INTERFACE IAVIFile
628 typedef struct IAVIFile IAVIFile
,*PAVIFILE
;
629 ICOM_BEGIN(IAVIFile
,IUnknown
)
630 ICOM_METHOD2(HRESULT
,Info
,AVIFILEINFOW
*,,LONG
,);
631 ICOM_METHOD3(HRESULT
,GetStream
,PAVISTREAM
*,,DWORD
,,LONG
,);
632 ICOM_METHOD2(HRESULT
,CreateStream
,PAVISTREAM
*,,AVISTREAMINFOW
*,);
633 ICOM_METHOD3(HRESULT
,WriteData
,DWORD
,,LPVOID
,,LONG
,);
634 ICOM_METHOD3(HRESULT
,ReadData
,DWORD
,,LPVOID
,,LONG
*,);
635 ICOM_METHOD (HRESULT
,EndRecord
);
636 ICOM_METHOD2(HRESULT
,DeleteStream
,DWORD
,,LONG
,);
638 #undef ICOM_INTERFACE
641 /* IGetFrame32 interface */
642 #define ICOM_INTERFACE IGetFrame
643 typedef struct IGetFrame IGetFrame
,*PGETFRAME
;
644 ICOM_BEGIN(IGetFrame
,IUnknown
)
645 ICOM_METHOD1(LPVOID
,GetFrame
,LONG
,);
646 ICOM_METHOD3(HRESULT
,Begin
,LONG
,,LONG
,,LONG
,);
647 ICOM_METHOD (HRESULT
,End
);
648 ICOM_METHOD6(HRESULT
,SetFormat
,LPBITMAPINFOHEADER
,,LPVOID
,,INT
,,INT
,,INT
,,INT
,);
650 #undef ICOM_INTERFACE
654 #define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)
656 #define AVIERR_UNSUPPORTED MAKE_AVIERR(101)
657 #define AVIERR_BADFORMAT MAKE_AVIERR(102)
658 #define AVIERR_MEMORY MAKE_AVIERR(103)
659 #define AVIERR_INTERNAL MAKE_AVIERR(104)
660 #define AVIERR_BADFLAGS MAKE_AVIERR(105)
661 #define AVIERR_BADPARAM MAKE_AVIERR(106)
662 #define AVIERR_BADSIZE MAKE_AVIERR(107)
663 #define AVIERR_BADHANDLE MAKE_AVIERR(108)
664 #define AVIERR_FILEREAD MAKE_AVIERR(109)
665 #define AVIERR_FILEWRITE MAKE_AVIERR(110)
666 #define AVIERR_FILEOPEN MAKE_AVIERR(111)
667 #define AVIERR_COMPRESSOR MAKE_AVIERR(112)
668 #define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)
669 #define AVIERR_READONLY MAKE_AVIERR(114)
670 #define AVIERR_NODATA MAKE_AVIERR(115)
671 #define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)
672 #define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)
673 #define AVIERR_USERABORT MAKE_AVIERR(198)
674 #define AVIERR_ERROR MAKE_AVIERR(199)
676 HRESULT WINAPI
AVIMakeCompressedStream(PAVISTREAM
*ppsCompressed
,PAVISTREAM ppsSource
,AVICOMPRESSOPTIONS
*lpOptions
,CLSID
*pclsidHandler
);
677 #define AVIMakeCompressedStream WINELIB_NAME_AW(AVIMakeCompressedStream)
678 HRESULT WINAPI
AVIStreamSetFormat(PAVISTREAM iface
,LONG pos
,LPVOID format
,LONG formatsize
);
679 HRESULT WINAPI
AVIStreamWrite(PAVISTREAM iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,DWORD flags
,LONG
*sampwritten
,LONG
*byteswritten
);
680 ULONG WINAPI
AVIStreamRelease(PAVISTREAM iface
);
681 LONG WINAPI
AVIStreamStart(PAVISTREAM iface
);
682 LONG WINAPI
AVIStreamLength(PAVISTREAM iface
);
683 HRESULT WINAPI
AVIStreamReadFormat(PAVISTREAM iface
,LONG pos
,LPVOID format
,LONG
*formatsize
);
684 HRESULT WINAPI
AVIStreamWrite(PAVISTREAM iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,DWORD flags
,LONG
*sampwritten
,LONG
*byteswritten
);
685 HRESULT WINAPI
AVIStreamRead(PAVISTREAM iface
,LONG start
,LONG samples
,LPVOID buffer
,LONG buffersize
,LONG
*bytesread
,LONG
*samplesread
);
686 HRESULT WINAPI
AVIStreamWriteData(PAVISTREAM iface
,DWORD fcc
,LPVOID lp
,LONG size
);
687 HRESULT WINAPI
AVIStreamReadData(PAVISTREAM iface
,DWORD fcc
,LPVOID lp
,LONG
*lpread
);
688 HRESULT WINAPI
AVIStreamInfoA(PAVISTREAM iface
,AVISTREAMINFOA
*asi
,LONG size
);
689 HRESULT WINAPI
AVIStreamInfoW(PAVISTREAM iface
,AVISTREAMINFOW
*asi
,LONG size
);
690 #define AVIStreamInfo WINELIB_NAME_AW(AVIStreamInfo)
691 PGETFRAME WINAPI
AVIStreamGetFrameOpen(PAVISTREAM pavi
,LPBITMAPINFOHEADER lpbiWanted
);
692 HRESULT WINAPI
AVIStreamGetFrameClose(PGETFRAME pg
);
693 PGETFRAME WINAPI
AVIStreamGetFrameOpen(PAVISTREAM pavi
,LPBITMAPINFOHEADER lpbiWanted
);
694 LPVOID WINAPI
AVIStreamGetFrame(PGETFRAME pg
,LONG pos
);
696 void WINAPI
AVIFileInit(void);
697 HRESULT WINAPI
AVIFileOpenA(PAVIFILE
* ppfile
,LPCSTR szFile
,UINT uMode
,LPCLSID lpHandler
);
698 #define AVIFileOpen WINELIB_NAME_AW(AVIFileOpen)
699 HRESULT WINAPI
AVIFileCreateStreamA(PAVIFILE pfile
,PAVISTREAM
*ppavi
,AVISTREAMINFOA
* psi
);
700 HRESULT WINAPI
AVIFileCreateStreamW(PAVIFILE pfile
,PAVISTREAM
*ppavi
,AVISTREAMINFOW
* psi
);
701 #define AVIFileCreateStream WINELIB_NAME_AW(AVIFileCreateStream)
702 ULONG WINAPI
AVIFileRelease(PAVIFILE iface
);
703 HRESULT WINAPI
AVIFileInfoA(PAVIFILE pfile
,PAVIFILEINFOA
,LONG
);
704 HRESULT WINAPI
AVIFileInfoW(PAVIFILE pfile
,PAVIFILEINFOW
,LONG
);
705 #define AVIFileInfo WINELIB_NAME_AW(AVIFileInfo)
706 HRESULT WINAPI
AVIFileGetStream(PAVIFILE pfile
,PAVISTREAM
*avis
,DWORD fccType
,LONG lParam
);
707 void WINAPI
AVIFileExit(void);