您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 其它文档 > VFWpas(delphi摄像头编程vfw)
{*******************************************************************************Originalauthorunknown.ModifiedforDelphi3/4COMsyntaxbyTomNuydens(delphi3d@gamedeveloper.org)()*******************************************************************************}unitVFW;interfaceusesWindows,MMSystem,Messages,CommDlg,ActiveX;{==General==================================================================}typePDWORD=^DWORD;PLONG=PDWORD;UDWORD=DWORD;PVOID=Pointer;int=Integer;{--ReturnsversionofVFW---------------------------------------------------}functionVideoForWindowsVersion:DWord;pascal;{--CallthesetostartstopusingVfWfromyourapp-------------------------}{TODO:Wherearethesefunctions?}//functionInitVFW:DWORD;stdcall;//functionTermVFW:DWORD;stdcall;{--Macros-------------------------------------------------------------------}functionMKFOURCC(ch0,ch1,ch2,ch3:Char):FOURCC;{==COMPMAN-InstallableCompressionManager================================}constICVERSION=$0104;typeHIC=THandle;//HandletoanInstallableCompressor////thiscodeinbiCompressionmeanstheDIBmustbeaccesedvia//48bitpointers!using*ONLY*theselectorgiven.//constBI_1632=$32333631;//'1632'functionmmioFOURCC(ch0,ch1,ch2,ch3:Char):FOURCC;typeTWOCC=Word;functionaviTWOCC(ch0,ch1:Char):TWOCC;constICTYPE_VIDEO=$63646976;//mmioFOURCC('v','i','d','c')ICTYPE_AUDIO=$63647561;//mmioFOURCC('a','u','d','c')constICERR_OK=0;ICERR_DONTDRAW=1;ICERR_NEWPALETTE=2;ICERR_GOTOKEYFRAME=3;ICERR_STOPDRAWING=4;ICERR_UNSUPPORTED=-1;ICERR_BADFORMAT=-2;ICERR_MEMORY=-3;ICERR_INTERNAL=-4;ICERR_BADFLAGS=-5;ICERR_BADPARAM=-6;ICERR_BADSIZE=-7;ICERR_BADHANDLE=-8;ICERR_CANTUPDATE=-9;ICERR_ABORT=-10;ICERR_ERROR=-100;ICERR_BADBITDEPTH=-200;ICERR_BADIMAGESIZE=-201;ICERR_CUSTOM=-400;//errorslessthanICERR_CUSTOM...{--ValuesfordwFlagsofICOpen()-------------------------------------------}ICMODE_COMPRESS=1;ICMODE_DECOMPRESS=2;ICMODE_FASTDECOMPRESS=3;ICMODE_QUERY=4;ICMODE_FASTCOMPRESS=5;ICMODE_DRAW=8;{--FlagsforAVIfileindex-------------------------------------------------}AVIIF_LIST=$00000001;AVIIF_TWOCC=$00000002;AVIIF_KEYFRAME=$00000010;{--qualityflags------------------------------------------------------------}ICQUALITY_LOW=0;ICQUALITY_HIGH=10000;ICQUALITY_DEFAULT=-1;{-----------------------------------------------------------------------------}ICM_USER=(DRV_USER+$0000);ICM_RESERVED_LOW=(DRV_USER+$1000);ICM_RESERVED_HIGH=(DRV_USER+$2000);ICM_RESERVED=ICM_RESERVED_LOW;{--Messages-----------------------------------------------------------------}ICM_GETSTATE=(ICM_RESERVED+0);//GetcompressorstateICM_SETSTATE=(ICM_RESERVED+1);//SetcompressorstateICM_GETINFO=(ICM_RESERVED+2);//QueryinfoaboutthecompressorICM_CONFIGURE=(ICM_RESERVED+10);//showtheconfiguredialogICM_ABOUT=(ICM_RESERVED+11);//showtheaboutboxICM_GETDEFAULTQUALITY=(ICM_RESERVED+30);//getthedefaultvalueforqualityICM_GETQUALITY=(ICM_RESERVED+31);//getthecurrentvalueforqualityICM_SETQUALITY=(ICM_RESERVED+32);//setthedefaultvalueforqualityICM_SET=(ICM_RESERVED+40);//TellthedriversomethingICM_GET=(ICM_RESERVED+41);//Askthedriversomething{--ConstantsforICM_SET:---------------------------------------------------}ICM_FRAMERATE=$526D7246;//mmioFOURCC('F','r','m','R')ICM_KEYFRAMERATE=$5279654B;//mmioFOURCC('K','e','y','R'){--ICMspecificmessages----------------------------------------------------}ICM_COMPRESS_GET_FORMAT=(ICM_USER+4);//getcompressformatorsizeICM_COMPRESS_GET_SIZE=(ICM_USER+5);//getoutputsizeICM_COMPRESS_QUERY=(ICM_USER+6);//querysupportforcompressICM_COMPRESS_BEGIN=(ICM_USER+7);//beginaseriesofcompresscalls.ICM_COMPRESS=(ICM_USER+8);//compressaframeICM_COMPRESS_END=(ICM_USER+9);//endofaseriesofcompresscalls.ICM_DECOMPRESS_GET_FORMAT=(ICM_USER+10);//getdecompressformatorsizeICM_DECOMPRESS_QUERY=(ICM_USER+11);//querysupportfordempressICM_DECOMPRESS_BEGIN=(ICM_USER+12);//startaseriesofdecompresscallsICM_DECOMPRESS=(ICM_USER+13);//decompressaframeICM_DECOMPRESS_END=(ICM_USER+14);//endaseriesofdecompresscallsICM_DECOMPRESS_SET_PALETTE=(ICM_USER+29);//fillintheDIBcolortableICM_DECOMPRESS_GET_PALETTE=(ICM_USER+30);//fillintheDIBcolortableICM_DRAW_QUERY=(ICM_USER+31);//querysupportfordempressICM_DRAW_BEGIN=(ICM_USER+15);//startaseriesofdrawcallsICM_DRAW_GET_PALETTE=(ICM_USER+16);//getthepaletteneededfordrawingICM_DRAW_START=(ICM_USER+18);//startdecompressclockICM_DRAW_STOP=(ICM_USER+19);//stopdecompressclockICM_DRAW_END=(ICM_USER+21);//endaseriesofdrawcallsICM_DRAW_GETTIME=(ICM_USER+32);//getvalueofdecompressclockICM_DRAW=(ICM_USER+33);//generalizedrendermessageICM_DRAW_WINDOW=(ICM_USER+34);//drawingwindowhasmovedorhiddenICM_DRAW_SETTIME=(ICM_USER+35);//setcorrectvaluefordecompressclockICM_DRAW_REALIZE=(ICM_USER+36);//realizepalettefordrawingICM_DRAW_FLUSH=(ICM_USER+37);//clearoutbufferedframesICM_DRAW_RENDERBUFFER=(ICM_USER+38);//drawundrawnthingsinqueueICM_DRAW_START_PLAY=(ICM_USER+39);//startofaplayICM_DRAW_STOP_PLAY=(ICM_USER+40);//endofaplayICM_DRAW_SUGGESTFORMAT=(ICM_USER+50);//LikeICGetDisplayFormatICM_DRAW_CHANGEPALETTE=(ICM_U
本文标题:VFWpas(delphi摄像头编程vfw)
链接地址:https://www.777doc.com/doc-5596742 .html