📄 hvideocap.pas
字号:
(*
Copyright (c) 1998-2007 by HiComponents. All rights reserved.
This software comes without express or implied warranty.
In no case shall the author be liable for any damage or unwanted behavior of any
computer hardware and/or software.
HiComponents grants you the right to include the compiled component
in your application, whether COMMERCIAL, SHAREWARE, or FREEWARE,
BUT YOU MAY NOT DISTRIBUTE THIS SOURCE CODE OR ITS COMPILED .DCU IN ANY FORM.
ImageEn, IEvolution and ImageEn ActiveX may not be included in any commercial,
shareware or freeware libraries or components.
email: support@hicomponents.com
http://www.hicomponents.com
*)
unit hvideocap;
{$R-}
{$Q-}
{$I ie.inc}
{$IFDEF IEINCLUDEVIDEOCAPTURE}
interface
uses
Windows, Messages, SysUtils, StdCtrls, Classes, Graphics, Controls, Forms, ImageEnView,
ImageEnProc, hyiedefs, videocap, ieview, hyieutils;
const
VH_FRAMEMESSAGE = WM_USER + 5000;
VH_DESTROYWINDOW = WM_USER + 5001;
type
//TcapVideoStreamCallback = function(hWnd:HWND; lpVHdr:PVIDEOHDR):LRESULT; stdcall;
{!!
<FS>TImageEnVideoCap
<FM>Description<FN>
TImageEnVideoCap is a non-visual component which can capture images from video cameras. It uses VFW (Video for Windows) to capture frames from a video source.
<FM>See also<FN>
<A TImageEnVideoView>
<FM>Properties<FN>
<A TImageEnVideoCap.AudioBitsPerSample>
<A TImageEnVideoCap.AudioChannels>
<A TImageEnVideoCap.AudioFormat>
<A TImageEnVideoCap.AudioSamplesPerSec>
<A TImageEnVideoCap.Capture>
<A TImageEnVideoCap.GetVideoSize>
<A TImageEnVideoCap.HasDlgVideoDisplay>
<A TImageEnVideoCap.HasDlgVideoFormat>
<A TImageEnVideoCap.HasDlgVideoSource>
<A TImageEnVideoCap.HasOverlay>
<A TImageEnVideoCap.RecAudio>
<A TImageEnVideoCap.RecFileName>
<A TImageEnVideoCap.RecFrameRate>
<A TImageEnVideoCap.RecMultitask>
<A TImageEnVideoCap.UseWindowsCodec>
<A TImageEnVideoCap.VideoSource>
<A TImageEnVideoCap.VideoSourceList>
<A TImageEnVideoCap.WndCaptureHandle>
<FM>Methods<FN>
<A TImageEnVideoCap.DoConfigureCompression>
<A TImageEnVideoCap.DoConfigureDisplay>
<A TImageEnVideoCap.DoConfigureFormat>
<A TImageEnVideoCap.DoConfigureSource>
<A TImageEnVideoCap.StartRecord>
<A TImageEnVideoCap.StopRecord>
<FM>Events<FN>
<A TImageEnVideoCap.OnJob>
<A TImageEnVideoCap.OnVideoFrameRaw>
<A TImageEnVideoCap.OnVideoFrame>
!!}
TImageEnVideoCap = class(TComponent)
private
fCapture: boolean; // se true inizia cattura
fWndC: HWND; // Handle finestra Video Capture (0=da creare)
fDrivers: TStringList; // driver disponibili
fVideoSource: integer; // indice video source corrente
fCallBackFrame: boolean; // Se True chiama attiva la callback CallBackFrameFunc
fOnVideoFrame: TVideoFrameEvent;
fOnVideoFrameRaw: TVideoFrameRawEvent;
fhBitmapInfo: THandle; // Handle della Bitmapinfo riempita da FillBitmapInfo
fBitmapInfoUp: boolean; // true se fhBitmapInfo
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -