epearson 0 Posted February 28, 2022 (edited) Hello, Note: I found a solution to my problem -- not using FMX but through another means. Thanks, everyone who answered. Is there any way to directly access the TVideoCaptureDevice sample buffer? Thank you. Edited February 28, 2022 by epearson to inform people I no longer need an answer to this question Share this post Link to post
Guest Posted February 28, 2022 (edited) lMyCAMDevice.OnSampleBufferReady := prcCAMSampleBufferReady; // showing our video on TImage .... procedure TfrmFormMain.prcCAMSampleBufferReady(Sender: TObject; const ATime: TMediaTime); begin // DONT USE "main thread" to process something "critial" like: process images by Cam // or anyother that can "crash" your UI (user interface) or app!!! // If exist images to process, then, put it on a "queue" to execute it! // Here, "prcSampleBufferSync" will be called always in a queue from main thread (your app) // to "dont paralize it" while the images it's processed!!! // // .............."main thread".........."method called" TThread.Queue(TThread.CurrentThread, prcCAMSampleBufferSync); end; //or directly using a Anonimous Procedure on TThread.Queue(TThread.CurrentThread, procedure begin ... end) ); procedure TfrmFormMain.prcCAMSampleBufferSync; begin // use your imagination, to redirect this buffer !!! 🙂 // in the meantime ... let's write the pictures coming from the camera in the TImage lMyCAMDevice.SampleBufferToBitmap(imgVideoCapture.Bitmap, True); end; Edited March 1, 2022 by Guest Share this post Link to post
Attila Kovacs 629 Posted February 28, 2022 @joaodanet2018 I have the strong suspicion that you are pasting into this forum -in some uniquely ugly way- everything you can google up. Why? Share this post Link to post
epearson 0 Posted February 28, 2022 Hi, I found a solution to my problem -- using a different application. Thanks everyone who tried to answer my question. Share this post Link to post