Spacing, remove dead code, add comments. When implementing CLOSE_ALARM mode, check Alarm Frames against alarm_frame_count instead of 0.
This commit is contained in:
parent
c9de883a7c
commit
b9e6cf8038
|
@ -1856,9 +1856,6 @@ bool Monitor::Analyse() {
|
||||||
// So...
|
// So...
|
||||||
Debug(1, "Waiting for decode");
|
Debug(1, "Waiting for decode");
|
||||||
packet_lock->wait();
|
packet_lock->wait();
|
||||||
//packetqueue.unlock(packet_lock); // This will delete packet_lock and notify_all
|
|
||||||
//packetqueue.wait();
|
|
||||||
////packet_lock->lock();
|
|
||||||
} // end while ! decoded
|
} // end while ! decoded
|
||||||
if (zm_terminate or analysis_thread->Stopped()) {
|
if (zm_terminate or analysis_thread->Stopped()) {
|
||||||
delete packet_lock;
|
delete packet_lock;
|
||||||
|
@ -1956,7 +1953,7 @@ bool Monitor::Analyse() {
|
||||||
if ((state == IDLE) || (state == TAPE) || (state == PREALARM)) {
|
if ((state == IDLE) || (state == TAPE) || (state == PREALARM)) {
|
||||||
// If we should end then previous continuous event and start a new non-continuous event
|
// If we should end then previous continuous event and start a new non-continuous event
|
||||||
if (event && event->Frames()
|
if (event && event->Frames()
|
||||||
&& !event->AlarmFrames()
|
&& (event->AlarmFrames() < alarm_frame_count)
|
||||||
&& (event_close_mode == CLOSE_ALARM)
|
&& (event_close_mode == CLOSE_ALARM)
|
||||||
// FIXME since we won't be including this snap in the event if we close it, we should be looking at event->duration() instead
|
// FIXME since we won't be including this snap in the event if we close it, we should be looking at event->duration() instead
|
||||||
&& (event->Duration() >= min_section_length)
|
&& (event->Duration() >= min_section_length)
|
||||||
|
@ -2051,6 +2048,7 @@ bool Monitor::Analyse() {
|
||||||
Event::EmptyPreAlarmFrames();
|
Event::EmptyPreAlarmFrames();
|
||||||
} // end if score or not
|
} // end if score or not
|
||||||
|
|
||||||
|
// At this point, snap ONLY has motion score, so this adds other sources
|
||||||
if (score > snap->score)
|
if (score > snap->score)
|
||||||
snap->score = score;
|
snap->score = score;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue