FMX.Media.TCameraComponent.Quality
Delphi
property Quality: TVideoCaptureQuality read GetQuality write SetQuality;
C++
__property TVideoCaptureQuality Quality = {read=GetQuality, write=SetQuality, nodefault};
Contents
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 |
---|---|
|
The captured data has high-resolution photo quality. |
|
The captured data has high resolution (depending on the device). |
|
The captured data has medium resolution (depending on the device). |
|
The captured data has low resolution (depending on the device). |
|
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:
- Use the AvailableCaptureSettings property to see the Array with the different supported configurations.
- You can use CaptureSettingPriority to set the criterion to sort the Array of the AvailableCaptureSettings to prioritize
Resolution
orFrameRate
when sorting the Array. See TVideoCaptureSettingPriority for further information.
- Use the CaptureSetting property to set the capture data resolution from the available ones.
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
- FMX.Media.TVideoCaptureSetting
- FMX.Media.TVideoCaptureSettingPriority
- FMX.Media.TVideoCaptureQuality
- FMX.Media.TCameraComponent.CaptureSetting
- FMX.Media.TCameraComponent.CaptureSettingPriority
- FMX.Media.TCameraComponent.AvailableCaptureSettings