I think I need reading material on using a fire monkey canvas
what I’m thinking is
I want to capture the android camera about 6 times a second into about 3 bit maps
I want to read pixels out of these bitmaps
Its a scanner project I have a bit like a QR scanner
I have written it in windows with Delphi 7
I can use a number of threads in the scan to get speed
what every one does is shake the camera when touching the screen
so I want a picture 0.2 of a second before pressing the screen and getting the shake
of course this is all trial and error stuff
I have being playing with this for a while now and the Demo is a good place to start but basically I think you use the device manager to get a TVideoCaptureDevice which I think you may be able to set the sample rate but by default the samples come at a rate for a tolerable video view in an image control. ie a few per second.
You set the OnSampleBuffer ready property and in that function use Dev.SampleBufferToBitMap passing in your image bitmap. The image then updates with each sample. There is nothing stopping you from getting a separate bitmap for each sample.
What is best is the demo app runs on a Windows 10 Laptop so you can develop without going to the phone. I have trouble with Windows 11 camera which I assume is a permissions issue and last time I looked the Demo did not address this.
From memory the demo does address permissions on the Android phone.
hsvandrew
Thanks for the video from Alister Christie
as I said I see the data going into a buffer and that is so good
But fire monkey is going to be very different with a android phone that the code i expect will be very different.
RogerConnell I see you got miss lead by hsvandrew as your answer was very correct for windows but not android
you both gave me the basics that gives me something to now work on that I know I will get their as I have navigated Delphi like this before
My application is basically for Android phones the comment on Windows 10/11 was promoting the cross platform functionality of Delphi FMX.
I find debugging logic on the phone to be tedious. The camera component and objects work cross platform with Delphi handling the different platform implementations under the hood.
The “Permissions” area is one that you need to customize for Android.
My code runs on both Windows and new and old Android phones with minor compiler conditionals.
Yes I got the basic idea that I needed thanks
I’m running Delphi 11
I’m sure I can cut the Android camera frame rate down and hopefully get a good resolution some how as that’s my bit to get right.
Because I’m new to Delphi 11 I have heaps of stupid things to work out
Getting access to the project manager to get to FMX
I’m still have the reading of pixels from a bitmap as pixels have gone with android bitmaps
Just the stupid things jumping from Delphi 7 to Delphi 11
but I will get their as I chunk at it.