Winsoft Camera for macOS v1.5 Full Source for Delphi 10.3 - 11
Winsoft Camera for macOS v1.5 Full Source for Delphi 10.3 - 11
Delphi camera component for macOS.
Uses AVFoundation framework
Available for Delphi 10.3 - 11
Source code included in registered version
Royalty free distribution in applications
type
TXCameraAspectRatio = (Unknown, Fit, Fill, Resize);
TXCameraAuthorizationStatus = (NotDetermined, Restricted, Denied, Authorized);
TXCameraColorSpace = (Unknown, sRGB, P3_D65, HLG_BT2020);
TXCameraExposureMode = (Unknown, Locked, AutoExpose, ContinuousAutoExposure);
TXCameraFlashMode = (Unknown, Off, On, Auto);
TXCameraFocusMode = (Unknown, Locked, AutoFocus, ContinuousAutoFocus);
TXCameraPosition = (Unknown, Back, Front);
TXCameraTorchMode = (Unknown, Off, On, Auto);
TXCameraVideoMirrored = (Unknown, Off, On);
TXCameraVideoOrientation = (Unknown, Portrait, PortraitUpsideDown, LandscapeLeft, LandscapeRight);
TXCameraWhiteBalanceMode = (Unknown, Locked, AutoWhiteBalance, ContinuousAutoWhiteBalance);
TXCameraFrameRate = record
Min: Double;
Max: Double;
end;
TXCameraCaptureFormat = record
public
property Format: AVCaptureDeviceFormat read;
property FrameRates: TArray<TXCameraFrameRate> read;
property MediaSubType: string read;
property MediaType: string read;
property Size: TSize read;
end;
TXCameraCaptureDevice = record
public
property ActiveFormat: TXCameraCaptureFormat read;
property Device: AVCaptureDevice read;
property Formats: TArray<TXCameraCaptureFormat> read;
property Manufacturer: string read;
property Model: string read;
property Name: string read;
property Position: TXCameraPosition read;
property UniqueID: string read;
end;
TXCamera = class(TComponent)
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function IsExposureModeSupported(ExposureMode: TXCameraExposureMode): Boolean;
function IsFlashModeSupported(FlashMode: TXCameraFlashMode): Boolean;
function IsFocusModeSupported(FlashMode: TXCameraFocusMode): Boolean;
function IsTorchModeSupported(TorchMode: TXCameraTorchMode): Boolean;
function IsWhiteBalanceModeSupported(WhiteBalanceMode: TXCameraWhiteBalanceMode): Boolean;
procedure RequestAccess;
function SampleBufferToBitmap(const Bitmap: TBitmap; const SetSize: Boolean): Boolean;
procedure Start;
procedure Stop;
property ActiveColorSpace: TXCameraColorSpace read write;
property ActiveFormat: TXCameraCaptureFormat read write;
property AuthorizationStatus: TXCameraAuthorizationStatus read;
property CaptureVideoDevices: TArray<TXCameraCaptureDevice> read;
property DefaultCaptureVideoDevice: TXCameraCaptureDevice read;
property Device: AVCaptureDevice read write;
property DeviceInput: AVCaptureDeviceInput read;
property DeviceName: string read;
property ExposurePointOfInterest: TPointF read write;
property FocusPointOfInterest: TPointF read write;
property Formats: TArray<TXCameraCaptureFormat> read;
property HasFlash: Boolean read;
property HasTorch: Boolean read;
property IsAdjustingExposure: Boolean read;
property IsAdjustingFocus: Boolean read;
property IsAdjustingWhiteBalance: Boolean read;
property IsConnected: Boolean read;
property IsExposurePointOfInterestSupported: Boolean read;
property IsFlashAvailable: Boolean read;
property IsFocusPointOfInterestSupported: Boolean read;
property IsInUseByAnotherApplication: Boolean read;
property IsPreviewMirroringSupported: Boolean read;
property IsPreviewOrientationSupported: Boolean read;
property IsRunning: Boolean read;
property IsSuspended: Boolean read;
property IsTorchActive: Boolean read;
property IsTorchAvailable: Boolean read;
property IsVideoMirroringSupported: Boolean read;
property IsVideoOrientationSupported: Boolean read;
property Manufacturer: string read;
property MaxAvailableTorchLevel: Single read;
property MaxFrameRate: Integer read;
property MinFrameRate: Integer read;
property Model: string read;
property Position: TXCameraPosition read;
property SampleBuffer: CMSampleBufferRef read;
property Session: AVCaptureSession read;
property TorchLevel: Single read;
property UniqueID: string read;
property VideoDataOutput: AVCaptureVideoDataOutput read;
property VideoDataOutputConnection: AVCaptureConnection read;
property VideoPreviewLayer: AVCaptureVideoPreviewLayer read;
property View: NSView read;
published
property About: string read write stored False;
property Active: Boolean read write default False;
property ExposureMode: TXCameraExposureMode read write default Unknown;
property FlashMode: TXCameraFlashMode read write default Unknown;
property FocusMode: TXCameraFocusMode read write default Unknown;
property Preview: Boolean read write default False;
property PreviewAspectRatio: TXCameraAspectRatio read write default Unknown;
property PreviewAutoMirroring: TXCameraVideoMirrored read write default Unknown;
property PreviewFrame: TBounds read write;
property PreviewMirrored: TXCameraVideoMirrored read write default Unknown;
property PreviewOrientation: TXCameraVideoOrientation read write default Unknown;
property TorchMode: TXCameraTorchMode read write default Unknown;
property VideoMirrored: TXCameraVideoMirrored read write default Unknown;
property VideoOrientation: TXCameraVideoOrientation read write default Unknown;
property WhiteBalanceMode: TXCameraWhiteBalanceMode read write default Unknown;
property OnSampleBufferReady: TNotifyEvent read write;
end;
What's new
Version 1.5
added Delphi 11 files
Version 1.5
added Delphi 11 files
Only for V.I.P
Warning! You are not allowed to view this text.