📄 vfw.h
字号:
(ICSendMessage(hic,ICM_CONFIGURE,(long)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)#define ICConfigure(hic,hwnd) \ ICSendMessage(hic,ICM_CONFIGURE,(long)(unsigned int)(hwnd),0)/* Decompression stuff */#define ICDECOMPRESS_HURRYUP 0x80000000 /* don't draw just buffer (hurry up!) */#define ICDECOMPRESS_UPDATE 0x40000000 /* don't draw just update screen */#define ICDECOMPRESS_PREROL 0x20000000 /* this frame is before real start */#define ICDECOMPRESS_NULLFRAME 0x10000000 /* repeat last frame */#define ICDECOMPRESS_NOTKEYFRAME 0x08000000 /* this frame is not a key frame */typedef struct { long dwFlags; /* flags (from AVI index...) */ LPBITMAPINFOHEADER lpbiInput; /* BITMAPINFO of compressed data */ const void* lpInput; /* compressed data */ LPBITMAPINFOHEADER lpbiOutput; /* DIB to decompress to */ void* lpOutput; long ckid; /* ckid from AVI file */} ICDECOMPRESS;typedef struct { long dwFlags; LPBITMAPINFOHEADER lpbiSrc; const void* lpSrc; LPBITMAPINFOHEADER lpbiDst; void* lpDst; /* changed for ICM_DECOMPRESSEX */ INT xDst; /* destination rectangle */ INT yDst; INT dxDst; INT dyDst; INT xSrc; /* source rectangle */ INT ySrc; INT dxSrc; INT dySrc;} ICDECOMPRESSEX;long VFWAPIV ICDecompress(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits);long VFWAPIV ICDecompressEx(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits);long VFWAPIV ICUniversalEx(HIC hic,int command,LPBITMAPINFOHEADER lpbiFormat,LPBITMAPINFOHEADER lpbi);#define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \ ICSendMessage( \ hic, ICM_DECOMPRESS_BEGIN, (long)(void*)(lpbiInput), \ (long)(void*)(lpbiOutput) \ )#define ICDecompressBeginEx(hic, lpbiInput, lpbiOutput) \ ICUniversalEx( \ hic, ICM_DECOMPRESSEX_BEGIN, (lpbiInput), \ (lpbiOutput) \ )#define ICDecompressQuery(hic, lpbiInput, lpbiOutput) \ ICSendMessage( \ hic,ICM_DECOMPRESS_QUERY, (long)(void*)(lpbiInput), \ (long) (void*)(lpbiOutput) \ )#define ICDecompressQueryEx(hic, lpbiInput, lpbiOutput) \ ICUniversalEx( \ hic,ICM_DECOMPRESSEX_QUERY, (lpbiInput), \ (lpbiOutput) \ )#define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput) \ ((long)ICSendMessage( \ hic,ICM_DECOMPRESS_GET_FORMAT, (long)(void*)(lpbiInput), \ (long)(void*)(lpbiOutput) \ ))#define ICDecompressGetFormatSize(hic, lpbi) \ ICDecompressGetFormat(hic, lpbi, NULL)#define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput) \ ICSendMessage( \ hic, ICM_DECOMPRESS_GET_PALETTE, (long)(void*)(lpbiInput), \ (long)(void*)(lpbiOutput) \ )#define ICDecompressSetPalette(hic,lpbiPalette) \ ICSendMessage( \ hic,ICM_DECOMPRESS_SET_PALETTE, \ (long)(void*)(lpbiPalette),0 \ )#define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)#define ICDecompressEndEx(hic) ICSendMessage(hic,ICM_DECOMPRESSEX_END, 0, 0)#define ICDRAW_QUERY 0x00000001L /* test for support */#define ICDRAW_FULLSCREEN 0x00000002L /* draw to full screen */#define ICDRAW_HDC 0x00000004L /* draw to a HDC/HWND */WIN_BOOL VFWAPI ICInfo(long fccType, long fccHandler, ICINFO * lpicinfo);LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, long cb);HIC VFWAPI ICOpen(long fccType, long fccHandler, UINT wMode);//HIC VFWAPI ICOpenFunction(long fccType, long fccHandler, unsigned int wMode, void* lpfnHandler);LRESULT VFWAPI ICClose(HIC hic);LRESULT VFWAPI ICSendMessage(HIC hic, unsigned int msg, long dw1, long dw2);//HIC VFWAPI ICLocate(long fccType, long fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, short wFlags);int VFWAPI ICDoSomething(void);long VFWAPIV ICDrawBegin( HIC hic, long dwFlags,/* flags */ HPALETTE hpal, /* palette to draw with */ HWND hwnd, /* window to draw to */ HDC hdc, /* HDC to draw to */ INT xDst, /* destination rectangle */ INT yDst, INT dxDst, INT dyDst, LPBITMAPINFOHEADER lpbi, /* format of frame to draw */ INT xSrc, /* source rectangle */ INT ySrc, INT dxSrc, INT dySrc, long dwRate, /* frames/second = (dwRate/dwScale) */ long dwScale);/* as passed to ICM_DRAW_BEGIN (FIXME: correct only for Win32?) */typedef struct { long dwFlags; HPALETTE hpal; HWND hwnd; HDC hdc; INT xDst; INT yDst; INT dxDst; INT dyDst; LPBITMAPINFOHEADER lpbi; INT xSrc; INT ySrc; INT dxSrc; INT dySrc; long dwRate; long dwScale;} ICDRAWBEGIN;#define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */#define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */#define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */#define ICDRAW_NULLFRAME 0x10000000L /* repeat last frame */#define ICDRAW_NOTKEYFRAME 0x08000000L /* this frame is not a key frame */typedef struct { long dwFlags; void* lpFormat; void* lpData; long cbData; long lTime;} ICDRAW;long VFWAPIV ICDraw(HIC hic,long dwFlags,void* lpFormat,void* lpData,long cbData,long lTime);#define AVIGETFRAMEF_BESTDISPLAYFMT 1typedef struct AVISTREAMINFOA { long fccType; long fccHandler; long dwFlags; /* AVIIF_* */ long dwCaps; short wPriority; short wLanguage; long dwScale; long dwRate; /* dwRate / dwScale == samples/second */ long dwStart; long dwLength; /* In units above... */ long dwInitialFrames; long dwSuggestedBufferSize; long dwQuality; long dwSampleSize; RECT rcFrame; long dwEditCount; long dwFormatChangeCount; char szName[64];} AVISTREAMINFOA, * LPAVISTREAMINFOA, *PAVISTREAMINFOA;typedef struct AVISTREAMINFOW { long fccType; long fccHandler; long dwFlags; long dwCaps; short wPriority; short wLanguage; long dwScale; long dwRate; /* dwRate / dwScale == samples/second */ long dwStart; long dwLength; /* In units above... */ long dwInitialFrames; long dwSuggestedBufferSize; long dwQuality; long dwSampleSize; RECT rcFrame; long dwEditCount; long dwFormatChangeCount; short szName[64];} AVISTREAMINFOW, * LPAVISTREAMINFOW, *PAVISTREAMINFOW;DECL_WINELIB_TYPE_AW(AVISTREAMINFO)DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO)DECL_WINELIB_TYPE_AW(PAVISTREAMINFO)#define AVISTREAMINFO_DISABLED 0x00000001#define AVISTREAMINFO_FORMATCHANGES 0x00010000/* AVIFILEINFO.dwFlags */#define AVIFILEINFO_HASINDEX 0x00000010#define AVIFILEINFO_MUSTUSEINDEX 0x00000020#define AVIFILEINFO_ISINTERLEAVED 0x00000100#define AVIFILEINFO_WASCAPTUREFILE 0x00010000#define AVIFILEINFO_COPYRIGHTED 0x00020000/* AVIFILEINFO.dwCaps */#define AVIFILECAPS_CANREAD 0x00000001#define AVIFILECAPS_CANWRITE 0x00000002#define AVIFILECAPS_ALLKEYFRAMES 0x00000010#define AVIFILECAPS_NOCOMPRESSION 0x00000020typedef struct AVIFILEINFOW { long dwMaxBytesPerSec; long dwFlags; long dwCaps; long dwStreams; long dwSuggestedBufferSize; long dwWidth; long dwHeight; long dwScale; long dwRate; long dwLength; long dwEditCount; short szFileType[64];} AVIFILEINFOW, * LPAVIFILEINFOW, *PAVIFILEINFOW;typedef struct AVIFILEINFOA { long dwMaxBytesPerSec; long dwFlags; long dwCaps; long dwStreams; long dwSuggestedBufferSize; long dwWidth; long dwHeight; long dwScale; long dwRate; long dwLength; long dwEditCount; char szFileType[64];} AVIFILEINFOA, * LPAVIFILEINFOA, *PAVIFILEINFOA;DECL_WINELIB_TYPE_AW(AVIFILEINFO)DECL_WINELIB_TYPE_AW(PAVIFILEINFO)DECL_WINELIB_TYPE_AW(LPAVIFILEINFO)/* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */#define AVICOMPRESSF_INTERLEAVE 0x00000001#define AVICOMPRESSF_DATARATE 0x00000002#define AVICOMPRESSF_KEYFRAMES 0x00000004#define AVICOMPRESSF_VALID 0x00000008typedef struct { long fccType; /* stream type, for consistency */ long fccHandler; /* compressor */ long dwKeyFrameEvery; /* keyframe rate */ long dwQuality; /* compress quality 0-10,000 */ long dwBytesPerSecond; /* unsigned chars per second */ long dwFlags; /* flags... see below */ void* lpFormat; /* save format */ long cbFormat; void* lpParms; /* compressor options */ long cbParms; long dwInterleaveEvery; /* for non-video streams only */} AVICOMPRESSOPTIONS, *LPAVICOMPRESSOPTIONS,*PAVICOMPRESSOPTIONS;typedef struct { long cbSize; // set to sizeof(COMPVARS) before // calling ICCompressorChoose long dwFlags; // see below... HIC hic; // HIC of chosen compressor long fccType; // basically ICTYPE_VIDEO long fccHandler; // handler of chosen compressor or // "" or "DIB " LPBITMAPINFO lpbiIn; // input format LPBITMAPINFO lpbiOut; // output format - will compress to this void* lpBitsOut; void* lpBitsPrev; long lFrame; long lKey; // key frames how often? long lDataRate; // desired data rate KB/Sec long lQ; // desired quality long lKeyCount; void* lpState; // state of compressor long cbState; // size of the state} COMPVARS, *PCOMPVARS;// FLAGS for dwFlags element of COMPVARS structure:#define AVIERR_OK 0#define MAKE_AVIERR(error) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)#define AVIERR_UNSUPPORTED MAKE_AVIERR(101)#define AVIERR_BADFORMAT MAKE_AVIERR(102)#define AVIERR_MEMORY MAKE_AVIERR(103)#define AVIERR_INTERNAL MAKE_AVIERR(104)#define AVIERR_BADFLAGS MAKE_AVIERR(105)#define AVIERR_BADPARAM MAKE_AVIERR(106)#define AVIERR_BADSIZE MAKE_AVIERR(107)#define AVIERR_BADHANDLE MAKE_AVIERR(108)#define AVIERR_FILEREAD MAKE_AVIERR(109)#define AVIERR_FILEWRITE MAKE_AVIERR(110)#define AVIERR_FILEOPEN MAKE_AVIERR(111)#define AVIERR_COMPRESSOR MAKE_AVIERR(112)#define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)#define AVIERR_READONLY MAKE_AVIERR(114)#define AVIERR_NODATA MAKE_AVIERR(115)#define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)#define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)#define AVIERR_USERABORT MAKE_AVIERR(198)#define AVIERR_ERROR MAKE_AVIERR(199)#ifdef __cplusplus}#endif#endif /* MPLAYER_VFW_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -