| 1 | #ifndef __WINE_VFW_H
|
|---|
| 2 | #define __WINE_VFW_H
|
|---|
| 3 |
|
|---|
| 4 | #include "windef.h"
|
|---|
| 5 | #include "mmsystem.h"
|
|---|
| 6 | #include "wingdi.h"
|
|---|
| 7 | #include "unknwn.h"
|
|---|
| 8 |
|
|---|
| 9 | #ifndef __cplusplus
|
|---|
| 10 | #ifndef inline
|
|---|
| 11 | #define inline
|
|---|
| 12 | #endif
|
|---|
| 13 | #endif
|
|---|
| 14 |
|
|---|
| 15 | #define VFWAPI WINAPI
|
|---|
| 16 | #define VFWAPIV WINAPIV
|
|---|
| 17 |
|
|---|
| 18 | #ifdef __cplusplus
|
|---|
| 19 | extern "C" {
|
|---|
| 20 | #endif /* __cplusplus */
|
|---|
| 21 |
|
|---|
| 22 | typedef HANDLE HDRAWDIB;
|
|---|
| 23 |
|
|---|
| 24 | HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCSTR szFile);
|
|---|
| 25 | HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile);
|
|---|
| 26 | #define MCIWndCreate WINELIB_NAME_AW(MCIWndCreate)
|
|---|
| 27 | DWORD VFWAPI VideoForWindowsVersion(void);
|
|---|
| 28 | LONG VFWAPI InitVFW(void);
|
|---|
| 29 | LONG VFWAPI TermVFW(void);
|
|---|
| 30 |
|
|---|
| 31 | #ifndef mmioFOURCC
|
|---|
| 32 | #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
|
|---|
| 33 | ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
|
|---|
| 34 | ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
|
|---|
| 35 | #endif
|
|---|
| 36 |
|
|---|
| 37 | #ifndef aviTWOCC
|
|---|
| 38 | #define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8))
|
|---|
| 39 | #endif
|
|---|
| 40 |
|
|---|
| 41 | #define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c')
|
|---|
| 42 | #define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c')
|
|---|
| 43 |
|
|---|
| 44 | /*****************************************************************************
|
|---|
| 45 | * Predeclare the interfaces
|
|---|
| 46 | */
|
|---|
| 47 | typedef struct IAVIStream IAVIStream,*PAVISTREAM;
|
|---|
| 48 | typedef struct IAVIFile IAVIFile,*PAVIFILE;
|
|---|
| 49 | typedef struct IGetFrame IGetFrame,*PGETFRAME;
|
|---|
| 50 |
|
|---|
| 51 | /* Installable Compressor Manager */
|
|---|
| 52 |
|
|---|
| 53 | #ifdef __WINE__
|
|---|
| 54 | /* HIC struct (same layout as Win95 one) */
|
|---|
| 55 | typedef struct tagWINE_HIC {
|
|---|
| 56 | DWORD magic; /* 00: 'Smag' */
|
|---|
| 57 | HANDLE curthread; /* 04: */
|
|---|
| 58 | DWORD type; /* 08: */
|
|---|
| 59 | DWORD handler; /* 0C: */
|
|---|
| 60 | HDRVR hdrv; /* 10: */
|
|---|
| 61 | #ifdef __WIN32OS2__
|
|---|
| 62 | DWORD privatevfw; /* 14:(handled by SendDriverMessage)*/
|
|---|
| 63 | #else
|
|---|
| 64 | DWORD private; /* 14:(handled by SendDriverMessage)*/
|
|---|
| 65 | #endif
|
|---|
| 66 | FARPROC driverproc; /* 18:(handled by SendDriverMessage)*/
|
|---|
| 67 | DWORD x1; /* 1c: name? */
|
|---|
| 68 | WORD x2; /* 20: */
|
|---|
| 69 | DWORD x3; /* 22: */
|
|---|
| 70 | /* 26: */
|
|---|
| 71 | } WINE_HIC;
|
|---|
| 72 | #endif
|
|---|
| 73 |
|
|---|
| 74 | /* error return codes */
|
|---|
| 75 | #define ICERR_OK 0
|
|---|
| 76 | #define ICERR_DONTDRAW 1
|
|---|
| 77 | #define ICERR_NEWPALETTE 2
|
|---|
| 78 | #define ICERR_GOTOKEYFRAME 3
|
|---|
| 79 | #define ICERR_STOPDRAWING 4
|
|---|
| 80 |
|
|---|
| 81 | #define ICERR_UNSUPPORTED -1
|
|---|
| 82 | #define ICERR_BADFORMAT -2
|
|---|
| 83 | #define ICERR_MEMORY -3
|
|---|
| 84 | #define ICERR_INTERNAL -4
|
|---|
| 85 | #define ICERR_BADFLAGS -5
|
|---|
| 86 | #define ICERR_BADPARAM -6
|
|---|
| 87 | #define ICERR_BADSIZE -7
|
|---|
| 88 | #define ICERR_BADHANDLE -8
|
|---|
| 89 | #define ICERR_CANTUPDATE -9
|
|---|
| 90 | #define ICERR_ABORT -10
|
|---|
| 91 | #define ICERR_ERROR -100
|
|---|
| 92 | #define ICERR_BADBITDEPTH -200
|
|---|
| 93 | #define ICERR_BADIMAGESIZE -201
|
|---|
| 94 |
|
|---|
| 95 | #define ICERR_CUSTOM -400
|
|---|
| 96 |
|
|---|
| 97 | /* ICM Messages */
|
|---|
| 98 | #define ICM_USER (DRV_USER+0x0000)
|
|---|
| 99 |
|
|---|
| 100 | /* ICM driver message range */
|
|---|
| 101 | #define ICM_RESERVED_LOW (DRV_USER+0x1000)
|
|---|
| 102 | #define ICM_RESERVED_HIGH (DRV_USER+0x2000)
|
|---|
| 103 | #define ICM_RESERVED ICM_RESERVED_LOW
|
|---|
| 104 |
|
|---|
| 105 | #define ICM_GETSTATE (ICM_RESERVED+0)
|
|---|
| 106 | #define ICM_SETSTATE (ICM_RESERVED+1)
|
|---|
| 107 | #define ICM_GETINFO (ICM_RESERVED+2)
|
|---|
| 108 |
|
|---|
| 109 | #define ICM_CONFIGURE (ICM_RESERVED+10)
|
|---|
| 110 | #define ICM_ABOUT (ICM_RESERVED+11)
|
|---|
| 111 | /* */
|
|---|
| 112 |
|
|---|
| 113 | #define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30)
|
|---|
| 114 | #define ICM_GETQUALITY (ICM_RESERVED+31)
|
|---|
| 115 | #define ICM_SETQUALITY (ICM_RESERVED+32)
|
|---|
| 116 |
|
|---|
| 117 | #define ICM_SET (ICM_RESERVED+40)
|
|---|
| 118 | #define ICM_GET (ICM_RESERVED+41)
|
|---|
| 119 |
|
|---|
| 120 | /* 2 constant FOURCC codes */
|
|---|
| 121 | #define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
|
|---|
| 122 | #define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
|
|---|
| 123 |
|
|---|
| 124 | #define ICM_COMPRESS_GET_FORMAT (ICM_USER+4)
|
|---|
| 125 | #define ICM_COMPRESS_GET_SIZE (ICM_USER+5)
|
|---|
| 126 | #define ICM_COMPRESS_QUERY (ICM_USER+6)
|
|---|
| 127 | #define ICM_COMPRESS_BEGIN (ICM_USER+7)
|
|---|
| 128 | #define ICM_COMPRESS (ICM_USER+8)
|
|---|
| 129 | #define ICM_COMPRESS_END (ICM_USER+9)
|
|---|
| 130 |
|
|---|
| 131 | #define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10)
|
|---|
| 132 | #define ICM_DECOMPRESS_QUERY (ICM_USER+11)
|
|---|
| 133 | #define ICM_DECOMPRESS_BEGIN (ICM_USER+12)
|
|---|
| 134 | #define ICM_DECOMPRESS (ICM_USER+13)
|
|---|
| 135 | #define ICM_DECOMPRESS_END (ICM_USER+14)
|
|---|
| 136 | #define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29)
|
|---|
| 137 | #define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30)
|
|---|
| 138 |
|
|---|
| 139 | #define ICM_DRAW_QUERY (ICM_USER+31)
|
|---|
| 140 | #define ICM_DRAW_BEGIN (ICM_USER+15)
|
|---|
| 141 | #define ICM_DRAW_GET_PALETTE (ICM_USER+16)
|
|---|
| 142 | #define ICM_DRAW_START (ICM_USER+18)
|
|---|
| 143 | #define ICM_DRAW_STOP (ICM_USER+19)
|
|---|
| 144 | #define ICM_DRAW_END (ICM_USER+21)
|
|---|
| 145 | #define ICM_DRAW_GETTIME (ICM_USER+32)
|
|---|
| 146 | #define ICM_DRAW (ICM_USER+33)
|
|---|
| 147 | #define ICM_DRAW_WINDOW (ICM_USER+34)
|
|---|
| 148 | #define ICM_DRAW_SETTIME (ICM_USER+35)
|
|---|
| 149 | #define ICM_DRAW_REALIZE (ICM_USER+36)
|
|---|
| 150 | #define ICM_DRAW_FLUSH (ICM_USER+37)
|
|---|
| 151 | #define ICM_DRAW_RENDERBUFFER (ICM_USER+38)
|
|---|
| 152 |
|
|---|
| 153 | #define ICM_DRAW_START_PLAY (ICM_USER+39)
|
|---|
| 154 | #define ICM_DRAW_STOP_PLAY (ICM_USER+40)
|
|---|
| 155 |
|
|---|
| 156 | #define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50)
|
|---|
| 157 | #define ICM_DRAW_CHANGEPALETTE (ICM_USER+51)
|
|---|
| 158 |
|
|---|
| 159 | #define ICM_GETBUFFERSWANTED (ICM_USER+41)
|
|---|
| 160 |
|
|---|
| 161 | #define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42)
|
|---|
| 162 |
|
|---|
| 163 | #define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60)
|
|---|
| 164 | #define ICM_DECOMPRESSEX_QUERY (ICM_USER+61)
|
|---|
| 165 | #define ICM_DECOMPRESSEX (ICM_USER+62)
|
|---|
| 166 | #define ICM_DECOMPRESSEX_END (ICM_USER+63)
|
|---|
| 167 |
|
|---|
| 168 | #define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70)
|
|---|
| 169 | #define ICM_SET_STATUS_PROC (ICM_USER+72)
|
|---|
| 170 |
|
|---|
| 171 | /* structs */
|
|---|
| 172 |
|
|---|
| 173 | /* NOTE: Only the 16 bit structs are packed. Structs that are packed anyway
|
|---|
| 174 | * have not been changed. If a structure is later extended, you may need to create
|
|---|
| 175 | * two versions of it.
|
|---|
| 176 | */
|
|---|
| 177 |
|
|---|
| 178 | typedef struct {
|
|---|
| 179 | DWORD dwSize; /* 00: size */
|
|---|
| 180 | DWORD fccType; /* 04: type 'vidc' usually */
|
|---|
| 181 | DWORD fccHandler; /* 08: */
|
|---|
| 182 | DWORD dwVersion; /* 0c: version of compman opening you */
|
|---|
| 183 | DWORD dwFlags; /* 10: LOWORD is type specific */
|
|---|
| 184 | LRESULT dwError; /* 14: */
|
|---|
| 185 | LPVOID pV1Reserved; /* 18: */
|
|---|
| 186 | LPVOID pV2Reserved; /* 1c: */
|
|---|
| 187 | DWORD dnDevNode; /* 20: */
|
|---|
| 188 | /* 24: */
|
|---|
| 189 | } ICOPEN,*LPICOPEN;
|
|---|
| 190 |
|
|---|
| 191 | #define ICCOMPRESS_KEYFRAME 0x00000001L
|
|---|
| 192 |
|
|---|
| 193 | typedef struct {
|
|---|
| 194 | DWORD dwFlags;
|
|---|
| 195 | LPBITMAPINFOHEADER lpbiOutput;
|
|---|
| 196 | LPVOID lpOutput;
|
|---|
| 197 | LPBITMAPINFOHEADER lpbiInput;
|
|---|
| 198 | LPVOID lpInput;
|
|---|
| 199 | LPDWORD lpckid;
|
|---|
| 200 | LPDWORD lpdwFlags;
|
|---|
| 201 | LONG lFrameNum;
|
|---|
| 202 | DWORD dwFrameSize;
|
|---|
| 203 | DWORD dwQuality;
|
|---|
| 204 | LPBITMAPINFOHEADER lpbiPrev;
|
|---|
| 205 | LPVOID lpPrev;
|
|---|
| 206 | } ICCOMPRESS;
|
|---|
| 207 |
|
|---|
| 208 | DWORD VFWAPIV ICCompress(
|
|---|
| 209 | HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiOutput,LPVOID lpData,
|
|---|
| 210 | LPBITMAPINFOHEADER lpbiInput,LPVOID lpBits,LPDWORD lpckid,
|
|---|
| 211 | LPDWORD lpdwFlags,LONG lFrameNum,DWORD dwFrameSize,DWORD dwQuality,
|
|---|
| 212 | LPBITMAPINFOHEADER lpbiPrev,LPVOID lpPrev
|
|---|
| 213 | );
|
|---|
| 214 |
|
|---|
| 215 | #define ICCompressGetFormat(hic, lpbiInput, lpbiOutput) \
|
|---|
| 216 | ICSendMessage( \
|
|---|
| 217 | hic,ICM_COMPRESS_GET_FORMAT,(DWORD)(LPVOID)(lpbiInput), \
|
|---|
| 218 | (DWORD)(LPVOID)(lpbiOutput) \
|
|---|
| 219 | )
|
|---|
| 220 |
|
|---|
| 221 | #define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
|
|---|
| 222 |
|
|---|
| 223 | #define ICCompressBegin(hic, lpbiInput, lpbiOutput) \
|
|---|
| 224 | ICSendMessage( \
|
|---|
| 225 | hic, ICM_COMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
|
|---|
| 226 | (DWORD)(LPVOID)(lpbiOutput) \
|
|---|
| 227 | )
|
|---|
| 228 |
|
|---|
| 229 | #define ICCompressGetSize(hic, lpbiInput, lpbiOutput) \
|
|---|
| 230 | ICSendMessage( \
|
|---|
| 231 | hic, ICM_COMPRESS_GET_SIZE, (DWORD)(LPVOID)(lpbiInput), \
|
|---|
| 232 | (DWORD)(LPVOID)(lpbiOutput) \
|
|---|
| 233 | )
|
|---|
| 234 |
|
|---|
| 235 | #define ICCompressQuery(hic, lpbiInput, lpbiOutput) \
|
|---|
| 236 | ICSendMessage( \
|
|---|
| 237 | hic, ICM_COMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
|
|---|
| 238 | (DWORD)(LPVOID)(lpbiOutput) \
|
|---|
| 239 | )
|
|---|
| 240 |
|
|---|
| 241 | #define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0)
|
|---|
| 242 |
|
|---|
| 243 | /* ICCOMPRESSFRAMES.dwFlags */
|
|---|
| 244 | #define ICCOMPRESSFRAMES_PADDING 0x00000001
|
|---|
| 245 | typedef struct {
|
|---|
| 246 | DWORD dwFlags;
|
|---|
| 247 | LPBITMAPINFOHEADER lpbiOutput;
|
|---|
| 248 | LPARAM lOutput;
|
|---|
| 249 | LPBITMAPINFOHEADER lpbiInput;
|
|---|
| 250 | LPARAM lInput;
|
|---|
| 251 | LONG lStartFrame;
|
|---|
| 252 | LONG lFrameCount;
|
|---|
| 253 | LONG lQuality;
|
|---|
| 254 | LONG lDataRate;
|
|---|
| 255 | LONG lKeyRate;
|
|---|
| 256 | DWORD dwRate;
|
|---|
| 257 | DWORD dwScale;
|
|---|
| 258 | DWORD dwOverheadPerFrame;
|
|---|
| 259 | DWORD dwReserved2;
|
|---|
| 260 | #ifdef __WIN32OS2__
|
|---|
| 261 | LONG (* CALLBACK GetData)(LPARAM lInput,LONG lFrame,LPVOID lpBits,LONG len);
|
|---|
| 262 | LONG (* CALLBACK PutData)(LPARAM lOutput,LONG lFrame,LPVOID lpBits,LONG len);
|
|---|
| 263 | #else
|
|---|
| 264 | LONG CALLBACK (*GetData)(LPARAM lInput,LONG lFrame,LPVOID lpBits,LONG len);
|
|---|
| 265 | LONG CALLBACK (*PutData)(LPARAM lOutput,LONG lFrame,LPVOID lpBits,LONG len);
|
|---|
| 266 | #endif
|
|---|
| 267 | } ICCOMPRESSFRAMES;
|
|---|
| 268 |
|
|---|
| 269 | typedef struct {
|
|---|
| 270 | DWORD dwFlags;
|
|---|
| 271 | LPARAM lParam;
|
|---|
| 272 | /* messages for Status callback */
|
|---|
| 273 | #define ICSTATUS_START 0
|
|---|
| 274 | #define ICSTATUS_STATUS 1
|
|---|
| 275 | #define ICSTATUS_END 2
|
|---|
| 276 | #define ICSTATUS_ERROR 3
|
|---|
| 277 | #define ICSTATUS_YIELD 4
|
|---|
| 278 | /* FIXME: some X11 libs define Status as int... */
|
|---|
| 279 | /* LONG CALLBACK (*zStatus)(LPARAM lParam, UINT message, LONG l); */
|
|---|
| 280 | #ifdef __WIN32OS2__
|
|---|
| 281 | LONG (* CALLBACK zStatus)(LPARAM lParam, UINT message, LONG l);
|
|---|
| 282 | #else
|
|---|
| 283 | LONG CALLBACK (*zStatus)(LPARAM lParam, UINT message, LONG l);
|
|---|
| 284 | #endif
|
|---|
| 285 | } ICSETSTATUSPROC;
|
|---|
| 286 |
|
|---|
| 287 | /* Values for wMode of ICOpen() */
|
|---|
| 288 | #define ICMODE_COMPRESS 1
|
|---|
| 289 | #define ICMODE_DECOMPRESS 2
|
|---|
| 290 | #define ICMODE_FASTDECOMPRESS 3
|
|---|
| 291 | #define ICMODE_QUERY 4
|
|---|
| 292 | #define ICMODE_FASTCOMPRESS 5
|
|---|
| 293 | #define ICMODE_DRAW 8
|
|---|
| 294 |
|
|---|
| 295 | /* quality flags */
|
|---|
| 296 | #define ICQUALITY_LOW 0
|
|---|
| 297 | #define ICQUALITY_HIGH 10000
|
|---|
| 298 | #define ICQUALITY_DEFAULT -1
|
|---|
| 299 |
|
|---|
| 300 | typedef struct {
|
|---|
| 301 | DWORD dwSize; /* 00: */
|
|---|
| 302 | DWORD fccType; /* 04:compressor type 'vidc' 'audc' */
|
|---|
| 303 | DWORD fccHandler; /* 08:compressor sub-type 'rle ' 'jpeg' 'pcm '*/
|
|---|
| 304 | DWORD dwFlags; /* 0c:flags LOWORD is type specific */
|
|---|
| 305 | DWORD dwVersion; /* 10:version of the driver */
|
|---|
| 306 | DWORD dwVersionICM; /* 14:version of the ICM used */
|
|---|
| 307 | /*
|
|---|
| 308 | * under Win32, the driver always returns UNICODE strings.
|
|---|
| 309 | */
|
|---|
| 310 | WCHAR szName[16]; /* 18:short name */
|
|---|
| 311 | WCHAR szDescription[128]; /* 38:long name */
|
|---|
| 312 | WCHAR szDriver[128]; /* 138:driver that contains compressor*/
|
|---|
| 313 | /* 238: */
|
|---|
| 314 | } ICINFO;
|
|---|
| 315 |
|
|---|
| 316 | /* ICINFO.dwFlags */
|
|---|
| 317 | #define VIDCF_QUALITY 0x0001 /* supports quality */
|
|---|
| 318 | #define VIDCF_CRUNCH 0x0002 /* supports crunching to a frame size */
|
|---|
| 319 | #define VIDCF_TEMPORAL 0x0004 /* supports inter-frame compress */
|
|---|
| 320 | #define VIDCF_COMPRESSFRAMES 0x0008 /* wants the compress all frames message */
|
|---|
| 321 | #define VIDCF_DRAW 0x0010 /* supports drawing */
|
|---|
| 322 | #define VIDCF_FASTTEMPORALC 0x0020 /* does not need prev frame on compress */
|
|---|
| 323 | #define VIDCF_FASTTEMPORALD 0x0080 /* does not need prev frame on decompress */
|
|---|
| 324 | #define VIDCF_QUALITYTIME 0x0040 /* supports temporal quality */
|
|---|
| 325 |
|
|---|
| 326 | #define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
|
|---|
| 327 |
|
|---|
| 328 |
|
|---|
| 329 | /* function shortcuts */
|
|---|
| 330 | /* ICM_ABOUT */
|
|---|
| 331 | #define ICMF_ABOUT_QUERY 0x00000001
|
|---|
| 332 |
|
|---|
| 333 | #define ICQueryAbout(hic) \
|
|---|
| 334 | (ICSendMessage(hic,ICM_ABOUT,(DWORD)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
|
|---|
| 335 |
|
|---|
| 336 | #define ICAbout(hic, hwnd) ICSendMessage(hic,ICM_ABOUT,(DWORD)(UINT)(hwnd),0)
|
|---|
| 337 |
|
|---|
| 338 | /* ICM_CONFIGURE */
|
|---|
| 339 | #define ICMF_CONFIGURE_QUERY 0x00000001
|
|---|
| 340 | #define ICQueryConfigure(hic) \
|
|---|
| 341 | (ICSendMessage(hic,ICM_CONFIGURE,(DWORD)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
|
|---|
| 342 |
|
|---|
| 343 | #define ICConfigure(hic,hwnd) \
|
|---|
| 344 | ICSendMessage(hic,ICM_CONFIGURE,(DWORD)(UINT)(hwnd),0)
|
|---|
| 345 |
|
|---|
| 346 | /* Decompression stuff */
|
|---|
| 347 | #define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */
|
|---|
| 348 | #define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */
|
|---|
| 349 | #define ICDECOMPRESS_PREROLL 0x20000000 /* this frame is before real start */
|
|---|
| 350 | #define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */
|
|---|
| 351 | #define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */
|
|---|
| 352 |
|
|---|
| 353 | typedef struct {
|
|---|
| 354 | DWORD dwFlags; /* flags (from AVI index...) */
|
|---|
| 355 | LPBITMAPINFOHEADER lpbiInput; /* BITMAPINFO of compressed data */
|
|---|
| 356 | LPVOID lpInput; /* compressed data */
|
|---|
| 357 | LPBITMAPINFOHEADER lpbiOutput; /* DIB to decompress to */
|
|---|
| 358 | LPVOID lpOutput;
|
|---|
| 359 | DWORD ckid; /* ckid from AVI file */
|
|---|
| 360 | } ICDECOMPRESS;
|
|---|
| 361 |
|
|---|
| 362 | typedef struct {
|
|---|
| 363 | DWORD dwFlags;
|
|---|
| 364 | LPBITMAPINFOHEADER lpbiSrc;
|
|---|
| 365 | LPVOID lpSrc;
|
|---|
| 366 | LPBITMAPINFOHEADER lpbiDst;
|
|---|
| 367 | LPVOID lpDst;
|
|---|
| 368 |
|
|---|
| 369 | /* changed for ICM_DECOMPRESSEX */
|
|---|
| 370 | INT xDst; /* destination rectangle */
|
|---|
| 371 | INT yDst;
|
|---|
| 372 | INT dxDst;
|
|---|
| 373 | INT dyDst;
|
|---|
| 374 |
|
|---|
| 375 | INT xSrc; /* source rectangle */
|
|---|
| 376 | INT ySrc;
|
|---|
| 377 | INT dxSrc;
|
|---|
| 378 | INT dySrc;
|
|---|
| 379 | } ICDECOMPRESSEX;
|
|---|
| 380 |
|
|---|
| 381 | DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,LPVOID lpData,LPBITMAPINFOHEADER lpbi,LPVOID lpBits);
|
|---|
| 382 |
|
|---|
| 383 | #define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \
|
|---|
| 384 | ICSendMessage( \
|
|---|
| 385 | hic, ICM_DECOMPRESS_BEGIN, (DWORD)(LPVOID)(lpbiInput), \
|
|---|
| 386 | (DWORD)(LPVOID)(lpbiOutput) \
|
|---|
| 387 | )
|
|---|
| 388 |
|
|---|
| 389 | #define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \
|
|---|
| 390 | ICSendMessage( \
|
|---|
| 391 | hic,ICM_DECOMPRESS_QUERY, (DWORD)(LPVOID)(lpbiInput), \
|
|---|
| 392 | (DWORD) (LPVOID)(lpbiOutput) \
|
|---|
| 393 | )
|
|---|
| 394 |
|
|---|
| 395 | #define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \
|
|---|
| 396 | ((LONG)ICSendMessage( \
|
|---|
| 397 | hic,ICM_DECOMPRESS_GET_FORMAT, (DWORD)(LPVOID)(lpbiInput), \
|
|---|
| 398 | (DWORD)(LPVOID)(lpbiOutput) \
|
|---|
| 399 | ))
|
|---|
| 400 |
|
|---|
| 401 | #define ICDecompressGetFormatSize(hic, lpbi) \
|
|---|
| 402 | ICDecompressGetFormat(hic, lpbi, NULL)
|
|---|
| 403 |
|
|---|
| 404 | #define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput) \
|
|---|
| 405 | ICSendMessage( \
|
|---|
| 406 | hic, ICM_DECOMPRESS_GET_PALETTE, (DWORD)(LPVOID)(lpbiInput), \
|
|---|
| 407 | (DWORD)(LPVOID)(lpbiOutput) \
|
|---|
| 408 | )
|
|---|
| 409 |
|
|---|
| 410 | #define ICDecompressSetPalette(hic,lpbiPalette) \
|
|---|
| 411 | ICSendMessage( \
|
|---|
| 412 | hic,ICM_DECOMPRESS_SET_PALETTE, \
|
|---|
| 413 | (DWORD)(LPVOID)(lpbiPalette),0 \
|
|---|
| 414 | )
|
|---|
| 415 |
|
|---|
| 416 | #define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)
|
|---|
| 417 |
|
|---|
| 418 | LRESULT VFWAPI ICSendMessage(HIC hic, UINT msg, DWORD dw1, DWORD dw2);
|
|---|
| 419 |
|
|---|
| 420 | inline static LRESULT VFWAPI ICDecompressEx(HIC hic, DWORD dwFlags,
|
|---|
| 421 | LPBITMAPINFOHEADER lpbiSrc, LPVOID lpSrc,
|
|---|
| 422 | int xSrc, int ySrc, int dxSrc, int dySrc,
|
|---|
| 423 | LPBITMAPINFOHEADER lpbiDst, LPVOID lpDst,
|
|---|
| 424 | int xDst, int yDst, int dxDst, int dyDst)
|
|---|
| 425 | {
|
|---|
| 426 | ICDECOMPRESSEX ic;
|
|---|
| 427 |
|
|---|
| 428 | ic.dwFlags = dwFlags;
|
|---|
| 429 | ic.lpbiSrc = lpbiSrc;
|
|---|
| 430 | ic.lpSrc = lpSrc;
|
|---|
| 431 | ic.xSrc = xSrc;
|
|---|
| 432 | ic.ySrc = ySrc;
|
|---|
| 433 | ic.dxSrc = dxSrc;
|
|---|
| 434 | ic.dySrc = dySrc;
|
|---|
| 435 | ic.lpbiDst = lpbiDst;
|
|---|
| 436 | ic.lpDst = lpDst;
|
|---|
| 437 | ic.xDst = xDst;
|
|---|
| 438 | ic.yDst = yDst;
|
|---|
| 439 | ic.dxDst = dxDst;
|
|---|
| 440 | ic.dyDst = dyDst;
|
|---|
| 441 | return ICSendMessage(hic, ICM_DECOMPRESSEX, (DWORD)&ic, sizeof(ic));
|
|---|
| 442 | }
|
|---|
| 443 |
|
|---|
| 444 | inline static LRESULT VFWAPI ICDecompressExBegin(HIC hic, DWORD dwFlags,
|
|---|
| 445 | LPBITMAPINFOHEADER lpbiSrc,
|
|---|
| 446 | LPVOID lpSrc,
|
|---|
| 447 | int xSrc, int ySrc, int dxSrc, int dySrc,
|
|---|
| 448 | LPBITMAPINFOHEADER lpbiDst,
|
|---|
| 449 | LPVOID lpDst,
|
|---|
| 450 | int xDst,
|
|---|
| 451 | int yDst,
|
|---|
| 452 | int dxDst,
|
|---|
| 453 | int dyDst)
|
|---|
| 454 | {
|
|---|
| 455 | ICDECOMPRESSEX ic;
|
|---|
| 456 |
|
|---|
| 457 | ic.dwFlags = dwFlags;
|
|---|
| 458 | ic.lpbiSrc = lpbiSrc;
|
|---|
| 459 | ic.lpSrc = lpSrc;
|
|---|
| 460 | ic.xSrc = xSrc;
|
|---|
| 461 | ic.ySrc = ySrc;
|
|---|
| 462 | ic.dxSrc = dxSrc;
|
|---|
| 463 | ic.dySrc = dySrc;
|
|---|
| 464 | ic.lpbiDst = lpbiDst;
|
|---|
| 465 | ic.lpDst = lpDst;
|
|---|
| 466 | ic.xDst = xDst;
|
|---|
| 467 | ic.yDst = yDst;
|
|---|
| 468 | ic.dxDst = dxDst;
|
|---|
| 469 | ic.dyDst = dyDst;
|
|---|
| 470 | return ICSendMessage(hic, ICM_DECOMPRESSEX_BEGIN, (DWORD)&ic, sizeof(ic));
|
|---|
| 471 | }
|
|---|
| 472 | inline static LRESULT VFWAPI ICDecompressExQuery(HIC hic, DWORD dwFlags,
|
|---|
| 473 | LPBITMAPINFOHEADER lpbiSrc,
|
|---|
| 474 | LPVOID lpSrc,
|
|---|
| 475 | int xSrc, int ySrc, int dxSrc, int dySrc,
|
|---|
| 476 | LPBITMAPINFOHEADER lpbiDst,
|
|---|
| 477 | LPVOID lpDst,
|
|---|
| 478 | int xDst,
|
|---|
| 479 | int yDst,
|
|---|
| 480 | int dxDst,
|
|---|
| 481 | int dyDst)
|
|---|
| 482 | {
|
|---|
| 483 | ICDECOMPRESSEX ic;
|
|---|
| 484 |
|
|---|
| 485 | ic.dwFlags = dwFlags;
|
|---|
| 486 | ic.lpbiSrc = lpbiSrc;
|
|---|
| 487 | ic.lpSrc = lpSrc;
|
|---|
| 488 | ic.xSrc = xSrc;
|
|---|
| 489 | ic.ySrc = ySrc;
|
|---|
| 490 | ic.dxSrc = dxSrc;
|
|---|
| 491 | ic.dySrc = dySrc;
|
|---|
| 492 | ic.lpbiDst = lpbiDst;
|
|---|
| 493 | ic.lpDst = lpDst;
|
|---|
| 494 | ic.xDst = xDst;
|
|---|
| 495 | ic.yDst = yDst;
|
|---|
| 496 | ic.dxDst = dxDst;
|
|---|
| 497 | ic.dyDst = dyDst;
|
|---|
| 498 | return ICSendMessage(hic, ICM_DECOMPRESSEX_QUERY, (DWORD)&ic, sizeof(ic));
|
|---|
| 499 | }
|
|---|
| 500 |
|
|---|
| 501 | #define ICDecompressExEnd(hic) \
|
|---|
| 502 | ICSendMessage(hic, ICM_DECOMPRESSEX_END, 0, 0)
|
|---|
| 503 |
|
|---|
| 504 | #define ICDRAW_QUERY 0x00000001L /* test for support */
|
|---|
| 505 | #define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */
|
|---|
| 506 | #define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */
|
|---|
| 507 | #define ICDRAW_ANIMATE 0x00000008L /* expect palette animation */
|
|---|
| 508 | #define ICDRAW_CONTINUE 0x00000010L /* draw is a continuation of previous draw */
|
|---|
| 509 | #define ICDRAW_MEMORYDC 0x00000020L /* DC is offscreen, by the way */
|
|---|
| 510 | #define ICDRAW_UPDATING 0x00000040L /* We're updating, as opposed to playing */
|
|---|
| 511 | #define ICDRAW_RENDER 0x00000080L /* used to render data not draw it */
|
|---|
| 512 | #define ICDRAW_BUFFER 0x00000100L /* buffer data offscreen, we will need to update it */
|
|---|
| 513 |
|
|---|
| 514 | #define ICDecompressOpen(fccType, fccHandler, lpbiIn, lpbiOut) \
|
|---|
| 515 | ICLocate(fccType, fccHandler, lpbiIn, lpbiOut, ICMODE_DECOMPRESS)
|
|---|
| 516 |
|
|---|
| 517 | #define ICDrawOpen(fccType, fccHandler, lpbiIn) \
|
|---|
| 518 | ICLocate(fccType, fccHandler, lpbiIn, NULL, ICMODE_DRAW)
|
|---|
| 519 |
|
|---|
| 520 | HANDLE VFWAPI ICImageCompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn,
|
|---|
| 521 | LPVOID lpBits, LPBITMAPINFO lpbiOut, LONG lQuality,
|
|---|
| 522 | LONG* plSize);
|
|---|
| 523 |
|
|---|
| 524 | HANDLE VFWAPI ICImageDecompress(HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn,
|
|---|
| 525 | LPVOID lpBits, LPBITMAPINFO lpbiOut);
|
|---|
| 526 |
|
|---|
| 527 | BOOL VFWAPI ICInfo(DWORD fccType, DWORD fccHandler, ICINFO * lpicinfo);
|
|---|
| 528 | BOOL VFWAPI ICInstall(DWORD fccType, DWORD fccHandler, LPARAM lParam, LPSTR szDesc, UINT wFlags);
|
|---|
| 529 | BOOL VFWAPI ICRemove(DWORD fccType, DWORD fccHandler, UINT wFlags);
|
|---|
| 530 | LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, DWORD cb);
|
|---|
| 531 | HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode);
|
|---|
| 532 | HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHandler);
|
|---|
| 533 |
|
|---|
| 534 | LRESULT VFWAPI ICClose(HIC hic);
|
|---|
| 535 | HIC VFWAPI ICLocate(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags);
|
|---|
| 536 | HIC VFWAPI ICGetDisplayFormat(HIC hic, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, int BitDepth, int dx, int dy);
|
|---|
| 537 |
|
|---|
| 538 | /* Values for wFlags of ICInstall() */
|
|---|
| 539 | #define ICINSTALL_UNICODE 0x8000
|
|---|
| 540 | #define ICINSTALL_FUNCTION 0x0001
|
|---|
| 541 | #define ICINSTALL_DRIVER 0x0002
|
|---|
| 542 | #define ICINSTALL_HDRV 0x0004
|
|---|
| 543 | #define ICINSTALL_DRIVERW 0x8002
|
|---|
| 544 |
|
|---|
| 545 | #define ICGetState(hic, pv, cb) \
|
|---|
| 546 | ICSendMessage(hic, ICM_GETSTATE, (DWORD)(LPVOID)(pv), (DWORD)(cb))
|
|---|
| 547 | #define ICSetState(hic, pv, cb) \
|
|---|
| 548 | ICSendMessage(hic, ICM_SETSTATE, (DWORD)(LPVOID)(pv), (DWORD)(cb))
|
|---|
| 549 | #define ICGetStateSize(hic) \
|
|---|
| 550 | ICGetState(hic, NULL, 0)
|
|---|
| 551 |
|
|---|
| 552 | inline static DWORD ICGetDefaultQuality(HIC hic)
|
|---|
| 553 | {
|
|---|
| 554 | DWORD dwICValue;
|
|---|
| 555 | ICSendMessage(hic, ICM_GETDEFAULTQUALITY, (DWORD)(LPVOID)&dwICValue, sizeof(DWORD));
|
|---|
| 556 | return dwICValue;
|
|---|
| 557 | }
|
|---|
| 558 |
|
|---|
| 559 | inline static DWORD ICGetDefaultKeyFrameRate(HIC hic)
|
|---|
| 560 | {
|
|---|
| 561 | DWORD dwICValue;
|
|---|
| 562 | ICSendMessage(hic, ICM_GETDEFAULTKEYFRAMERATE, (DWORD)(LPVOID)&dwICValue, sizeof(DWORD));
|
|---|
| 563 | return dwICValue;
|
|---|
| 564 | }
|
|---|
| 565 |
|
|---|
| 566 | #define ICDrawWindow(hic, prc) \
|
|---|
| 567 | ICSendMessage(hic, ICM_DRAW_WINDOW, (DWORD)(LPVOID)(prc), sizeof(RECT))
|
|---|
| 568 |
|
|---|
| 569 | /* As passed to ICM_DRAW_SUGGESTFORMAT */
|
|---|
| 570 | typedef struct {
|
|---|
| 571 | DWORD dwFlags;
|
|---|
| 572 | LPBITMAPINFOHEADER lpbiIn;
|
|---|
| 573 | LPBITMAPINFOHEADER lpbiSuggest;
|
|---|
| 574 | INT dxSrc;
|
|---|
| 575 | INT dySrc;
|
|---|
| 576 | INT dxDst;
|
|---|
| 577 | INT dyDst;
|
|---|
| 578 | HIC hicDecompressor;
|
|---|
| 579 | } ICDRAWSUGGEST;
|
|---|
| 580 |
|
|---|
| 581 | typedef struct {
|
|---|
| 582 | DWORD dwFlags;
|
|---|
| 583 | int iStart;
|
|---|
| 584 | int iLen;
|
|---|
| 585 | LPPALETTEENTRY lppe;
|
|---|
| 586 | } ICPALETTE;
|
|---|
| 587 |
|
|---|
| 588 | DWORD VFWAPIV ICDrawBegin(
|
|---|
| 589 | HIC hic,
|
|---|
| 590 | DWORD dwFlags,/* flags */
|
|---|
| 591 | HPALETTE hpal, /* palette to draw with */
|
|---|
| 592 | HWND hwnd, /* window to draw to */
|
|---|
| 593 | HDC hdc, /* HDC to draw to */
|
|---|
| 594 | INT xDst, /* destination rectangle */
|
|---|
| 595 | INT yDst,
|
|---|
| 596 | INT dxDst,
|
|---|
| 597 | INT dyDst,
|
|---|
| 598 | LPBITMAPINFOHEADER lpbi, /* format of frame to draw */
|
|---|
| 599 | INT xSrc, /* source rectangle */
|
|---|
| 600 | INT ySrc,
|
|---|
| 601 | INT dxSrc,
|
|---|
| 602 | INT dySrc,
|
|---|
| 603 | DWORD dwRate, /* frames/second = (dwRate/dwScale) */
|
|---|
| 604 | DWORD dwScale
|
|---|
| 605 | );
|
|---|
| 606 |
|
|---|
| 607 | /* as passed to ICM_DRAW_BEGIN */
|
|---|
| 608 | typedef struct {
|
|---|
| 609 | DWORD dwFlags;
|
|---|
| 610 | HPALETTE hpal;
|
|---|
| 611 | HWND hwnd;
|
|---|
| 612 | HDC hdc;
|
|---|
| 613 | INT xDst;
|
|---|
| 614 | INT yDst;
|
|---|
| 615 | INT dxDst;
|
|---|
| 616 | INT dyDst;
|
|---|
| 617 | LPBITMAPINFOHEADER lpbi;
|
|---|
| 618 | INT xSrc;
|
|---|
| 619 | INT ySrc;
|
|---|
| 620 | INT dxSrc;
|
|---|
| 621 | INT dySrc;
|
|---|
| 622 | DWORD dwRate;
|
|---|
| 623 | DWORD dwScale;
|
|---|
| 624 | } ICDRAWBEGIN;
|
|---|
| 625 |
|
|---|
| 626 | #define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */
|
|---|
| 627 | #define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */
|
|---|
| 628 | #define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */
|
|---|
| 629 | #define ICDRAW_NULLFRAME 0x10000000L /* repeat last frame */
|
|---|
| 630 | #define ICDRAW_NOTKEYFRAME 0x08000000L /* this frame is not a key frame */
|
|---|
| 631 |
|
|---|
| 632 | typedef struct {
|
|---|
| 633 | DWORD dwFlags;
|
|---|
| 634 | LPVOID lpFormat;
|
|---|
| 635 | LPVOID lpData;
|
|---|
| 636 | DWORD cbData;
|
|---|
| 637 | LONG lTime;
|
|---|
| 638 | } ICDRAW;
|
|---|
| 639 |
|
|---|
| 640 | DWORD VFWAPIV ICDraw(HIC hic,DWORD dwFlags,LPVOID lpFormat,LPVOID lpData,DWORD cbData,LONG lTime);
|
|---|
| 641 |
|
|---|
| 642 | inline static LRESULT VFWAPI ICDrawSuggestFormat(HIC hic, LPBITMAPINFOHEADER lpbiIn,
|
|---|
| 643 | LPBITMAPINFOHEADER lpbiOut,
|
|---|
| 644 | int dxSrc, int dySrc,
|
|---|
| 645 | int dxDst, int dyDst,
|
|---|
| 646 | HIC hicDecomp)
|
|---|
| 647 | {
|
|---|
| 648 | ICDRAWSUGGEST ic;
|
|---|
| 649 |
|
|---|
| 650 | ic.lpbiIn = lpbiIn;
|
|---|
| 651 | ic.lpbiSuggest = lpbiOut;
|
|---|
| 652 | ic.dxSrc = dxSrc;
|
|---|
| 653 | ic.dySrc = dySrc;
|
|---|
| 654 | ic.dxDst = dxDst;
|
|---|
| 655 | ic.dyDst = dyDst;
|
|---|
| 656 | ic.hicDecompressor = hicDecomp;
|
|---|
| 657 | return ICSendMessage(hic, ICM_DRAW_SUGGESTFORMAT, (DWORD)&ic, sizeof(ic));
|
|---|
| 658 | }
|
|---|
| 659 |
|
|---|
| 660 | #define ICDrawQuery(hic, lpbiInput) \
|
|---|
| 661 | ICSendMessage(hic, ICM_DRAW_QUERY, (DWORD)(LPVOID)(lpbiInput), 0L)
|
|---|
| 662 |
|
|---|
| 663 | #define ICDrawChangePalette(hic, lpbiInput) \
|
|---|
| 664 | ICSendMessage(hic, ICM_DRAW_CHANGEPALETTE, (DWORD)(LPVOID)(lpbiInput), 0L)
|
|---|
| 665 |
|
|---|
| 666 | #define ICGetBuffersWanted(hic, lpdwBuffers) \
|
|---|
| 667 | ICSendMessage(hic, ICM_GETBUFFERSWANTED, (DWORD)(LPVOID)(lpdwBuffers), 0)
|
|---|
| 668 |
|
|---|
| 669 | #define ICDrawEnd(hic) \
|
|---|
| 670 | ICSendMessage(hic, ICM_DRAW_END, 0, 0)
|
|---|
| 671 |
|
|---|
| 672 | #define ICDrawStart(hic) \
|
|---|
| 673 | ICSendMessage(hic, ICM_DRAW_START, 0, 0)
|
|---|
| 674 |
|
|---|
| 675 | #define ICDrawStartPlay(hic, lFrom, lTo) \
|
|---|
| 676 | ICSendMessage(hic, ICM_DRAW_START_PLAY, (DWORD)(lFrom), (DWORD)(lTo))
|
|---|
| 677 |
|
|---|
| 678 | #define ICDrawStop(hic) \
|
|---|
| 679 | ICSendMessage(hic, ICM_DRAW_STOP, 0, 0)
|
|---|
| 680 |
|
|---|
| 681 | #define ICDrawStopPlay(hic) \
|
|---|
| 682 | ICSendMessage(hic, ICM_DRAW_STOP_PLAY, 0, 0)
|
|---|
| 683 |
|
|---|
| 684 | #define ICDrawGetTime(hic, lplTime) \
|
|---|
| 685 | ICSendMessage(hic, ICM_DRAW_GETTIME, (DWORD)(LPVOID)(lplTime), 0)
|
|---|
| 686 |
|
|---|
| 687 | #define ICDrawSetTime(hic, lTime) \
|
|---|
| 688 | ICSendMessage(hic, ICM_DRAW_SETTIME, (DWORD)lTime, 0)
|
|---|
| 689 |
|
|---|
| 690 | #define ICDrawRealize(hic, hdc, fBackground) \
|
|---|
| 691 | ICSendMessage(hic, ICM_DRAW_REALIZE, (DWORD)(UINT)(HDC)(hdc), (DWORD)(BOOL)(fBackground))
|
|---|
| 692 |
|
|---|
| 693 | #define ICDrawFlush(hic) \
|
|---|
| 694 | ICSendMessage(hic, ICM_DRAW_FLUSH, 0, 0)
|
|---|
| 695 |
|
|---|
| 696 | #define ICDrawRenderBuffer(hic) \
|
|---|
| 697 | ICSendMessage(hic, ICM_DRAW_RENDERBUFFER, 0, 0)
|
|---|
| 698 |
|
|---|
| 699 | inline static LRESULT VFWAPI ICSetStatusProc(HIC hic, DWORD dwFlags, LRESULT lParam,
|
|---|
| 700 | #ifdef __WIN32OS2__
|
|---|
| 701 | LONG (* CALLBACK fpfnStatus)(LPARAM, UINT, LONG))
|
|---|
| 702 | #else
|
|---|
| 703 | LONG (CALLBACK *fpfnStatus)(LPARAM, UINT, LONG))
|
|---|
| 704 | #endif
|
|---|
| 705 | {
|
|---|
| 706 | ICSETSTATUSPROC ic;
|
|---|
| 707 |
|
|---|
| 708 | ic.dwFlags = dwFlags;
|
|---|
| 709 | ic.lParam = lParam;
|
|---|
| 710 | /* FIXME: see comment in ICSETSTATUSPROC definition */
|
|---|
| 711 | ic.zStatus = fpfnStatus;
|
|---|
| 712 |
|
|---|
| 713 | return ICSendMessage(hic, ICM_SET_STATUS_PROC, (DWORD)&ic, sizeof(ic));
|
|---|
| 714 | }
|
|---|
| 715 |
|
|---|
| 716 | typedef struct {
|
|---|
| 717 | LONG cbSize;
|
|---|
| 718 | DWORD dwFlags;
|
|---|
| 719 | HIC hic;
|
|---|
| 720 | DWORD fccType;
|
|---|
| 721 | DWORD fccHandler;
|
|---|
| 722 | LPBITMAPINFO lpbiIn;
|
|---|
| 723 | LPBITMAPINFO lpbiOut;
|
|---|
| 724 | LPVOID lpBitsOut;
|
|---|
| 725 | LPVOID lpBitsPrev;
|
|---|
| 726 | LONG lFrame;
|
|---|
| 727 | LONG lKey;
|
|---|
| 728 | LONG lDataRate;
|
|---|
| 729 | LONG lQ;
|
|---|
| 730 | LONG lKeyCount;
|
|---|
| 731 | LPVOID lpState;
|
|---|
| 732 | LONG cbState;
|
|---|
| 733 | } COMPVARS, *PCOMPVARS;
|
|---|
| 734 |
|
|---|
| 735 | #define ICMF_COMPVARS_VALID 0x00000001
|
|---|
| 736 |
|
|---|
| 737 | BOOL VFWAPI ICCompressorChoose(HWND hwnd, UINT uiFlags, LPVOID pvIn, LPVOID lpData,
|
|---|
| 738 | PCOMPVARS pc, LPSTR lpszTitle);
|
|---|
| 739 |
|
|---|
| 740 | #define ICMF_CHOOSE_KEYFRAME 0x0001
|
|---|
| 741 | #define ICMF_CHOOSE_DATARATE 0x0002
|
|---|
| 742 | #define ICMF_CHOOSE_PREVIEW 0x0004
|
|---|
| 743 | #define ICMF_CHOOSE_ALLCOMPRESSORS 0x0008
|
|---|
| 744 |
|
|---|
| 745 | BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn);
|
|---|
| 746 | void VFWAPI ICSeqCompressFrameEnd(PCOMPVARS pc);
|
|---|
| 747 |
|
|---|
| 748 | LPVOID VFWAPI ICSeqCompressFrame(PCOMPVARS pc, UINT uiFlags, LPVOID lpBits,
|
|---|
| 749 | BOOL *pfKey, LONG *plSize);
|
|---|
| 750 | void VFWAPI ICCompressorFree(PCOMPVARS pc);
|
|---|
| 751 |
|
|---|
| 752 | /********************* AVIFILE function declarations *************************/
|
|---|
| 753 | #define formtypeAVI mmioFOURCC('A', 'V', 'I', ' ')
|
|---|
| 754 | #define listtypeAVIHEADER mmioFOURCC('h', 'd', 'r', 'l')
|
|---|
| 755 | #define ckidAVIMAINHDR mmioFOURCC('a', 'v', 'i', 'h')
|
|---|
| 756 | #define listtypeSTREAMHEADER mmioFOURCC('s', 't', 'r', 'l')
|
|---|
| 757 | #define ckidSTREAMHEADER mmioFOURCC('s', 't', 'r', 'h')
|
|---|
| 758 | #define ckidSTREAMFORMAT mmioFOURCC('s', 't', 'r', 'f')
|
|---|
| 759 | #define ckidSTREAMHANDLERDATA mmioFOURCC('s', 't', 'r', 'd')
|
|---|
| 760 | #define ckidSTREAMNAME mmioFOURCC('s', 't', 'r', 'n')
|
|---|
| 761 |
|
|---|
| 762 | #define listtypeAVIMOVIE mmioFOURCC('m', 'o', 'v', 'i')
|
|---|
| 763 | #define listtypeAVIRECORD mmioFOURCC('r', 'e', 'c', ' ')
|
|---|
| 764 |
|
|---|
| 765 | #define ckidAVINEWINDEX mmioFOURCC('i', 'd', 'x', '1')
|
|---|
| 766 |
|
|---|
| 767 | #define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's')
|
|---|
| 768 | #define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's')
|
|---|
| 769 | #define streamtypeMIDI mmioFOURCC('m', 'i', 'd', 's')
|
|---|
| 770 | #define streamtypeTEXT mmioFOURCC('t', 'x', 't', 's')
|
|---|
| 771 |
|
|---|
| 772 | /* Basic chunk types */
|
|---|
| 773 | #define cktypeDIBbits aviTWOCC('d', 'b')
|
|---|
| 774 | #define cktypeDIBcompressed aviTWOCC('d', 'c')
|
|---|
| 775 | #define cktypePALchange aviTWOCC('p', 'c')
|
|---|
| 776 | #define cktypeWAVEbytes aviTWOCC('w', 'b')
|
|---|
| 777 |
|
|---|
| 778 | /* Chunk id to use for extra chunks for padding. */
|
|---|
| 779 | #define ckidAVIPADDING mmioFOURCC('J', 'U', 'N', 'K')
|
|---|
| 780 |
|
|---|
| 781 | /* AVIFileHdr.dwFlags */
|
|---|
| 782 | #define AVIF_HASINDEX 0x00000010 /* Index at end of file? */
|
|---|
| 783 | #define AVIF_MUSTUSEINDEX 0x00000020
|
|---|
| 784 | #define AVIF_ISINTERLEAVED 0x00000100
|
|---|
| 785 | #define AVIF_TRUSTCKTYPE 0x00000800 /* Use CKType to find key frames*/
|
|---|
| 786 | #define AVIF_WASCAPTUREFILE 0x00010000
|
|---|
| 787 | #define AVIF_COPYRIGHTED 0x00020000
|
|---|
| 788 |
|
|---|
| 789 | #define AVI_HEADERSIZE 2048
|
|---|
| 790 |
|
|---|
| 791 | typedef struct _MainAVIHeader
|
|---|
| 792 | {
|
|---|
| 793 | DWORD dwMicroSecPerFrame;
|
|---|
| 794 | DWORD dwMaxBytesPerSec;
|
|---|
| 795 | DWORD dwPaddingGranularity;
|
|---|
| 796 | DWORD dwFlags;
|
|---|
| 797 | DWORD dwTotalFrames;
|
|---|
| 798 | DWORD dwInitialFrames;
|
|---|
| 799 | DWORD dwStreams;
|
|---|
| 800 | DWORD dwSuggestedBufferSize;
|
|---|
| 801 | DWORD dwWidth;
|
|---|
| 802 | DWORD dwHeight;
|
|---|
| 803 | DWORD dwReserved[4];
|
|---|
| 804 | } MainAVIHeader;
|
|---|
| 805 |
|
|---|
| 806 | /* AVIStreamHeader.dwFlags */
|
|---|
| 807 | #define AVISF_DISABLED 0x00000001
|
|---|
| 808 | #define AVISF_VIDEO_PALCHANGES 0x00010000
|
|---|
| 809 |
|
|---|
| 810 | typedef struct {
|
|---|
| 811 | FOURCC fccType;
|
|---|
| 812 | FOURCC fccHandler;
|
|---|
| 813 | DWORD dwFlags; /* AVISF_* */
|
|---|
| 814 | WORD wPriority;
|
|---|
| 815 | WORD wLanguage;
|
|---|
| 816 | DWORD dwInitialFrames;
|
|---|
| 817 | DWORD dwScale;
|
|---|
| 818 | DWORD dwRate; /* dwRate / dwScale == samples/second */
|
|---|
| 819 | DWORD dwStart;
|
|---|
| 820 | DWORD dwLength; /* In units above... */
|
|---|
| 821 | DWORD dwSuggestedBufferSize;
|
|---|
| 822 | DWORD dwQuality;
|
|---|
| 823 | DWORD dwSampleSize;
|
|---|
| 824 | struct { SHORT left, top, right, bottom; } rcFrame; /* word.word - word.word in file */
|
|---|
| 825 | } AVIStreamHeader;
|
|---|
| 826 |
|
|---|
| 827 | /* AVIINDEXENTRY.dwFlags */
|
|---|
| 828 | #define AVIIF_LIST 0x00000001 /* chunk is a 'LIST' */
|
|---|
| 829 | #define AVIIF_TWOCC 0x00000002
|
|---|
| 830 | #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
|
|---|
| 831 |
|
|---|
| 832 | #define AVIIF_NOTIME 0x00000100 /* this frame doesn't take any time */
|
|---|
| 833 | #define AVIIF_COMPUSE 0x0FFF0000
|
|---|
| 834 |
|
|---|
| 835 | typedef struct _AVIINDEXENTRY {
|
|---|
| 836 | DWORD ckid;
|
|---|
| 837 | DWORD dwFlags;
|
|---|
| 838 | DWORD dwChunkOffset;
|
|---|
| 839 | DWORD dwChunkLength;
|
|---|
| 840 | } AVIINDEXENTRY;
|
|---|
| 841 |
|
|---|
| 842 | typedef struct _AVIPALCHANGE {
|
|---|
| 843 | BYTE bFirstEntry;
|
|---|
| 844 | BYTE bNumEntries;
|
|---|
| 845 | WORD wFlags; /* pad */
|
|---|
| 846 | PALETTEENTRY peNew[1];
|
|---|
| 847 | } AVIPALCHANGE;
|
|---|
| 848 |
|
|---|
| 849 | #define AVIIF_KEYFRAME 0x00000010 /* this frame is a key frame. */
|
|---|
| 850 |
|
|---|
| 851 | #define AVIGETFRAMEF_BESTDISPLAYFMT 1
|
|---|
| 852 |
|
|---|
| 853 | typedef struct _AVISTREAMINFOA {
|
|---|
| 854 | DWORD fccType;
|
|---|
| 855 | DWORD fccHandler;
|
|---|
| 856 | DWORD dwFlags; /* AVIIF_* */
|
|---|
| 857 | DWORD dwCaps;
|
|---|
| 858 | WORD wPriority;
|
|---|
| 859 | WORD wLanguage;
|
|---|
| 860 | DWORD dwScale;
|
|---|
| 861 | DWORD dwRate; /* dwRate / dwScale == samples/second */
|
|---|
| 862 | DWORD dwStart;
|
|---|
| 863 | DWORD dwLength; /* In units above... */
|
|---|
| 864 | DWORD dwInitialFrames;
|
|---|
| 865 | DWORD dwSuggestedBufferSize;
|
|---|
| 866 | DWORD dwQuality;
|
|---|
| 867 | DWORD dwSampleSize;
|
|---|
| 868 | RECT rcFrame;
|
|---|
| 869 | DWORD dwEditCount;
|
|---|
| 870 | DWORD dwFormatChangeCount;
|
|---|
| 871 | CHAR szName[64];
|
|---|
| 872 | } AVISTREAMINFOA, * LPAVISTREAMINFOA, *PAVISTREAMINFOA;
|
|---|
| 873 |
|
|---|
| 874 | typedef struct _AVISTREAMINFOW {
|
|---|
| 875 | DWORD fccType;
|
|---|
| 876 | DWORD fccHandler;
|
|---|
| 877 | DWORD dwFlags;
|
|---|
| 878 | DWORD dwCaps;
|
|---|
| 879 | WORD wPriority;
|
|---|
| 880 | WORD wLanguage;
|
|---|
| 881 | DWORD dwScale;
|
|---|
| 882 | DWORD dwRate; /* dwRate / dwScale == samples/second */
|
|---|
| 883 | DWORD dwStart;
|
|---|
| 884 | DWORD dwLength; /* In units above... */
|
|---|
| 885 | DWORD dwInitialFrames;
|
|---|
| 886 | DWORD dwSuggestedBufferSize;
|
|---|
| 887 | DWORD dwQuality;
|
|---|
| 888 | DWORD dwSampleSize;
|
|---|
| 889 | RECT rcFrame;
|
|---|
| 890 | DWORD dwEditCount;
|
|---|
| 891 | DWORD dwFormatChangeCount;
|
|---|
| 892 | WCHAR szName[64];
|
|---|
| 893 | } AVISTREAMINFOW, * LPAVISTREAMINFOW, *PAVISTREAMINFOW;
|
|---|
| 894 | DECL_WINELIB_TYPE_AW(AVISTREAMINFO)
|
|---|
| 895 | DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO)
|
|---|
| 896 | DECL_WINELIB_TYPE_AW(PAVISTREAMINFO)
|
|---|
| 897 |
|
|---|
| 898 | #define AVISTREAMINFO_DISABLED 0x00000001
|
|---|
| 899 | #define AVISTREAMINFO_FORMATCHANGES 0x00010000
|
|---|
| 900 |
|
|---|
| 901 | /* AVIFILEINFO.dwFlags */
|
|---|
| 902 | #define AVIFILEINFO_HASINDEX 0x00000010
|
|---|
| 903 | #define AVIFILEINFO_MUSTUSEINDEX 0x00000020
|
|---|
| 904 | #define AVIFILEINFO_ISINTERLEAVED 0x00000100
|
|---|
| 905 | #define AVIFILEINFO_WASCAPTUREFILE 0x00010000
|
|---|
| 906 | #define AVIFILEINFO_COPYRIGHTED 0x00020000
|
|---|
| 907 |
|
|---|
| 908 | /* AVIFILEINFO.dwCaps */
|
|---|
| 909 | #define AVIFILECAPS_CANREAD 0x00000001
|
|---|
| 910 | #define AVIFILECAPS_CANWRITE 0x00000002
|
|---|
| 911 | #define AVIFILECAPS_ALLKEYFRAMES 0x00000010
|
|---|
| 912 | #define AVIFILECAPS_NOCOMPRESSION 0x00000020
|
|---|
| 913 |
|
|---|
| 914 | typedef struct _AVIFILEINFOW {
|
|---|
| 915 | DWORD dwMaxBytesPerSec;
|
|---|
| 916 | DWORD dwFlags;
|
|---|
| 917 | DWORD dwCaps;
|
|---|
| 918 | DWORD dwStreams;
|
|---|
| 919 | DWORD dwSuggestedBufferSize;
|
|---|
| 920 | DWORD dwWidth;
|
|---|
| 921 | DWORD dwHeight;
|
|---|
| 922 | DWORD dwScale;
|
|---|
| 923 | DWORD dwRate;
|
|---|
| 924 | DWORD dwLength;
|
|---|
| 925 | DWORD dwEditCount;
|
|---|
| 926 | WCHAR szFileType[64];
|
|---|
| 927 | } AVIFILEINFOW, * LPAVIFILEINFOW, *PAVIFILEINFOW;
|
|---|
| 928 | typedef struct _AVIFILEINFOA {
|
|---|
| 929 | DWORD dwMaxBytesPerSec;
|
|---|
| 930 | DWORD dwFlags;
|
|---|
| 931 | DWORD dwCaps;
|
|---|
| 932 | DWORD dwStreams;
|
|---|
| 933 | DWORD dwSuggestedBufferSize;
|
|---|
| 934 | DWORD dwWidth;
|
|---|
| 935 | DWORD dwHeight;
|
|---|
| 936 | DWORD dwScale;
|
|---|
| 937 | DWORD dwRate;
|
|---|
| 938 | DWORD dwLength;
|
|---|
| 939 | DWORD dwEditCount;
|
|---|
| 940 | CHAR szFileType[64];
|
|---|
| 941 | } AVIFILEINFOA, * LPAVIFILEINFOA, *PAVIFILEINFOA;
|
|---|
| 942 | DECL_WINELIB_TYPE_AW(AVIFILEINFO)
|
|---|
| 943 | DECL_WINELIB_TYPE_AW(PAVIFILEINFO)
|
|---|
| 944 | DECL_WINELIB_TYPE_AW(LPAVIFILEINFO)
|
|---|
| 945 |
|
|---|
| 946 | /* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
|
|---|
| 947 | #define AVICOMPRESSF_INTERLEAVE 0x00000001
|
|---|
| 948 | #define AVICOMPRESSF_DATARATE 0x00000002
|
|---|
| 949 | #define AVICOMPRESSF_KEYFRAMES 0x00000004
|
|---|
| 950 | #define AVICOMPRESSF_VALID 0x00000008
|
|---|
| 951 |
|
|---|
| 952 | typedef struct {
|
|---|
| 953 | DWORD fccType; /* stream type, for consistency */
|
|---|
| 954 | DWORD fccHandler; /* compressor */
|
|---|
| 955 | DWORD dwKeyFrameEvery; /* keyframe rate */
|
|---|
| 956 | DWORD dwQuality; /* compress quality 0-10,000 */
|
|---|
| 957 | DWORD dwBytesPerSecond; /* bytes per second */
|
|---|
| 958 | DWORD dwFlags; /* flags... see below */
|
|---|
| 959 | LPVOID lpFormat; /* save format */
|
|---|
| 960 | DWORD cbFormat;
|
|---|
| 961 | LPVOID lpParms; /* compressor options */
|
|---|
| 962 | DWORD cbParms;
|
|---|
| 963 | DWORD dwInterleaveEvery; /* for non-video streams only */
|
|---|
| 964 | } AVICOMPRESSOPTIONS, *LPAVICOMPRESSOPTIONS,*PAVICOMPRESSOPTIONS;
|
|---|
| 965 |
|
|---|
| 966 |
|
|---|
| 967 |
|
|---|
| 968 | #define DEFINE_AVIGUID(name, l, w1, w2) \
|
|---|
| 969 | DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
|
|---|
| 970 |
|
|---|
| 971 | DEFINE_AVIGUID(IID_IAVIFile, 0x00020020, 0, 0);
|
|---|
| 972 | DEFINE_AVIGUID(IID_IAVIStream, 0x00020021, 0, 0);
|
|---|
| 973 | DEFINE_AVIGUID(IID_IAVIStreaming, 0x00020022, 0, 0);
|
|---|
| 974 | DEFINE_AVIGUID(IID_IGetFrame, 0x00020023, 0, 0);
|
|---|
| 975 | DEFINE_AVIGUID(IID_IAVIEditStream, 0x00020024, 0, 0);
|
|---|
| 976 |
|
|---|
| 977 | DEFINE_AVIGUID(CLSID_AVIFile, 0x00020000, 0, 0);
|
|---|
| 978 |
|
|---|
| 979 | /*****************************************************************************
|
|---|
| 980 | * IAVIStream interface
|
|---|
| 981 | */
|
|---|
| 982 | #define ICOM_INTERFACE IAVIStream
|
|---|
| 983 | #define IAVIStream_METHODS \
|
|---|
| 984 | ICOM_METHOD2(HRESULT,Create, LPARAM,lParam1, LPARAM,lParam2) \
|
|---|
| 985 | ICOM_METHOD2(HRESULT,Info, AVISTREAMINFOW*,psi, LONG,lSize) \
|
|---|
| 986 | ICOM_METHOD2(LONG, FindSample, LONG,lPos, LONG,lFlags) \
|
|---|
| 987 | ICOM_METHOD3(HRESULT,ReadFormat, LONG,lPos, LPVOID,lpFormat, LONG*,lpcbFormat) \
|
|---|
| 988 | ICOM_METHOD3(HRESULT,SetFormat, LONG,lPos, LPVOID,lpFormat, LONG,cbFormat) \
|
|---|
| 989 | ICOM_METHOD6(HRESULT,Read, LONG,lStart, LONG,lSamples, LPVOID,lpBuffer, LONG,cbBuffer, LONG*,plBytes, LONG*,plSamples) \
|
|---|
| 990 | ICOM_METHOD7(HRESULT,Write, LONG,lStart, LONG,lSamples, LPVOID,lpBuffer, LONG,cbBuffer, DWORD,dwFlags, LONG*,plSampWritten, LONG*,plBytesWritten) \
|
|---|
| 991 | ICOM_METHOD2(HRESULT,Delete, LONG,lStart, LONG,lSamples) \
|
|---|
| 992 | ICOM_METHOD3(HRESULT,ReadData, DWORD,fcc, LPVOID,lpBuffer, LONG*,lpcbBuffer) \
|
|---|
| 993 | ICOM_METHOD3(HRESULT,WriteData, DWORD,fcc, LPVOID,lpBuffer, LONG,cbBuffer) \
|
|---|
| 994 | ICOM_METHOD2(HRESULT,SetInfo, AVISTREAMINFOW*,plInfo, LONG,cbInfo)
|
|---|
| 995 | #define IAVIStream_IMETHODS \
|
|---|
| 996 | IUnknown_IMETHODS \
|
|---|
| 997 | IAVIStream_METHODS
|
|---|
| 998 | ICOM_DEFINE(IAVIStream, IUnknown)
|
|---|
| 999 | #undef ICOM_INTERFACE
|
|---|
| 1000 |
|
|---|
| 1001 | /*** IUnknown methods ***/
|
|---|
| 1002 | #define IAVIStream_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 1003 | #define IAVIStream_AddRef(p) ICOM_CALL (AddRef,p)
|
|---|
| 1004 | #define IAVIStream_Release(p) ICOM_CALL (Release,p)
|
|---|
| 1005 | /*** IAVIStream methods ***/
|
|---|
| 1006 | #define IAVIStream_Create(p,a,b) ICOM_CALL2(Create,p,a,b)
|
|---|
| 1007 | #define IAVIStream_Info(p,a,b) ICOM_CALL2(Info,p,a,b)
|
|---|
| 1008 | #define IAVIStream_FindSample(p,a,b) ICOM_CALL2(FindSample,p,a,b)
|
|---|
| 1009 | #define IAVIStream_ReadFormat(p,a,b,c) ICOM_CALL3(ReadFormat,p,a,b,c)
|
|---|
| 1010 | #define IAVIStream_SetFormat(p,a,b,c) ICOM_CALL3(SetFormat,p,a,b,c)
|
|---|
| 1011 | #define IAVIStream_Read(p,a,b,c,d,e,f) ICOM_CALL6(Read,p,a,b,c,d,e,f)
|
|---|
| 1012 | #define IAVIStream_Write(p,a,b,c,d,e,f,g) ICOM_CALL7(Write,p,a,b,c,d,e,f,g)
|
|---|
| 1013 | #define IAVIStream_Delete(p,a,b) ICOM_CALL2(Delete,p,a,b)
|
|---|
| 1014 | #define IAVIStream_ReadData(p,a,b,c) ICOM_CALL3(ReadData,p,a,b,c)
|
|---|
| 1015 | #define IAVIStream_WriteData(p,a,b,c) ICOM_CALL3(WriteData,p,a,b,c)
|
|---|
| 1016 | #define IAVIStream_SetInfo(p,a,b) ICOM_CALL2(SetInfo,p,a,b)
|
|---|
| 1017 |
|
|---|
| 1018 | HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM*ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *lpOptions,CLSID*pclsidHandler);
|
|---|
| 1019 |
|
|---|
| 1020 | HRESULT WINAPI AVIStreamCreate(PAVISTREAM*,LONG,LONG,CLSID*);
|
|---|
| 1021 | HRESULT WINAPI AVIStreamInfoA(PAVISTREAM iface,AVISTREAMINFOA *asi,LONG size);
|
|---|
| 1022 | HRESULT WINAPI AVIStreamInfoW(PAVISTREAM iface,AVISTREAMINFOW *asi,LONG size);
|
|---|
| 1023 | #define AVIStreamInfo WINELIB_NAME_AW(AVIStreamInfo)
|
|---|
| 1024 | LPVOID WINAPI AVIStreamGetFrame(PGETFRAME pg,LONG pos);
|
|---|
| 1025 | HRESULT WINAPI AVIStreamGetFrameClose(PGETFRAME pg);
|
|---|
| 1026 | PGETFRAME WINAPI AVIStreamGetFrameOpen(PAVISTREAM pavi,LPBITMAPINFOHEADER lpbiWanted);
|
|---|
| 1027 | LONG WINAPI AVIStreamLength(PAVISTREAM iface);
|
|---|
| 1028 | HRESULT WINAPI AVIStreamRead(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread);
|
|---|
| 1029 | HRESULT WINAPI AVIStreamReadData(PAVISTREAM iface,DWORD fcc,LPVOID lp,LONG *lpread);
|
|---|
| 1030 | HRESULT WINAPI AVIStreamReadFormat(PAVISTREAM iface,LONG pos,LPVOID format,LONG *formatsize);
|
|---|
| 1031 | ULONG WINAPI AVIStreamRelease(PAVISTREAM iface);
|
|---|
| 1032 | HRESULT WINAPI AVIStreamSetFormat(PAVISTREAM iface,LONG pos,LPVOID format,LONG formatsize);
|
|---|
| 1033 | LONG WINAPI AVIStreamStart(PAVISTREAM iface);
|
|---|
| 1034 | HRESULT WINAPI AVIStreamWrite(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,DWORD flags,LONG *sampwritten,LONG *byteswritten);
|
|---|
| 1035 | HRESULT WINAPI AVIStreamWriteData(PAVISTREAM iface,DWORD fcc,LPVOID lp,LONG size);
|
|---|
| 1036 | HRESULT WINAPI AVIStreamOpenFromFileA(PAVISTREAM *ppavi, LPCSTR szFile,
|
|---|
| 1037 | DWORD fccType, LONG lParam,
|
|---|
| 1038 | UINT mode, CLSID *pclsidHandler);
|
|---|
| 1039 | HRESULT WINAPI AVIStreamOpenFromFileW(PAVISTREAM *ppavi, LPCWSTR szFile,
|
|---|
| 1040 | DWORD fccType, LONG lParam,
|
|---|
| 1041 | UINT mode, CLSID *pclsidHandler);
|
|---|
| 1042 | #define AVIStreamOpenFromFile WINELIB_NAME_AW(AVIStreamOpenFromFile)
|
|---|
| 1043 |
|
|---|
| 1044 | #define AVIStreamFormatSize(pavi, lPos, plSize) \
|
|---|
| 1045 | AVIStreamReadFormat(pavi, lPos, NULL, plSize)
|
|---|
| 1046 |
|
|---|
| 1047 | /*****************************************************************************
|
|---|
| 1048 | * IAVIFile interface
|
|---|
| 1049 | */
|
|---|
| 1050 | /* In Win32 this interface uses UNICODE only */
|
|---|
| 1051 | #define ICOM_INTERFACE IAVIFile
|
|---|
| 1052 | #define IAVIFile_METHODS \
|
|---|
| 1053 | ICOM_METHOD2(HRESULT,Info, AVIFILEINFOW*,pfi, LONG,lSize) \
|
|---|
| 1054 | ICOM_METHOD3(HRESULT,GetStream, PAVISTREAM*,ppStream, DWORD,fccType, LONG,lParam) \
|
|---|
| 1055 | ICOM_METHOD2(HRESULT,CreateStream, PAVISTREAM*,ppStream, AVISTREAMINFOW*,psi) \
|
|---|
| 1056 | ICOM_METHOD3(HRESULT,WriteData, DWORD,fcc, LPVOID,lpBuffer, LONG,cbBuffer) \
|
|---|
| 1057 | ICOM_METHOD3(HRESULT,ReadData, DWORD,fcc, LPVOID,lpBuffer, LONG*,lpcbBuffer) \
|
|---|
| 1058 | ICOM_METHOD (HRESULT,EndRecord) \
|
|---|
| 1059 | ICOM_METHOD2(HRESULT,DeleteStream, DWORD,fccType, LONG,lParam)
|
|---|
| 1060 | #define IAVIFile_IMETHODS \
|
|---|
| 1061 | IUnknown_IMETHODS \
|
|---|
| 1062 | IAVIFile_METHODS
|
|---|
| 1063 | ICOM_DEFINE(IAVIFile,IUnknown)
|
|---|
| 1064 | #undef ICOM_INTERFACE
|
|---|
| 1065 |
|
|---|
| 1066 | /*** IUnknown methods ***/
|
|---|
| 1067 | #define IAVIFile_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 1068 | #define IAVIFile_AddRef(p) ICOM_CALL (AddRef,p)
|
|---|
| 1069 | #define IAVIFile_Release(p) ICOM_CALL (Release,p)
|
|---|
| 1070 | /*** IAVIFile methods ***/
|
|---|
| 1071 | #define IAVIFile_Info(p,a,b) ICOM_CALL2(Info,p,a,b)
|
|---|
| 1072 | #define IAVIFile_GetStream(p,a,b,c) ICOM_CALL3(GetStream,p,a,b,c)
|
|---|
| 1073 | #define IAVIFile_CreateStream(p,a,b) ICOM_CALL2(CreateStream,p,a,b)
|
|---|
| 1074 | #define IAVIFile_WriteData(p,a,b,c) ICOM_CALL3(WriteData,p,a,b,c)
|
|---|
| 1075 | #define IAVIFile_ReadData(p,a,b,c) ICOM_CALL3(ReadData,p,a,b,c)
|
|---|
| 1076 | #define IAVIFile_EndRecord(p) ICOM_CALL (EndRecord,p)
|
|---|
| 1077 | #define IAVIFile_DeleteStream(p,a,b) ICOM_CALL2(DeleteStream,p,a,b)
|
|---|
| 1078 |
|
|---|
| 1079 | HRESULT WINAPI AVIFileCreateStreamA(PAVIFILE pfile,PAVISTREAM* ppavi,AVISTREAMINFOA* psi);
|
|---|
| 1080 | HRESULT WINAPI AVIFileCreateStreamW(PAVIFILE pfile,PAVISTREAM* ppavi,AVISTREAMINFOW* psi);
|
|---|
| 1081 | #define AVIFileCreateStream WINELIB_NAME_AW(AVIFileCreateStream)
|
|---|
| 1082 | void WINAPI AVIFileExit(void);
|
|---|
| 1083 | HRESULT WINAPI AVIFileGetStream(PAVIFILE pfile,PAVISTREAM* avis,DWORD fccType,LONG lParam);
|
|---|
| 1084 | HRESULT WINAPI AVIFileInfoA(PAVIFILE pfile,PAVIFILEINFOA pfi,LONG lSize);
|
|---|
| 1085 | HRESULT WINAPI AVIFileInfoW(PAVIFILE pfile,PAVIFILEINFOW pfi,LONG lSize);
|
|---|
| 1086 | #define AVIFileInfo WINELIB_NAME_AW(AVIFileInfo)
|
|---|
| 1087 | void WINAPI AVIFileInit(void);
|
|---|
| 1088 | HRESULT WINAPI AVIFileOpenA(PAVIFILE* ppfile,LPCSTR szFile,UINT uMode,LPCLSID lpHandler);
|
|---|
| 1089 | HRESULT WINAPI AVIFileOpenW(PAVIFILE* ppfile,LPCWSTR szFile,UINT uMode,LPCLSID lpHandler);
|
|---|
| 1090 | #define AVIFileOpen WINELIB_NAME_AW(AVIFileOpen)
|
|---|
| 1091 | ULONG WINAPI AVIFileRelease(PAVIFILE iface);
|
|---|
| 1092 |
|
|---|
| 1093 |
|
|---|
| 1094 | /*****************************************************************************
|
|---|
| 1095 | * IGetFrame interface
|
|---|
| 1096 | */
|
|---|
| 1097 | #define ICOM_INTERFACE IGetFrame
|
|---|
| 1098 | #define IGetFrame_METHODS \
|
|---|
| 1099 | ICOM_METHOD1(LPVOID, GetFrame, LONG,lPos) \
|
|---|
| 1100 | ICOM_METHOD3(HRESULT,Begin, LONG,lStart, LONG,lEnd, LONG,lRate) \
|
|---|
| 1101 | ICOM_METHOD (HRESULT,End) \
|
|---|
| 1102 | ICOM_METHOD6(HRESULT,SetFormat, LPBITMAPINFOHEADER,lpbi, LPVOID,lpBits, INT,x, INT,y, INT,dx, INT,dy)
|
|---|
| 1103 | #define IGetFrame_IMETHODS \
|
|---|
| 1104 | IUnknown_IMETHODS \
|
|---|
| 1105 | IGetFrame_METHODS
|
|---|
| 1106 | ICOM_DEFINE(IGetFrame,IUnknown)
|
|---|
| 1107 | #undef ICOM_INTERFACE
|
|---|
| 1108 |
|
|---|
| 1109 | /*** IUnknown methods ***/
|
|---|
| 1110 | #define IGetFrame_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 1111 | #define IGetFrame_AddRef(p) ICOM_CALL (AddRef,p)
|
|---|
| 1112 | #define IGetFrame_Release(p) ICOM_CALL (Release,p)
|
|---|
| 1113 | /*** IGetFrame methods ***/
|
|---|
| 1114 | #define IGetFrame_GetFrame(p,a) ICOM_CALL1(GetFrame,p,a)
|
|---|
| 1115 | #define IGetFrame_Begin(p,a,b,c) ICOM_CALL3(Begin,p,a,b,c)
|
|---|
| 1116 | #define IGetFrame_End(p) ICOM_CALL (End,p)
|
|---|
| 1117 | #define IGetFrame_SetFormat(p,a,b,c,d,e,f) ICOM_CALL6(SetFormat,p,a,b,c,d,e,f)
|
|---|
| 1118 |
|
|---|
| 1119 | #define AVIERR_OK 0
|
|---|
| 1120 | #define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)
|
|---|
| 1121 |
|
|---|
| 1122 | #define AVIERR_UNSUPPORTED MAKE_AVIERR(101)
|
|---|
| 1123 | #define AVIERR_BADFORMAT MAKE_AVIERR(102)
|
|---|
| 1124 | #define AVIERR_MEMORY MAKE_AVIERR(103)
|
|---|
| 1125 | #define AVIERR_INTERNAL MAKE_AVIERR(104)
|
|---|
| 1126 | #define AVIERR_BADFLAGS MAKE_AVIERR(105)
|
|---|
| 1127 | #define AVIERR_BADPARAM MAKE_AVIERR(106)
|
|---|
| 1128 | #define AVIERR_BADSIZE MAKE_AVIERR(107)
|
|---|
| 1129 | #define AVIERR_BADHANDLE MAKE_AVIERR(108)
|
|---|
| 1130 | #define AVIERR_FILEREAD MAKE_AVIERR(109)
|
|---|
| 1131 | #define AVIERR_FILEWRITE MAKE_AVIERR(110)
|
|---|
| 1132 | #define AVIERR_FILEOPEN MAKE_AVIERR(111)
|
|---|
| 1133 | #define AVIERR_COMPRESSOR MAKE_AVIERR(112)
|
|---|
| 1134 | #define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)
|
|---|
| 1135 | #define AVIERR_READONLY MAKE_AVIERR(114)
|
|---|
| 1136 | #define AVIERR_NODATA MAKE_AVIERR(115)
|
|---|
| 1137 | #define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)
|
|---|
| 1138 | #define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)
|
|---|
| 1139 | #define AVIERR_USERABORT MAKE_AVIERR(198)
|
|---|
| 1140 | #define AVIERR_ERROR MAKE_AVIERR(199)
|
|---|
| 1141 |
|
|---|
| 1142 | HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCSTR szFile);
|
|---|
| 1143 | HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile);
|
|---|
| 1144 | #define MCIWndCreate WINELIB_NAME_AW(MCIWndCreate)
|
|---|
| 1145 |
|
|---|
| 1146 | #define MCIWNDOPENF_NEW 0x0001
|
|---|
| 1147 |
|
|---|
| 1148 | #define MCIWNDF_NOAUTOSIZEWINDOW 0x0001
|
|---|
| 1149 | #define MCIWNDF_NOPLAYBAR 0x0002
|
|---|
| 1150 | #define MCIWNDF_NOAUTOSIZEMOVIE 0x0004
|
|---|
| 1151 | #define MCIWNDF_NOMENU 0x0008
|
|---|
| 1152 | #define MCIWNDF_SHOWNAME 0x0010
|
|---|
| 1153 | #define MCIWNDF_SHOWPOS 0x0020
|
|---|
| 1154 | #define MCIWNDF_SHOWMODE 0x0040
|
|---|
| 1155 | #define MCIWNDF_SHOWALL 0x0070
|
|---|
| 1156 |
|
|---|
| 1157 | #define MCIWNDF_NOTIFYMODE 0x0100
|
|---|
| 1158 | #define MCIWNDF_NOTIFYPOS 0x0200
|
|---|
| 1159 | #define MCIWNDF_NOTIFYSIZE 0x0400
|
|---|
| 1160 | #define MCIWNDF_NOTIFYERROR 0x1000
|
|---|
| 1161 | #define MCIWNDF_NOTIFYALL 0x1F00
|
|---|
| 1162 |
|
|---|
| 1163 | #define MCIWNDF_NOTIFYANSI 0x0080
|
|---|
| 1164 |
|
|---|
| 1165 | #define MCIWNDF_NOTIFYMEDIAA 0x0880
|
|---|
| 1166 | #define MCIWNDF_NOTIFYMEDIAW 0x0800
|
|---|
| 1167 | #define MCIWNDF_NOTIFYMEDIA WINELIB_NAME_AW(MCIWNDF_NOTIFYMEDIA)
|
|---|
| 1168 |
|
|---|
| 1169 | #define MCIWNDF_RECORD 0x2000
|
|---|
| 1170 | #define MCIWNDF_NOERRORDLG 0x4000
|
|---|
| 1171 | #define MCIWNDF_NOOPEN 0x8000
|
|---|
| 1172 |
|
|---|
| 1173 | #ifdef __cplusplus
|
|---|
| 1174 | #define MCIWndSM ::SendMessage
|
|---|
| 1175 | #else
|
|---|
| 1176 | #define MCIWndSM SendMessage
|
|---|
| 1177 | #endif
|
|---|
| 1178 |
|
|---|
| 1179 | #define MCIWndCanPlay(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_PLAY,0,0)
|
|---|
| 1180 | #define MCIWndCanRecord(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_RECORD,0,0)
|
|---|
| 1181 | #define MCIWndCanSave(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_SAVE,0,0)
|
|---|
| 1182 | #define MCIWndCanWindow(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_WINDOW,0,0)
|
|---|
| 1183 | #define MCIWndCanEject(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_EJECT,0,0)
|
|---|
| 1184 | #define MCIWndCanConfig(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_CONFIG,0,0)
|
|---|
| 1185 | #define MCIWndPaletteKick(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_PALETTEKICK,0,0)
|
|---|
| 1186 |
|
|---|
| 1187 | #define MCIWndSave(hWnd,szFile) (LONG)MCIWndSM(hWnd,MCI_SAVE,0,(LPARAM)(LPVOID)(szFile))
|
|---|
| 1188 | #define MCIWndSaveDialog(hWnd) MCIWndSave(hWnd,-1)
|
|---|
| 1189 |
|
|---|
| 1190 | #define MCIWndNew(hWnd,lp) (LONG)MCIWndSM(hWnd,MCIWNDM_NEW,0,(LPARAM)(LPVOID)(lp))
|
|---|
| 1191 |
|
|---|
| 1192 | #define MCIWndRecord(hWnd) (LONG)MCIWndSM(hWnd,MCI_RECORD,0,0)
|
|---|
| 1193 | #define MCIWndOpen(hWnd,sz,f) (LONG)MCIWndSM(hWnd,MCIWNDM_OPEN,(WPARAM)(UINT)(f),(LPARAM)(LPVOID)(sz))
|
|---|
| 1194 | #define MCIWndOpenDialog(hWnd) MCIWndOpen(hWnd,-1,0)
|
|---|
| 1195 | #define MCIWndClose(hWnd) (LONG)MCIWndSM(hWnd,MCI_CLOSE,0,0)
|
|---|
| 1196 | #define MCIWndPlay(hWnd) (LONG)MCIWndSM(hWnd,MCI_PLAY,0,0)
|
|---|
| 1197 | #define MCIWndStop(hWnd) (LONG)MCIWndSM(hWnd,MCI_STOP,0,0)
|
|---|
| 1198 | #define MCIWndPause(hWnd) (LONG)MCIWndSM(hWnd,MCI_PAUSE,0,0)
|
|---|
| 1199 | #define MCIWndResume(hWnd) (LONG)MCIWndSM(hWnd,MCI_RESUME,0,0)
|
|---|
| 1200 | #define MCIWndSeek(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCI_SEEK,0,(LPARAM)(LONG)(lPos))
|
|---|
| 1201 | #define MCIWndEject(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_EJECT,0,0)
|
|---|
| 1202 |
|
|---|
| 1203 | #define MCIWndHome(hWnd) MCIWndSeek(hWnd,MCIWND_START)
|
|---|
| 1204 | #define MCIWndEnd(hWnd) MCIWndSeek(hWnd,MCIWND_END)
|
|---|
| 1205 |
|
|---|
| 1206 | #define MCIWndGetSource(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_GET_SOURCE,0,(LPARAM)(LPRECT)(prc))
|
|---|
| 1207 | #define MCIWndPutSource(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_PUT_SOURCE,0,(LPARAM)(LPRECT)(prc))
|
|---|
| 1208 |
|
|---|
| 1209 | #define MCIWndGetDest(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_GET_DEST,0,(LPARAM)(LPRECT)(prc))
|
|---|
| 1210 | #define MCIWndPutDest(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_PUT_DEST,0,(LPARAM)(LPRECT)(prc))
|
|---|
| 1211 |
|
|---|
| 1212 | #define MCIWndPlayReverse(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYREVERSE,0,0)
|
|---|
| 1213 | #define MCIWndPlayFrom(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYFROM,0,(LPARAM)(LONG)(lPos))
|
|---|
| 1214 | #define MCIWndPlayTo(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYTO, 0,(LPARAM)(LONG)(lPos))
|
|---|
| 1215 | #define MCIWndPlayFromTo(hWnd,lStart,lEnd) (MCIWndSeek(hWnd,lStart),MCIWndPlayTo(hWnd,lEnd))
|
|---|
| 1216 |
|
|---|
| 1217 | #define MCIWndGetDeviceID(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETDEVICEID,0,0)
|
|---|
| 1218 | #define MCIWndGetAlias(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETALIAS,0,0)
|
|---|
| 1219 | #define MCIWndGetMode(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETMODE,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
|
|---|
| 1220 | #define MCIWndGetPosition(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETPOSITION,0,0)
|
|---|
| 1221 | #define MCIWndGetPositionString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETPOSITION,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
|
|---|
| 1222 | #define MCIWndGetStart(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETSTART,0,0)
|
|---|
| 1223 | #define MCIWndGetLength(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETLENGTH,0,0)
|
|---|
| 1224 | #define MCIWndGetEnd(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETEND,0,0)
|
|---|
| 1225 |
|
|---|
| 1226 | #define MCIWndStep(hWnd,n) (LONG)MCIWndSM(hWnd,MCI_STEP,0,(LPARAM)(long)(n))
|
|---|
| 1227 |
|
|---|
| 1228 | #define MCIWndDestroy(hWnd) (VOID)MCIWndSM(hWnd,WM_CLOSE,0,0)
|
|---|
| 1229 | #define MCIWndSetZoom(hWnd,iZoom) (VOID)MCIWndSM(hWnd,MCIWNDM_SETZOOM,0,(LPARAM)(UINT)(iZoom))
|
|---|
| 1230 | #define MCIWndGetZoom(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETZOOM,0,0)
|
|---|
| 1231 | #define MCIWndSetVolume(hWnd,iVol) (LONG)MCIWndSM(hWnd,MCIWNDM_SETVOLUME,0,(LPARAM)(UINT)(iVol))
|
|---|
| 1232 | #define MCIWndGetVolume(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETVOLUME,0,0)
|
|---|
| 1233 | #define MCIWndSetSpeed(hWnd,iSpeed) (LONG)MCIWndSM(hWnd,MCIWNDM_SETSPEED,0,(LPARAM)(UINT)(iSpeed))
|
|---|
| 1234 | #define MCIWndGetSpeed(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETSPEED,0,0)
|
|---|
| 1235 | #define MCIWndSetTimeFormat(hWnd,lp) (LONG)MCIWndSM(hWnd,MCIWNDM_SETTIMEFORMAT,0,(LPARAM)(LPTSTR)(lp))
|
|---|
| 1236 | #define MCIWndGetTimeFormat(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETTIMEFORMAT,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
|
|---|
| 1237 | #define MCIWndValidateMedia(hWnd) (VOID)MCIWndSM(hWnd,MCIWNDM_VALIDATEMEDIA,0,0)
|
|---|
| 1238 |
|
|---|
| 1239 | #define MCIWndSetRepeat(hWnd,f) (void)MCIWndSM(hWnd,MCIWNDM_SETREPEAT,0,(LPARAM)(BOOL)(f))
|
|---|
| 1240 | #define MCIWndGetRepeat(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_GETREPEAT,0,0)
|
|---|
| 1241 |
|
|---|
| 1242 | #define MCIWndUseFrames(hWnd) MCIWndSetTimeFormat(hWnd,TEXT("frames"))
|
|---|
| 1243 | #define MCIWndUseTime(hWnd) MCIWndSetTimeFormat(hWnd,TEXT("ms"))
|
|---|
| 1244 |
|
|---|
| 1245 | #define MCIWndSetActiveTimer(hWnd,active) \
|
|---|
| 1246 | (VOID)MCIWndSM(hWnd,MCIWNDM_SETACTIVETIMER, \
|
|---|
| 1247 | (WPARAM)(UINT)(active),0L)
|
|---|
| 1248 | #define MCIWndSetInactiveTimer(hWnd,inactive) \
|
|---|
| 1249 | (VOID)MCIWndSM(hWnd,MCIWNDM_SETINACTIVETIMER, \
|
|---|
| 1250 | (WPARAM)(UINT)(inactive),0L)
|
|---|
| 1251 | #define MCIWndSetTimers(hWnd,active,inactive) \
|
|---|
| 1252 | (VOID)MCIWndSM(hWnd,MCIWNDM_SETTIMERS,(WPARAM)(UINT)(active),\
|
|---|
| 1253 | (LPARAM)(UINT)(inactive))
|
|---|
| 1254 | #define MCIWndGetActiveTimer(hWnd) \
|
|---|
| 1255 | (UINT)MCIWndSM(hWnd,MCIWNDM_GETACTIVETIMER,0,0L);
|
|---|
| 1256 | #define MCIWndGetInactiveTimer(hWnd) \
|
|---|
| 1257 | (UINT)MCIWndSM(hWnd,MCIWNDM_GETINACTIVETIMER,0,0L);
|
|---|
| 1258 |
|
|---|
| 1259 | #define MCIWndRealize(hWnd,fBkgnd) (LONG)MCIWndSM(hWnd,MCIWNDM_REALIZE,(WPARAM)(BOOL)(fBkgnd),0)
|
|---|
| 1260 |
|
|---|
| 1261 | #define MCIWndSendString(hWnd,sz) (LONG)MCIWndSM(hWnd,MCIWNDM_SENDSTRING,0,(LPARAM)(LPTSTR)(sz))
|
|---|
| 1262 | #define MCIWndReturnString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_RETURNSTRING,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
|
|---|
| 1263 | #define MCIWndGetError(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETERROR,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
|
|---|
| 1264 |
|
|---|
| 1265 | #define MCIWndGetPalette(hWnd) (HPALETTE)MCIWndSM(hWnd,MCIWNDM_GETPALETTE,0,0)
|
|---|
| 1266 | #define MCIWndSetPalette(hWnd,hpal) (LONG)MCIWndSM(hWnd,MCIWNDM_SETPALETTE,(WPARAM)(HPALETTE)(hpal),0)
|
|---|
| 1267 |
|
|---|
| 1268 | #define MCIWndGetFileName(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETFILENAME,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
|
|---|
| 1269 | #define MCIWndGetDevice(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETDEVICE,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
|
|---|
| 1270 |
|
|---|
| 1271 | #define MCIWndGetStyles(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETSTYLES,0,0L)
|
|---|
| 1272 | #define MCIWndChangeStyles(hWnd,mask,value) (LONG)MCIWndSM(hWnd,MCIWNDM_CHANGESTYLES,(WPARAM)(UINT)(mask),(LPARAM)(LONG)(value))
|
|---|
| 1273 |
|
|---|
| 1274 | #define MCIWndOpenInterface(hWnd,pUnk) (LONG)MCIWndSM(hWnd,MCIWNDM_OPENINTERFACE,0,(LPARAM)(LPUNKNOWN)(pUnk))
|
|---|
| 1275 |
|
|---|
| 1276 | #define MCIWndSetOwner(hWnd,hWndP) (LONG)MCIWndSM(hWnd,MCIWNDM_SETOWNER,(WPARAM)(hWndP),0)
|
|---|
| 1277 |
|
|---|
| 1278 | #define MCIWNDM_GETDEVICEID (WM_USER + 100)
|
|---|
| 1279 | #define MCIWNDM_GETSTART (WM_USER + 103)
|
|---|
| 1280 | #define MCIWNDM_GETLENGTH (WM_USER + 104)
|
|---|
| 1281 | #define MCIWNDM_GETEND (WM_USER + 105)
|
|---|
| 1282 | #define MCIWNDM_EJECT (WM_USER + 107)
|
|---|
| 1283 | #define MCIWNDM_SETZOOM (WM_USER + 108)
|
|---|
| 1284 | #define MCIWNDM_GETZOOM (WM_USER + 109)
|
|---|
| 1285 | #define MCIWNDM_SETVOLUME (WM_USER + 110)
|
|---|
| 1286 | #define MCIWNDM_GETVOLUME (WM_USER + 111)
|
|---|
| 1287 | #define MCIWNDM_SETSPEED (WM_USER + 112)
|
|---|
| 1288 | #define MCIWNDM_GETSPEED (WM_USER + 113)
|
|---|
| 1289 | #define MCIWNDM_SETREPEAT (WM_USER + 114)
|
|---|
| 1290 | #define MCIWNDM_GETREPEAT (WM_USER + 115)
|
|---|
| 1291 | #define MCIWNDM_REALIZE (WM_USER + 118)
|
|---|
| 1292 | #define MCIWNDM_VALIDATEMEDIA (WM_USER + 121)
|
|---|
| 1293 | #define MCIWNDM_PLAYFROM (WM_USER + 122)
|
|---|
| 1294 | #define MCIWNDM_PLAYTO (WM_USER + 123)
|
|---|
| 1295 | #define MCIWNDM_GETPALETTE (WM_USER + 126)
|
|---|
| 1296 | #define MCIWNDM_SETPALETTE (WM_USER + 127)
|
|---|
| 1297 | #define MCIWNDM_SETTIMERS (WM_USER + 129)
|
|---|
| 1298 | #define MCIWNDM_SETACTIVETIMER (WM_USER + 130)
|
|---|
| 1299 | #define MCIWNDM_SETINACTIVETIMER (WM_USER + 131)
|
|---|
| 1300 | #define MCIWNDM_GETACTIVETIMER (WM_USER + 132)
|
|---|
| 1301 | #define MCIWNDM_GETINACTIVETIMER (WM_USER + 133)
|
|---|
| 1302 | #define MCIWNDM_CHANGESTYLES (WM_USER + 135)
|
|---|
| 1303 | #define MCIWNDM_GETSTYLES (WM_USER + 136)
|
|---|
| 1304 | #define MCIWNDM_GETALIAS (WM_USER + 137)
|
|---|
| 1305 | #define MCIWNDM_PLAYREVERSE (WM_USER + 139)
|
|---|
| 1306 | #define MCIWNDM_GET_SOURCE (WM_USER + 140)
|
|---|
| 1307 | #define MCIWNDM_PUT_SOURCE (WM_USER + 141)
|
|---|
| 1308 | #define MCIWNDM_GET_DEST (WM_USER + 142)
|
|---|
| 1309 | #define MCIWNDM_PUT_DEST (WM_USER + 143)
|
|---|
| 1310 | #define MCIWNDM_CAN_PLAY (WM_USER + 144)
|
|---|
| 1311 | #define MCIWNDM_CAN_WINDOW (WM_USER + 145)
|
|---|
| 1312 | #define MCIWNDM_CAN_RECORD (WM_USER + 146)
|
|---|
| 1313 | #define MCIWNDM_CAN_SAVE (WM_USER + 147)
|
|---|
| 1314 | #define MCIWNDM_CAN_EJECT (WM_USER + 148)
|
|---|
| 1315 | #define MCIWNDM_CAN_CONFIG (WM_USER + 149)
|
|---|
| 1316 | #define MCIWNDM_PALETTEKICK (WM_USER + 150)
|
|---|
| 1317 | #define MCIWNDM_OPENINTERFACE (WM_USER + 151)
|
|---|
| 1318 | #define MCIWNDM_SETOWNER (WM_USER + 152)
|
|---|
| 1319 |
|
|---|
| 1320 | #define MCIWNDM_SENDSTRINGA (WM_USER + 101)
|
|---|
| 1321 | #define MCIWNDM_GETPOSITIONA (WM_USER + 102)
|
|---|
| 1322 | #define MCIWNDM_GETMODEA (WM_USER + 106)
|
|---|
| 1323 | #define MCIWNDM_SETTIMEFORMATA (WM_USER + 119)
|
|---|
| 1324 | #define MCIWNDM_GETTIMEFORMATA (WM_USER + 120)
|
|---|
| 1325 | #define MCIWNDM_GETFILENAMEA (WM_USER + 124)
|
|---|
| 1326 | #define MCIWNDM_GETDEVICEA (WM_USER + 125)
|
|---|
| 1327 | #define MCIWNDM_GETERRORA (WM_USER + 128)
|
|---|
| 1328 | #define MCIWNDM_NEWA (WM_USER + 134)
|
|---|
| 1329 | #define MCIWNDM_RETURNSTRINGA (WM_USER + 138)
|
|---|
| 1330 | #define MCIWNDM_OPENA (WM_USER + 153)
|
|---|
| 1331 |
|
|---|
| 1332 | #define MCIWNDM_SENDSTRINGW (WM_USER + 201)
|
|---|
| 1333 | #define MCIWNDM_GETPOSITIONW (WM_USER + 202)
|
|---|
| 1334 | #define MCIWNDM_GETMODEW (WM_USER + 206)
|
|---|
| 1335 | #define MCIWNDM_SETTIMEFORMATW (WM_USER + 219)
|
|---|
| 1336 | #define MCIWNDM_GETTIMEFORMATW (WM_USER + 220)
|
|---|
| 1337 | #define MCIWNDM_GETFILENAMEW (WM_USER + 224)
|
|---|
| 1338 | #define MCIWNDM_GETDEVICEW (WM_USER + 225)
|
|---|
| 1339 | #define MCIWNDM_GETERRORW (WM_USER + 228)
|
|---|
| 1340 | #define MCIWNDM_NEWW (WM_USER + 234)
|
|---|
| 1341 | #define MCIWNDM_RETURNSTRINGW (WM_USER + 238)
|
|---|
| 1342 | #define MCIWNDM_OPENW (WM_USER + 252)
|
|---|
| 1343 |
|
|---|
| 1344 | #define MCIWNDM_SENDSTRING WINELIB_NAME_AW(MCIWNDM_SENDSTRING)
|
|---|
| 1345 | #define MCIWNDM_GETPOSITION WINELIB_NAME_AW(MCIWNDM_GETPOSITION)
|
|---|
| 1346 | #define MCIWNDM_GETMODE WINELIB_NAME_AW(MCIWNDM_GETMODE)
|
|---|
| 1347 | #define MCIWNDM_SETTIMEFORMAT WINELIB_NAME_AW(MCIWNDM_SETTIMEFORMAT)
|
|---|
| 1348 | #define MCIWNDM_GETTIMEFORMAT WINELIB_NAME_AW(MCIWNDM_GETTIMEFORMAT)
|
|---|
| 1349 | #define MCIWNDM_GETFILENAME WINELIB_NAME_AW(MCIWNDM_GETFILENAME)
|
|---|
| 1350 | #define MCIWNDM_GETDEVICE WINELIB_NAME_AW(MCIWNDM_GETDEVICE)
|
|---|
| 1351 | #define MCIWNDM_GETERROR WINELIB_NAME_AW(MCIWNDM_GETERROR)
|
|---|
| 1352 | #define MCIWNDM_NEW WINELIB_NAME_AW(MCIWNDM_NEW)
|
|---|
| 1353 | #define MCIWNDM_RETURNSTRING WINELIB_NAME_AW(MCIWNDM_RETURNSTRING)
|
|---|
| 1354 | #define MCIWNDM_OPEN WINELIB_NAME_AW(MCIWNDM_OPEN)
|
|---|
| 1355 |
|
|---|
| 1356 | #define MCIWNDM_NOTIFYMODE (WM_USER + 200)
|
|---|
| 1357 | #define MCIWNDM_NOTIFYPOS (WM_USER + 201)
|
|---|
| 1358 | #define MCIWNDM_NOTIFYSIZE (WM_USER + 202)
|
|---|
| 1359 | #define MCIWNDM_NOTIFYMEDIA (WM_USER + 203)
|
|---|
| 1360 | #define MCIWNDM_NOTIFYERROR (WM_USER + 205)
|
|---|
| 1361 |
|
|---|
| 1362 | #define MCIWND_START -1
|
|---|
| 1363 | #define MCIWND_END -2
|
|---|
| 1364 |
|
|---|
| 1365 | /********************************************
|
|---|
| 1366 | * DrawDib declarations
|
|---|
| 1367 | */
|
|---|
| 1368 |
|
|---|
| 1369 | HDRAWDIB VFWAPI DrawDibOpen( void );
|
|---|
| 1370 | UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground);
|
|---|
| 1371 |
|
|---|
| 1372 | BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, HDC hdc, INT dxDst, INT dyDst,
|
|---|
| 1373 | LPBITMAPINFOHEADER lpbi, INT dxSrc, INT dySrc, UINT wFlags);
|
|---|
| 1374 |
|
|---|
| 1375 | BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, INT xDst, INT yDst, INT dxDst, INT dyDst,
|
|---|
| 1376 | LPBITMAPINFOHEADER lpbi, LPVOID lpBits,
|
|---|
| 1377 | INT xSrc, INT ySrc, INT dxSrc, INT dySrc, UINT wFlags);
|
|---|
| 1378 |
|
|---|
| 1379 | /* DrawDibDraw flags */
|
|---|
| 1380 |
|
|---|
| 1381 | #define DDF_UPDATE 0x0002
|
|---|
| 1382 | #define DDF_SAME_HDC 0x0004
|
|---|
| 1383 | #define DDF_SAME_DRAW 0x0008
|
|---|
| 1384 | #define DDF_DONTDRAW 0x0010
|
|---|
| 1385 | #define DDF_ANIMATE 0x0020
|
|---|
| 1386 | #define DDF_BUFFER 0x0040
|
|---|
| 1387 | #define DDF_JUSTDRAWIT 0x0080
|
|---|
| 1388 | #define DDF_FULLSCREEN 0x0100
|
|---|
| 1389 | #define DDF_BACKGROUNDPAL 0x0200
|
|---|
| 1390 | #define DDF_NOTKEYFRAME 0x0400
|
|---|
| 1391 | #define DDF_HURRYUP 0x0800
|
|---|
| 1392 | #define DDF_HALFTONE 0x1000
|
|---|
| 1393 |
|
|---|
| 1394 | #define DDF_PREROLL DDF_DONTDRAW
|
|---|
| 1395 | #define DDF_SAME_DIB DDF_SAME_DRAW
|
|---|
| 1396 | #define DDF_SAME_SIZE DDF_SAME_DRAW
|
|---|
| 1397 |
|
|---|
| 1398 | BOOL VFWAPI DrawDibSetPalette(HDRAWDIB hdd, HPALETTE hpal);
|
|---|
| 1399 | HPALETTE VFWAPI DrawDibGetPalette(HDRAWDIB hdd);
|
|---|
| 1400 | BOOL VFWAPI DrawDibChangePalette(HDRAWDIB hdd, int iStart, int iLen, LPPALETTEENTRY lppe);
|
|---|
| 1401 | LPVOID VFWAPI DrawDibGetBuffer(HDRAWDIB hdd, LPBITMAPINFOHEADER lpbi, DWORD dwSize, DWORD dwFlags);
|
|---|
| 1402 |
|
|---|
| 1403 | BOOL VFWAPI DrawDibStart(HDRAWDIB hdd, DWORD rate);
|
|---|
| 1404 | BOOL VFWAPI DrawDibStop(HDRAWDIB hdd);
|
|---|
| 1405 | #define DrawDibUpdate(hdd, hdc, x, y) \
|
|---|
| 1406 | DrawDibDraw(hdd, hdc, x, y, 0, 0, NULL, NULL, 0, 0, 0, 0, DDF_UPDATE)
|
|---|
| 1407 |
|
|---|
| 1408 | BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd);
|
|---|
| 1409 | BOOL VFWAPI DrawDibClose(HDRAWDIB hdd);
|
|---|
| 1410 |
|
|---|
| 1411 | /* display profiling */
|
|---|
| 1412 | #define PD_CAN_DRAW_DIB 0x0001
|
|---|
| 1413 | #define PD_CAN_STRETCHDIB 0x0002
|
|---|
| 1414 | #define PD_STRETCHDIB_1_1_OK 0x0004
|
|---|
| 1415 | #define PD_STRETCHDIB_1_2_OK 0x0008
|
|---|
| 1416 | #define PD_STRETCHDIB_1_N_OK 0x0010
|
|---|
| 1417 |
|
|---|
| 1418 | DWORD VFWAPI DrawDibProfileDisplay(LPBITMAPINFOHEADER lpbi);
|
|---|
| 1419 |
|
|---|
| 1420 |
|
|---|
| 1421 | #ifdef __cplusplus
|
|---|
| 1422 | }
|
|---|
| 1423 | #endif /* __cplusplus */
|
|---|
| 1424 |
|
|---|
| 1425 | #endif /* __WINE_VFW_H */
|
|---|