4

Is it possible to have a preview function within the app of what the mobile camera is seeing? Or is this option only possible to code in Eclipse or similar programs?

Using the camera component in XE5 only opens the inbuilt camera app, not displaying the view within the app..

Primarily Android..

Thanks

JohnGallo2
  • 51
  • 3

1 Answers1

0

It is very easy - you have to define procedure that will be assigning camera buffer to TImage.Bitmap. OnSampleBufferToBitmap event handler can look like:

procedure TForm240.SampleBufferReady(Sender: TObject; const ATime: TMediaTime);
begin
  VideoCamera.SampleBufferToBitmap(Image1.Bitmap, True);
end;

It is taken from official example for Video Capture: http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE5_Update/FireMonkey/Delphi/VideoCaptureHD/

Tested by me and works on few devices.