151 lines
5.8 KiB
C++
151 lines
5.8 KiB
C++
// CodeGear C++Builder
|
|
// Copyright (c) 1995, 2025 by Embarcadero Technologies, Inc.
|
|
// All rights reserved
|
|
|
|
// (DO NOT EDIT: machine generated header) 'hvideocap.pas' rev: 37.00 (Windows)
|
|
|
|
#ifndef hvideocapHPP
|
|
#define hvideocapHPP
|
|
|
|
#pragma delphiheader begin
|
|
#pragma option push
|
|
#if defined(__BORLANDC__) && !defined(__clang__)
|
|
#pragma option -w- // All warnings off
|
|
#pragma option -Vx // Zero-length empty class member
|
|
#endif
|
|
#pragma pack(push,8)
|
|
#include <System.hpp>
|
|
#include <SysInit.hpp>
|
|
#include <Winapi.Windows.hpp>
|
|
#include <Winapi.Messages.hpp>
|
|
#include <System.SysUtils.hpp>
|
|
#include <Vcl.StdCtrls.hpp>
|
|
#include <System.Classes.hpp>
|
|
#include <Vcl.Graphics.hpp>
|
|
#include <Vcl.Controls.hpp>
|
|
#include <Vcl.Forms.hpp>
|
|
#include <imageenview.hpp>
|
|
#include <imageenproc.hpp>
|
|
#include <hyiedefs.hpp>
|
|
#include <videocap.hpp>
|
|
#include <ieview.hpp>
|
|
#include <iexBitmaps.hpp>
|
|
#include <System.Types.hpp>
|
|
|
|
//-- user supplied -----------------------------------------------------------
|
|
|
|
namespace Hvideocap
|
|
{
|
|
//-- forward type declarations -----------------------------------------------
|
|
class DELPHICLASS TImageEnVideoCap;
|
|
//-- type declarations -------------------------------------------------------
|
|
class PASCALIMPLEMENTATION TImageEnVideoCap : public System::Classes::TComponent
|
|
{
|
|
typedef System::Classes::TComponent inherited;
|
|
|
|
private:
|
|
bool fCapture;
|
|
HWND fWndC;
|
|
System::Classes::TStringList* fDrivers;
|
|
int fVideoSource;
|
|
bool fCallBackFrame;
|
|
Videocap::TVideoFrameEvent fOnVideoFrame;
|
|
Videocap::TVideoFrameRawEvent fOnVideoFrameRaw;
|
|
Winapi::Windows::THandle fhBitmapInfo;
|
|
bool fBitmapInfoUp;
|
|
bool fConnected;
|
|
Hyiedefs::TIEJobEvent fOnJob;
|
|
Hyiedefs::hDrawDib fHDrawDib;
|
|
Iexbitmaps::TIEDibbitmap* fBitmap;
|
|
void *fPix;
|
|
bool fDone;
|
|
bool fDriverBusy;
|
|
bool fEnding;
|
|
bool fUseWindowsCodec;
|
|
System::UnicodeString fRecFileName;
|
|
int fRecFrameRate;
|
|
bool fRecAudio;
|
|
bool fRecMultitask;
|
|
bool fRecording;
|
|
HWND fWinHandle;
|
|
|
|
protected:
|
|
void __fastcall SetCapture(bool v);
|
|
void __fastcall DriverConnect();
|
|
bool __fastcall DriverConnectNE();
|
|
void __fastcall DriverDisconnect();
|
|
void __fastcall FillDrivers();
|
|
void __fastcall SetVideoSource(int v);
|
|
bool __fastcall GetHasDlgVideoSource();
|
|
bool __fastcall GetHasDlgVideoFormat();
|
|
bool __fastcall GetHasDlgVideoDisplay();
|
|
bool __fastcall GetHasOverlay();
|
|
void __fastcall GetCaps(Videocap::TCAPDRIVERCAPS &fDriverCaps);
|
|
void __fastcall SetCallBackFrame(bool v);
|
|
void __fastcall SetOnVideoFrame(Videocap::TVideoFrameEvent v);
|
|
void __fastcall SetOnVideoFrameRaw(Videocap::TVideoFrameRawEvent v);
|
|
bool __fastcall FillBitmapInfo();
|
|
void __fastcall CreateCaptureWindow();
|
|
void __fastcall DestroyCaptureWindow();
|
|
void __fastcall DoJob(Hyiedefs::TIEJob job, int per);
|
|
void __fastcall AllocateWindow();
|
|
System::Word __fastcall GetAudioFormat();
|
|
void __fastcall SetAudioFormat(System::Word v);
|
|
System::Word __fastcall GetAudioChannels();
|
|
void __fastcall SetAudioChannels(System::Word v);
|
|
unsigned __fastcall GetAudioSamplesPerSec();
|
|
void __fastcall SetAudioSamplesPerSec(unsigned v);
|
|
System::Word __fastcall GetAudioBitsPerSample();
|
|
void __fastcall SetAudioBitsPerSample(System::Word v);
|
|
void __fastcall GetWaveFormat(Videocap::TWAVEFORMATEX &wf);
|
|
void __fastcall SetWaveFormat(Videocap::TWAVEFORMATEX &wf);
|
|
|
|
public:
|
|
__fastcall virtual TImageEnVideoCap(System::Classes::TComponent* Owner);
|
|
__fastcall virtual ~TImageEnVideoCap();
|
|
__property bool Capture = {read=fCapture, write=SetCapture, default=0};
|
|
bool __fastcall DoConfigureSource();
|
|
bool __fastcall DoConfigureFormat();
|
|
bool __fastcall DoConfigureDisplay();
|
|
bool __fastcall DoConfigureCompression();
|
|
__property System::Classes::TStringList* VideoSourceList = {read=fDrivers};
|
|
__property bool HasOverlay = {read=GetHasOverlay, nodefault};
|
|
__property bool HasDlgVideoSource = {read=GetHasDlgVideoSource, nodefault};
|
|
__property bool HasDlgVideoFormat = {read=GetHasDlgVideoFormat, nodefault};
|
|
__property bool HasDlgVideoDisplay = {read=GetHasDlgVideoDisplay, nodefault};
|
|
void __fastcall StartRecord();
|
|
void __fastcall StopRecord();
|
|
__property System::UnicodeString RecFileName = {read=fRecFileName, write=fRecFileName};
|
|
__property int RecFrameRate = {read=fRecFrameRate, write=fRecFrameRate, nodefault};
|
|
__property bool RecAudio = {read=fRecAudio, write=fRecAudio, nodefault};
|
|
__property bool RecMultitask = {read=fRecMultitask, write=fRecMultitask, nodefault};
|
|
__property HWND WndCaptureHandle = {read=fWndC};
|
|
__property System::Word AudioFormat = {read=GetAudioFormat, write=SetAudioFormat, nodefault};
|
|
__property System::Word AudioChannels = {read=GetAudioChannels, write=SetAudioChannels, nodefault};
|
|
__property unsigned AudioSamplesPerSec = {read=GetAudioSamplesPerSec, write=SetAudioSamplesPerSec, nodefault};
|
|
__property System::Word AudioBitsPerSample = {read=GetAudioBitsPerSample, write=SetAudioBitsPerSample, nodefault};
|
|
Winapi::Windows::TRect __fastcall GetVideoSize();
|
|
__property bool UseWindowsCodec = {read=fUseWindowsCodec, write=fUseWindowsCodec, nodefault};
|
|
|
|
__published:
|
|
__property int VideoSource = {read=fVideoSource, write=SetVideoSource, default=0};
|
|
__property Videocap::TVideoFrameEvent OnVideoFrame = {read=fOnVideoFrame, write=SetOnVideoFrame};
|
|
__property Videocap::TVideoFrameRawEvent OnVideoFrameRaw = {read=fOnVideoFrameRaw, write=SetOnVideoFrameRaw};
|
|
__property Hyiedefs::TIEJobEvent OnJob = {read=fOnJob, write=fOnJob};
|
|
};
|
|
|
|
|
|
//-- var, const, procedure ---------------------------------------------------
|
|
static _DELPHI_CONST System::Word VH_FRAMEMESSAGE = System::Word(0x1788);
|
|
static _DELPHI_CONST System::Word VH_DESTROYWINDOW = System::Word(0x1789);
|
|
} /* namespace Hvideocap */
|
|
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_HVIDEOCAP)
|
|
using namespace Hvideocap;
|
|
#endif
|
|
#pragma pack(pop)
|
|
#pragma option pop
|
|
|
|
#pragma delphiheader end.
|
|
//-- end unit ----------------------------------------------------------------
|
|
#endif // hvideocapHPP
|