From d23dc429810950b989a6c1a8557ebbe537225ede Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 21 Jul 2020 18:48:45 -0400 Subject: [PATCH] fix merge from master, make it compile --- src/zm_event.cpp | 2 +- src/zm_monitor.h | 4 ++-- src/zmc.cpp | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/zm_event.cpp b/src/zm_event.cpp index ff07e7cae..5d0de2cb9 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -670,7 +670,7 @@ void Event::AddFrame(Image *image, struct timeval timestamp, int score, Image *a // The idea is to write out 1/sec frame_data.push(new Frame(id, frames, frame_type, timestamp, delta_time, score)); - if ( write_to_db || (frame_data.size() > (int)monitor->get_fps()) ) { + if ( write_to_db || (frame_data.size() > (int)monitor->get_capture_fps()) ) { Debug(1, "Adding %d frames to DB", frame_data.size()); WriteDbFrames(); last_db_frame = frames; diff --git a/src/zm_monitor.h b/src/zm_monitor.h index f169429ba..142105aca 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -556,8 +556,8 @@ public: #if HAVE_LIBAVCODEC //void StreamMpeg( const char *format, int scale=100, int maxfps=10, int bitrate=100000 ); #endif // HAVE_LIBAVCODEC - double get_fps( ) const { - return fps; + double get_capture_fps( ) const { + return capture_fps; } }; diff --git a/src/zmc.cpp b/src/zmc.cpp index 3534f8584..a08aff1f4 100644 --- a/src/zmc.cpp +++ b/src/zmc.cpp @@ -235,6 +235,8 @@ int main(int argc, char *argv[]) { int result = 0; + int prime_capture_log_count = 0; + while ( !zm_terminate ) { result = 0; static char sql[ZM_SQL_SML_BUFSIZ];