BSOne.SFC/EM.Lib/ImageEn_SRC/Source/Delphi10.1Berlin/VideoCap.hpp

308 lines
12 KiB
C++

// CodeGear C++Builder
// Copyright (c) 1995, 2025 by Embarcadero Technologies, Inc.
// All rights reserved
// (DO NOT EDIT: machine generated header) 'videocap.pas' rev: 37.00 (Windows)
#ifndef videocapHPP
#define videocapHPP
#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 <ievect.hpp>
#include <ieview.hpp>
#include <hyieutils.hpp>
#include <iexBitmaps.hpp>
#include <System.Types.hpp>
#include <System.UITypes.hpp>
//-- user supplied -----------------------------------------------------------
namespace Videocap
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TVideoCapException;
struct TCAPDRIVERCAPS;
struct TVIDEOHDR;
struct TCAPSTATUS;
struct TCAPTUREPARMS;
struct TWAVEFORMATEX;
class DELPHICLASS TImageEnVideoView;
//-- type declarations -------------------------------------------------------
class PASCALIMPLEMENTATION TVideoCapException : public System::Sysutils::Exception
{
typedef System::Sysutils::Exception inherited;
public:
/* Exception.Create */ inline __fastcall TVideoCapException(const System::UnicodeString Msg) : System::Sysutils::Exception(Msg) { }
/* Exception.CreateFmt */ inline __fastcall TVideoCapException(const System::UnicodeString Msg, const System::TVarRec *Args, const System::NativeInt Args_High) : System::Sysutils::Exception(Msg, Args, Args_High) { }
/* Exception.CreateRes */ inline __fastcall TVideoCapException(System::NativeUInt Ident)/* overload */ : System::Sysutils::Exception(Ident) { }
/* Exception.CreateRes */ inline __fastcall TVideoCapException(System::PResStringRec ResStringRec)/* overload */ : System::Sysutils::Exception(ResStringRec) { }
/* Exception.CreateResFmt */ inline __fastcall TVideoCapException(System::NativeUInt Ident, const System::TVarRec *Args, const System::NativeInt Args_High)/* overload */ : System::Sysutils::Exception(Ident, Args, Args_High) { }
/* Exception.CreateResFmt */ inline __fastcall TVideoCapException(System::PResStringRec ResStringRec, const System::TVarRec *Args, const System::NativeInt Args_High)/* overload */ : System::Sysutils::Exception(ResStringRec, Args, Args_High) { }
/* Exception.CreateHelp */ inline __fastcall TVideoCapException(const System::UnicodeString Msg, int AHelpContext) : System::Sysutils::Exception(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ inline __fastcall TVideoCapException(const System::UnicodeString Msg, const System::TVarRec *Args, const System::NativeInt Args_High, int AHelpContext) : System::Sysutils::Exception(Msg, Args, Args_High, AHelpContext) { }
/* Exception.CreateResHelp */ inline __fastcall TVideoCapException(System::NativeUInt Ident, int AHelpContext)/* overload */ : System::Sysutils::Exception(Ident, AHelpContext) { }
/* Exception.CreateResHelp */ inline __fastcall TVideoCapException(System::PResStringRec ResStringRec, int AHelpContext)/* overload */ : System::Sysutils::Exception(ResStringRec, AHelpContext) { }
/* Exception.CreateResFmtHelp */ inline __fastcall TVideoCapException(System::PResStringRec ResStringRec, const System::TVarRec *Args, const System::NativeInt Args_High, int AHelpContext)/* overload */ : System::Sysutils::Exception(ResStringRec, Args, Args_High, AHelpContext) { }
/* Exception.CreateResFmtHelp */ inline __fastcall TVideoCapException(System::NativeUInt Ident, const System::TVarRec *Args, const System::NativeInt Args_High, int AHelpContext)/* overload */ : System::Sysutils::Exception(Ident, Args, Args_High, AHelpContext) { }
/* Exception.Destroy */ inline __fastcall virtual ~TVideoCapException() { }
};
enum DECLSPEC_DENUM TVCDisplayMode : unsigned char { dmPreview, dmOverlay };
typedef void __fastcall (__closure *TVideoFrameEvent)(System::TObject* Sender, Iexbitmaps::TIEDibbitmap* Bitmap);
typedef void __fastcall (__closure *TVideoFrameRawEvent)(System::TObject* Sender, Winapi::Windows::THandle hDib, void * pData);
struct DECLSPEC_DRECORD TCAPDRIVERCAPS
{
public:
int wDeviceIndex;
System::LongBool fHasOverlay;
System::LongBool fHasDlgVideoSource;
System::LongBool fHasDlgVideoFormat;
System::LongBool fHasDlgVideoDisplay;
System::LongBool fCaptureInitialized;
System::LongBool fDriverSuppliesPalettes;
Winapi::Windows::THandle hVideoIn;
Winapi::Windows::THandle hVideoOut;
Winapi::Windows::THandle hVideoExtIn;
Winapi::Windows::THandle hVideoExtout;
};
typedef TCAPDRIVERCAPS *PCAPDRIVERCAPS;
struct DECLSPEC_DRECORD TVIDEOHDR
{
public:
Winapi::Windows::PByte lpData;
unsigned dwBufferLength;
unsigned dwBytesUsed;
unsigned dwTimeCaptured;
unsigned dwUser;
unsigned dwFlags;
System::StaticArray<unsigned, 4> dwReserved;
};
typedef TVIDEOHDR *PVIDEOHDR;
struct DECLSPEC_DRECORD TCAPSTATUS
{
public:
unsigned uiImageWidth;
unsigned uiImageHeight;
System::LongBool fLiveWindow;
System::LongBool fOverlayWindow;
System::LongBool fScale;
Winapi::Windows::TPoint ptScroll;
System::LongBool fUsingDefaultPalette;
System::LongBool fAudioHardware;
System::LongBool fCapFileExists;
unsigned dwCurrentVideoFrame;
unsigned dwCurrentVideoFramesDropped;
unsigned dwCurrentWaveSamples;
unsigned dwCurrentTimeElapsedMS;
Winapi::Windows::THandle hPalCurrent;
System::LongBool fCapturingNow;
unsigned dwReturn;
unsigned wNumVideoAllocated;
unsigned wNumAudioAllocated;
};
typedef TCAPSTATUS *PCAPSTATUS;
typedef TCAPTUREPARMS *PCAPTUREPARMS;
struct DECLSPEC_DRECORD TCAPTUREPARMS
{
public:
unsigned dwRequestMicroSecPerFrame;
System::LongBool fMakeUserHitOKToCapture;
unsigned wPercentDropForError;
System::LongBool fYield;
unsigned dwIndexSize;
unsigned wChunkGranularity;
System::LongBool fUsingDOSMemory;
unsigned wNumVideoRequested;
System::LongBool fCaptureAudio;
unsigned wNumAudioRequested;
unsigned vKeyAbort;
System::LongBool fAbortLeftMouse;
System::LongBool fAbortRightMouse;
System::LongBool fLimitEnabled;
unsigned wTimeLimit;
System::LongBool fMCIControl;
System::LongBool fStepMCIDevice;
unsigned dwMCIStartTime;
unsigned dwMCIStopTime;
System::LongBool fStepCaptureAt2x;
unsigned wStepCaptureAverageFrames;
unsigned dwAudioBufferSize;
System::LongBool fDisableWriteCache;
unsigned AVStreamMaster;
};
typedef TWAVEFORMATEX *PWAVEFORMATEX;
struct DECLSPEC_DRECORD TWAVEFORMATEX
{
public:
System::Word wFormatTag;
System::Word nChannels;
unsigned nSamplesPerSec;
unsigned nAvgBytesPerSec;
System::Word nBlockAlign;
System::Word wBitsPerSample;
System::Word cbSize;
};
class PASCALIMPLEMENTATION TImageEnVideoView : public Ievect::TImageEnVect
{
typedef Ievect::TImageEnVect inherited;
private:
bool fShowVideo;
bool fFreeze;
TVCDisplayMode fDisplayMode;
HWND fWndC;
System::Classes::TStringList* fDrivers;
int fVideoSource;
Hyiedefs::TIEScrollStyle fSScrollBars;
int fPreviewRate;
bool fCallBackFrame;
TVideoFrameEvent fOnVideoFrame;
TVideoFrameRawEvent fOnVideoFrameRaw;
Winapi::Windows::THandle fhBitmapInfo;
bool fBitmapInfoUp;
bool fConnected;
bool fFitFreeze;
Hyiedefs::TIEJobEvent fOnJob;
Hyiedefs::hDrawDib fHDrawDib;
bool fGrabFrame;
System::AnsiString fRecFileName;
int fRecFrameRate;
bool fRecAudio;
bool fRecMultitask;
bool fRecording;
bool fCreatingCaptureWindow;
protected:
void __fastcall SetShowVideo(bool v);
void __fastcall SetFreeze(bool v);
void __fastcall SetDisplayMode(TVCDisplayMode v);
HIDESBASE MESSAGE void __fastcall WMSize(Winapi::Messages::TWMSize &Message);
bool __fastcall DriverConnect();
bool __fastcall DriverConnectNE();
void __fastcall DriverDisconnect();
void __fastcall SetVideoSource(int v);
virtual void __fastcall SetScrollBars(Hyiedefs::TIEScrollStyle v);
bool __fastcall GetHasDlgVideoSource();
bool __fastcall GetHasDlgVideoFormat();
bool __fastcall GetHasDlgVideoDisplay();
bool __fastcall GetHasOverlay();
void __fastcall GetCaps(TCAPDRIVERCAPS &fDriverCaps);
void __fastcall SetPreviewRate(int v);
void __fastcall SetCallBackFrame(bool v);
void __fastcall SetOnVideoFrame(TVideoFrameEvent v);
void __fastcall SetOnVideoFrameRaw(TVideoFrameRawEvent v);
bool __fastcall FillBitmapInfo();
void __fastcall CreateCaptureWindow();
void __fastcall DestroyCaptureWindow();
void __fastcall DoJob(Hyiedefs::TIEJob job, int per);
void __fastcall DecompRawFrame(Iexbitmaps::TIEDibbitmap* OutBitmap, void * pix);
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(TWAVEFORMATEX &wf);
void __fastcall SetWaveFormat(TWAVEFORMATEX &wf);
public:
__fastcall virtual TImageEnVideoView(System::Classes::TComponent* Owner);
__fastcall virtual ~TImageEnVideoView();
void __fastcall FillDrivers();
virtual void __fastcall Paint();
virtual void __fastcall Select(int x1, int y1, int x2, int y2, Imageenview::TIESelOp Op);
bool __fastcall DoConfigureSource();
bool __fastcall DoConfigureFormat();
bool __fastcall DoConfigureDisplay();
bool __fastcall DoConfigureCompression();
void __fastcall Freeze();
void __fastcall UnFreeze();
__property bool Frozen = {read=fFreeze, write=SetFreeze, default=0};
void __fastcall SaveFrame();
__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};
bool __fastcall StartRecord();
void __fastcall StopRecord();
__property System::AnsiString 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};
Winapi::Windows::TRect __fastcall GetVideoSize();
__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};
__published:
__property bool FitFreeze = {read=fFitFreeze, write=fFitFreeze, default=1};
__property TVCDisplayMode DisplayMode = {read=fDisplayMode, write=SetDisplayMode, default=0};
__property bool ShowVideo = {read=fShowVideo, write=SetShowVideo, default=0};
__property int VideoSource = {read=fVideoSource, write=SetVideoSource, default=0};
__property int PreviewRate = {read=fPreviewRate, write=SetPreviewRate, default=60};
__property TVideoFrameEvent OnVideoFrame = {read=fOnVideoFrame, write=SetOnVideoFrame};
__property TVideoFrameRawEvent OnVideoFrameRaw = {read=fOnVideoFrameRaw, write=SetOnVideoFrameRaw};
__property Hyiedefs::TIEJobEvent OnJob = {read=fOnJob, write=fOnJob};
public:
/* TWinControl.CreateParented */ inline __fastcall TImageEnVideoView(HWND ParentWindow) : Ievect::TImageEnVect(ParentWindow) { }
};
//-- var, const, procedure ---------------------------------------------------
} /* namespace Videocap */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_VIDEOCAP)
using namespace Videocap;
#endif
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // videocapHPP