Show: Delphi C++
Display Preferences

FMX.Media.TCaptureDevice

From RAD Studio API Documentation
Jump to: navigation, search

System.TObjectTCaptureDevice

Delphi

TCaptureDevice = class abstract

C++

class PASCALIMPLEMENTATION TCaptureDevice : public System::TObject

Properties

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

Description

Base class for capturing devices.

TCaptureDevice is an abstract class that encapsulates the basic methods and properties for capturing devices.

A capturing device can capture audio or video data. The type of captured data is exposed through the MediaType property. TAudioCaptureDevice and TVideoCaptureDevice extend the TCaptureDevice implementation to add specific behavior for audio capturing devices (like microphones) and for video capturing devices (like web cameras).

Do not use TCaptureDevice explicitly in an application. To access and manage any 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.

Use the TCaptureDeviceManager specific methods and properties to access the list with available capturing devices and also the default capturing devices 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

Personal tools
In Other Languages
Previous Versions
Assistance