⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tvideocap.htm

📁 智能监控delphi源码, 操作说明 1. 在两台微机上分别运行文件夹中的可执行文件。 2. 主界面程序可以通过菜单或者按钮选择监控方式、报警模式、打开/关闭摄像头、开始/停止录像以及查看历史记
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0054)http://www.serveisgirona.com/delphi/video/videocap.htm -->
<HTML><HEAD><TITLE>TVideocap</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<P><B>TVideocap Component</B></P>
<P>TVideocap is a full featured video capture component. You can select drivers, 
format, source, capturing to a file and also trigger an event after every frame 
captured, so it can be used for designing video conference software.</P>
<P>It' s easy, drop the component, set connected property to true and you can 
preview the image.</P>
<P>A sample aplication with few lines of source is included on the evaluation 
package. You can <A 
href="http://www.serveisgirona.com/delphi/download.htm">download</A> the 
evaluation package, <A 
href="http://www.serveisgirona.com/delphi/register.htm">register</A> to receive 
video package with full source or view some <A 
href="http://www.serveisgirona.com/delphi/video/screenshots.htm">screenshots.</A></P>
<P>TVideocap ancestor is TWincontrol and TWincontrol properties are not 
described here. </P>
<TABLE width="100%" border=1>
  <TBODY>
  <TR>
    <TD width="13%"><B>Property</B></TD>
    <TD width="15%"><B>Datatype</B></TD>
    <TD width="62%"><B>Description</B></TD>
    <TD width="10%"><B>Type</B></TD></TR>
  <TR>
    <TD width="13%">Autosize</TD>
    <TD width="15%">Boolean</TD>
    <TD width="62%">The capture window is resized to the video format when 
      capture or preview begins</TD>
    <TD width="10%">Published</TD></TR>
  <TR>
    <TD width="13%">Connected</TD>
    <TD width="15%">Boolean</TD>
    <TD width="62%">Connects/Disconnects to the capture driver if preview is 
      enabled then you can view the image</TD>
    <TD width="10%">Published</TD></TR>
  <TR>
    <TD width="13%">Filename</TD>
    <TD width="15%">String</TD>
    <TD width="62%">Avi Filename to store the captured images when Start 
      methot is called.</TD>
    <TD width="10%">Published</TD></TR>
  <TR>
    <TD width="13%">IndexDriver</TD>
    <TD width="15%">Integer</TD>
    <TD width="62%">Driver index if multiple capture drivers are installed are 
      enumerated as 0,1, and so on.</TD>
    <TD width="10%">Published</TD></TR>
  <TR>
    <TD width="13%">Overlay</TD>
    <TD width="15%">Boolean</TD>
    <TD width="62%">Usually the driver supports the overlay mode, with this 
      mode the driver shows preview in real time as an 'overlay surface' without 
      consuming CPU, but usually you can only use one capture driver at a time 
      on this mode because most video drivers only support one overlay 
    surface.</TD>
    <TD width="10%">Published</TD></TR>
  <TR>
    <TD width="13%">Preview</TD>
    <TD width="15%">Boolean</TD>
    <TD width="62%">Shows or not a preview of the captured images you can 
      improve performance (little) disabling preview or setting a low preview 
      rate</TD>
    <TD width="10%">Published</TD></TR>
  <TR>
    <TD width="13%" height=43>PreviewRate</TD>
    <TD width="15%" height=43>Integer</TD>
    <TD width="62%" height=43>Miliseconds between preview frames, you can set 
      a preview rate of 15 frames/secong setting this value to 1000/15=67</TD>
    <TD width="10%" height=43>Published</TD></TR>
  <TR>
    <TD width="13%">PreviewStretch</TD>
    <TD width="15%">Boolean</TD>
    <TD width="62%">When autosize is false the preview image is stretched to 
      fit into the window.</TD>
    <TD width="10%">Published</TD></TR>
  <TR>
    <TD width="13%">Vhandle</TD>
    <TD width="15%">Hwnd</TD>
    <TD width="62%">Internal api handle of the capture driver, valid only when 
      connected </TD>
    <TD width="10%">Public RO</TD></TR>
  <TR>
    <TD width="13%">Recording</TD>
    <TD width="15%">Boolean</TD>
    <TD width="62%">Returns true if the video driver is capturing images</TD>
    <TD width="10%">Public RO</TD></TR>
  <TR>
    <TD width="13%">Params</TD>
    <TD width="15%">TCaptureParams</TD>
    <TD width="62%">Returns the capture parameters in a windows api 
    structure.</TD>
    <TD width="10%">Public RO</TD></TR>
  <TR>
    <TD width="13%">VideoFormat</TD>
    <TD width="15%">PBitmapInfo</TD>
    <TD width="62%">Returns the video format as a pointer to a TBitmapinfo 
      structure</TD>
    <TD width="10%">Public RO</TD></TR>
  <TR>
    <TD width="13%">AudioFormat</TD>
    <TD width="15%">PWaveFormatex</TD>
    <TD width="62%">Returns the audio format as a pointer to a TWaveFormatex 
      structure</TD>
    <TD width="10%">Public RO</TD></TR></TBODY></TABLE>
<P>RO= Read only</P>
<TABLE width="100%" border=1>
  <TBODY>
  <TR>
    <TD width="54%"><B>Method definition</B></TD>
    <TD width="46%"><B>Description</B></TD></TR>
  <TR>
    <TD width="54%">procedure VideoFormatDlg</TD>
    <TD width="46%">Shows the video format dialog, this dialog is inside the 
      capture driver</TD></TR>
  <TR>
    <TD width="54%">procedure VideoDisplayDlg</TD>
    <TD width="46%">Shows the video display dialog, this dialog is inside the 
      capture driver and most drivers don't support it</TD></TR>
  <TR>
    <TD width="54%">procedure VideoSourceDlg</TD>
    <TD width="46%">Shows the video source dialog, this dialog is inside the 
      capture driver is used to select the video input and video input 
type</TD></TR>
  <TR>
    <TD width="54%">procedure VideoCompressionDlg</TD>
    <TD width="46%">Shows the video compression dialog, this dialog is inside 
      windows multimedia system, and shows current installed video codecs</TD></TR>
  <TR>
    <TD width="54%">procedure DriverDlg</TD>
    <TD width="46%">Shows a driver list to the user, if the user chooses a 
      driver the IndexDriver property is modified</TD></TR>
  <TR>
    <TD width="54%">procedure CopyToClipboard</TD>
    <TD width="46%">While in preview mode you can easily copy the image to the 
      clipboard using this procedure</TD></TR>
  <TR>
    <TD width="54%">procedure CheckConnected</TD>
    <TD width="46%">Check if the driver is connected and raises an exception 
      if it's not connected</TD></TR>
  <TR>
    <TD width="54%">function GetStatus:TCapStatus</TD>
    <TD width="46%">You can read the internal api information of the video 
      capture driver status. See Win32.hlp for more help.</TD></TR>
  <TR>
    <TD width="54%">function GetParms:TCaptureParms</TD>
    <TD width="46%">You can read the internal api parameters of the video 
      capture drivers. See Win32.hlp for more help.</TD></TR>
  <TR>
    <TD width="54%">function GetCaps:TCapDrivercaps</TD>
    <TD width="46%">Tou can read the internal api capabilities of the video 
      capture drivers. See Win32.hlp for more help</TD></TR>
  <TR>
    <TD width="54%">procedure Setparms(parms:TCaptureparms)</TD>
    <TD width="46%">You can set the capture parms directly using the internal 
      api. See Win32.hlp for more help</TD></TR>
  <TR>
    <TD width="54%">procedure Start</TD>
    <TD width="46%">Start the recording of video to the specified file</TD></TR>
  <TR>
    <TD width="54%">procedure Stop</TD>
    <TD width="46%">Stops the recording of video</TD></TR>
  <TR>
    <TD width="54%">procedure StartNoFile</TD>
    <TD width="46%">Starts the recording of video but don't write the video to 
      a file</TD></TR>
  <TR>
    <TD width="54%">procedure PreviewOptions</TD>
    <TD width="46%">Shows a dialog to the user with the preview options</TD></TR>
  <TR>
    <TD width="54%">procedure ShowCaptureOptions</TD>
    <TD width="46%">Shows a dialog to the user with the capture options, you 
      can get more info about this options on Win32.hlp file.</TD></TR>
  <TR>
    <TD width="54%">function VideoHdrToBitmap(VideoHdr:TVideoHdr):TBitmap</TD>
    <TD width="46%">Translates the information provided by the capture event 
      to a windows device independent bitmap</TD></TR>
  <TR>
    <TD width="54%">function VideoHdrToDDBitmap(VideoHdr:TVideoHdr):TBitmap</TD>
    <TD width="46%">Translates the information provided by the capture event 
      to a windows device dependent bitmap</TD></TR>
  <TR>
    <TD width="54%">procedure 
      DrawDIB(Destination:HDC;ALeft,ATop,AWidth,AHeight:Integer; var 
      VideoHdr:TVideoHdr)</TD>
    <TD width="46%">Draws the information provided by the capture event to a 
      device context (a canvas.handle), use it to draw the image with acceptable 
      quality in all display devices (like 256 color devices)</TD></TR>
  <TR>
    <TD width="54%">procedure 
    CopyVdhrBitmap(VideoHdr:TVideoHdr;Bitmap:TBitmap)</TD>
    <TD width="46%">Another way to copy the video info to a bitmap (using 
      windows functions, not optimized) </TD></TR></TBODY></TABLE>
<P>&nbsp;</P>
<TABLE width="100%" border=1>
  <TBODY>
  <TR>
    <TD width="39%"><B>Event</B></TD>
    <TD width="61%"><B>Description</B></TD></TR>
  <TR>
    <TD width="39%">OnCapture:TCaptureEvent</TD>
    <TD width="61%">
      <P>Triggered when the driver captures an image, the prototype is:</P>
      <P>procedure (Sender:TObject;var VideoHdr:TVideoHdr) of object;</P>
      <P>You can use the VideoHdr variable to draw it with DrawDIB or convert it 
      to a bitmap...</P></TD></TR>
  <TR>
    <TD width="39%">OnCaptureAudio:TCaptureAudioEvent</TD>
    <TD width="61%">
      <P>Triggered when the driver captures an audio segment, the prototype 
      is:</P>
      <P>procedure (Sender:TObject;var WaveHdr:TWaveHdr) of object;</P>
      <P>You can use the WaveHdr variable to proces the audio 
  information</P></TD></TR>
  <TR>
    <TD width="39%">OnStatuschange:TNotifyEvent</TD>
    <TD width="61%">Triggered when the driver starts or stops, because the 
      capture can be stoped by the user or at time over.</TD></TR>
  <TR>
    <TD width="39%">OnCapturePreview:TCaptureEvent</TD>
    <TD width="61%">Triggered when the driver previews an image, the prototype 
      is the same as OnCapture</TD></TR></TBODY></TABLE>
<P>&nbsp;</P></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -