vfw.h
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:20k
源码类别:

midi

开发平台:

Unix_Linux

  1. /*
  2.  * Modified for use with MPlayer, detailed CVS changelog at
  3.  * http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
  4.  * $Id: 7957a83925afd2c6859183defb503ba3e6fd359d $
  5.  */
  6. #ifndef __WINE_VFW_H
  7. #define __WINE_VFW_H
  8. //#include "pshpack1.h"
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #ifndef __WINE_WINGDI_H
  13. typedef struct __attribute__((__packed__))
  14. {
  15.     short    bfType;
  16.     long   bfSize;
  17.     short    bfReserved1;
  18.     short    bfReserved2;
  19.     long   bfOffBits;
  20. } BITMAPFILEHEADER;
  21. #ifndef _BITMAPINFOHEADER_
  22. #define _BITMAPINFOHEADER_
  23. typedef struct __attribute__((__packed__))
  24. {
  25.     long  biSize;
  26.     long   biWidth;
  27.     long   biHeight;
  28.     short  biPlanes;
  29.     short  biBitCount;
  30.     long  biCompression;
  31.     long  biSizeImage;
  32.     long   biXPelsPerMeter;
  33.     long   biYPelsPerMeter;
  34.     long  biClrUsed;
  35.     long  biClrImportant;
  36. } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
  37. typedef struct {
  38. BITMAPINFOHEADER bmiHeader;
  39. int bmiColors[1];
  40. } BITMAPINFO, *LPBITMAPINFO;
  41. #endif
  42. #endif
  43. #define VFWAPI
  44. #define VFWAPIV
  45. #ifndef __WINE_WINDEF_H
  46. typedef long (__stdcall__ *DRIVERPROC)(long,HDRVR,unsigned int,long,long);
  47. #endif
  48. #ifndef mmioFOURCC
  49. #define mmioFOURCC( ch0, ch1, ch2, ch3 )
  50. ( (long)(unsigned char)(ch0) | ( (long)(unsigned char)(ch1) << 8 ) |
  51. ( (long)(unsigned char)(ch2) << 16 ) | ( (long)(unsigned char)(ch3) << 24 ) )
  52. #endif
  53. #ifndef aviTWOCC
  54. #define aviTWOCC(ch0, ch1) ((short)(unsigned char)(ch0) | ((short)(unsigned char)(ch1) << 8))
  55. #endif
  56. #define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c')
  57. #define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c')
  58. /* Installable Compressor M? */
  59. /* HIC struct (same layout as Win95 one) */
  60. typedef struct tagWINE_HIC {
  61. long magic; /* 00: 'Smag' */
  62. HANDLE curthread; /* 04: */
  63. long type; /* 08: */
  64. long handler; /* 0C: */
  65. HDRVR hdrv; /* 10: */
  66. long driverid; /* 14:(handled by SendDriverMessage)*/
  67. DRIVERPROC driverproc; /* 18:(handled by SendDriverMessage)*/
  68. long x1; /* 1c: name? */
  69. short x2; /* 20: */
  70. long x3; /* 22: */
  71. /* 26: */
  72. } WINE_HIC;
  73. /* error return codes */
  74. #define ICERR_OK 0
  75. #define ICERR_DONTDRAW 1
  76. #define ICERR_NEWPALETTE 2
  77. #define ICERR_GOTOKEYFRAME 3
  78. #define ICERR_STOPDRAWING 4
  79. #define ICERR_UNSUPPORTED -1
  80. #define ICERR_BADFORMAT -2
  81. #define ICERR_MEMORY -3
  82. #define ICERR_INTERNAL -4
  83. #define ICERR_BADFLAGS -5
  84. #define ICERR_BADPARAM -6
  85. #define ICERR_BADSIZE -7
  86. #define ICERR_BADHANDLE -8
  87. #define ICERR_CANTUPDATE -9
  88. #define ICERR_ABORT -10
  89. #define ICERR_ERROR -100
  90. #define ICERR_BADBITDEPTH -200
  91. #define ICERR_BADIMAGESIZE -201
  92. #define ICERR_CUSTOM -400
  93. /* ICM Messages */
  94. #define ICM_USER (DRV_USER+0x0000)
  95. /* ICM driver message range */
  96. #define ICM_RESERVED_LOW (DRV_USER+0x1000)
  97. #define ICM_RESERVED_HIGH (DRV_USER+0x2000)
  98. #define ICM_RESERVED ICM_RESERVED_LOW
  99. #define ICM_GETSTATE (ICM_RESERVED+0)
  100. #define ICM_SETSTATE (ICM_RESERVED+1)
  101. #define ICM_GETINFO (ICM_RESERVED+2)
  102. #define ICM_CONFIGURE (ICM_RESERVED+10)
  103. #define ICM_ABOUT (ICM_RESERVED+11)
  104. /* */
  105. #define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30)
  106. #define ICM_GETQUALITY (ICM_RESERVED+31)
  107. #define ICM_SETQUALITY (ICM_RESERVED+32)
  108. #define ICM_SET (ICM_RESERVED+40)
  109. #define ICM_GET (ICM_RESERVED+41)
  110. /* 2 constant FOURCC codes */
  111. #define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
  112. #define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
  113. #define ICM_COMPRESS_GET_FORMAT (ICM_USER+4)
  114. #define ICM_COMPRESS_GET_SIZE (ICM_USER+5)
  115. #define ICM_COMPRESS_QUERY (ICM_USER+6)
  116. #define ICM_COMPRESS_BEGIN (ICM_USER+7)
  117. #define ICM_COMPRESS (ICM_USER+8)
  118. #define ICM_COMPRESS_END (ICM_USER+9)
  119. #define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10)
  120. #define ICM_DECOMPRESS_QUERY (ICM_USER+11)
  121. #define ICM_DECOMPRESS_BEGIN (ICM_USER+12)
  122. #define ICM_DECOMPRESS (ICM_USER+13)
  123. #define ICM_DECOMPRESS_END (ICM_USER+14)
  124. #define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29)
  125. #define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30)
  126. #define ICM_DRAW_QUERY (ICM_USER+31)
  127. #define ICM_DRAW_BEGIN (ICM_USER+15)
  128. #define ICM_DRAW_GET_PALETTE (ICM_USER+16)
  129. #define ICM_DRAW_START (ICM_USER+18)
  130. #define ICM_DRAW_STOP (ICM_USER+19)
  131. #define ICM_DRAW_END (ICM_USER+21)
  132. #define ICM_DRAW_GETTIME (ICM_USER+32)
  133. #define ICM_DRAW (ICM_USER+33)
  134. #define ICM_DRAW_WINDOW (ICM_USER+34)
  135. #define ICM_DRAW_SETTIME (ICM_USER+35)
  136. #define ICM_DRAW_REALIZE (ICM_USER+36)
  137. #define ICM_DRAW_FLUSH (ICM_USER+37)
  138. #define ICM_DRAW_RENDERBUFFER (ICM_USER+38)
  139. #define ICM_DRAW_START_PLAY (ICM_USER+39)
  140. #define ICM_DRAW_STOP_PLAY (ICM_USER+40)
  141. #define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50)
  142. #define ICM_DRAW_CHANGEPALETTE (ICM_USER+51)
  143. #define ICM_GETBUFFERSWANTED (ICM_USER+41)
  144. #define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42)
  145. #define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60)
  146. #define ICM_DECOMPRESSEX_QUERY (ICM_USER+61)
  147. #define ICM_DECOMPRESSEX (ICM_USER+62)
  148. #define ICM_DECOMPRESSEX_END (ICM_USER+63)
  149. #define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70)
  150. #define ICM_SET_STATUS_PROC (ICM_USER+72)
  151. /* structs */
  152. typedef struct {
  153. long dwSize; /* 00: size */
  154. long fccType; /* 04: type 'vidc' usually */
  155. long fccHandler; /* 08: */
  156. long dwVersion; /* 0c: version of compman opening you */
  157. long dwFlags; /* 10: LOshort is type specific */
  158. LRESULT dwError; /* 14: */
  159. void* pV1Reserved; /* 18: */
  160. void* pV2Reserved; /* 1c: */
  161. long dnDevNode; /* 20: */
  162. /* 24: */
  163. } ICOPEN,*LPICOPEN;
  164. #define ICCOMPRESS_KEYFRAME     0x00000001L
  165. typedef struct {
  166.     long dwFlags;
  167.     LPBITMAPINFOHEADER lpbiOutput;
  168.     void* lpOutput;
  169.     LPBITMAPINFOHEADER lpbiInput;
  170.     const void* lpInput;
  171.     long* lpckid;
  172.     long* lpdwFlags;
  173.     long lFrameNum;
  174.     long dwFrameSize;
  175.     long dwQuality;
  176.     LPBITMAPINFOHEADER lpbiPrev;
  177.     void* lpPrev;
  178. } ICCOMPRESS;
  179. long VFWAPIV ICCompress(
  180. HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiOutput,void* lpData,
  181. LPBITMAPINFOHEADER lpbiInput,void* lpBits,long* lpckid,
  182. long* lpdwFlags,long lFrameNum,long dwFrameSize,long dwQuality,
  183. LPBITMAPINFOHEADER lpbiPrev,void* lpPrev
  184. );
  185. #define ICCompressGetFormat(hic, lpbiInput, lpbiOutput) 
  186. ICSendMessage(
  187.     hic,ICM_COMPRESS_GET_FORMAT,(long)(void*)(lpbiInput),
  188.     (long)(void*)(lpbiOutput)
  189. )
  190. #define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
  191. #define ICGetDefaultKeyFrameRate(hic,lpint) 
  192. ICSendMessage(
  193.     hic, ICM_GETDEFAULTKEYFRAMERATE,
  194.     (long)(void*)(lpint), 
  195.     0 )
  196. #define ICGetDefaultQuality(hic,lpint) 
  197. ICSendMessage(
  198.     hic, ICM_GETDEFAULTQUALITY,
  199.     (long)(void*)(lpint), 
  200.     0 )
  201.     
  202. #define ICCompressBegin(hic, lpbiInput, lpbiOutput) 
  203.     ICSendMessage(
  204.      hic, ICM_COMPRESS_BEGIN, (long)(void*)(lpbiInput),
  205. (long)(void*)(lpbiOutput)
  206.     )
  207. #define ICCompressGetSize(hic, lpbiInput, lpbiOutput) 
  208.     ICSendMessage(
  209.      hic, ICM_COMPRESS_GET_SIZE, (long)(void*)(lpbiInput), 
  210. (long)(void*)(lpbiOutput)
  211.     )
  212. #define ICCompressQuery(hic, lpbiInput, lpbiOutput)
  213.     ICSendMessage(
  214.      hic, ICM_COMPRESS_QUERY, (long)(void*)(lpbiInput),
  215. (long)(void*)(lpbiOutput)
  216.     )
  217. #define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0)
  218. /* ICCOMPRESSFRAMES.dwFlags */
  219. #define ICCOMPRESSFRAMES_PADDING        0x00000001
  220. typedef struct {
  221.     long               dwFlags;
  222.     LPBITMAPINFOHEADER  lpbiOutput;
  223.     LPARAM              lOutput;
  224.     LPBITMAPINFOHEADER  lpbiInput;
  225.     LPARAM              lInput;
  226.     long                lStartFrame;
  227.     long                lFrameCount;
  228.     long                lQuality;
  229.     long                lDataRate;
  230.     long                lKeyRate;
  231.     long               dwRate;
  232.     long               dwScale;
  233.     long               dwOverheadPerFrame;
  234.     long               dwReserved2;
  235.     long CALLBACK (*GetData)(LPARAM lInput,long lFrame,void* lpBits,long len);
  236.     long CALLBACK (*PutData)(LPARAM lOutput,long lFrame,void* lpBits,long len);
  237. } ICCOMPRESSFRAMES;
  238. /* Values for wMode of ICOpen() */
  239. #define ICMODE_COMPRESS 1
  240. #define ICMODE_DECOMPRESS 2
  241. #define ICMODE_FASTDECOMPRESS 3
  242. #define ICMODE_QUERY 4
  243. #define ICMODE_FASTCOMPRESS 5
  244. #define ICMODE_DRAW 8
  245. /* quality flags */
  246. #define ICQUALITY_LOW       0
  247. #define ICQUALITY_HIGH      10000
  248. #define ICQUALITY_DEFAULT   -1
  249. typedef struct {
  250. long dwSize; /* 00: */
  251. long fccType; /* 04:compressor type     'vidc' 'audc' */
  252. long fccHandler; /* 08:compressor sub-type 'rle ' 'jpeg' 'pcm '*/
  253. long dwFlags; /* 0c:flags LOshort is type specific */
  254. long dwVersion; /* 10:version of the driver */
  255. long dwVersionICM; /* 14:version of the ICM used */
  256. /*
  257.  * under Win32, the driver always returns UNICODE strings.
  258.  */
  259. WCHAR szName[16]; /* 18:short name */
  260. WCHAR szDescription[128]; /* 38:long name */
  261. WCHAR szDriver[128]; /* 138:driver that contains compressor*/
  262. /* 238: */
  263. } ICINFO;
  264. /* ICINFO.dwFlags */
  265. #define VIDCF_QUALITY 0x0001  /* supports quality */
  266. #define VIDCF_CRUNCH 0x0002  /* supports crunching to a frame size */
  267. #define VIDCF_TEMPORAL 0x0004  /* supports inter-frame compress */
  268. #define VIDCF_COMPRESSFRAMES 0x0008  /* wants the compress all frames message */
  269. #define VIDCF_DRAW 0x0010  /* supports drawing */
  270. #define VIDCF_FASTTEMPORALC 0x0020  /* does not need prev frame on compress */
  271. #define VIDCF_FASTTEMPORALD 0x0080  /* does not need prev frame on decompress */
  272. #define VIDCF_QUALITYTIME 0x0040  /* supports temporal quality */
  273. #define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
  274. /* function shortcuts */
  275. /* ICM_ABOUT */
  276. #define ICMF_ABOUT_QUERY         0x00000001
  277. #define ICQueryAbout(hic) 
  278. (ICSendMessage(hic,ICM_ABOUT,(long)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
  279. #define ICAbout(hic, hwnd) ICSendMessage(hic,ICM_ABOUT,(long)(unsigned int)(hwnd),0)
  280. /* ICM_CONFIGURE */
  281. #define ICMF_CONFIGURE_QUERY 0x00000001
  282. #define ICQueryConfigure(hic) 
  283. (ICSendMessage(hic,ICM_CONFIGURE,(long)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
  284. #define ICConfigure(hic,hwnd) 
  285. ICSendMessage(hic,ICM_CONFIGURE,(long)(unsigned int)(hwnd),0)
  286. /* Decompression stuff */
  287. #define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */
  288. #define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */
  289. #define ICDECOMPRESS_PREROL 0x20000000 /* this frame is before real start */
  290. #define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */
  291. #define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */
  292. typedef struct {
  293.     long dwFlags; /* flags (from AVI index...) */
  294.     LPBITMAPINFOHEADER lpbiInput; /* BITMAPINFO of compressed data */
  295.     const void* lpInput; /* compressed data */
  296.     LPBITMAPINFOHEADER lpbiOutput; /* DIB to decompress to */
  297.     void* lpOutput;
  298.     long ckid; /* ckid from AVI file */
  299. } ICDECOMPRESS;
  300. typedef struct {
  301.     long dwFlags;
  302.     LPBITMAPINFOHEADER lpbiSrc;
  303.     const void* lpSrc;
  304.     LPBITMAPINFOHEADER lpbiDst;
  305.     void* lpDst;
  306.     /* changed for ICM_DECOMPRESSEX */
  307.     INT xDst;       /* destination rectangle */
  308.     INT yDst;
  309.     INT dxDst;
  310.     INT dyDst;
  311.     INT xSrc;       /* source rectangle */
  312.     INT ySrc;
  313.     INT dxSrc;
  314.     INT dySrc;
  315. } ICDECOMPRESSEX;
  316. long VFWAPIV ICDecompress(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits);
  317. long VFWAPIV ICDecompressEx(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits);
  318. long VFWAPIV ICUniversalEx(HIC hic,int command,LPBITMAPINFOHEADER lpbiFormat,LPBITMAPINFOHEADER lpbi);
  319. #define ICDecompressBegin(hic, lpbiInput, lpbiOutput) 
  320.     ICSendMessage(
  321.      hic, ICM_DECOMPRESS_BEGIN, (long)(void*)(lpbiInput),
  322. (long)(void*)(lpbiOutput)
  323.     )
  324. #define ICDecompressBeginEx(hic, lpbiInput, lpbiOutput) 
  325.     ICUniversalEx(
  326.      hic, ICM_DECOMPRESSEX_BEGIN, (lpbiInput),
  327. (lpbiOutput)
  328.     )
  329. #define ICDecompressQuery(hic, lpbiInput, lpbiOutput)  
  330.     ICSendMessage(
  331.      hic,ICM_DECOMPRESS_QUERY, (long)(void*)(lpbiInput),
  332. (long) (void*)(lpbiOutput)
  333.     )
  334. #define ICDecompressQueryEx(hic, lpbiInput, lpbiOutput) 
  335.     ICUniversalEx(
  336.      hic,ICM_DECOMPRESSEX_QUERY, (lpbiInput),
  337. (lpbiOutput)
  338.     )
  339. #define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput)
  340.     ((long)ICSendMessage(
  341.      hic,ICM_DECOMPRESS_GET_FORMAT, (long)(void*)(lpbiInput),
  342. (long)(void*)(lpbiOutput)
  343.     ))
  344. #define ICDecompressGetFormatSize(hic, lpbi) 
  345. ICDecompressGetFormat(hic, lpbi, NULL)
  346. #define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput)
  347.     ICSendMessage(
  348.      hic, ICM_DECOMPRESS_GET_PALETTE, (long)(void*)(lpbiInput), 
  349. (long)(void*)(lpbiOutput)
  350.     )
  351. #define ICDecompressSetPalette(hic,lpbiPalette)
  352.         ICSendMessage(
  353. hic,ICM_DECOMPRESS_SET_PALETTE,
  354. (long)(void*)(lpbiPalette),0
  355. )
  356. #define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)
  357. #define ICDecompressEndEx(hic) ICSendMessage(hic,ICM_DECOMPRESSEX_END, 0, 0)
  358. #define ICDRAW_QUERY        0x00000001L   /* test for support */
  359. #define ICDRAW_FULLSCREEN   0x00000002L   /* draw to full screen */
  360. #define ICDRAW_HDC          0x00000004L   /* draw to a HDC/HWND */
  361. WIN_BOOL VFWAPI ICInfo(long fccType, long fccHandler, ICINFO * lpicinfo);
  362. LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, long cb);
  363. HIC VFWAPI ICOpen(long fccType, long fccHandler, UINT wMode);
  364. //HIC VFWAPI ICOpenFunction(long fccType, long fccHandler, unsigned int wMode, void* lpfnHandler);
  365. LRESULT VFWAPI ICClose(HIC hic);
  366. LRESULT VFWAPI ICSendMessage(HIC hic, unsigned int msg, long dw1, long dw2);
  367. //HIC VFWAPI ICLocate(long fccType, long fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, short wFlags);
  368. int VFWAPI ICDoSomething(void);
  369. long VFWAPIV ICDrawBegin(
  370.         HIC hic,
  371.         long dwFlags,/* flags */
  372.         HPALETTE hpal, /* palette to draw with */
  373.         HWND hwnd, /* window to draw to */
  374.         HDC hdc, /* HDC to draw to */
  375.         INT xDst, /* destination rectangle */
  376.         INT yDst,
  377.         INT dxDst,
  378.         INT dyDst,
  379.         LPBITMAPINFOHEADER lpbi, /* format of frame to draw */
  380.         INT xSrc, /* source rectangle */
  381.         INT ySrc,
  382.         INT dxSrc,
  383.         INT dySrc,
  384.         long dwRate, /* frames/second = (dwRate/dwScale) */
  385.         long dwScale
  386. );
  387. /* as passed to ICM_DRAW_BEGIN (FIXME: correct only for Win32?)  */
  388. typedef struct {
  389. long dwFlags;
  390. HPALETTE hpal;
  391. HWND hwnd;
  392. HDC hdc;
  393. INT xDst;
  394. INT yDst;
  395. INT dxDst;
  396. INT dyDst;
  397. LPBITMAPINFOHEADER lpbi;
  398. INT xSrc;
  399. INT ySrc;
  400. INT dxSrc;
  401. INT dySrc;
  402. long dwRate;
  403. long dwScale;
  404. } ICDRAWBEGIN;
  405. #define ICDRAW_HURRYUP      0x80000000L   /* don't draw just buffer (hurry up!) */
  406. #define ICDRAW_UPDATE       0x40000000L   /* don't draw just update screen */
  407. #define ICDRAW_PREROLL      0x20000000L   /* this frame is before real start */
  408. #define ICDRAW_NULLFRAME    0x10000000L   /* repeat last frame */
  409. #define ICDRAW_NOTKEYFRAME  0x08000000L   /* this frame is not a key frame */
  410. typedef struct {
  411. long dwFlags;
  412. void* lpFormat;
  413. void* lpData;
  414. long cbData;
  415. long lTime;
  416. } ICDRAW;
  417. long VFWAPIV ICDraw(HIC hic,long dwFlags,void* lpFormat,void* lpData,long cbData,long lTime);
  418. #define AVIGETFRAMEF_BESTDISPLAYFMT 1
  419. typedef struct _AVISTREAMINFOA {
  420.     long fccType;
  421.     long fccHandler;
  422.     long dwFlags;        /* AVIIF_* */
  423.     long dwCaps;
  424.     short wPriority;
  425.     short wLanguage;
  426.     long dwScale;
  427.     long dwRate; /* dwRate / dwScale == samples/second */
  428.     long dwStart;
  429.     long dwLength; /* In units above... */
  430.     long dwInitialFrames;
  431.     long dwSuggestedBufferSize;
  432.     long dwQuality;
  433.     long dwSampleSize;
  434.     RECT rcFrame;
  435.     long dwEditCount;
  436.     long dwFormatChangeCount;
  437.     char szName[64];
  438. } AVISTREAMINFOA, * LPAVISTREAMINFOA, *PAVISTREAMINFOA;
  439. typedef struct _AVISTREAMINFOW {
  440.     long fccType;
  441.     long fccHandler;
  442.     long dwFlags;
  443.     long dwCaps;
  444.     short wPriority;
  445.     short wLanguage;
  446.     long dwScale;
  447.     long dwRate; /* dwRate / dwScale == samples/second */
  448.     long dwStart;
  449.     long dwLength; /* In units above... */
  450.     long dwInitialFrames;
  451.     long dwSuggestedBufferSize;
  452.     long dwQuality;
  453.     long dwSampleSize;
  454.     RECT rcFrame;
  455.     long dwEditCount;
  456.     long dwFormatChangeCount;
  457.     short szName[64];
  458. } AVISTREAMINFOW, * LPAVISTREAMINFOW, *PAVISTREAMINFOW;
  459. DECL_WINELIB_TYPE_AW(AVISTREAMINFO)
  460. DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO)
  461. DECL_WINELIB_TYPE_AW(PAVISTREAMINFO)
  462. #define AVISTREAMINFO_DISABLED 0x00000001
  463. #define AVISTREAMINFO_FORMATCHANGES 0x00010000
  464. /* AVIFILEINFO.dwFlags */
  465. #define AVIFILEINFO_HASINDEX 0x00000010
  466. #define AVIFILEINFO_MUSTUSEINDEX 0x00000020
  467. #define AVIFILEINFO_ISINTERLEAVED 0x00000100
  468. #define AVIFILEINFO_WASCAPTUREFILE 0x00010000
  469. #define AVIFILEINFO_COPYRIGHTED 0x00020000
  470. /* AVIFILEINFO.dwCaps */
  471. #define AVIFILECAPS_CANREAD 0x00000001
  472. #define AVIFILECAPS_CANWRITE 0x00000002
  473. #define AVIFILECAPS_ALLKEYFRAMES 0x00000010
  474. #define AVIFILECAPS_NOCOMPRESSION 0x00000020
  475. typedef struct _AVIFILEINFOW {
  476.     long               dwMaxBytesPerSec;
  477.     long               dwFlags;
  478.     long               dwCaps;
  479.     long               dwStreams;
  480.     long               dwSuggestedBufferSize;
  481.     long               dwWidth;
  482.     long               dwHeight;
  483.     long               dwScale;        
  484.     long               dwRate;
  485.     long               dwLength;
  486.     long               dwEditCount;
  487.     short               szFileType[64];
  488. } AVIFILEINFOW, * LPAVIFILEINFOW, *PAVIFILEINFOW;
  489. typedef struct _AVIFILEINFOA {
  490.     long               dwMaxBytesPerSec;
  491.     long               dwFlags;
  492.     long               dwCaps;
  493.     long               dwStreams;
  494.     long               dwSuggestedBufferSize;
  495.     long               dwWidth;
  496.     long               dwHeight;
  497.     long               dwScale;        
  498.     long               dwRate;
  499.     long               dwLength;
  500.     long               dwEditCount;
  501.     char szFileType[64];
  502. } AVIFILEINFOA, * LPAVIFILEINFOA, *PAVIFILEINFOA;
  503. DECL_WINELIB_TYPE_AW(AVIFILEINFO)
  504. DECL_WINELIB_TYPE_AW(PAVIFILEINFO)
  505. DECL_WINELIB_TYPE_AW(LPAVIFILEINFO)
  506. /* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
  507. #define AVICOMPRESSF_INTERLEAVE 0x00000001
  508. #define AVICOMPRESSF_DATARATE 0x00000002
  509. #define AVICOMPRESSF_KEYFRAMES 0x00000004
  510. #define AVICOMPRESSF_VALID 0x00000008
  511. typedef struct {
  512.     long fccType; /* stream type, for consistency */
  513.     long fccHandler; /* compressor */
  514.     long dwKeyFrameEvery; /* keyframe rate */
  515.     long dwQuality; /* compress quality 0-10,000 */
  516.     long dwBytesPerSecond; /* unsigned chars per second */
  517.     long dwFlags; /* flags... see below */
  518.     void* lpFormat; /* save format */
  519.     long cbFormat;
  520.     void* lpParms; /* compressor options */
  521.     long cbParms;
  522.     long dwInterleaveEvery; /* for non-video streams only */
  523. } AVICOMPRESSOPTIONS, *LPAVICOMPRESSOPTIONS,*PAVICOMPRESSOPTIONS;
  524. typedef struct {
  525.     long cbSize; // set to sizeof(COMPVARS) before
  526. // calling ICCompressorChoose
  527.     long dwFlags; // see below...
  528.     HIC hic; // HIC of chosen compressor
  529.     long               fccType; // basically ICTYPE_VIDEO
  530.     long               fccHandler; // handler of chosen compressor or
  531. // "" or "DIB "
  532.     LPBITMAPINFO lpbiIn; // input format
  533.     LPBITMAPINFO lpbiOut; // output format - will compress to this
  534.     void* lpBitsOut;
  535.     void* lpBitsPrev;
  536.     long lFrame;
  537.     long lKey; // key frames how often?
  538.     long lDataRate; // desired data rate KB/Sec
  539.     long lQ; // desired quality
  540.     long lKeyCount;
  541.     void* lpState; // state of compressor
  542.     long cbState; // size of the state
  543. } COMPVARS, *PCOMPVARS;
  544. // FLAGS for dwFlags element of COMPVARS structure:
  545. #define AVIERR_OK 0
  546. #define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)
  547. #define AVIERR_UNSUPPORTED MAKE_AVIERR(101)
  548. #define AVIERR_BADFORMAT MAKE_AVIERR(102)
  549. #define AVIERR_MEMORY MAKE_AVIERR(103)
  550. #define AVIERR_INTERNAL MAKE_AVIERR(104)
  551. #define AVIERR_BADFLAGS MAKE_AVIERR(105)
  552. #define AVIERR_BADPARAM MAKE_AVIERR(106)
  553. #define AVIERR_BADSIZE MAKE_AVIERR(107)
  554. #define AVIERR_BADHANDLE MAKE_AVIERR(108)
  555. #define AVIERR_FILEREAD MAKE_AVIERR(109)
  556. #define AVIERR_FILEWRITE MAKE_AVIERR(110)
  557. #define AVIERR_FILEOPEN MAKE_AVIERR(111)
  558. #define AVIERR_COMPRESSOR MAKE_AVIERR(112)
  559. #define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)
  560. #define AVIERR_READONLY MAKE_AVIERR(114)
  561. #define AVIERR_NODATA MAKE_AVIERR(115)
  562. #define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)
  563. #define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)
  564. #define AVIERR_USERABORT MAKE_AVIERR(198)
  565. #define AVIERR_ERROR MAKE_AVIERR(199)
  566. #ifdef __cplusplus
  567. }
  568. #endif
  569. #endif /* __WINE_VFW_H */