araglin
18th May 2009, 15:02
Hello!
Here is the problem:
I'm trying to implement a watchdogtimer-like behavior of Motion-Detection software.
1. When we recieve first MOTION-signal, we start video capturing and QTimer, which connected to stopVideoCapture().
2. If we don't recieve any MOTION-signal while timer is active, then stopVideoCapture() is called - and all done.
2a. But if we recieve another MOTION-signal, we need to restart timer to prolongate video capturing process... but I get stuck here - don't understand how to reset QTimer....
timer->stop();
timer->start(15000);
won't work because stopVideoCapture() is called after 15 sec from initial timer->start() no matter how many MOTION-signals were recieved within that interval...
Any suggestions?
Thanks in advance!
Here is the problem:
I'm trying to implement a watchdogtimer-like behavior of Motion-Detection software.
1. When we recieve first MOTION-signal, we start video capturing and QTimer, which connected to stopVideoCapture().
2. If we don't recieve any MOTION-signal while timer is active, then stopVideoCapture() is called - and all done.
2a. But if we recieve another MOTION-signal, we need to restart timer to prolongate video capturing process... but I get stuck here - don't understand how to reset QTimer....
timer->stop();
timer->start(15000);
won't work because stopVideoCapture() is called after 15 sec from initial timer->start() no matter how many MOTION-signals were recieved within that interval...
Any suggestions?
Thanks in advance!