FMX.Media.TVideoCaptureDevice

From RAD Studio API Documentation
Jump to: navigation, search

FMX.Media.TCaptureDeviceSystem.TObjectTVideoCaptureDevice

Delphi

TVideoCaptureDevice = class(TCaptureDevice)

C++

class PASCALIMPLEMENTATION TVideoCaptureDevice : public TCaptureDevice

Properties

Type Visibility Source Unit Parent
class public
FMX.Media.pas
FMX.Media.hpp
FMX.Media FMX.Media

Description

Defines a video capturing device.

TVideoCaptureDevice extends the TCaptureDevice implementation to add specific behavior for video capturing devices (like web cameras).

To access and manage any video capture device, use TCaptureDeviceManager. Do not explicitly destroy a capturing device; TCaptureDeviceManager keeps the used device in the Current property, and destroys it before closing the application.

To display video samples, use the SampleBufferToBitmap method. It displays video samples on a specified bitmap.

Use the DefaultVideoCaptureDevice method to access the default capturing video device of the system.

Example:

//Delphi declaration
var
  VideoCamera = TCaptureDeviceManager
begin
  // Get access to the default video capture device
  VideoCamera := TCaptureDeviceManager.Current.DefaultVideoCaptureDevice;
  if VideoCamera <> nil then
  begin
     //do something
  end;
end;
  // C++ declaration
TCaptureDeviceManager* CaptureManager = TCaptureDeviceManager::Current;
  // Get access to default video capture device
TVideoCaptureDevice* VideoCamera = CaptureManager->DefaultVideoCaptureDevice;

if(VideoCamera){
     //do something
}

See Also