Jump to content
epearson

TVideoCaptureDevice

Recommended Posts

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 by epearson
to inform people I no longer need an answer to this question

Share this post


Link to post
Guest
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 by Guest

Share this post


Link to post

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×