Only warn about event exceeding section_length if we are not using close_mode=TIME. Fixes #3599

pull/3609/head
Isaac Connor 2022-09-25 10:05:09 -04:00
parent 0df8b0cc7c
commit 0ce8373bb1
1 changed files with 7 additions and 5 deletions

View File

@ -2089,11 +2089,13 @@ bool Monitor::Analyse() {
if ( section_length
&& ( ( timestamp->tv_sec - video_store_data->recording.tv_sec ) >= section_length )
) {
Warning("%s: %03d - event %" PRIu64 ", has exceeded desired section length. %" PRIi64 " - %" PRIi64 " = %" PRIi64 " >= %d",
name.c_str(), analysis_image_count, event->Id(),
static_cast<int64>(timestamp->tv_sec), static_cast<int64>(video_store_data->recording.tv_sec),
static_cast<int64>(timestamp->tv_sec - video_store_data->recording.tv_sec),
section_length);
if (event_close_mode != CLOSE_TIME) {
Warning("%s: %03d - event %" PRIu64 ", has exceeded desired section length. %" PRIi64 " - %" PRIi64 " = %" PRIi64 " >= %d",
name.c_str(), analysis_image_count, event->Id(),
static_cast<int64>(timestamp->tv_sec), static_cast<int64>(video_store_data->recording.tv_sec),
static_cast<int64>(timestamp->tv_sec - video_store_data->recording.tv_sec),
section_length);
}
closeEvent();
event = new Event(this, *timestamp, cause, noteSetMap);
shared_data->last_event_id = event->Id();