2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 #define VFWAPIV WINAPIV
31 #endif /* __cplusplus */
33 typedef HANDLE HDRAWDIB
;
35 /*****************************************************************************
36 * Predeclare the interfaces
38 typedef struct IAVIStream
*PAVISTREAM
;
39 typedef struct IAVIFile
*PAVIFILE
;
40 typedef struct IGetFrame
*PGETFRAME
;
41 typedef struct IAVIEditStream
*PAVIEDITSTREAM
;
43 /* Installable Compressor Manager */
45 #define ICVERSION 0x0104
49 /* error return codes */
51 #define ICERR_DONTDRAW 1
52 #define ICERR_NEWPALETTE 2
53 #define ICERR_GOTOKEYFRAME 3
54 #define ICERR_STOPDRAWING 4
56 #define ICERR_UNSUPPORTED -1
57 #define ICERR_BADFORMAT -2
58 #define ICERR_MEMORY -3
59 #define ICERR_INTERNAL -4
60 #define ICERR_BADFLAGS -5
61 #define ICERR_BADPARAM -6
62 #define ICERR_BADSIZE -7
63 #define ICERR_BADHANDLE -8
64 #define ICERR_CANTUPDATE -9
65 #define ICERR_ABORT -10
66 #define ICERR_ERROR -100
67 #define ICERR_BADBITDEPTH -200
68 #define ICERR_BADIMAGESIZE -201
70 #define ICERR_CUSTOM -400
73 #define ICM_USER (DRV_USER+0x0000)
75 /* ICM driver message range */
76 #define ICM_RESERVED_LOW (DRV_USER+0x1000)
77 #define ICM_RESERVED_HIGH (DRV_USER+0x2000)
78 #define ICM_RESERVED ICM_RESERVED_LOW
80 #define ICM_GETSTATE (ICM_RESERVED+0)
81 #define ICM_SETSTATE (ICM_RESERVED+1)
82 #define ICM_GETINFO (ICM_RESERVED+2)
84 #define ICM_CONFIGURE (ICM_RESERVED+10)
85 #define ICM_ABOUT (ICM_RESERVED+11)
88 #define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30)
89 #define ICM_GETQUALITY (ICM_RESERVED+31)
90 #define ICM_SETQUALITY (ICM_RESERVED+32)
92 #define ICM_SET (ICM_RESERVED+40)
93 #define ICM_GET (ICM_RESERVED+41)
95 /* 2 constant FOURCC codes */
96 #define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
97 #define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
99 #define ICM_COMPRESS_GET_FORMAT (ICM_USER+4)
100 #define ICM_COMPRESS_GET_SIZE (ICM_USER+5)
101 #define ICM_COMPRESS_QUERY (ICM_USER+6)
102 #define ICM_COMPRESS_BEGIN (ICM_USER+7)
103 #define ICM_COMPRESS (ICM_USER+8)
104 #define ICM_COMPRESS_END (ICM_USER+9)
106 #define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10)
107 #define ICM_DECOMPRESS_QUERY (ICM_USER+11)
108 #define ICM_DECOMPRESS_BEGIN (ICM_USER+12)
109 #define ICM_DECOMPRESS (ICM_USER+13)
110 #define ICM_DECOMPRESS_END (ICM_USER+14)
111 #define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29)
112 #define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30)
114 #define ICM_DRAW_QUERY (ICM_USER+31)
115 #define ICM_DRAW_BEGIN (ICM_USER+15)
116 #define ICM_DRAW_GET_PALETTE (ICM_USER+16)
117 #define ICM_DRAW_START (ICM_USER+18)
118 #define ICM_DRAW_STOP (ICM_USER+19)
119 #define ICM_DRAW_END (ICM_USER+21)
120 #define ICM_DRAW_GETTIME (ICM_USER+32)
121 #define ICM_DRAW (ICM_USER+33)
122 #define ICM_DRAW_WINDOW (ICM_USER+34)
123 #define ICM_DRAW_SETTIME (ICM_USER+35)
124 #define ICM_DRAW_REALIZE (ICM_USER+36)
125 #define ICM_DRAW_FLUSH (ICM_USER+37)
126 #define ICM_DRAW_RENDERBUFFER (ICM_USER+38)
128 #define ICM_DRAW_START_PLAY (ICM_USER+39)
129 #define ICM_DRAW_STOP_PLAY (ICM_USER+40)
131 #define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50)
132 #define ICM_DRAW_CHANGEPALETTE (ICM_USER+51)
134 #define ICM_GETBUFFERSWANTED (ICM_USER+41)
136 #define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42)
138 #define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60)
139 #define ICM_DECOMPRESSEX_QUERY (ICM_USER+61)
140 #define ICM_DECOMPRESSEX (ICM_USER+62)
141 #define ICM_DECOMPRESSEX_END (ICM_USER+63)
143 #define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70)
144 #define ICM_SET_STATUS_PROC (ICM_USER+72)
147 #define comptypeDIB mmioFOURCC('D','I','B',' ')
152 /* NOTE: Only the 16 bit structs are packed. Structs that are packed anyway
153 * have not been changed. If a structure is later extended, you may need to create
154 * two versions of it.
158 DWORD dwSize
; /* 00: size */
159 DWORD fccType
; /* 04: type 'vidc' usually */
160 DWORD fccHandler
; /* 08: */
161 DWORD dwVersion
; /* 0c: version of compman opening you */
162 DWORD dwFlags
; /* 10: LOWORD is type specific */
163 LRESULT dwError
; /* 14: */
164 LPVOID pV1Reserved
; /* 18: */
165 LPVOID pV2Reserved
; /* 1c: */
166 DWORD dnDevNode
; /* 20: */
170 #define ICCOMPRESS_KEYFRAME 0x00000001L
174 LPBITMAPINFOHEADER lpbiOutput
;
175 _Field_size_bytes_(lpbiOutput
->biSizeImage
) LPVOID lpOutput
;
176 LPBITMAPINFOHEADER lpbiInput
;
177 _Field_size_bytes_(lpbiInput
->biSizeImage
) LPVOID lpInput
;
183 LPBITMAPINFOHEADER lpbiPrev
;
184 _Field_size_bytes_(lpbiPrev
->biSizeImage
) LPVOID lpPrev
;
192 _In_ LPBITMAPINFOHEADER lpbiOutput
,
193 _Out_writes_bytes_(lpbiOutput
->biSizeImage
) LPVOID lpData
,
194 _In_ LPBITMAPINFOHEADER lpbiInput
,
195 _In_reads_bytes_(lpbiInput
->biSizeImage
) LPVOID lpBits
,
196 _Out_opt_ LPDWORD lpckid
,
197 _Out_opt_ LPDWORD lpdwFlags
,
199 _In_ DWORD dwFrameSize
,
200 _In_ DWORD dwQuality
,
201 _In_opt_ LPBITMAPINFOHEADER lpbiPrev
,
202 _In_reads_bytes_opt_(lpbiPrev
->biSizeImage
) LPVOID lpPrev
);
204 #define ICCompressGetFormat(hic, lpbiInput, lpbiOutput) \
206 hic,ICM_COMPRESS_GET_FORMAT,(DWORD_PTR)(LPVOID)(lpbiInput), \
207 (DWORD_PTR)(LPVOID)(lpbiOutput) \
210 #define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
212 #define ICCompressBegin(hic, lpbiInput, lpbiOutput) \
214 hic, ICM_COMPRESS_BEGIN, (DWORD_PTR)(LPVOID)(lpbiInput), \
215 (DWORD_PTR)(LPVOID)(lpbiOutput) \
218 #define ICCompressGetSize(hic, lpbiInput, lpbiOutput) \
220 hic, ICM_COMPRESS_GET_SIZE, (DWORD_PTR)(LPVOID)(lpbiInput), \
221 (DWORD_PTR)(LPVOID)(lpbiOutput) \
224 #define ICCompressQuery(hic, lpbiInput, lpbiOutput) \
226 hic, ICM_COMPRESS_QUERY, (DWORD_PTR)(LPVOID)(lpbiInput), \
227 (DWORD_PTR)(LPVOID)(lpbiOutput) \
230 #define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0)
232 /* ICCOMPRESSFRAMES.dwFlags */
233 #define ICCOMPRESSFRAMES_PADDING 0x00000001
236 LPBITMAPINFOHEADER lpbiOutput
;
238 LPBITMAPINFOHEADER lpbiInput
;
247 DWORD dwOverheadPerFrame
;
249 LONG (CALLBACK
*GetData
)(_In_ LPARAM lInput
, _In_ LONG lFrame
, _Out_writes_bytes_(len
) LPVOID lpBits
, _In_ LONG len
);
250 LONG (CALLBACK
*PutData
)(_In_ LPARAM lOutput
, _In_ LONG lFrame
, _In_reads_bytes_(len
) LPVOID lpBits
, _In_ LONG len
);
256 /* messages for Status callback */
257 #define ICSTATUS_START 0
258 #define ICSTATUS_STATUS 1
259 #define ICSTATUS_END 2
260 #define ICSTATUS_ERROR 3
261 #define ICSTATUS_YIELD 4
262 /* FIXME: some X11 libs define Status as int... */
263 /* LONG (CALLBACK *zStatus)(LPARAM lParam, UINT message, LONG l); */
264 LONG (CALLBACK
*zStatus
)(LPARAM lParam
, UINT message
, LONG l
);
267 /* Values for wMode of ICOpen() */
268 #define ICMODE_COMPRESS 1
269 #define ICMODE_DECOMPRESS 2
270 #define ICMODE_FASTDECOMPRESS 3
271 #define ICMODE_QUERY 4
272 #define ICMODE_FASTCOMPRESS 5
273 #define ICMODE_DRAW 8
276 #define ICQUALITY_LOW 0
277 #define ICQUALITY_HIGH 10000
278 #define ICQUALITY_DEFAULT -1
281 DWORD dwSize
; /* 00: */
282 DWORD fccType
; /* 04:compressor type 'vidc' 'audc' */
283 DWORD fccHandler
; /* 08:compressor sub-type 'rle ' 'jpeg' 'pcm '*/
284 DWORD dwFlags
; /* 0c:flags LOWORD is type specific */
285 DWORD dwVersion
; /* 10:version of the driver */
286 DWORD dwVersionICM
; /* 14:version of the ICM used */
288 * under Win32, the driver always returns UNICODE strings.
290 WCHAR szName
[16]; /* 18:short name */
291 WCHAR szDescription
[128]; /* 38:long name */
292 WCHAR szDriver
[128]; /* 138:driver that contains compressor*/
297 #define VIDCF_QUALITY 0x0001 /* supports quality */
298 #define VIDCF_CRUNCH 0x0002 /* supports crunching to a frame size */
299 #define VIDCF_TEMPORAL 0x0004 /* supports inter-frame compress */
300 #define VIDCF_COMPRESSFRAMES 0x0008 /* wants the compress all frames message */
301 #define VIDCF_DRAW 0x0010 /* supports drawing */
302 #define VIDCF_FASTTEMPORALC 0x0020 /* does not need prev frame on compress */
303 #define VIDCF_FASTTEMPORALD 0x0080 /* does not need prev frame on decompress */
304 #define VIDCF_QUALITYTIME 0x0040 /* supports temporal quality */
306 #define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
309 /* function shortcuts */
311 #define ICMF_ABOUT_QUERY 0x00000001
313 #define ICQueryAbout(hic) \
314 (ICSendMessage(hic,ICM_ABOUT,(DWORD_PTR)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
316 #define ICAbout(hic, hwnd) ICSendMessage(hic,ICM_ABOUT,(DWORD_PTR)(UINT_PTR)(hwnd),0)
319 #define ICMF_CONFIGURE_QUERY 0x00000001
320 #define ICQueryConfigure(hic) \
321 (ICSendMessage(hic,ICM_CONFIGURE,(DWORD_PTR)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
323 #define ICConfigure(hic,hwnd) \
324 ICSendMessage(hic,ICM_CONFIGURE,(DWORD_PTR)(UINT_PTR)(hwnd),0)
326 /* Decompression stuff */
327 #define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */
328 #define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */
329 #define ICDECOMPRESS_PREROLL 0x20000000 /* this frame is before real start */
330 #define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */
331 #define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */
334 DWORD dwFlags
; /* flags (from AVI index...) */
335 LPBITMAPINFOHEADER lpbiInput
; /* BITMAPINFO of compressed data */
336 _Field_size_bytes_(lpbiInput
->biSizeImage
) LPVOID lpInput
; /* compressed data */
337 LPBITMAPINFOHEADER lpbiOutput
; /* DIB to decompress to */
338 _Field_size_bytes_(lpbiOutput
->biSizeImage
) LPVOID lpOutput
;
339 DWORD ckid
; /* ckid from AVI file */
344 LPBITMAPINFOHEADER lpbiSrc
;
346 LPBITMAPINFOHEADER lpbiDst
;
349 /* changed for ICM_DECOMPRESSEX */
350 INT xDst
; /* destination rectangle */
355 INT xSrc
; /* source rectangle */
366 _In_ LPBITMAPINFOHEADER lpbiFormat
,
367 _In_reads_bytes_(lpbiFormat
->biSizeImage
) LPVOID lpData
,
368 _In_ LPBITMAPINFOHEADER lpbi
,
369 _Out_writes_bytes_(lpbi
->biSizeImage
) LPVOID lpBits
);
371 #define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \
373 hic, ICM_DECOMPRESS_BEGIN, (DWORD_PTR)(LPVOID)(lpbiInput), \
374 (DWORD_PTR)(LPVOID)(lpbiOutput) \
377 #define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \
379 hic,ICM_DECOMPRESS_QUERY, (DWORD_PTR)(LPVOID)(lpbiInput), \
380 (DWORD_PTR) (LPVOID)(lpbiOutput) \
383 #define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \
384 ((LONG)ICSendMessage( \
385 hic,ICM_DECOMPRESS_GET_FORMAT, (DWORD_PTR)(LPVOID)(lpbiInput), \
386 (DWORD_PTR)(LPVOID)(lpbiOutput) \
389 #define ICDecompressGetFormatSize(hic, lpbi) \
390 ICDecompressGetFormat(hic, lpbi, NULL)
392 #define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput) \
394 hic, ICM_DECOMPRESS_GET_PALETTE, (DWORD_PTR)(LPVOID)(lpbiInput), \
395 (DWORD_PTR)(LPVOID)(lpbiOutput) \
398 #define ICDecompressSetPalette(hic,lpbiPalette) \
400 hic,ICM_DECOMPRESS_SET_PALETTE, \
401 (DWORD_PTR)(LPVOID)(lpbiPalette),0 \
404 #define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)
417 ICDecompressEx(_In_ HIC hic
,
419 _In_ LPBITMAPINFOHEADER lpbiSrc
,
420 _In_reads_bytes_(lpbiSrc
->biSizeImage
) LPVOID lpSrc
,
425 _In_ LPBITMAPINFOHEADER lpbiDst
,
426 _Out_writes_bytes_(lpbiDst
->biSizeImage
) LPVOID lpDst
,
434 ic
.dwFlags
= dwFlags
;
435 ic
.lpbiSrc
= lpbiSrc
;
441 ic
.lpbiDst
= lpbiDst
;
447 return ICSendMessage(hic
, ICM_DECOMPRESSEX
, (DWORD_PTR
)&ic
, sizeof(ic
));
453 ICDecompressExBegin(_In_ HIC hic
,
455 _In_ LPBITMAPINFOHEADER lpbiSrc
,
456 _In_opt_ LPVOID lpSrc
,
461 _In_ LPBITMAPINFOHEADER lpbiDst
,
462 _Out_opt_ LPVOID lpDst
,
470 ic
.dwFlags
= dwFlags
;
471 ic
.lpbiSrc
= lpbiSrc
;
477 ic
.lpbiDst
= lpbiDst
;
483 return ICSendMessage(hic
, ICM_DECOMPRESSEX_BEGIN
, (DWORD_PTR
)&ic
, sizeof(ic
));
489 ICDecompressExQuery(_In_ HIC hic
,
491 _In_ LPBITMAPINFOHEADER lpbiSrc
,
492 _Reserved_ LPVOID lpSrc
,
497 _In_opt_ LPBITMAPINFOHEADER lpbiDst
,
498 _Out_opt_ LPVOID lpDst
,
506 ic
.dwFlags
= dwFlags
;
507 ic
.lpbiSrc
= lpbiSrc
;
513 ic
.lpbiDst
= lpbiDst
;
519 return ICSendMessage(hic
, ICM_DECOMPRESSEX_QUERY
, (DWORD_PTR
)&ic
, sizeof(ic
));
522 #define ICDecompressExEnd(hic) \
523 ICSendMessage(hic, ICM_DECOMPRESSEX_END, 0, 0)
525 #define ICDRAW_QUERY 0x00000001L /* test for support */
526 #define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */
527 #define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */
528 #define ICDRAW_ANIMATE 0x00000008L /* expect palette animation */
529 #define ICDRAW_CONTINUE 0x00000010L /* draw is a continuation of previous draw */
530 #define ICDRAW_MEMORYDC 0x00000020L /* DC is offscreen, by the way */
531 #define ICDRAW_UPDATING 0x00000040L /* We're updating, as opposed to playing */
532 #define ICDRAW_RENDER 0x00000080L /* used to render data not draw it */
533 #define ICDRAW_BUFFER 0x00000100L /* buffer data offscreen, we will need to update it */
535 #define ICDecompressOpen(fccType, fccHandler, lpbiIn, lpbiOut) \
536 ICLocate(fccType, fccHandler, lpbiIn, lpbiOut, ICMODE_DECOMPRESS)
538 #define ICDrawOpen(fccType, fccHandler, lpbiIn) \
539 ICLocate(fccType, fccHandler, lpbiIn, NULL, ICMODE_DRAW)
546 _In_ LPBITMAPINFO lpbiIn
,
548 _In_opt_ LPBITMAPINFO lpbiOut
,
550 _Inout_opt_ LONG
* plSize
);
557 _In_ LPBITMAPINFO lpbiIn
,
559 _In_opt_ LPBITMAPINFO lpbiOut
);
565 _In_ DWORD fccHandler
,
566 _Out_ ICINFO
* lpicinfo
);
572 _In_ DWORD fccHandler
,
581 _In_ DWORD fccHandler
,
584 _Success_(return != 0)
589 _Out_writes_bytes_to_(cb
, return) ICINFO
*picinfo
,
592 HIC VFWAPI
ICOpen(_In_ DWORD fccType
, _In_ DWORD fccHandler
, _In_ UINT wMode
);
598 _In_ DWORD fccHandler
,
600 _In_ DRIVERPROC lpfnHandler
);
602 LRESULT VFWAPI
ICClose(_In_ HIC hic
);
608 _In_ DWORD fccHandler
,
609 _In_ LPBITMAPINFOHEADER lpbiIn
,
610 _In_opt_ LPBITMAPINFOHEADER lpbiOut
,
617 _In_ LPBITMAPINFOHEADER lpbiIn
,
618 _Out_ LPBITMAPINFOHEADER lpbiOut
,
623 /* Values for wFlags of ICInstall() */
624 #define ICINSTALL_UNICODE 0x8000
625 #define ICINSTALL_FUNCTION 0x0001
626 #define ICINSTALL_DRIVER 0x0002
627 #define ICINSTALL_HDRV 0x0004
628 #define ICINSTALL_DRIVERW 0x8002
630 #define ICGetState(hic, pv, cb) \
631 ICSendMessage(hic, ICM_GETSTATE, (DWORD_PTR)(LPVOID)(pv), (DWORD_PTR)(cb))
632 #define ICSetState(hic, pv, cb) \
633 ICSendMessage(hic, ICM_SETSTATE, (DWORD_PTR)(LPVOID)(pv), (DWORD_PTR)(cb))
634 #define ICGetStateSize(hic) \
635 ICGetState(hic, NULL, 0)
637 static inline DWORD
ICGetDefaultQuality(HIC hic
)
640 ICSendMessage(hic
, ICM_GETDEFAULTQUALITY
, (DWORD_PTR
)(LPVOID
)&dwICValue
, sizeof(DWORD
));
644 static inline DWORD
ICGetDefaultKeyFrameRate(HIC hic
)
647 ICSendMessage(hic
, ICM_GETDEFAULTKEYFRAMERATE
, (DWORD_PTR
)(LPVOID
)&dwICValue
, sizeof(DWORD
));
651 #define ICDrawWindow(hic, prc) \
652 ICSendMessage(hic, ICM_DRAW_WINDOW, (DWORD_PTR)(LPVOID)(prc), sizeof(RECT))
654 /* As passed to ICM_DRAW_SUGGESTFORMAT */
657 LPBITMAPINFOHEADER lpbiIn
;
658 LPBITMAPINFOHEADER lpbiSuggest
;
678 _In_opt_ HPALETTE hpal
,
685 _In_ LPBITMAPINFOHEADER lpbi
,
693 /* as passed to ICM_DRAW_BEGIN */
703 LPBITMAPINFOHEADER lpbi
;
712 #define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */
713 #define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */
714 #define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */
715 #define ICDRAW_NULLFRAME 0x10000000L /* repeat last frame */
716 #define ICDRAW_NOTKEYFRAME 0x08000000L /* this frame is not a key frame */
731 _In_ LPVOID lpFormat
,
732 _In_reads_bytes_opt_(cbData
) LPVOID lpData
,
739 ICDrawSuggestFormat(_In_ HIC hic
,
740 _In_ LPBITMAPINFOHEADER lpbiIn
,
741 _Out_ LPBITMAPINFOHEADER lpbiOut
,
751 ic
.lpbiSuggest
= lpbiOut
;
756 ic
.hicDecompressor
= hicDecomp
;
757 return ICSendMessage(hic
, ICM_DRAW_SUGGESTFORMAT
, (DWORD_PTR
)&ic
, sizeof(ic
));
760 #define ICDrawQuery(hic, lpbiInput) \
761 ICSendMessage(hic, ICM_DRAW_QUERY, (DWORD_PTR)(LPVOID)(lpbiInput), 0L)
763 #define ICDrawChangePalette(hic, lpbiInput) \
764 ICSendMessage(hic, ICM_DRAW_CHANGEPALETTE, (DWORD_PTR)(LPVOID)(lpbiInput), 0L)
766 #define ICGetBuffersWanted(hic, lpdwBuffers) \
767 ICSendMessage(hic, ICM_GETBUFFERSWANTED, (DWORD_PTR)(LPVOID)(lpdwBuffers), 0)
769 #define ICDrawEnd(hic) \
770 ICSendMessage(hic, ICM_DRAW_END, 0, 0)
772 #define ICDrawStart(hic) \
773 ICSendMessage(hic, ICM_DRAW_START, 0, 0)
775 #define ICDrawStartPlay(hic, lFrom, lTo) \
776 ICSendMessage(hic, ICM_DRAW_START_PLAY, (DWORD_PTR)(lFrom), (DWORD_PTR)(lTo))
778 #define ICDrawStop(hic) \
779 ICSendMessage(hic, ICM_DRAW_STOP, 0, 0)
781 #define ICDrawStopPlay(hic) \
782 ICSendMessage(hic, ICM_DRAW_STOP_PLAY, 0, 0)
784 #define ICDrawGetTime(hic, lplTime) \
785 ICSendMessage(hic, ICM_DRAW_GETTIME, (DWORD_PTR)(LPVOID)(lplTime), 0)
787 #define ICDrawSetTime(hic, lTime) \
788 ICSendMessage(hic, ICM_DRAW_SETTIME, (DWORD_PTR)lTime, 0)
790 #define ICDrawRealize(hic, hdc, fBackground) \
791 ICSendMessage(hic, ICM_DRAW_REALIZE, (DWORD_PTR)(UINT_PTR)(HDC)(hdc), (DWORD_PTR)(BOOL)(fBackground))
793 #define ICDrawFlush(hic) \
794 ICSendMessage(hic, ICM_DRAW_FLUSH, 0, 0)
796 #define ICDrawRenderBuffer(hic) \
797 ICSendMessage(hic, ICM_DRAW_RENDERBUFFER, 0, 0)
802 ICSetStatusProc(_In_ HIC hic
,
805 _In_
LONG(CALLBACK
*fpfnStatus
)(_In_ LPARAM
, _In_ UINT
, _In_ LONG
))
809 ic
.dwFlags
= dwFlags
;
811 /* FIXME: see comment in ICSETSTATUSPROC definition */
812 ic
.zStatus
= fpfnStatus
;
814 return ICSendMessage(hic
, ICM_SET_STATUS_PROC
, (DWORD_PTR
)&ic
, sizeof(ic
));
824 LPBITMAPINFO lpbiOut
;
834 } COMPVARS
, *PCOMPVARS
;
836 #define ICMF_COMPVARS_VALID 0x00000001
843 _In_opt_ LPVOID pvIn
,
844 _In_opt_ LPVOID lpData
,
845 _Inout_ PCOMPVARS pc
,
846 _In_opt_ LPSTR lpszTitle
);
848 #define ICMF_CHOOSE_KEYFRAME 0x0001
849 #define ICMF_CHOOSE_DATARATE 0x0002
850 #define ICMF_CHOOSE_PREVIEW 0x0004
851 #define ICMF_CHOOSE_ALLCOMPRESSORS 0x0008
855 ICSeqCompressFrameStart(
857 _In_ LPBITMAPINFO lpbiIn
);
859 void VFWAPI
ICSeqCompressFrameEnd(_In_ PCOMPVARS pc
);
865 _Reserved_ UINT uiFlags
,
868 _Inout_opt_ LONG
*plSize
);
870 void VFWAPI
ICCompressorFree(_In_ PCOMPVARS pc
);
872 /********************* AVIFILE function declarations *************************/
875 #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
876 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
877 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
881 #define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8))
886 #define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c')
887 #define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c')
889 #define formtypeAVI mmioFOURCC('A', 'V', 'I', ' ')
890 #define listtypeAVIHEADER mmioFOURCC('h', 'd', 'r', 'l')
891 #define ckidAVIMAINHDR mmioFOURCC('a', 'v', 'i', 'h')
892 #define listtypeSTREAMHEADER mmioFOURCC('s', 't', 'r', 'l')
893 #define ckidSTREAMHEADER mmioFOURCC('s', 't', 'r', 'h')
894 #define ckidSTREAMFORMAT mmioFOURCC('s', 't', 'r', 'f')
895 #define ckidSTREAMHANDLERDATA mmioFOURCC('s', 't', 'r', 'd')
896 #define ckidSTREAMNAME mmioFOURCC('s', 't', 'r', 'n')
898 #define listtypeAVIMOVIE mmioFOURCC('m', 'o', 'v', 'i')
899 #define listtypeAVIRECORD mmioFOURCC('r', 'e', 'c', ' ')
901 #define ckidAVINEWINDEX mmioFOURCC('i', 'd', 'x', '1')
903 #define streamtypeANY 0UL
904 #define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's')
905 #define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's')
906 #define streamtypeMIDI mmioFOURCC('m', 'i', 'd', 's')
907 #define streamtypeTEXT mmioFOURCC('t', 'x', 't', 's')
909 /* Basic chunk types */
910 #define cktypeDIBbits aviTWOCC('d', 'b')
911 #define cktypeDIBcompressed aviTWOCC('d', 'c')
912 #define cktypePALchange aviTWOCC('p', 'c')
913 #define cktypeWAVEbytes aviTWOCC('w', 'b')
915 /* Chunk id to use for extra chunks for padding. */
916 #define ckidAVIPADDING mmioFOURCC('J', 'U', 'N', 'K')
918 #define FromHex(n) (((n) >= 'A') ? ((n) + 10 - 'A') : ((n) - '0'))
919 #define StreamFromFOURCC(fcc) ((WORD)((FromHex(LOBYTE(LOWORD(fcc))) << 4) + \
920 (FromHex(HIBYTE(LOWORD(fcc))))))
921 #define TWOCCFromFOURCC(fcc) HIWORD(fcc)
922 #define ToHex(n) ((BYTE)(((n) > 9) ? ((n) - 10 + 'A') : ((n) + '0')))
923 #define MAKEAVICKID(tcc, stream) \
924 MAKELONG((ToHex((stream) & 0x0f) << 8) | \
925 (ToHex(((stream) & 0xf0) >> 4)), tcc)
927 /* AVIFileHdr.dwFlags */
928 #define AVIF_HASINDEX 0x00000010 /* Index at end of file? */
929 #define AVIF_MUSTUSEINDEX 0x00000020
930 #define AVIF_ISINTERLEAVED 0x00000100
931 #define AVIF_TRUSTCKTYPE 0x00000800 /* Use CKType to find key frames*/
932 #define AVIF_WASCAPTUREFILE 0x00010000
933 #define AVIF_COPYRIGHTED 0x00020000
935 #define AVI_HEADERSIZE 2048
937 typedef BOOL (CALLBACK
*AVISAVECALLBACK
)(INT
);
939 typedef struct _MainAVIHeader
941 DWORD dwMicroSecPerFrame
;
942 DWORD dwMaxBytesPerSec
;
943 DWORD dwPaddingGranularity
;
946 DWORD dwInitialFrames
;
948 DWORD dwSuggestedBufferSize
;
954 /* AVIStreamHeader.dwFlags */
955 #define AVISF_DISABLED 0x00000001
956 #define AVISF_VIDEO_PALCHANGES 0x00010000
961 DWORD dwFlags
; /* AVISF_* */
964 DWORD dwInitialFrames
;
966 DWORD dwRate
; /* dwRate / dwScale == samples/second */
968 DWORD dwLength
; /* In units above... */
969 DWORD dwSuggestedBufferSize
;
972 struct { SHORT left
, top
, right
, bottom
; } rcFrame
; /* word.word - word.word in file */
975 /* AVIINDEXENTRY.dwFlags */
976 #define AVIIF_LIST 0x00000001 /* chunk is a 'LIST' */
977 #define AVIIF_TWOCC 0x00000002
978 #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
979 #define AVIIF_FIRSTPART 0x00000020
980 #define AVIIF_LASTPART 0x00000040
981 #define AVIIF_MIDPART (AVIIF_LASTPART|AVIIF_FIRSTPART)
982 #define AVIIF_NOTIME 0x00000100 /* this frame doesn't take any time */
983 #define AVIIF_COMPUSE 0x0FFF0000
985 typedef struct _AVIINDEXENTRY
{
992 typedef struct _AVIPALCHANGE
{
995 WORD wFlags
; /* pad */
996 PALETTEENTRY peNew
[1];
999 #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
1001 #define AVIGETFRAMEF_BESTDISPLAYFMT 1
1003 typedef struct _AVISTREAMINFOA
{
1006 DWORD dwFlags
; /* AVIIF_* */
1011 DWORD dwRate
; /* dwRate / dwScale == samples/second */
1013 DWORD dwLength
; /* In units above... */
1014 DWORD dwInitialFrames
;
1015 DWORD dwSuggestedBufferSize
;
1020 DWORD dwFormatChangeCount
;
1022 } AVISTREAMINFOA
, * LPAVISTREAMINFOA
, *PAVISTREAMINFOA
;
1024 typedef struct _AVISTREAMINFOW
{
1032 DWORD dwRate
; /* dwRate / dwScale == samples/second */
1034 DWORD dwLength
; /* In units above... */
1035 DWORD dwInitialFrames
;
1036 DWORD dwSuggestedBufferSize
;
1041 DWORD dwFormatChangeCount
;
1043 } AVISTREAMINFOW
, * LPAVISTREAMINFOW
, *PAVISTREAMINFOW
;
1044 DECL_WINELIB_TYPE_AW(AVISTREAMINFO
)
1045 DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO
)
1046 DECL_WINELIB_TYPE_AW(PAVISTREAMINFO
)
1048 #define AVISTREAMINFO_DISABLED 0x00000001
1049 #define AVISTREAMINFO_FORMATCHANGES 0x00010000
1051 /* AVIFILEINFO.dwFlags */
1052 #define AVIFILEINFO_HASINDEX 0x00000010
1053 #define AVIFILEINFO_MUSTUSEINDEX 0x00000020
1054 #define AVIFILEINFO_ISINTERLEAVED 0x00000100
1055 #define AVIFILEINFO_TRUSTCKTYPE 0x00000800
1056 #define AVIFILEINFO_WASCAPTUREFILE 0x00010000
1057 #define AVIFILEINFO_COPYRIGHTED 0x00020000
1059 /* AVIFILEINFO.dwCaps */
1060 #define AVIFILECAPS_CANREAD 0x00000001
1061 #define AVIFILECAPS_CANWRITE 0x00000002
1062 #define AVIFILECAPS_ALLKEYFRAMES 0x00000010
1063 #define AVIFILECAPS_NOCOMPRESSION 0x00000020
1065 typedef struct _AVIFILEINFOW
{
1066 DWORD dwMaxBytesPerSec
;
1070 DWORD dwSuggestedBufferSize
;
1077 WCHAR szFileType
[64];
1078 } AVIFILEINFOW
, * LPAVIFILEINFOW
, *PAVIFILEINFOW
;
1079 typedef struct _AVIFILEINFOA
{
1080 DWORD dwMaxBytesPerSec
;
1084 DWORD dwSuggestedBufferSize
;
1091 CHAR szFileType
[64];
1092 } AVIFILEINFOA
, * LPAVIFILEINFOA
, *PAVIFILEINFOA
;
1093 DECL_WINELIB_TYPE_AW(AVIFILEINFO
)
1094 DECL_WINELIB_TYPE_AW(PAVIFILEINFO
)
1095 DECL_WINELIB_TYPE_AW(LPAVIFILEINFO
)
1097 /* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
1098 #define AVICOMPRESSF_INTERLEAVE 0x00000001
1099 #define AVICOMPRESSF_DATARATE 0x00000002
1100 #define AVICOMPRESSF_KEYFRAMES 0x00000004
1101 #define AVICOMPRESSF_VALID 0x00000008
1104 DWORD fccType
; /* stream type, for consistency */
1105 DWORD fccHandler
; /* compressor */
1106 DWORD dwKeyFrameEvery
; /* keyframe rate */
1107 DWORD dwQuality
; /* compress quality 0-10,000 */
1108 DWORD dwBytesPerSecond
; /* bytes per second */
1109 DWORD dwFlags
; /* flags... see below */
1110 LPVOID lpFormat
; /* save format */
1112 LPVOID lpParms
; /* compressor options */
1114 DWORD dwInterleaveEvery
; /* for non-video streams only */
1115 } AVICOMPRESSOPTIONS
, *LPAVICOMPRESSOPTIONS
,*PAVICOMPRESSOPTIONS
;
1117 #define FIND_DIR 0x0000000FL /* direction mask */
1118 #define FIND_NEXT 0x00000001L /* search forward */
1119 #define FIND_PREV 0x00000004L /* search backward */
1120 #define FIND_FROM_START 0x00000008L /* start at the logical beginning */
1122 #define FIND_TYPE 0x000000F0L /* type mask */
1123 #define FIND_KEY 0x00000010L /* find a key frame */
1124 #define FIND_ANY 0x00000020L /* find any (non-empty) sample */
1125 #define FIND_FORMAT 0x00000040L /* find a formatchange */
1127 #define FIND_RET 0x0000F000L /* return mask */
1128 #define FIND_POS 0x00000000L /* return logical position */
1129 #define FIND_LENGTH 0x00001000L /* return logical size */
1130 #define FIND_OFFSET 0x00002000L /* return physical position */
1131 #define FIND_SIZE 0x00003000L /* return physical size */
1132 #define FIND_INDEX 0x00004000L /* return physical index position */
1136 #define DEFINE_AVIGUID(name, l, w1, w2) \
1137 DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
1139 DEFINE_AVIGUID(IID_IAVIFile
, 0x00020020, 0, 0);
1140 DEFINE_AVIGUID(IID_IAVIStream
, 0x00020021, 0, 0);
1141 DEFINE_AVIGUID(IID_IAVIStreaming
, 0x00020022, 0, 0);
1142 DEFINE_AVIGUID(IID_IGetFrame
, 0x00020023, 0, 0);
1143 DEFINE_AVIGUID(IID_IAVIEditStream
, 0x00020024, 0, 0);
1145 DEFINE_AVIGUID(CLSID_AVISimpleUnMarshal
,0x00020009, 0, 0);
1146 DEFINE_AVIGUID(CLSID_AVIFile
, 0x00020000, 0, 0);
1148 /*****************************************************************************
1149 * IAVIStream interface
1151 #define INTERFACE IAVIStream
1152 DECLARE_INTERFACE_(IAVIStream
,IUnknown
)
1154 /*** IUnknown methods ***/
1155 STDMETHOD_(HRESULT
,QueryInterface
)(THIS_ REFIID riid
, _Outptr_
void** ppvObject
) PURE
;
1156 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
1157 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
1158 /*** IAVIStream methods ***/
1159 STDMETHOD(Create
)(THIS_ LPARAM lParam1
, LPARAM lParam2
) PURE
;
1160 STDMETHOD(Info
)(THIS_
_Out_writes_bytes_(lSize
) AVISTREAMINFOW
*psi
, _In_ LONG lSize
) PURE
;
1161 STDMETHOD_(LONG
,FindSample
)(THIS_ _In_ LONG lPos
, _In_ LONG lFlags
) PURE
;
1162 STDMETHOD(ReadFormat
)(THIS_ _In_ LONG lPos
, _Out_writes_bytes_to_opt_(*lpcbFormat
, *lpcbFormat
) LPVOID lpFormat
, _Inout_ LONG
*lpcbFormat
) PURE
;
1163 STDMETHOD(SetFormat
)(THIS_ _In_ LONG lPos
, _In_reads_bytes_(cbFormat
) LPVOID lpFormat
, _In_ LONG cbFormat
) PURE
;
1164 STDMETHOD(Read
)(THIS_ _In_ LONG lStart
, _In_ LONG lSamples
, _Out_writes_bytes_opt_(cbBuffer
) LPVOID lpBuffer
, _In_ LONG cbBuffer
, _Out_opt_ LONG
*plBytes
, _Out_opt_ LONG
*plSamples
) PURE
;
1165 STDMETHOD(Write
)(THIS_ _In_ LONG lStart
, _In_ LONG lSamples
, _In_reads_bytes_(cbBuffer
) LPVOID lpBuffer
, _In_ LONG cbBuffer
, _In_ DWORD dwFlags
, _Out_opt_ LONG
*plSampWritten
, _Out_opt_ LONG
*plBytesWritten
) PURE
;
1166 STDMETHOD(Delete
)(THIS_ _In_ LONG lStart
, _In_ LONG lSamples
) PURE
;
1167 STDMETHOD(ReadData
)(THIS_ _In_ DWORD fcc
, _Out_writes_bytes_to_opt_(*lpcbBuffer
, *lpcbBuffer
) LPVOID lpBuffer
, _Inout_ LONG
*lpcbBuffer
) PURE
;
1168 STDMETHOD(WriteData
)(THIS_ _In_ DWORD fcc
, _In_reads_bytes_(cbBuffer
) LPVOID lpBuffer
, _In_ LONG cbBuffer
) PURE
;
1169 STDMETHOD(SetInfo
)(THIS_
_In_reads_bytes_(cbInfo
) AVISTREAMINFOW
*plInfo
, _In_ LONG cbInfo
) PURE
;
1173 #if !defined(__cplusplus) || defined(CINTERFACE)
1174 /*** IUnknown methods ***/
1175 #define IAVIStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1176 #define IAVIStream_AddRef(p) (p)->lpVtbl->AddRef(p)
1177 #define IAVIStream_Release(p) (p)->lpVtbl->Release(p)
1178 /*** IAVIStream methods ***/
1179 #define IAVIStream_Create(p,a,b) (p)->lpVtbl->Create(p,a,b)
1180 #define IAVIStream_Info(p,a,b) (p)->lpVtbl->Info(p,a,b)
1181 #define IAVIStream_FindSample(p,a,b) (p)->lpVtbl->FindSample(p,a,b)
1182 #define IAVIStream_ReadFormat(p,a,b,c) (p)->lpVtbl->ReadFormat(p,a,b,c)
1183 #define IAVIStream_SetFormat(p,a,b,c) (p)->lpVtbl->SetFormat(p,a,b,c)
1184 #define IAVIStream_Read(p,a,b,c,d,e,f) (p)->lpVtbl->Read(p,a,b,c,d,e,f)
1185 #define IAVIStream_Write(p,a,b,c,d,e,f,g) (p)->lpVtbl->Write(p,a,b,c,d,e,f,g)
1186 #define IAVIStream_Delete(p,a,b) (p)->lpVtbl->Delete(p,a,b)
1187 #define IAVIStream_ReadData(p,a,b,c) (p)->lpVtbl->ReadData(p,a,b,c)
1188 #define IAVIStream_WriteData(p,a,b,c) (p)->lpVtbl->WriteData(p,a,b,c)
1189 #define IAVIStream_SetInfo(p,a,b) (p)->lpVtbl->SetInfo(p,a,b)
1192 #define AVISTREAMREAD_CONVENIENT (-1L)
1194 ULONG WINAPI
AVIStreamAddRef(PAVISTREAM iface
);
1195 ULONG WINAPI
AVIStreamRelease(PAVISTREAM iface
);
1200 _Outptr_ PAVISTREAM
*,
1208 _In_ PAVISTREAM iface
,
1209 _Out_writes_bytes_(size
) AVISTREAMINFOA
*asi
,
1215 _In_ PAVISTREAM iface
,
1216 _Out_writes_bytes_(size
) AVISTREAMINFOW
*asi
,
1219 #define AVIStreamInfo WINELIB_NAME_AW(AVIStreamInfo)
1223 AVIStreamFindSample(
1224 _In_ PAVISTREAM pstream
,
1230 AVIStreamReadFormat(
1231 _In_ PAVISTREAM iface
,
1233 _Out_writes_bytes_to_opt_(*formatsize
, *formatsize
) LPVOID format
,
1234 _Inout_ LONG
*formatsize
);
1239 _In_ PAVISTREAM iface
,
1241 _In_reads_bytes_(formatsize
) LPVOID format
,
1242 _In_ LONG formatsize
);
1247 _In_ PAVISTREAM iface
,
1250 _Out_writes_bytes_opt_(buffersize
) LPVOID buffer
,
1251 _In_ LONG buffersize
,
1252 _Out_opt_ LONG
*bytesread
,
1253 _Out_opt_ LONG
*samplesread
);
1258 _In_ PAVISTREAM iface
,
1261 _In_reads_bytes_(buffersize
) LPVOID buffer
,
1262 _In_ LONG buffersize
,
1264 _Out_opt_ LONG
*sampwritten
,
1265 _Out_opt_ LONG
*byteswritten
);
1270 _In_ PAVISTREAM iface
,
1272 _Out_writes_bytes_to_opt_(*lpread
, *lpread
) LPVOID lp
,
1273 _Inout_ LONG
*lpread
);
1278 _In_ PAVISTREAM iface
,
1280 _In_reads_bytes_(size
) LPVOID lp
,
1285 AVIStreamGetFrameOpen(
1286 _In_ PAVISTREAM pavi
,
1287 _In_opt_ LPBITMAPINFOHEADER lpbiWanted
);
1289 LPVOID WINAPI
AVIStreamGetFrame(_In_ PGETFRAME pg
, _In_ LONG pos
);
1290 HRESULT WINAPI
AVIStreamGetFrameClose(_In_ PGETFRAME pg
);
1294 AVIMakeCompressedStream(
1295 _Outptr_ PAVISTREAM
*ppsCompressed
,
1296 _In_ PAVISTREAM ppsSource
,
1297 _In_ AVICOMPRESSOPTIONS
*lpOptions
,
1298 _In_opt_ CLSID
*pclsidHandler
);
1302 AVIMakeFileFromStreams(
1303 _Outptr_ PAVIFILE
*ppfile
,
1305 _In_reads_(nStreams
) PAVISTREAM
*ppStreams
);
1309 AVIMakeStreamFromClipboard(
1311 _In_ HANDLE hGlobal
,
1312 _Outptr_ PAVISTREAM
* ppstream
);
1316 AVIStreamOpenFromFileA(
1317 _Outptr_ PAVISTREAM
*ppavi
,
1322 _In_opt_ CLSID
*pclsidHandler
);
1326 AVIStreamOpenFromFileW(
1327 _Outptr_ PAVISTREAM
*ppavi
,
1328 _In_ LPCWSTR szFile
,
1332 _In_opt_ CLSID
*pclsidHandler
);
1334 #define AVIStreamOpenFromFile WINELIB_NAME_AW(AVIStreamOpenFromFile)
1338 AVIStreamBeginStreaming(
1339 _In_ PAVISTREAM pavi
,
1344 LONG WINAPI
AVIStreamEndStreaming(_In_ PAVISTREAM pavi
);
1349 _Out_writes_(cbFilter
) LPSTR szFilter
,
1356 _Out_writes_(cbFilter
) LPWSTR szFilter
,
1360 #define AVIBuildFilter WINELIB_NAME_AW(AVIBuildFilter)
1368 _In_reads_(nStream
) PAVISTREAM
*ppavi
,
1369 _Inout_updates_(nStream
) LPAVICOMPRESSOPTIONS
*ppOptions
);
1375 _In_reads_(nStreams
) LPAVICOMPRESSOPTIONS
*ppOptions
);
1381 _In_opt_ CLSID
*pclsidHandler
,
1382 _In_ AVISAVECALLBACK lpfnCallback
,
1384 _In_ PAVISTREAM pavi
,
1385 _In_ LPAVICOMPRESSOPTIONS lpOptions
,
1392 _In_opt_ CLSID
*pclsidHandler
,
1393 _In_ AVISAVECALLBACK lpfnCallback
,
1395 _In_ PAVISTREAM pavi
,
1396 _In_ LPAVICOMPRESSOPTIONS lpOptions
,
1399 #define AVISave WINELIB_NAME_AW(AVISave)
1405 _In_opt_ CLSID
*pclsidHandler
,
1406 _In_ AVISAVECALLBACK lpfnCallback
,
1408 _In_reads_(nStream
) PAVISTREAM
*ppavi
,
1409 _In_reads_(nStream
) LPAVICOMPRESSOPTIONS
*plpOptions
);
1415 _In_opt_ CLSID
*pclsidHandler
,
1416 _In_ AVISAVECALLBACK lpfnCallback
,
1418 _In_reads_(nStream
) PAVISTREAM
*ppavi
,
1419 _In_reads_(nStream
) LPAVICOMPRESSOPTIONS
*plpOptions
);
1421 #define AVISaveV WINELIB_NAME_AW(AVISaveV)
1423 LONG WINAPI
AVIStreamStart(_In_ PAVISTREAM iface
);
1424 LONG WINAPI
AVIStreamLength(_In_ PAVISTREAM iface
);
1425 LONG WINAPI
AVIStreamSampleToTime(_In_ PAVISTREAM pstream
, _In_ LONG lSample
);
1426 LONG WINAPI
AVIStreamTimeToSample(_In_ PAVISTREAM pstream
, _In_ LONG lTime
);
1428 #define AVIFileClose(pavi) \
1429 AVIFileRelease(pavi)
1430 #define AVIStreamClose(pavi) \
1431 AVIStreamRelease(pavi);
1432 #define AVIStreamEnd(pavi) \
1433 (AVIStreamStart(pavi) + AVIStreamLength(pavi))
1434 #define AVIStreamEndTime(pavi) \
1435 AVIStreamSampleToTime(pavi, AVIStreamEnd(pavi))
1436 #define AVIStreamFormatSize(pavi, lPos, plSize) \
1437 AVIStreamReadFormat(pavi, lPos, NULL, plSize)
1438 #define AVIStreamLengthTime(pavi) \
1439 AVIStreamSampleToTime(pavi, AVIStreamLength(pavi))
1440 #define AVIStreamSampleSize(pavi,pos,psize) \
1441 AVIStreamRead(pavi,pos,1,NULL,0,psize,NULL)
1442 #define AVIStreamSampleToSample(pavi1, pavi2, samp2) \
1443 AVIStreamTimeToSample(pavi1, AVIStreamSampleToTime(pavi2, samp2))
1444 #define AVIStreamStartTime(pavi) \
1445 AVIStreamSampleToTime(pavi, AVIStreamStart(pavi))
1447 #define AVIStreamNextSample(pavi, pos) \
1448 AVIStreamFindSample(pavi, pos + 1, FIND_NEXT | FIND_ANY)
1449 #define AVIStreamPrevSample(pavi, pos) \
1450 AVIStreamFindSample(pavi, pos - 1, FIND_PREV | FIND_ANY)
1451 #define AVIStreamNearestSample(pavi, pos) \
1452 AVIStreamFindSample(pavi, pos, FIND_PREV | FIND_ANY)
1453 #define AVStreamNextKeyFrame(pavi,pos) \
1454 AVIStreamFindSample(pavi, pos + 1, FIND_NEXT | FIND_KEY)
1455 #define AVStreamPrevKeyFrame(pavi,pos) \
1456 AVIStreamFindSample(pavi, pos - 1, FIND_NEXT | FIND_KEY)
1457 #define AVIStreamNearestKeyFrame(pavi,pos) \
1458 AVIStreamFindSample(pavi, pos, FIND_PREV | FIND_KEY)
1459 #define AVIStreamIsKeyFrame(pavi, pos) \
1460 (AVIStreamNearestKeyFrame(pavi, pos) == pos)
1462 /*****************************************************************************
1463 * IAVIStreaming interface
1465 #define INTERFACE IAVIStreaming
1466 DECLARE_INTERFACE_(IAVIStreaming
,IUnknown
)
1468 /*** IUnknown methods ***/
1469 STDMETHOD_(HRESULT
,QueryInterface
)(THIS_ REFIID riid
, _Outptr_
void** ppvObject
) PURE
;
1470 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
1471 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
1472 /*** IAVIStreaming methods ***/
1473 STDMETHOD(Begin
)(IAVIStreaming
*iface
, _In_ LONG lStart
, _In_ LONG lEnd
, _In_ LONG lRate
) PURE
;
1474 STDMETHOD(End
)(IAVIStreaming
*iface
) PURE
;
1478 #if !defined(__cplusplus) || defined(CINTERFACE)
1479 /*** IUnknown methods ***/
1480 #define IAVIStreaming_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1481 #define IAVIStreaming_AddRef(p) (p)->lpVtbl->AddRef(p)
1482 #define IAVIStreaming_Release(p) (p)->lpVtbl->Release(p)
1483 /*** IAVIStreaming methods ***/
1484 #define IAVIStreaming_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
1485 #define IAVIStreaming_End(p) (p)->lpVtbl->End(p)
1488 /*****************************************************************************
1489 * IAVIEditStream interface
1491 #define INTERFACE IAVIEditStream
1492 DECLARE_INTERFACE_(IAVIEditStream
,IUnknown
)
1494 /*** IUnknown methods ***/
1495 STDMETHOD_(HRESULT
,QueryInterface
)(THIS_ REFIID riid
, _Outptr_
void** ppvObject
) PURE
;
1496 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
1497 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
1498 /*** IAVIEditStream methods ***/
1499 STDMETHOD(Cut
)(IAVIEditStream
*iface
, _Inout_ LONG
*plStart
, _Inout_ LONG
*plLength
, _Outptr_ PAVISTREAM
*ppResult
) PURE
;
1500 STDMETHOD(Copy
)(IAVIEditStream
*iface
, _Inout_ LONG
*plStart
, _Inout_ LONG
*plLength
, _Outptr_ PAVISTREAM
*ppResult
) PURE
;
1501 STDMETHOD(Paste
)(IAVIEditStream
*iface
, _Inout_ LONG
*plStart
, _Inout_ LONG
*plLength
, _Inout_ PAVISTREAM pSource
, _In_ LONG lStart
, _In_ LONG lEnd
) PURE
;
1502 STDMETHOD(Clone
)(IAVIEditStream
*iface
, _Outptr_ PAVISTREAM
*ppResult
) PURE
;
1503 STDMETHOD(SetInfo
)(IAVIEditStream
*iface
, _In_reads_bytes_(size
) LPAVISTREAMINFOW asi
, _In_ LONG size
) PURE
;
1507 #if !defined(__cplusplus) || defined(CINTERFACE)
1508 /*** IUnknown methods ***/
1509 #define IAVIEditStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1510 #define IAVIEditStream_AddRef(p) (p)->lpVtbl->AddRef(p)
1511 #define IAVIEditStream_Release(p) (p)->lpVtbl->Release(p)
1512 /*** IAVIEditStream methods ***/
1513 #define IAVIEditStream_Cut(p,a,b,c) (p)->lpVtbl->Cut(p,a,b,c)
1514 #define IAVIEditStream_Copy(p,a,b,c) (p)->lpVtbl->Copy(p,a,b,c)
1515 #define IAVIEditStream_Paste(p,a,b,c,d,e) (p)->lpVtbl->Paste(p,a,b,c,d,e)
1516 #define IAVIEditStream_Clone(p,a) (p)->lpVtbl->Clone(p,a)
1517 #define IAVIEditStream_SetInfo(p,a,b) (p)->lpVtbl->SetInfo(p,a,b)
1522 CreateEditableStream(
1523 _Outptr_ PAVISTREAM
*ppEditable
,
1524 _In_ PAVISTREAM pSource
);
1529 _In_ PAVISTREAM pStream
,
1530 _Outptr_ PAVISTREAM
*ppResult
);
1535 _In_ PAVISTREAM pStream
,
1536 _Inout_ LONG
*plStart
,
1537 _Inout_ LONG
*plLength
,
1538 _Outptr_ PAVISTREAM
*ppResult
);
1543 _In_ PAVISTREAM pStream
,
1544 _Inout_ LONG
*plStart
,
1545 _Inout_ LONG
*plLength
,
1546 _Outptr_ PAVISTREAM
*ppResult
);
1551 _In_ PAVISTREAM pDest
,
1552 _Inout_ LONG
*plStart
,
1553 _Inout_ LONG
*plLength
,
1554 _In_ PAVISTREAM pSource
,
1561 _In_ PAVISTREAM pstream
,
1562 _In_reads_bytes_(size
) LPAVISTREAMINFOA asi
,
1568 _In_ PAVISTREAM pstream
,
1569 _In_reads_bytes_(size
) LPAVISTREAMINFOW asi
,
1572 #define EditStreamSetInfo WINELIB_NAME_AW(EditStreamSetInfo)
1574 HRESULT WINAPI
EditStreamSetNameA(_In_ PAVISTREAM pstream
, _In_ LPCSTR szName
);
1575 HRESULT WINAPI
EditStreamSetNameW(_In_ PAVISTREAM pstream
, _In_ LPCWSTR szName
);
1576 #define EditStreamSetName WINELIB_NAME_AW(EditStreamSetName)
1578 /*****************************************************************************
1579 * IAVIFile interface
1581 /* In Win32 this interface uses UNICODE only */
1582 #define INTERFACE IAVIFile
1583 DECLARE_INTERFACE_(IAVIFile
,IUnknown
)
1585 /*** IUnknown methods ***/
1586 STDMETHOD_(HRESULT
,QueryInterface
)(THIS_ REFIID riid
, _Outptr_
void** ppvObject
) PURE
;
1587 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
1588 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
1589 /*** IAVIFile methods ***/
1590 STDMETHOD(Info
)(THIS_
_Out_writes_bytes_(lSize
) AVIFILEINFOW
*pfi
, _In_ LONG lSize
) PURE
;
1591 STDMETHOD(GetStream
)(THIS_ _Outptr_ PAVISTREAM
*ppStream
, _In_ DWORD fccType
, _In_ LONG lParam
) PURE
;
1592 STDMETHOD(CreateStream
)(THIS_ _Outptr_ PAVISTREAM
*ppStream
, _In_ AVISTREAMINFOW
*psi
) PURE
;
1593 STDMETHOD(WriteData
)(THIS_ _In_ DWORD fcc
, _In_reads_bytes_(cbBuffer
) LPVOID lpBuffer
, _In_ LONG cbBuffer
) PURE
;
1594 STDMETHOD(ReadData
)(THIS_ _In_ DWORD fcc
, _Out_writes_bytes_to_(*lpcbBuffer
, *lpcbBuffer
) LPVOID lpBuffer
, _Inout_ LONG
*lpcbBuffer
) PURE
;
1595 STDMETHOD(EndRecord
)(THIS
) PURE
;
1596 STDMETHOD(DeleteStream
)(THIS_ _In_ DWORD fccType
, _In_ LONG lParam
) PURE
;
1600 #if !defined(__cplusplus) || defined(CINTERFACE)
1601 /*** IUnknown methods ***/
1602 #define IAVIFile_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1603 #define IAVIFile_AddRef(p) (p)->lpVtbl->AddRef(p)
1604 #define IAVIFile_Release(p) (p)->lpVtbl->Release(p)
1605 /*** IAVIFile methods ***/
1606 #define IAVIFile_Info(p,a,b) (p)->lpVtbl->Info(p,a,b)
1607 #define IAVIFile_GetStream(p,a,b,c) (p)->lpVtbl->GetStream(p,a,b,c)
1608 #define IAVIFile_CreateStream(p,a,b) (p)->lpVtbl->CreateStream(p,a,b)
1609 #define IAVIFile_WriteData(p,a,b,c) (p)->lpVtbl->WriteData(p,a,b,c)
1610 #define IAVIFile_ReadData(p,a,b,c) (p)->lpVtbl->ReadData(p,a,b,c)
1611 #define IAVIFile_EndRecord(p) (p)->lpVtbl->EndRecord(p)
1612 #define IAVIFile_DeleteStream(p,a,b) (p)->lpVtbl->DeleteStream(p,a,b)
1615 void WINAPI
AVIFileInit(void);
1616 void WINAPI
AVIFileExit(void);
1621 _Outptr_ PAVIFILE
* ppfile
,
1624 _In_opt_ LPCLSID lpHandler
);
1629 _Outptr_ PAVIFILE
* ppfile
,
1630 _In_ LPCWSTR szFile
,
1632 _In_opt_ LPCLSID lpHandler
);
1634 #define AVIFileOpen WINELIB_NAME_AW(AVIFileOpen)
1636 ULONG WINAPI
AVIFileAddRef(PAVIFILE pfile
);
1637 ULONG WINAPI
AVIFileRelease(PAVIFILE pfile
);
1642 _In_ PAVIFILE pfile
,
1643 _Out_writes_bytes_(lSize
) PAVIFILEINFOA pfi
,
1649 _In_ PAVIFILE pfile
,
1650 _Out_writes_bytes_(lSize
) PAVIFILEINFOW pfi
,
1653 #define AVIFileInfo WINELIB_NAME_AW(AVIFileInfo)
1658 _In_ PAVIFILE pfile
,
1659 _Outptr_ PAVISTREAM
* avis
,
1665 AVIFileCreateStreamA(
1666 _In_ PAVIFILE pfile
,
1667 _Outptr_ PAVISTREAM
* ppavi
,
1668 _In_ AVISTREAMINFOA
* psi
);
1672 AVIFileCreateStreamW(
1673 _In_ PAVIFILE pfile
,
1674 _Outptr_ PAVISTREAM
* ppavi
,
1675 _In_ AVISTREAMINFOW
* psi
);
1677 #define AVIFileCreateStream WINELIB_NAME_AW(AVIFileCreateStream)
1682 _In_ PAVIFILE pfile
,
1684 _In_reads_bytes_(size
) LPVOID lp
,
1690 _In_ PAVIFILE pfile
,
1692 _Out_writes_bytes_to_(*size
, *size
) LPVOID lp
,
1693 _Inout_ LPLONG size
);
1695 HRESULT WINAPI
AVIFileEndRecord(_In_ PAVIFILE pfile
);
1697 /*****************************************************************************
1698 * IGetFrame interface
1700 #define INTERFACE IGetFrame
1701 DECLARE_INTERFACE_(IGetFrame
,IUnknown
)
1703 /*** IUnknown methods ***/
1704 STDMETHOD_(HRESULT
,QueryInterface
)(THIS_ REFIID riid
, _Outptr_
void** ppvObject
) PURE
;
1705 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
1706 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
1707 /*** IGetFrame methods ***/
1708 STDMETHOD_(LPVOID
,GetFrame
)(THIS_ _In_ LONG lPos
) PURE
;
1709 STDMETHOD(Begin
)(THIS_ _In_ LONG lStart
, _In_ LONG lEnd
, _In_ LONG lRate
) PURE
;
1710 STDMETHOD(End
)(THIS
) PURE
;
1711 STDMETHOD(SetFormat
)(THIS_ _In_ LPBITMAPINFOHEADER lpbi
, _In_opt_ LPVOID lpBits
, _In_ INT x
, _In_ INT y
, _In_ INT dx
, _In_ INT dy
) PURE
;
1715 #if !defined(__cplusplus) || defined(CINTERFACE)
1716 /*** IUnknown methods ***/
1717 #define IGetFrame_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1718 #define IGetFrame_AddRef(p) (p)->lpVtbl->AddRef(p)
1719 #define IGetFrame_Release(p) (p)->lpVtbl->Release(p)
1720 /*** IGetFrame methods ***/
1721 #define IGetFrame_GetFrame(p,a) (p)->lpVtbl->GetFrame(p,a)
1722 #define IGetFrame_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
1723 #define IGetFrame_End(p) (p)->lpVtbl->End(p)
1724 #define IGetFrame_SetFormat(p,a,b,c,d,e,f) (p)->lpVtbl->SetFormat(p,a,b,c,d,e,f)
1727 HRESULT WINAPI
AVIClearClipboard(void);
1728 HRESULT WINAPI
AVIGetFromClipboard(_Outptr_ PAVIFILE
*ppfile
);
1729 HRESULT WINAPI
AVIPutFileOnClipboard(_In_ PAVIFILE pfile
);
1732 BOOL WINAPI
GetOpenFileNamePreviewA(_Inout_ LPOPENFILENAMEA lpofn
);
1733 BOOL WINAPI
GetOpenFileNamePreviewW(_Inout_ LPOPENFILENAMEW lpofn
);
1734 #define GetOpenFileNamePreview WINELIB_NAME_AW(GetOpenFileNamePreview)
1735 BOOL WINAPI
GetSaveFileNamePreviewA(_Inout_ LPOPENFILENAMEA lpofn
);
1736 BOOL WINAPI
GetSaveFileNamePreviewW(_Inout_ LPOPENFILENAMEW lpofn
);
1737 #define GetSaveFileNamePreview WINELIB_NAME_AW(GetSaveFileNamePreview)
1741 #define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)
1743 #define AVIERR_UNSUPPORTED MAKE_AVIERR(101)
1744 #define AVIERR_BADFORMAT MAKE_AVIERR(102)
1745 #define AVIERR_MEMORY MAKE_AVIERR(103)
1746 #define AVIERR_INTERNAL MAKE_AVIERR(104)
1747 #define AVIERR_BADFLAGS MAKE_AVIERR(105)
1748 #define AVIERR_BADPARAM MAKE_AVIERR(106)
1749 #define AVIERR_BADSIZE MAKE_AVIERR(107)
1750 #define AVIERR_BADHANDLE MAKE_AVIERR(108)
1751 #define AVIERR_FILEREAD MAKE_AVIERR(109)
1752 #define AVIERR_FILEWRITE MAKE_AVIERR(110)
1753 #define AVIERR_FILEOPEN MAKE_AVIERR(111)
1754 #define AVIERR_COMPRESSOR MAKE_AVIERR(112)
1755 #define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)
1756 #define AVIERR_READONLY MAKE_AVIERR(114)
1757 #define AVIERR_NODATA MAKE_AVIERR(115)
1758 #define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)
1759 #define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)
1760 #define AVIERR_USERABORT MAKE_AVIERR(198)
1761 #define AVIERR_ERROR MAKE_AVIERR(199)
1763 BOOL VFWAPIV
MCIWndRegisterClass(void);
1781 #define MCIWndCreate WINELIB_NAME_AW(MCIWndCreate)
1783 #define MCIWNDOPENF_NEW 0x0001
1785 #define MCIWNDF_NOAUTOSIZEWINDOW 0x0001
1786 #define MCIWNDF_NOPLAYBAR 0x0002
1787 #define MCIWNDF_NOAUTOSIZEMOVIE 0x0004
1788 #define MCIWNDF_NOMENU 0x0008
1789 #define MCIWNDF_SHOWNAME 0x0010
1790 #define MCIWNDF_SHOWPOS 0x0020
1791 #define MCIWNDF_SHOWMODE 0x0040
1792 #define MCIWNDF_SHOWALL 0x0070
1794 #define MCIWNDF_NOTIFYMODE 0x0100
1795 #define MCIWNDF_NOTIFYPOS 0x0200
1796 #define MCIWNDF_NOTIFYSIZE 0x0400
1797 #define MCIWNDF_NOTIFYERROR 0x1000
1798 #define MCIWNDF_NOTIFYALL 0x1F00
1800 #define MCIWNDF_NOTIFYANSI 0x0080
1802 #define MCIWNDF_NOTIFYMEDIAA 0x0880
1803 #define MCIWNDF_NOTIFYMEDIAW 0x0800
1804 #define MCIWNDF_NOTIFYMEDIA WINELIB_NAME_AW(MCIWNDF_NOTIFYMEDIA)
1806 #define MCIWNDF_RECORD 0x2000
1807 #define MCIWNDF_NOERRORDLG 0x4000
1808 #define MCIWNDF_NOOPEN 0x8000
1811 #define MCIWndSM ::SendMessage
1813 #define MCIWndSM SendMessage
1816 #define MCIWndCanPlay(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_PLAY,0,0)
1817 #define MCIWndCanRecord(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_RECORD,0,0)
1818 #define MCIWndCanSave(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_SAVE,0,0)
1819 #define MCIWndCanWindow(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_WINDOW,0,0)
1820 #define MCIWndCanEject(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_EJECT,0,0)
1821 #define MCIWndCanConfig(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_CONFIG,0,0)
1822 #define MCIWndPaletteKick(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_PALETTEKICK,0,0)
1824 #define MCIWndSave(hWnd,szFile) (LONG)MCIWndSM(hWnd,MCI_SAVE,0,(LPARAM)(LPVOID)(szFile))
1825 #define MCIWndSaveDialog(hWnd) MCIWndSave(hWnd,-1)
1827 #define MCIWndNew(hWnd,lp) (LONG)MCIWndSM(hWnd,MCIWNDM_NEW,0,(LPARAM)(LPVOID)(lp))
1829 #define MCIWndRecord(hWnd) (LONG)MCIWndSM(hWnd,MCI_RECORD,0,0)
1830 #define MCIWndOpen(hWnd,sz,f) (LONG)MCIWndSM(hWnd,MCIWNDM_OPEN,(WPARAM)(UINT)(f),(LPARAM)(LPVOID)(sz))
1831 #define MCIWndOpenDialog(hWnd) MCIWndOpen(hWnd,-1,0)
1832 #define MCIWndClose(hWnd) (LONG)MCIWndSM(hWnd,MCI_CLOSE,0,0)
1833 #define MCIWndPlay(hWnd) (LONG)MCIWndSM(hWnd,MCI_PLAY,0,0)
1834 #define MCIWndStop(hWnd) (LONG)MCIWndSM(hWnd,MCI_STOP,0,0)
1835 #define MCIWndPause(hWnd) (LONG)MCIWndSM(hWnd,MCI_PAUSE,0,0)
1836 #define MCIWndResume(hWnd) (LONG)MCIWndSM(hWnd,MCI_RESUME,0,0)
1837 #define MCIWndSeek(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCI_SEEK,0,(LPARAM)(LONG)(lPos))
1838 #define MCIWndEject(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_EJECT,0,0)
1840 #define MCIWndHome(hWnd) MCIWndSeek(hWnd,MCIWND_START)
1841 #define MCIWndEnd(hWnd) MCIWndSeek(hWnd,MCIWND_END)
1843 #define MCIWndGetSource(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_GET_SOURCE,0,(LPARAM)(LPRECT)(prc))
1844 #define MCIWndPutSource(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_PUT_SOURCE,0,(LPARAM)(LPRECT)(prc))
1846 #define MCIWndGetDest(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_GET_DEST,0,(LPARAM)(LPRECT)(prc))
1847 #define MCIWndPutDest(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_PUT_DEST,0,(LPARAM)(LPRECT)(prc))
1849 #define MCIWndPlayReverse(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYREVERSE,0,0)
1850 #define MCIWndPlayFrom(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYFROM,0,(LPARAM)(LONG)(lPos))
1851 #define MCIWndPlayTo(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYTO, 0,(LPARAM)(LONG)(lPos))
1852 #define MCIWndPlayFromTo(hWnd,lStart,lEnd) (MCIWndSeek(hWnd,lStart),MCIWndPlayTo(hWnd,lEnd))
1854 #define MCIWndGetDeviceID(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETDEVICEID,0,0)
1855 #define MCIWndGetAlias(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETALIAS,0,0)
1856 #define MCIWndGetMode(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETMODE,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
1857 #define MCIWndGetPosition(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETPOSITION,0,0)
1858 #define MCIWndGetPositionString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETPOSITION,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
1859 #define MCIWndGetStart(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETSTART,0,0)
1860 #define MCIWndGetLength(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETLENGTH,0,0)
1861 #define MCIWndGetEnd(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETEND,0,0)
1863 #define MCIWndStep(hWnd,n) (LONG)MCIWndSM(hWnd,MCI_STEP,0,(LPARAM)(LONG)(n))
1865 #define MCIWndDestroy(hWnd) (VOID)MCIWndSM(hWnd,WM_CLOSE,0,0)
1866 #define MCIWndSetZoom(hWnd,iZoom) (VOID)MCIWndSM(hWnd,MCIWNDM_SETZOOM,0,(LPARAM)(UINT)(iZoom))
1867 #define MCIWndGetZoom(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETZOOM,0,0)
1868 #define MCIWndSetVolume(hWnd,iVol) (LONG)MCIWndSM(hWnd,MCIWNDM_SETVOLUME,0,(LPARAM)(UINT)(iVol))
1869 #define MCIWndGetVolume(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETVOLUME,0,0)
1870 #define MCIWndSetSpeed(hWnd,iSpeed) (LONG)MCIWndSM(hWnd,MCIWNDM_SETSPEED,0,(LPARAM)(UINT)(iSpeed))
1871 #define MCIWndGetSpeed(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETSPEED,0,0)
1872 #define MCIWndSetTimeFormat(hWnd,lp) (LONG)MCIWndSM(hWnd,MCIWNDM_SETTIMEFORMAT,0,(LPARAM)(LPTSTR)(lp))
1873 #define MCIWndGetTimeFormat(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETTIMEFORMAT,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
1874 #define MCIWndValidateMedia(hWnd) (VOID)MCIWndSM(hWnd,MCIWNDM_VALIDATEMEDIA,0,0)
1876 #define MCIWndSetRepeat(hWnd,f) (void)MCIWndSM(hWnd,MCIWNDM_SETREPEAT,0,(LPARAM)(BOOL)(f))
1877 #define MCIWndGetRepeat(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_GETREPEAT,0,0)
1879 #define MCIWndUseFrames(hWnd) MCIWndSetTimeFormat(hWnd,TEXT("frames"))
1880 #define MCIWndUseTime(hWnd) MCIWndSetTimeFormat(hWnd,TEXT("ms"))
1882 #define MCIWndSetActiveTimer(hWnd,active) \
1883 (VOID)MCIWndSM(hWnd,MCIWNDM_SETACTIVETIMER, \
1884 (WPARAM)(UINT)(active),0L)
1885 #define MCIWndSetInactiveTimer(hWnd,inactive) \
1886 (VOID)MCIWndSM(hWnd,MCIWNDM_SETINACTIVETIMER, \
1887 (WPARAM)(UINT)(inactive),0L)
1888 #define MCIWndSetTimers(hWnd,active,inactive) \
1889 (VOID)MCIWndSM(hWnd,MCIWNDM_SETTIMERS,(WPARAM)(UINT)(active),\
1890 (LPARAM)(UINT)(inactive))
1891 #define MCIWndGetActiveTimer(hWnd) \
1892 (UINT)MCIWndSM(hWnd,MCIWNDM_GETACTIVETIMER,0,0L);
1893 #define MCIWndGetInactiveTimer(hWnd) \
1894 (UINT)MCIWndSM(hWnd,MCIWNDM_GETINACTIVETIMER,0,0L);
1896 #define MCIWndRealize(hWnd,fBkgnd) (LONG)MCIWndSM(hWnd,MCIWNDM_REALIZE,(WPARAM)(BOOL)(fBkgnd),0)
1898 #define MCIWndSendString(hWnd,sz) (LONG)MCIWndSM(hWnd,MCIWNDM_SENDSTRING,0,(LPARAM)(LPTSTR)(sz))
1899 #define MCIWndReturnString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_RETURNSTRING,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1900 #define MCIWndGetError(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETERROR,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1902 #define MCIWndGetPalette(hWnd) (HPALETTE)MCIWndSM(hWnd,MCIWNDM_GETPALETTE,0,0)
1903 #define MCIWndSetPalette(hWnd,hpal) (LONG)MCIWndSM(hWnd,MCIWNDM_SETPALETTE,(WPARAM)(HPALETTE)(hpal),0)
1905 #define MCIWndGetFileName(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETFILENAME,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1906 #define MCIWndGetDevice(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETDEVICE,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
1908 #define MCIWndGetStyles(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETSTYLES,0,0L)
1909 #define MCIWndChangeStyles(hWnd,mask,value) (LONG)MCIWndSM(hWnd,MCIWNDM_CHANGESTYLES,(WPARAM)(UINT)(mask),(LPARAM)(LONG)(value))
1911 #define MCIWndOpenInterface(hWnd,pUnk) (LONG)MCIWndSM(hWnd,MCIWNDM_OPENINTERFACE,0,(LPARAM)(LPUNKNOWN)(pUnk))
1913 #define MCIWndSetOwner(hWnd,hWndP) (LONG)MCIWndSM(hWnd,MCIWNDM_SETOWNER,(WPARAM)(hWndP),0)
1915 #define MCIWNDM_GETDEVICEID (WM_USER + 100)
1916 #define MCIWNDM_GETSTART (WM_USER + 103)
1917 #define MCIWNDM_GETLENGTH (WM_USER + 104)
1918 #define MCIWNDM_GETEND (WM_USER + 105)
1919 #define MCIWNDM_EJECT (WM_USER + 107)
1920 #define MCIWNDM_SETZOOM (WM_USER + 108)
1921 #define MCIWNDM_GETZOOM (WM_USER + 109)
1922 #define MCIWNDM_SETVOLUME (WM_USER + 110)
1923 #define MCIWNDM_GETVOLUME (WM_USER + 111)
1924 #define MCIWNDM_SETSPEED (WM_USER + 112)
1925 #define MCIWNDM_GETSPEED (WM_USER + 113)
1926 #define MCIWNDM_SETREPEAT (WM_USER + 114)
1927 #define MCIWNDM_GETREPEAT (WM_USER + 115)
1928 #define MCIWNDM_REALIZE (WM_USER + 118)
1929 #define MCIWNDM_VALIDATEMEDIA (WM_USER + 121)
1930 #define MCIWNDM_PLAYFROM (WM_USER + 122)
1931 #define MCIWNDM_PLAYTO (WM_USER + 123)
1932 #define MCIWNDM_GETPALETTE (WM_USER + 126)
1933 #define MCIWNDM_SETPALETTE (WM_USER + 127)
1934 #define MCIWNDM_SETTIMERS (WM_USER + 129)
1935 #define MCIWNDM_SETACTIVETIMER (WM_USER + 130)
1936 #define MCIWNDM_SETINACTIVETIMER (WM_USER + 131)
1937 #define MCIWNDM_GETACTIVETIMER (WM_USER + 132)
1938 #define MCIWNDM_GETINACTIVETIMER (WM_USER + 133)
1939 #define MCIWNDM_CHANGESTYLES (WM_USER + 135)
1940 #define MCIWNDM_GETSTYLES (WM_USER + 136)
1941 #define MCIWNDM_GETALIAS (WM_USER + 137)
1942 #define MCIWNDM_PLAYREVERSE (WM_USER + 139)
1943 #define MCIWNDM_GET_SOURCE (WM_USER + 140)
1944 #define MCIWNDM_PUT_SOURCE (WM_USER + 141)
1945 #define MCIWNDM_GET_DEST (WM_USER + 142)
1946 #define MCIWNDM_PUT_DEST (WM_USER + 143)
1947 #define MCIWNDM_CAN_PLAY (WM_USER + 144)
1948 #define MCIWNDM_CAN_WINDOW (WM_USER + 145)
1949 #define MCIWNDM_CAN_RECORD (WM_USER + 146)
1950 #define MCIWNDM_CAN_SAVE (WM_USER + 147)
1951 #define MCIWNDM_CAN_EJECT (WM_USER + 148)
1952 #define MCIWNDM_CAN_CONFIG (WM_USER + 149)
1953 #define MCIWNDM_PALETTEKICK (WM_USER + 150)
1954 #define MCIWNDM_OPENINTERFACE (WM_USER + 151)
1955 #define MCIWNDM_SETOWNER (WM_USER + 152)
1957 #define MCIWNDM_SENDSTRINGA (WM_USER + 101)
1958 #define MCIWNDM_GETPOSITIONA (WM_USER + 102)
1959 #define MCIWNDM_GETMODEA (WM_USER + 106)
1960 #define MCIWNDM_SETTIMEFORMATA (WM_USER + 119)
1961 #define MCIWNDM_GETTIMEFORMATA (WM_USER + 120)
1962 #define MCIWNDM_GETFILENAMEA (WM_USER + 124)
1963 #define MCIWNDM_GETDEVICEA (WM_USER + 125)
1964 #define MCIWNDM_GETERRORA (WM_USER + 128)
1965 #define MCIWNDM_NEWA (WM_USER + 134)
1966 #define MCIWNDM_RETURNSTRINGA (WM_USER + 138)
1967 #define MCIWNDM_OPENA (WM_USER + 153)
1969 #define MCIWNDM_SENDSTRINGW (WM_USER + 201)
1970 #define MCIWNDM_GETPOSITIONW (WM_USER + 202)
1971 #define MCIWNDM_GETMODEW (WM_USER + 206)
1972 #define MCIWNDM_SETTIMEFORMATW (WM_USER + 219)
1973 #define MCIWNDM_GETTIMEFORMATW (WM_USER + 220)
1974 #define MCIWNDM_GETFILENAMEW (WM_USER + 224)
1975 #define MCIWNDM_GETDEVICEW (WM_USER + 225)
1976 #define MCIWNDM_GETERRORW (WM_USER + 228)
1977 #define MCIWNDM_NEWW (WM_USER + 234)
1978 #define MCIWNDM_RETURNSTRINGW (WM_USER + 238)
1979 #define MCIWNDM_OPENW (WM_USER + 252)
1981 #define MCIWNDM_SENDSTRING WINELIB_NAME_AW(MCIWNDM_SENDSTRING)
1982 #define MCIWNDM_GETPOSITION WINELIB_NAME_AW(MCIWNDM_GETPOSITION)
1983 #define MCIWNDM_GETMODE WINELIB_NAME_AW(MCIWNDM_GETMODE)
1984 #define MCIWNDM_SETTIMEFORMAT WINELIB_NAME_AW(MCIWNDM_SETTIMEFORMAT)
1985 #define MCIWNDM_GETTIMEFORMAT WINELIB_NAME_AW(MCIWNDM_GETTIMEFORMAT)
1986 #define MCIWNDM_GETFILENAME WINELIB_NAME_AW(MCIWNDM_GETFILENAME)
1987 #define MCIWNDM_GETDEVICE WINELIB_NAME_AW(MCIWNDM_GETDEVICE)
1988 #define MCIWNDM_GETERROR WINELIB_NAME_AW(MCIWNDM_GETERROR)
1989 #define MCIWNDM_NEW WINELIB_NAME_AW(MCIWNDM_NEW)
1990 #define MCIWNDM_RETURNSTRING WINELIB_NAME_AW(MCIWNDM_RETURNSTRING)
1991 #define MCIWNDM_OPEN WINELIB_NAME_AW(MCIWNDM_OPEN)
1993 #define MCIWNDM_NOTIFYMODE (WM_USER + 200)
1994 #define MCIWNDM_NOTIFYPOS (WM_USER + 201)
1995 #define MCIWNDM_NOTIFYSIZE (WM_USER + 202)
1996 #define MCIWNDM_NOTIFYMEDIA (WM_USER + 203)
1997 #define MCIWNDM_NOTIFYERROR (WM_USER + 205)
1999 #define MCIWND_START -1
2000 #define MCIWND_END -2
2002 /********************************************
2003 * DrawDib declarations
2010 LONG timeDecompress
;
2015 } DRAWDIBTIME
, *LPDRAWDIBTIME
;
2017 HDRAWDIB VFWAPI
DrawDibOpen( void );
2024 _In_ BOOL fBackground
);
2033 _In_ LPBITMAPINFOHEADER lpbi
,
2047 _In_opt_ LPBITMAPINFOHEADER lpbi
,
2048 _In_opt_ LPVOID lpBits
,
2055 /* DrawDibDraw flags */
2057 #define DDF_UPDATE 0x0002
2058 #define DDF_SAME_HDC 0x0004
2059 #define DDF_SAME_DRAW 0x0008
2060 #define DDF_DONTDRAW 0x0010
2061 #define DDF_ANIMATE 0x0020
2062 #define DDF_BUFFER 0x0040
2063 #define DDF_JUSTDRAWIT 0x0080
2064 #define DDF_FULLSCREEN 0x0100
2065 #define DDF_BACKGROUNDPAL 0x0200
2066 #define DDF_NOTKEYFRAME 0x0400
2067 #define DDF_HURRYUP 0x0800
2068 #define DDF_HALFTONE 0x1000
2070 #define DDF_PREROLL DDF_DONTDRAW
2071 #define DDF_SAME_DIB DDF_SAME_DRAW
2072 #define DDF_SAME_SIZE DDF_SAME_DRAW
2074 BOOL VFWAPI
DrawDibSetPalette(_In_ HDRAWDIB hdd
, _In_opt_ HPALETTE hpal
);
2075 HPALETTE VFWAPI
DrawDibGetPalette(_In_ HDRAWDIB hdd
);
2079 DrawDibChangePalette(
2083 _In_reads_(iLen
) LPPALETTEENTRY lppe
);
2089 _Out_ LPBITMAPINFOHEADER lpbi
,
2091 _In_ DWORD dwFlags
);
2093 BOOL VFWAPI
DrawDibStart(_In_ HDRAWDIB hdd
, _In_ DWORD rate
);
2094 BOOL VFWAPI
DrawDibStop(_In_ HDRAWDIB hdd
);
2096 #define DrawDibUpdate(hdd, hdc, x, y) \
2097 DrawDibDraw(hdd, hdc, x, y, 0, 0, NULL, NULL, 0, 0, 0, 0, DDF_UPDATE)
2099 BOOL VFWAPI
DrawDibEnd(_In_ HDRAWDIB hdd
);
2100 BOOL VFWAPI
DrawDibClose(_In_ HDRAWDIB hdd
);
2101 BOOL VFWAPI
DrawDibTime(_In_ HDRAWDIB hdd
, _Out_ LPDRAWDIBTIME lpddtime
);
2103 /* display profiling */
2104 #define PD_CAN_DRAW_DIB 0x0001
2105 #define PD_CAN_STRETCHDIB 0x0002
2106 #define PD_STRETCHDIB_1_1_OK 0x0004
2107 #define PD_STRETCHDIB_1_2_OK 0x0008
2108 #define PD_STRETCHDIB_1_N_OK 0x0010
2110 DWORD VFWAPI
DrawDibProfileDisplay(_In_ LPBITMAPINFOHEADER lpbi
);
2112 DECLARE_HANDLE(HVIDEO
);
2113 typedef HVIDEO
*LPHVIDEO
;
2115 DWORD VFWAPI
VideoForWindowsVersion(void);
2117 LONG VFWAPI
InitVFW(void);
2118 LONG VFWAPI
TermVFW(void);
2120 #define DV_ERR_OK (0)
2121 #define DV_ERR_BASE (1)
2122 #define DV_ERR_NONSPECIFIC (DV_ERR_BASE)
2123 #define DV_ERR_BADFORMAT (DV_ERR_BASE + 1)
2124 #define DV_ERR_STILLPLAYING (DV_ERR_BASE + 2)
2125 #define DV_ERR_UNPREPARED (DV_ERR_BASE + 3)
2126 #define DV_ERR_SYNC (DV_ERR_BASE + 4)
2127 #define DV_ERR_TOOMANYCHANNELS (DV_ERR_BASE + 5)
2128 #define DV_ERR_NOTDETECTED (DV_ERR_BASE + 6)
2129 #define DV_ERR_BADINSTALL (DV_ERR_BASE + 7)
2130 #define DV_ERR_CREATEPALETTE (DV_ERR_BASE + 8)
2131 #define DV_ERR_SIZEFIELD (DV_ERR_BASE + 9)
2132 #define DV_ERR_PARAM1 (DV_ERR_BASE + 10)
2133 #define DV_ERR_PARAM2 (DV_ERR_BASE + 11)
2134 #define DV_ERR_CONFIG1 (DV_ERR_BASE + 12)
2135 #define DV_ERR_CONFIG2 (DV_ERR_BASE + 13)
2136 #define DV_ERR_FLAGS (DV_ERR_BASE + 14)
2137 #define DV_ERR_13 (DV_ERR_BASE + 15)
2139 #define DV_ERR_NOTSUPPORTED (DV_ERR_BASE + 16)
2140 #define DV_ERR_NOMEM (DV_ERR_BASE + 17)
2141 #define DV_ERR_ALLOCATED (DV_ERR_BASE + 18)
2142 #define DV_ERR_BADDEVICEID (DV_ERR_BASE + 19)
2143 #define DV_ERR_INVALHANDLE (DV_ERR_BASE + 20)
2144 #define DV_ERR_BADERRNUM (DV_ERR_BASE + 21)
2145 #define DV_ERR_NO_BUFFERS (DV_ERR_BASE + 22)
2147 #define DV_ERR_MEM_CONFLICT (DV_ERR_BASE + 23)
2148 #define DV_ERR_IO_CONFLICT (DV_ERR_BASE + 24)
2149 #define DV_ERR_DMA_CONFLICT (DV_ERR_BASE + 25)
2150 #define DV_ERR_INT_CONFLICT (DV_ERR_BASE + 26)
2151 #define DV_ERR_PROTECT_ONLY (DV_ERR_BASE + 27)
2152 #define DV_ERR_LASTERROR (DV_ERR_BASE + 27)
2154 #define DV_ERR_USER_MSG (DV_ERR_BASE + 1000)
2156 #ifndef MM_DRVM_OPEN
2157 #define MM_DRVM_OPEN 0x3D0
2158 #define MM_DRVM_CLOSE 0x3D1
2159 #define MM_DRVM_DATA 0x3D2
2160 #define MM_DRVM_ERROR 0x3D3
2162 #define DV_VM_OPEN MM_DRVM_OPEN
2163 #define DV_VM_CLOSE MM_DRVM_CLOSE
2164 #define DV_VM_DATA MM_DRVM_DATA
2165 #define DV_VM_ERROR MM_DRVM_ERROR
2168 typedef struct videohdr_tag
{
2170 DWORD dwBufferLength
;
2172 DWORD dwTimeCaptured
;
2175 DWORD_PTR dwReserved
[4];
2176 } VIDEOHDR
, *PVIDEOHDR
, *LPVIDEOHDR
;
2178 #define VHDR_DONE 0x00000001
2179 #define VHDR_PREPARED 0x00000002
2180 #define VHDR_INQUEUE 0x00000004
2181 #define VHDR_KEYFRAME 0x00000008
2183 typedef struct channel_caps_tag
{
2185 DWORD dwSrcRectXMod
;
2186 DWORD dwSrcRectYMod
;
2187 DWORD dwSrcRectWidthMod
;
2188 DWORD dwSrcRectHeightMod
;
2189 DWORD dwDstRectXMod
;
2190 DWORD dwDstRectYMod
;
2191 DWORD dwDstRectWidthMod
;
2192 DWORD dwDstRectHeightMod
;
2193 } CHANNEL_CAPS
, *PCHANNEL_CAPS
, *LPCHANNEL_CAPS
;
2195 #define VCAPS_OVERLAY 0x00000001
2196 #define VCAPS_SRC_CAN_CLIP 0x00000002
2197 #define VCAPS_DST_CAN_CLIP 0x00000004
2198 #define VCAPS_CAN_SCALE 0x00000008
2200 #define VIDEO_EXTERNALIN 0x0001
2201 #define VIDEO_EXTERNALOUT 0x0002
2202 #define VIDEO_IN 0x0004
2203 #define VIDEO_OUT 0x0008
2205 #define VIDEO_DLG_QUERY 0x0010
2207 #define VIDEO_CONFIGURE_QUERY 0x8000
2209 #define VIDEO_CONFIGURE_SET 0x1000
2211 #define VIDEO_CONFIGURE_GET 0x2000
2212 #define VIDEO_CONFIGURE_QUERYSIZE 0x0001
2214 #define VIDEO_CONFIGURE_CURRENT 0x0010
2215 #define VIDEO_CONFIGURE_NOMINAL 0x0020
2216 #define VIDEO_CONFIGURE_MIN 0x0040
2217 #define VIDEO_CONFIGURE_MAX 0x0080
2219 #define DVM_USER 0x4000
2221 #define DVM_CONFIGURE_START 0x1000
2222 #define DVM_CONFIGURE_END 0x1FFF
2224 #define DVM_PALETTE (DVM_CONFIGURE_START + 1)
2225 #define DVM_FORMAT (DVM_CONFIGURE_START + 2)
2226 #define DVM_PALETTERGB555 (DVM_CONFIGURE_START + 3)
2227 #define DVM_SRC_RECT (DVM_CONFIGURE_START + 4)
2228 #define DVM_DST_RECT (DVM_CONFIGURE_START + 5)
2230 #define AVICapSM(hwnd,m,w,l) ((IsWindow(hwnd)) ? SendMessage(hwnd,m,w,l) : 0)
2232 #define WM_CAP_START WM_USER
2234 #define WM_CAP_UNICODE_START WM_USER+100
2236 #define WM_CAP_GET_CAPSTREAMPTR (WM_CAP_START + 1)
2238 #define WM_CAP_SET_CALLBACK_ERRORW (WM_CAP_UNICODE_START + 2)
2239 #define WM_CAP_SET_CALLBACK_STATUSW (WM_CAP_UNICODE_START + 3)
2240 #define WM_CAP_SET_CALLBACK_ERRORA (WM_CAP_START + 2)
2241 #define WM_CAP_SET_CALLBACK_STATUSA (WM_CAP_START+ 3)
2243 #define WM_CAP_SET_CALLBACK_ERROR WINELIB_NAME_AW(WM_CAP_SET_CALLBACK_ERROR)
2244 #define WM_CAP_SET_CALLBACK_STATUS WINELIB_NAME_AW(WM_CAP_SET_CALLBACK_STATUS)
2246 #define WM_CAP_SET_CALLBACK_YIELD (WM_CAP_START + 4)
2247 #define WM_CAP_SET_CALLBACK_FRAME (WM_CAP_START + 5)
2248 #define WM_CAP_SET_CALLBACK_VIDEOSTREAM (WM_CAP_START + 6)
2249 #define WM_CAP_SET_CALLBACK_WAVESTREAM (WM_CAP_START + 7)
2250 #define WM_CAP_GET_USER_DATA (WM_CAP_START + 8)
2251 #define WM_CAP_SET_USER_DATA (WM_CAP_START + 9)
2253 #define WM_CAP_DRIVER_CONNECT (WM_CAP_START + 10)
2254 #define WM_CAP_DRIVER_DISCONNECT (WM_CAP_START + 11)
2256 #define WM_CAP_DRIVER_GET_NAMEA (WM_CAP_START + 12)
2257 #define WM_CAP_DRIVER_GET_VERSIONA (WM_CAP_START + 13)
2258 #define WM_CAP_DRIVER_GET_NAMEW (WM_CAP_UNICODE_START + 12)
2259 #define WM_CAP_DRIVER_GET_VERSIONW (WM_CAP_UNICODE_START + 13)
2261 #define WM_CAP_DRIVER_GET_NAME WINELIB_NAME_AW(WM_CAP_DRIVER_GET_NAME)
2262 #define WM_CAP_DRIVER_GET_VERSION WINELIB_NAME_AW(WM_CAP_DRIVER_GET_VERSION)
2264 #define WM_CAP_DRIVER_GET_CAPS (WM_CAP_START + 14)
2266 #define WM_CAP_FILE_SET_CAPTURE_FILEA (WM_CAP_START + 20)
2267 #define WM_CAP_FILE_GET_CAPTURE_FILEA (WM_CAP_START + 21)
2268 #define WM_CAP_FILE_ALLOCATE (WM_CAP_START + 22)
2269 #define WM_CAP_FILE_SAVEASA (WM_CAP_START + 23)
2270 #define WM_CAP_FILE_SET_INFOCHUNK (WM_CAP_START + 24)
2271 #define WM_CAP_FILE_SAVEDIBA (WM_CAP_START + 25)
2272 #define WM_CAP_FILE_SET_CAPTURE_FILEW (WM_CAP_UNICODE_START + 20)
2273 #define WM_CAP_FILE_GET_CAPTURE_FILEW (WM_CAP_UNICODE_START + 21)
2274 #define WM_CAP_FILE_SAVEASW (WM_CAP_UNICODE_START + 23)
2275 #define WM_CAP_FILE_SAVEDIBW (WM_CAP_UNICODE_START + 25)
2277 #define WM_CAP_FILE_SET_CAPTURE_FILE WINELIB_NAME_AW(WM_CAP_FILE_SET_CAPTURE_FILE)
2278 #define WM_CAP_FILE_GET_CAPTURE_FILE WINELIB_NAME_AW(WM_CAP_FILE_GET_CAPTURE_FILE)
2279 #define WM_CAP_FILE_SAVEAS WINELIB_NAME_AW(WM_CAP_FILE_SAVEAS)
2280 #define WM_CAP_FILE_SAVEDIB WINELIB_NAME_AW(WM_CAP_FILE_SAVEDIB)
2282 #define WM_CAP_EDIT_COPY (WM_CAP_START + 30)
2284 #define WM_CAP_SET_AUDIOFORMAT (WM_CAP_START + 35)
2285 #define WM_CAP_GET_AUDIOFORMAT (WM_CAP_START + 36)
2287 #define WM_CAP_DLG_VIDEOFORMAT (WM_CAP_START + 41)
2288 #define WM_CAP_DLG_VIDEOSOURCE (WM_CAP_START + 42)
2289 #define WM_CAP_DLG_VIDEODISPLAY (WM_CAP_START + 43)
2290 #define WM_CAP_GET_VIDEOFORMAT (WM_CAP_START + 44)
2291 #define WM_CAP_SET_VIDEOFORMAT (WM_CAP_START + 45)
2292 #define WM_CAP_DLG_VIDEOCOMPRESSION (WM_CAP_START + 46)
2294 #define WM_CAP_SET_PREVIEW (WM_CAP_START + 50)
2295 #define WM_CAP_SET_OVERLAY (WM_CAP_START + 51)
2296 #define WM_CAP_SET_PREVIEWRATE (WM_CAP_START + 52)
2297 #define WM_CAP_SET_SCALE (WM_CAP_START + 53)
2298 #define WM_CAP_GET_STATUS (WM_CAP_START + 54)
2299 #define WM_CAP_SET_SCROLL (WM_CAP_START + 55)
2301 #define WM_CAP_GRAB_FRAME (WM_CAP_START + 60)
2302 #define WM_CAP_GRAB_FRAME_NOSTOP (WM_CAP_START + 61)
2304 #define WM_CAP_SEQUENCE (WM_CAP_START + 62)
2305 #define WM_CAP_SEQUENCE_NOFILE (WM_CAP_START + 63)
2306 #define WM_CAP_SET_SEQUENCE_SETUP (WM_CAP_START + 64)
2307 #define WM_CAP_GET_SEQUENCE_SETUP (WM_CAP_START + 65)
2309 #define WM_CAP_SET_MCI_DEVICEA (WM_CAP_START + 66)
2310 #define WM_CAP_GET_MCI_DEVICEA (WM_CAP_START + 67)
2311 #define WM_CAP_SET_MCI_DEVICEW (WM_CAP_UNICODE_START + 66)
2312 #define WM_CAP_GET_MCI_DEVICEW (WM_CAP_UNICODE_START + 67)
2314 #define WM_CAP_SET_MCI_DEVICE WINELIB_NAME_AW(WM_CAP_SET_MCI_DEVICE)
2315 #define WM_CAP_GET_MCI_DEVICE WINELIB_NAME_AW(WM_CAP_GET_MCI_DEVICE)
2317 #define WM_CAP_STOP (WM_CAP_START + 68)
2318 #define WM_CAP_ABORT (WM_CAP_START + 69)
2320 #define WM_CAP_SINGLE_FRAME_OPEN (WM_CAP_START + 70)
2321 #define WM_CAP_SINGLE_FRAME_CLOSE (WM_CAP_START + 71)
2322 #define WM_CAP_SINGLE_FRAME (WM_CAP_START + 72)
2324 #define WM_CAP_PAL_OPENA (WM_CAP_START + 80)
2325 #define WM_CAP_PAL_SAVEA (WM_CAP_START + 81)
2326 #define WM_CAP_PAL_OPENW (WM_CAP_UNICODE_START + 80)
2327 #define WM_CAP_PAL_SAVEW (WM_CAP_UNICODE_START + 81)
2329 #define WM_CAP_PAL_OPEN WINELIB_NAME_AW(WM_CAP_PAL_OPEN)
2330 #define WM_CAP_PAL_SAVE WINELIB_NAME_AW(WM_CAP_PAL_SAVE)
2332 #define WM_CAP_PAL_PASTE (WM_CAP_START + 82)
2333 #define WM_CAP_PAL_AUTOCREATE (WM_CAP_START + 83)
2334 #define WM_CAP_PAL_MANUALCREATE (WM_CAP_START + 84)
2336 #define WM_CAP_SET_CALLBACK_CAPCONTROL (WM_CAP_START + 85)
2338 #define WM_CAP_UNICODE_END WM_CAP_PAL_SAVEW
2339 #define WM_CAP_END WM_CAP_UNICODE_END
2341 typedef struct tagCapDriverCaps
{
2344 BOOL fHasDlgVideoSource
;
2345 BOOL fHasDlgVideoFormat
;
2346 BOOL fHasDlgVideoDisplay
;
2347 BOOL fCaptureInitialized
;
2348 BOOL fDriverSuppliesPalettes
;
2352 HANDLE hVideoExtOut
;
2353 } CAPDRIVERCAPS
, *PCAPDRIVERCAPS
, *LPCAPDRIVERCAPS
;
2355 typedef struct tagCapStatus
{
2359 BOOL fOverlayWindow
;
2362 BOOL fUsingDefaultPalette
;
2363 BOOL fAudioHardware
;
2364 BOOL fCapFileExists
;
2365 DWORD dwCurrentVideoFrame
;
2366 DWORD dwCurrentVideoFramesDropped
;
2367 DWORD dwCurrentWaveSamples
;
2368 DWORD dwCurrentTimeElapsedMS
;
2369 HPALETTE hPalCurrent
;
2372 UINT wNumVideoAllocated
;
2373 UINT wNumAudioAllocated
;
2374 } CAPSTATUS
, *PCAPSTATUS
, *LPCAPSTATUS
;
2377 typedef struct tagCaptureParms
{
2378 DWORD dwRequestMicroSecPerFrame
;
2379 BOOL fMakeUserHitOKToCapture
;
2380 UINT wPercentDropForError
;
2383 UINT wChunkGranularity
;
2384 BOOL fUsingDOSMemory
;
2385 UINT wNumVideoRequested
;
2387 UINT wNumAudioRequested
;
2389 BOOL fAbortLeftMouse
;
2390 BOOL fAbortRightMouse
;
2394 BOOL fStepMCIDevice
;
2395 DWORD dwMCIStartTime
;
2396 DWORD dwMCIStopTime
;
2397 BOOL fStepCaptureAt2x
;
2398 UINT wStepCaptureAverageFrames
;
2399 DWORD dwAudioBufferSize
;
2400 BOOL fDisableWriteCache
;
2401 UINT AVStreamMaster
;
2402 } CAPTUREPARMS
, *PCAPTUREPARMS
, *LPCAPTUREPARMS
;
2404 typedef LRESULT (CALLBACK
* CAPYIELDCALLBACK
)(_In_ HWND hWnd
);
2407 (CALLBACK
* CAPSTATUSCALLBACKW
)(
2413 (CALLBACK
* CAPERRORCALLBACKW
)(
2419 (CALLBACK
* CAPSTATUSCALLBACKA
)(
2425 (CALLBACK
* CAPERRORCALLBACKA
)(
2431 (CALLBACK
* CAPVIDEOCALLBACK
)(
2433 _In_ LPVIDEOHDR lpVHdr
);
2436 (CALLBACK
* CAPWAVECALLBACK
)(
2438 _In_ LPWAVEHDR lpWHdr
);
2441 (CALLBACK
* CAPCONTROLCALLBACK
)(
2447 capCreateCaptureWindowA(
2459 capCreateCaptureWindowW(
2469 #define capCreateCaptureWindow WINELIB_NAME_AW(capCreateCaptureWindow)
2473 capGetDriverDescriptionA(
2475 _Out_writes_(cbName
) LPSTR
,
2477 _Out_writes_(cbVer
) LPSTR
,
2482 capGetDriverDescriptionW(
2484 _Out_writes_(cbName
) LPWSTR
,
2486 _Out_writes_(cbVer
) LPWSTR
,
2489 #define capGetDriverDescription WINELIB_NAME_AW(capGetDriverDescription)
2493 #endif /* __cplusplus */
2495 #endif /* __WINE_VFW_H */