Show: Delphi C++
Display Preferences

FMX.Media.TCameraComponent.Quality

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Quality: TVideoCaptureQuality read GetQuality write SetQuality;

C++

__property TVideoCaptureQuality Quality = {read=GetQuality, write=SetQuality, nodefault};

Properties

Type Visibility Source Unit Parent
property public
FMX.Media.pas
FMX.Media.hpp
FMX.Media TCameraComponent

Description

States the quality of the video capture.

The Quality property of type TVideoCaptureQuality can take one of the following values:

Value Meaning

PhotoQuality

The captured data has high-resolution photo quality.

HighQuality

The captured data has high resolution (depending on the device).

MediumQuality

The captured data has medium resolution (depending on the device).

LowQuality

The captured data has low resolution (depending on the device).

CaptureSettings

This option allows you to set a customized capture data resolution.

By default, Quality is set to CaptureSettings and it uses the best available camera quality (best resolution and best frame rate) prioritizing first the Resolution.

For example, to change the Quality of the CameraComponent1 TCameraComponent to LowQuality, you can use the following line:

Delphi:

CameraComponent1.Quality := TVideoCaptureQuality.LowQuality;

C++:

CameraComponent1->Quality = TVideoCaptureQuality::LowQuality;

Setting a Custom Quality Capture Setting

By setting the Quality to TVideoCaptureQuality.CaptureSettings you can set a customized capture data resolution:

To set the best available capture settings prioritizing the frame rate, you could for example use the following:

Delphi:

procedure TForm1.SetMaxFrameRateClick(Sender: TObject);
var
  LSettings: TArray<TVideoCaptureSetting>;
begin
  CameraComponent1.CaptureSettingPriority := TVideoCaptureSettingPriority.FrameRate;
  LSettings := CameraComponent1.AvailableCaptureSettings;
  CameraComponent1.CaptureSetting := LSettings[0];
end;

C++:

void __fastcall TForm1::SetMaxFrameRateClick(TObject *Sender)
{
	DynamicArray<TVideoCaptureSetting> LSettings;
	CameraComponent1->CaptureSettingPriority = TVideoCaptureSettingPriority::FrameRate;
	LSettings = CameraComponent1->AvailableCaptureSettings;
	CameraComponent1->CaptureSetting = LSettings[0];
}
Note: When you set a specific CaptureSetting, the Quality property is automatically set to TVideoCaptureQuality.CaptureSettings.

See Also

Code Samples

Personal tools
In Other Languages
Previous Versions
Assistance