How to get multiple bitmaps from camera

  

I would like to scan a QRCode with Firemonkey in Delphi 10.4.
I can take a single photo with the code below, but I only get one OnDidFinishTaking event, and it’s not really good to parse the final image to read the QRCode:
if TPlatformServices.Current.SupportsPlatformService(IFMXCameraService, Service) then
begin
Params.Editable := False;
Params.NeedSaveToAlbum := True;
Params.RequiredResolution := TSize.Create(640, 640);
Params.OnDidFinishTaking := DoDidFinish;
Params.OnDidCancelTaking := DoDidCancel;
Service.TakePhoto(imgIndice, Params);
end
else
ShowMessage(‘This device does not support the camera service’);

So, I use the TCameraComponent instead, with the OnSampleBufferReady event.
That’s exactly what I want, but this component is really bad, it takes a lot of time to turn on, and the image is jerky.
Does another method exist to get a fluid series of images from the camera? Like a normal QRCode scanner?
Maybe something directly from Android or iOS APIs?

Comments are closed.