diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 2f410143a..4644c7e53 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -380,7 +380,7 @@ Monitor::Monitor() videoStore = nullptr; packetqueue.setMaxVideoPackets(pre_event_count); -} // Monitor::Monitor +} // Monitor::Monitor /* std::string load_monitor_sql = @@ -441,12 +441,6 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) { capture_delay = (dbrow[col] && atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; alarm_capture_delay = (dbrow[col] && atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; - if ( analysis_fps_limit > 0.0 ) { - uint64_t usec = round(1000000*pre_event_count/analysis_fps_limit); - video_buffer_duration.tv_sec = usec/1000000; - video_buffer_duration.tv_usec = usec % 1000000; - } - if ( dbrow[col] ) strncpy(device, dbrow[col], sizeof(device)-1); else @@ -565,10 +559,10 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) { alarm_ref_blend_perc = atoi(dbrow[col]); col++; track_motion = atoi(dbrow[col]); col++; - signal_check_points = atoi(dbrow[col]); col++; - signal_check_colour = strtol(dbrow[col][0] == '#' ? dbrow[col]+1 : dbrow[col], 0, 16); col++; embed_exif = (*dbrow[col] != '0'); col++; rtsp_server = (*dbrow[col] != '0'); col++; + signal_check_points = atoi(dbrow[col]); col++; + signal_check_colour = strtol(dbrow[col][0] == '#' ? dbrow[col]+1 : dbrow[col], 0, 16); col++; // How many frames we need to have before we start analysing ready_count = warmup_count; @@ -2932,6 +2926,7 @@ int Monitor::Close() { analysis_it = nullptr; // deleted by packetqueue } #endif + return 1; }; Monitor::Orientation Monitor::getOrientation() const { return orientation; } diff --git a/src/zm_monitor.h b/src/zm_monitor.h index 378b2c312..73794e036 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -311,7 +311,6 @@ protected: int frame_skip; // How many frames to skip in continuous modes int motion_frame_skip; // How many frames to skip in motion detection double analysis_fps_limit; // Target framerate for video analysis - struct timeval video_buffer_duration; // How long a video segment to keep in buffer (set only if analysis fps != 0 ) unsigned int analysis_update_delay; // How long we wait before updating analysis parameters int capture_delay; // How long we wait between capture frames int alarm_capture_delay; // How long we wait between capture frames when in alarm state @@ -479,7 +478,6 @@ public: void SetVideoWriterStartTime(const struct timeval &t) { video_store_data->recording = t; } unsigned int GetPreEventCount() const { return pre_event_count; }; - struct timeval GetVideoBufferDuration() const { return video_buffer_duration; }; int GetImageBufferCount() const { return image_buffer_count; }; State GetState() const; int GetImage( int index=-1, int scale=100 );