📄 vfw_gai.pas
字号:
*)
function ICCompressGetFormat(hic: HIC; lpbiInput, lpbiOutput: PBITMAPINFOHEADER): DWORD;
function ICCompressGetFormatSize(hic: HIC; lpbi: PBITMAPINFOHEADER): DWORD;
(*
* ICCompressSize()
*
* return the maximal size of a compressed frame
*
*)
function ICCompressGetSize(hic: HIC; lpbiInput, lpbiOutput: PBITMAPINFOHEADER): DWORD;
function ICCompressEnd(hic: HIC): DWORD;
(************************************************************************
decompression functions
************************************************************************)
(*
* ICDecompress()
*
* decompress a single frame
*
*)
function ICDecompress(
hic : HIC;
dwFlags : DWORD; // flags (from AVI index...)
lpbiFormat : PBITMAPINFOHEADER; // BITMAPINFO of compressed data
// biSizeImage has the chunk size
lpData : PVOID; // data
lpbi : PBITMAPINFOHEADER; // DIB to decompress to
lpBits : PVOID
): DWORD; cdecl;
(*
* ICDecompressBegin()
*
* start compression from a source format (lpbiInput) to a dest
* format (lpbiOutput) is supported.
*
*)
function ICDecompressBegin(hic: HIC; lpbiInput, lpbiOutput: PBITMAPINFOHEADER): DWORD;
(*
* ICDecompressQuery()
*
* determines if compression from a source format (lpbiInput) to a dest
* format (lpbiOutput) is supported.
*
*)
function ICDecompressQuery(hic: HIC; lpbiInput, lpbiOutput: PBITMAPINFOHEADER): DWORD;
(*
* ICDecompressGetFormat()
*
* get the output format, (format of un-compressed data)
* if lpbiOutput is NULL return the size in bytes needed for format.
*
*)
function ICDecompressGetFormat(hic: HIC; lpbiInput, lpbiOutput: PBITMAPINFOHEADER): DWORD;
function ICDecompressGetFormatSize(hic: HIC; lpbi: PBITMAPINFOHEADER): DWORD;
(*
* ICDecompressGetPalette()
*
* get the output palette
*
*)
function ICDecompressGetPalette(hic: HIC; lpbiInput, lpbiOutput: PBITMAPINFOHEADER): DWORD;
function ICDecompressSetPalette(hic: HIC; lpbiPalette: PBITMAPINFOHEADER): DWORD;
function ICDecompressEnd(hic: HIC): DWORD;
(************************************************************************
decompression (ex) functions
************************************************************************)
//
// on Win16 these functions are macros that call ICMessage. ICMessage will
// not work on NT. rather than add new entrypoints we have given
// them as static inline functions
//
(*
* ICDecompressEx()
*
* decompress a single frame
*
*)
function ICDecompressEx(
hic : HIC;
dwFlags : DWORD;
lpbiSrc : PBITMAPINFOHEADER;
lpSrc : PVOID;
xSrc : int;
ySrc : int;
dxSrc : int;
dySrc : int;
lpbiDst : PBITMAPINFOHEADER;
lpDst : PVOID;
xDst : int;
yDst : int;
dxDst : int;
dyDst : int
): DWORD; stdcall;
(*
* ICDecompressExBegin()
*
* start compression from a source format (lpbiInput) to a dest
* format (lpbiOutput) is supported.
*
*)
function ICDecompressExBegin(
hic : HIC;
dwFlags : DWORD;
lpbiSrc : PBITMAPINFOHEADER;
lpSrc : PVOID;
xSrc : int;
ySrc : int;
dxSrc : int;
dySrc : int;
lpbiDst : PBITMAPINFOHEADER;
lpDst : PVOID;
xDst : int;
yDst : int;
dxDst : int;
dyDst : int
): DWORD; stdcall;
(*
* ICDecompressExQuery()
*
*)
function ICDecompressExQuery(
hic : HIC;
dwFlags : DWORD;
lpbiSrc : PBITMAPINFOHEADER;
lpSrc : PVOID;
xSrc : int;
ySrc : int;
dxSrc : int;
dySrc : int;
lpbiDst : PBITMAPINFOHEADER;
lpDst : PVOID;
xDst : int;
yDst : int;
dxDst : int;
dyDst : int
): DWORD; stdcall;
function ICDecompressExEnd(hic: HIC): DWORD;
(************************************************************************
drawing functions
************************************************************************)
(*
* ICDrawBegin()
*
* start decompressing data with format (lpbiInput) directly to the screen
*
* return zero if the decompressor supports drawing.
*
*)
function ICDrawBegin(
hic : HIC;
dwFlags : DWORD; // flags
hpal : HPALETTE; // palette to draw with
hwnd : HWND; // window to draw to
hdc : HDC; // HDC to draw to
xDst : int; // destination rectangle
yDst : int;
dxDst : int;
dyDst : int;
lpbi : PBITMAPINFOHEADER; // format of frame to draw
xSrc : int; // source rectangle
ySrc : int;
dxSrc : int;
dySrc : int;
dwRate : DWORD; // frames/second = (dwRate/dwScale)
dwScale : DWORD
): DWORD; cdecl;
(*
* ICDraw()
*
* decompress data directly to the screen
*
*)
function ICDraw(
hic : HIC;
dwFlags : DWORD; // flags
lpFormat : PVOID; // format of frame to decompress
lpData : PVOID; // frame data to decompress
cbData : DWORD; // size of data
lTime : DWORD // time to draw this frame
): DWORD; cdecl;
// ICMessage is not supported on Win32, so provide a static inline function
// to do the same job
function ICDrawSuggestFormat(
hic : HIC;
lpbiIn : PBITMAPINFOHEADER;
lpbiOut : PBITMAPINFOHEADER;
dxSrc : int;
dySrc : int;
dxDst : int;
dyDst : int;
hicDecomp : HIC
): DWORD; stdcall;
(*
* ICDrawQuery()
*
* determines if the compressor is willing to render the specified format.
*
*)
function ICDrawQuery(hic: HIC; lpbiInput: PBITMAPINFOHEADER): DWORD;
function ICDrawChangePalette(hic: HIC; lpbiInput: PBITMAPINFOHEADER): DWORD;
function ICGetBuffersWanted(hic: HIC; lpdwBuffers: PDWORD): DWORD;
function ICDrawEnd(hic: HIC): DWORD;
function ICDrawStart(hic: HIC): DWORD;
function ICDrawStartPlay(hic: HIC; lFrom, lTo: DWORD): DWORD;
function ICDrawStop(hic: HIC): DWORD;
function ICDrawStopPlay(hic: HIC): DWORD;
function ICDrawGetTime(hic: HIC; lplTime: PDWORD): DWORD;
function ICDrawSetTime(hic: HIC; lTime: DWORD): DWORD;
function ICDrawRealize(hic: HIC; hdc: HDC; fBackground: BOOL): DWORD;
function ICDrawFlush(hic: HIC): DWORD;
function ICDrawRenderBuffer(hic: HIC): DWORD;
(************************************************************************
Status callback functions
************************************************************************/
/*
* ICSetStatusProc()
*
* Set the status callback function
*
*)
// ICMessage is not supported on NT
function ICSetStatusProc(
hic : HIC;
dwFlags : DWORD;
lParam : DWORD;
fpfnStatus : TICStatusProc
): DWORD; stdcall;
(************************************************************************
helper routines for DrawDib and MCIAVI...
************************************************************************)
function ICLocate(fccType, fccHandler: DWORD; lpbiIn, lpbiOut: PBITMAPINFOHEADER; wFlags: WORD): HIC; stdcall;
function ICGetDisplayFormat(hic: HIC; lpbiIn, lpbiOut: PBITMAPINFOHEADER; BitDepth: int; dx, dy: int): HIC; stdcall;
function ICDecompressOpen(fccType, fccHandler: DWORD; lpbiIn, lpbiOut: PBITMAPINFOHEADER): HIC;
function ICDrawOpen(fccType, fccHandler: DWORD; lpbiIn: PBITMAPINFOHEADER): HIC;
(************************************************************************
Higher level functions
************************************************************************)
function ICImageCompress(
hic : HIC; // compressor to use
uiFlags : UINT; // flags (none yet)
lpbiIn : PBITMAPINFO; // format to compress from
lpBits : PVOID; // data to compress
lpbiOut : PBITMAPINFO; // compress to this (NULL ==> default)
lQuality : LONG; // quality to use
plSize : PDWORD // compress to this size (0=whatever)
): THANDLE; stdcall;
function ICImageDecompress(
hic : HIC; // compressor to use
uiFlags : UINT; // flags (none yet)
lpbiIn : PBITMAPINFO; // format to decompress from
lpBits : PVOID; // data to decompress
lpbiOut : PBITMAPINFO // decompress to this (NULL ==> default)
): THANDLE; stdcall;
{-- TCompVars ----------------------------------------------------------------}
//
// Structure used by ICSeqCompressFrame and ICCompressorChoose routines
// Make sure this matches the autodoc in icm.c!
//
type
PCOMPVARS = ^TCOMPVARS;
TCOMPVARS = packed record
cbSize : DWORD; // set to sizeof(COMPVARS) before
// calling ICCompressorChoose
dwFlags : DWORD; // see below...
hic : HIC; // HIC of chosen compressor
fccType : DWORD; // basically ICTYPE_VIDEO
fccHandler : DWORD; // handler of chosen compressor or
// "" or "DIB "
lpbiIn : PBITMAPINFO; // input format
lpbiOut : PBITMAPINFO; // output format - will compress to this
lpBitsOut : PVOID;
lpBitsPrev : PVOID;
lFrame : LONG;
lKey : LONG; // key frames how often?
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -