sfearnley
asked on
Video Capture
I am programming in Delphi 7. Using:
SFhWnd:=capCreateCaptureWi ndow ( 'SFWindow',
WS_CHILD or WS_VISIBLE ,
WebCamLeft,WebCamTop, WebCamWidth,WebCamHeight,
MainForm.Handle,0);
capCaptureGetSetup(SFhWnd, @VideoCapt urePararam eters,size of(VideoCa ptureParar ameters));
VideoCapturePararameters.f Yield:=tru e;
capCaptureSetSetup( SFhWnd,@VideoCaptureParara meters,siz eof(VideoC apturePara rameters)) ;
capCaptureSequence (SFhWnd); etc . . .
To capture input from WebCam to file.
How do I get the program to return control to MainForm without actually clicking with the mouse on the form.
(That works) I wish to process the WebCam input in realt time.
[I have tried SetPriorityClass(MainForm. Handle,HIG H_PRIORITY _CLASS)]
I do not know how to set two threads going which may be an answer?
SFhWnd:=capCreateCaptureWi
WS_CHILD or WS_VISIBLE ,
WebCamLeft,WebCamTop, WebCamWidth,WebCamHeight,
MainForm.Handle,0);
capCaptureGetSetup(SFhWnd,
VideoCapturePararameters.f
capCaptureSetSetup( SFhWnd,@VideoCaptureParara
capCaptureSequence (SFhWnd); etc . . .
To capture input from WebCam to file.
How do I get the program to return control to MainForm without actually clicking with the mouse on the form.
(That works) I wish to process the WebCam input in realt time.
[I have tried SetPriorityClass(MainForm.
I do not know how to set two threads going which may be an answer?
ASKER
SetForegroundWindow(handle ) is not the problem - the main program 'freezes' (I assume by having lost focus) , though the recording continues and the video window stays live. I have tried running the video on another form and using MainForm.Setfocus - it does not work.
ASKER
Problem now solved by myself - re-wrote the code from scratch and the program no longer freezes.
(VideoCapturePararameters. fYield:=tr ue; now seems to be working!)
(VideoCapturePararameters.
If you have solved your problem yourself.
Then you can ask to have this question [PAQ] & [Refunded]
https://www.experts-exchange.com/Community_Support/askQuestion.jsp
I would PAQ it for the simple reason, that someone might find your own information handy.
Take Care
Carrzkiss
Then you can ask to have this question [PAQ] & [Refunded]
https://www.experts-exchange.com/Community_Support/askQuestion.jsp
I would PAQ it for the simple reason, that someone might find your own information handy.
Take Care
Carrzkiss
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Did you mean SetForegroundWindow(handle