From a6b7c6e99f4e6607a7f4554aaf5e0fc4adfbe015 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Tue, 21 Jul 2015 22:52:52 +0200 Subject: [PATCH 01/14] Add analysis interval parameter to monitors --- db/zm_create.sql.in | 1 + db/zm_update-1.28.100.sql | 18 +++++++++ src/zm_monitor.cpp | 48 +++++++++++++++++------ src/zm_monitor.h | 4 +- web/lang/big5_big5.php | 2 + web/lang/cn_zh.php | 2 + web/lang/cs_cz.php | 2 + web/lang/de_de.php | 2 + web/lang/dk_dk.php | 2 + web/lang/en_gb.php | 2 + web/lang/es_ar.php | 2 + web/lang/es_es.php | 2 + web/lang/et_ee.php | 2 + web/lang/fr_fr.php | 2 + web/lang/he_il.php | 2 + web/lang/hu_hu.php | 2 + web/lang/it_it.php | 2 + web/lang/ja_jp.php | 2 + web/lang/nl_nl.php | 2 + web/lang/pl_pl.php | 2 + web/lang/pt_br.php | 2 + web/lang/ro_ro.php | 2 + web/lang/ru_ru.php | 2 + web/lang/se_se.php | 2 + web/skins/classic/views/js/monitor.js.php | 2 + web/skins/classic/views/monitor.php | 3 ++ 26 files changed, 103 insertions(+), 13 deletions(-) diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index c52c5741e..388dba7a4 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -361,6 +361,7 @@ CREATE TABLE `Monitors` ( `MaxFPS` decimal(5,2) default NULL, `AlarmMaxFPS` decimal(5,2) default NULL, `FPSReportInterval` smallint(5) unsigned NOT NULL default '250', + `AnalysisInterval` smallint(5) unsigned NOT NULL default '1', `RefBlendPerc` tinyint(3) unsigned NOT NULL default '6', `AlarmRefBlendPerc` tinyint(3) unsigned NOT NULL default '6', `Controllable` tinyint(3) unsigned NOT NULL default '0', diff --git a/db/zm_update-1.28.100.sql b/db/zm_update-1.28.100.sql index 1b3d3b745..391748d94 100644 --- a/db/zm_update-1.28.100.sql +++ b/db/zm_update-1.28.100.sql @@ -20,3 +20,21 @@ SET @s = (SELECT IF( PREPARE stmt FROM @s; EXECUTE stmt; +-- +-- Add AnalysisInterval column to Monitors +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'AnalysisInterval' + ) > 0, +"SELECT 'Column AnalysisInterval exists in Monitors'", +"ALTER TABLE Monitors ADD `AnalysisInterval` smallint(5) unsigned not null default 1 AFTER `FPSReportInterval`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 906ca68f6..fcce98226 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -284,6 +284,7 @@ Monitor::Monitor( int p_capture_delay, int p_alarm_capture_delay, int p_fps_report_interval, + int p_analysis_interval, int p_ref_blend_perc, int p_alarm_ref_blend_perc, bool p_track_motion, @@ -311,6 +312,7 @@ Monitor::Monitor( alarm_capture_delay( p_alarm_capture_delay ), alarm_frame_count( p_alarm_frame_count ), fps_report_interval( p_fps_report_interval ), + analysis_interval( p_analysis_interval ), ref_blend_perc( p_ref_blend_perc ), alarm_ref_blend_perc( p_alarm_ref_blend_perc ), track_motion( p_track_motion ), @@ -351,6 +353,7 @@ Monitor::Monitor( fps = 0.0; event_count = 0; image_count = 0; + processed_image_count = 0; ready_count = warmup_count; first_alarm_count = 0; last_alarm_count = 0; @@ -1173,10 +1176,19 @@ bool Monitor::Analyse() struct timeval now; gettimeofday( &now, NULL ); - if ( image_count && fps_report_interval && !(image_count%fps_report_interval) ) + // Skip image if the analysis_interval image count is not reached + if ( image_count && analysis_interval && (image_count%analysis_interval) ) + { + shared_data->last_read_index = shared_data->last_write_index; + shared_data->last_read_time = now.tv_sec; + image_count++; + return( true ); + } + + if ( processed_image_count && fps_report_interval && !(processed_image_count%fps_report_interval) ) { fps = double(fps_report_interval)/(now.tv_sec-last_fps_time); - Info( "%s: %d - Processing at %.2f fps", name, image_count, fps ); + Info( "%s: %d - Processing at %.2f fps", name, processed_image_count, fps ); last_fps_time = now.tv_sec; } @@ -1657,6 +1669,7 @@ bool Monitor::Analyse() //shared_data->last_read_time = image_buffer[index].timestamp->tv_sec; shared_data->last_read_time = now.tv_sec; image_count++; + processed_image_count++; return( true ); } @@ -1671,7 +1684,7 @@ void Monitor::Reload() closeEvent(); static char sql[ZM_SQL_MED_BUFSIZ]; - snprintf( sql, sizeof(sql), "select Function+0, Enabled, LinkedMonitors, EventPrefix, LabelFormat, LabelX, LabelY, WarmupCount, PreEventCount, PostEventCount, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = '%d'", id ); + snprintf( sql, sizeof(sql), "select Function+0, Enabled, LinkedMonitors, EventPrefix, LabelFormat, LabelX, LabelY, WarmupCount, PreEventCount, PostEventCount, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, AnalysisInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = '%d'", id ); if ( mysql_query( &dbconn, sql ) ) { @@ -1711,6 +1724,7 @@ void Monitor::Reload() capture_delay = (dbrow[index]&&atof(dbrow[index])>0.0)?int(DT_PREC_3/atof(dbrow[index])):0; index++; alarm_capture_delay = (dbrow[index]&&atof(dbrow[index])>0.0)?int(DT_PREC_3/atof(dbrow[index])):0; index++; fps_report_interval = atoi(dbrow[index++]); + analysis_interval = atoi(dbrow[index++]); ref_blend_perc = atoi(dbrow[index++]); alarm_ref_blend_perc = atoi(dbrow[index++]); track_motion = atoi(dbrow[index++]); @@ -1863,11 +1877,11 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose static char sql[ZM_SQL_MED_BUFSIZ]; if ( !device[0] ) { - strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Method, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' order by Device, Channel", sizeof(sql) ); + strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Method, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, AnalysisInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' order by Device, Channel", sizeof(sql) ); } else { - snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Method, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' and Device = '%s' order by Channel", device ); + snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Method, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, AnalysisInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Function != 'None' and Type = 'Local' and Device = '%s' order by Channel", device ); } if ( mysql_query( &dbconn, sql ) ) { @@ -1949,6 +1963,7 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); int capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; int alarm_capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; int fps_report_interval = atoi(dbrow[col]); col++; + int analysis_interval = atoi(dbrow[col]); col++; int ref_blend_perc = atoi(dbrow[col]); col++; int alarm_ref_blend_perc = atoi(dbrow[col]); col++; int track_motion = atoi(dbrow[col]); col++; @@ -2009,6 +2024,7 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); capture_delay, alarm_capture_delay, fps_report_interval, + analysis_interval, ref_blend_perc, alarm_ref_blend_perc, track_motion, @@ -2039,11 +2055,11 @@ int Monitor::LoadRemoteMonitors( const char *protocol, const char *host, const c static char sql[ZM_SQL_MED_BUFSIZ]; if ( !protocol ) { - strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Remote'", sizeof(sql) ); + strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, AnalysisInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Remote'", sizeof(sql) ); } else { - snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Remote' and Protocol = '%s' and Host = '%s' and Port = '%s' and Path = '%s'", protocol, host, port, path ); + snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, AnalysisInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Remote' and Protocol = '%s' and Host = '%s' and Port = '%s' and Path = '%s'", protocol, host, port, path ); } if ( mysql_query( &dbconn, sql ) ) { @@ -2106,6 +2122,7 @@ int Monitor::LoadRemoteMonitors( const char *protocol, const char *host, const c int capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; int alarm_capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; int fps_report_interval = atoi(dbrow[col]); col++; + int analysis_interval = atoi(dbrow[col]); col++; int ref_blend_perc = atoi(dbrow[col]); col++; int alarm_ref_blend_perc = atoi(dbrow[col]); col++; int track_motion = atoi(dbrow[col]); col++; @@ -2182,6 +2199,7 @@ int Monitor::LoadRemoteMonitors( const char *protocol, const char *host, const c capture_delay, alarm_capture_delay, fps_report_interval, + analysis_interval, ref_blend_perc, alarm_ref_blend_perc, track_motion, @@ -2212,11 +2230,11 @@ int Monitor::LoadFileMonitors( const char *file, Monitor **&monitors, Purpose pu static char sql[ZM_SQL_MED_BUFSIZ]; if ( !file[0] ) { - strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'File'", sizeof(sql) ); + strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, AnalysisInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'File'", sizeof(sql) ); } else { - snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'File' and Path = '%s'", file ); + snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, AnalysisInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'File' and Path = '%s'", file ); } if ( mysql_query( &dbconn, sql ) ) { @@ -2275,6 +2293,7 @@ int Monitor::LoadFileMonitors( const char *file, Monitor **&monitors, Purpose pu int capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; int alarm_capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; int fps_report_interval = atoi(dbrow[col]); col++; + int analysis_interval = atoi(dbrow[col]); col++; int ref_blend_perc = atoi(dbrow[col]); col++; int alarm_ref_blend_perc = atoi(dbrow[col]); col++; int track_motion = atoi(dbrow[col]); col++; @@ -2319,6 +2338,7 @@ int Monitor::LoadFileMonitors( const char *file, Monitor **&monitors, Purpose pu capture_delay, alarm_capture_delay, fps_report_interval, + analysis_interval, ref_blend_perc, alarm_ref_blend_perc, track_motion, @@ -2349,11 +2369,11 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose static char sql[ZM_SQL_MED_BUFSIZ]; if ( !file[0] ) { - strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Method, Options, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg'", sizeof(sql) ); + strncpy( sql, "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Method, Options, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, AnalysisInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg'", sizeof(sql) ); } else { - snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Method, Options, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg' and Path = '%s'", file ); + snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Path, Method, Options, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, AnalysisInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'Ffmpeg' and Path = '%s'", file ); } if ( mysql_query( &dbconn, sql ) ) { @@ -2414,6 +2434,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose int capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; int alarm_capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; int fps_report_interval = atoi(dbrow[col]); col++; + int analysis_interval = atoi(dbrow[col]); col++; int ref_blend_perc = atoi(dbrow[col]); col++; int alarm_ref_blend_perc = atoi(dbrow[col]); col++; int track_motion = atoi(dbrow[col]); col++; @@ -2460,6 +2481,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose capture_delay, alarm_capture_delay, fps_report_interval, + analysis_interval, ref_blend_perc, alarm_ref_blend_perc, track_motion, @@ -2488,7 +2510,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose ) { static char sql[ZM_SQL_MED_BUFSIZ]; - snprintf( sql, sizeof(sql), "select Id, Name, Type, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Protocol, Method, Host, Port, Path, Options, User, Pass, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = %d", id ); + snprintf( sql, sizeof(sql), "select Id, Name, Type, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Protocol, Method, Host, Port, Path, Options, User, Pass, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, MaxFPS, AlarmMaxFPS, FPSReportInterval, AnalysisInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = %d", id ); if ( mysql_query( &dbconn, sql ) ) { Error( "Can't run query: %s", mysql_error( &dbconn ) ); @@ -2578,6 +2600,7 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); int capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; int alarm_capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++; int fps_report_interval = atoi(dbrow[col]); col++; + int analysis_interval = atoi(dbrow[col]); col++; int ref_blend_perc = atoi(dbrow[col]); col++; int alarm_ref_blend_perc = atoi(dbrow[col]); col++; int track_motion = atoi(dbrow[col]); col++; @@ -2773,6 +2796,7 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); capture_delay, alarm_capture_delay, fps_report_interval, + analysis_interval, ref_blend_perc, alarm_ref_blend_perc, track_motion, diff --git a/src/zm_monitor.h b/src/zm_monitor.h index b8326a1c4..6aa417b45 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -238,6 +238,7 @@ protected: int alarm_capture_delay; // How long we wait between capture frames when in alarm state int alarm_frame_count; // How many alarm frames are required before an event is triggered int fps_report_interval; // How many images should be captured/processed between reporting the current FPS + int analysis_interval; // Do analysis every time this image count is reached int ref_blend_perc; // Percentage of new image going into reference image. int alarm_ref_blend_perc; // Percentage of new image going into reference image during alarm. bool track_motion; // Whether this monitor tries to track detected motion @@ -252,6 +253,7 @@ protected: Purpose purpose; // What this monitor has been created to do int event_count; int image_count; + int processed_image_count; int ready_count; int first_alarm_count; int last_alarm_count; @@ -298,7 +300,7 @@ protected: public: // OurCheckAlarms seems to be unused. Check it on zm_monitor.cpp for more info. //bool OurCheckAlarms( Zone *zone, const Image *pImage ); - Monitor( int p_id, const char *p_name, int p_function, bool p_enabled, const char *p_linked_monitors, Camera *p_camera, int p_orientation, unsigned int p_deinterlacing, const char *p_event_prefix, const char *p_label_format, const Coord &p_label_coord, int p_image_buffer_count, int p_warmup_count, int p_pre_event_count, int p_post_event_count, int p_stream_replay_buffer, int p_alarm_frame_count, int p_section_length, int p_frame_skip, int p_motion_frame_skip, int p_capture_delay, int p_alarm_capture_delay, int p_fps_report_interval, int p_ref_blend_perc, int p_alarm_ref_blend_perc, bool p_track_motion, Rgb p_signal_check_colour, Purpose p_purpose, int p_n_zones=0, Zone *p_zones[]=0 ); + Monitor( int p_id, const char *p_name, int p_function, bool p_enabled, const char *p_linked_monitors, Camera *p_camera, int p_orientation, unsigned int p_deinterlacing, const char *p_event_prefix, const char *p_label_format, const Coord &p_label_coord, int p_image_buffer_count, int p_warmup_count, int p_pre_event_count, int p_post_event_count, int p_stream_replay_buffer, int p_alarm_frame_count, int p_section_length, int p_frame_skip, int p_motion_frame_skip, int p_capture_delay, int p_alarm_capture_delay, int p_fps_report_interval, int p_analysis_interval, int p_ref_blend_perc, int p_alarm_ref_blend_perc, bool p_track_motion, Rgb p_signal_check_colour, Purpose p_purpose, int p_n_zones=0, Zone *p_zones[]=0 ); ~Monitor(); void AddZones( int p_n_zones, Zone *p_zones[] ); diff --git a/web/lang/big5_big5.php b/web/lang/big5_big5.php index 84da0f622..3b39bb8b3 100644 --- a/web/lang/big5_big5.php +++ b/web/lang/big5_big5.php @@ -95,6 +95,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => '警告', 'All' => '全部', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => '確定', 'ApplyingStateChange' => '確定狀態改變', 'ArchArchived' => 'Archived Only', @@ -131,6 +132,7 @@ $SLANG = array( 'BackgroundFilter' => 'Run filter in background', 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Channel must be set to an integer of zero or more', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Device must be set to a valid value', diff --git a/web/lang/cn_zh.php b/web/lang/cn_zh.php index 21bd2f269..7a53cb99a 100644 --- a/web/lang/cn_zh.php +++ b/web/lang/cn_zh.php @@ -91,6 +91,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => '警报', 'All' => '全部', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => '应用', 'ApplyingStateChange' => '状态改变生效', 'ArchArchived' => '仅限于存档', @@ -127,6 +128,7 @@ $SLANG = array( 'BackgroundFilter' => '在后台运行筛选器', 'BadAlarmFrameCount' => '报警帧数必须设为大于1的整数', 'BadAlarmMaxFPS' => '报警最大帧率必须是正整数或正浮点数', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => '通道必须设为大于零的整数', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => '必须为器件设置有效值', diff --git a/web/lang/cs_cz.php b/web/lang/cs_cz.php index ff0f6f260..e5d85e371 100644 --- a/web/lang/cs_cz.php +++ b/web/lang/cs_cz.php @@ -91,6 +91,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Pozor', 'All' => 'Vechny', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Pout', 'ApplyingStateChange' => 'Aplikuji zmnu stavu', 'ArchArchived' => 'Pouze archivovan', @@ -127,6 +128,7 @@ $SLANG = array( 'BackgroundFilter' => 'Run filter in background', 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Channel must be set to an integer of zero or more', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Device must be set to a valid value', diff --git a/web/lang/de_de.php b/web/lang/de_de.php index bfb7f19d4..83bf6ee91 100644 --- a/web/lang/de_de.php +++ b/web/lang/de_de.php @@ -93,6 +93,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Alarm', 'All' => 'Alle', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Anwenden', 'ApplyingStateChange' => 'Aktiviere neuen Status', 'ArchArchived' => 'Nur Archivierte', @@ -129,6 +130,7 @@ $SLANG = array( 'BackgroundFilter' => 'Filter im Hintergrund laufen lassen', 'BadAlarmFrameCount' => 'Die Bildanzahl muss ganzzahlig 1 oder größer sein', 'BadAlarmMaxFPS' => 'Alarm-Maximum-FPS muss eine positive Ganzzahl oder eine Gleitkommazahl sein', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Der Kanal muss ganzzahlig 0 oder größer sein', 'BadColours' => 'Zielfarbe muss auf einen gültigen Wert gesetzt werden', // Added - 2011-06-15 'BadDevice' => 'Das Gerät muss eine gültige Systemresource sein', diff --git a/web/lang/dk_dk.php b/web/lang/dk_dk.php index 08795edf4..cbb5e8d24 100644 --- a/web/lang/dk_dk.php +++ b/web/lang/dk_dk.php @@ -92,6 +92,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Alarm', 'All' => 'Alle', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Aktiver', 'ApplyingStateChange' => 'Aktivere State ndring', 'ArchArchived' => 'Kun Arkiverede', @@ -128,6 +129,7 @@ $SLANG = array( 'BackgroundFilter' => 'Run filter in background', 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Channel must be set to an integer of zero or more', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Device must be set to a valid value', diff --git a/web/lang/en_gb.php b/web/lang/en_gb.php index ceaabad02..c9cc3326a 100644 --- a/web/lang/en_gb.php +++ b/web/lang/en_gb.php @@ -100,6 +100,7 @@ $SLANG = array( 'AlarmRGBUnset' => 'You must set an alarm RGB colour', 'Alert' => 'Alert', 'All' => 'All', + 'AnalysisInterval' => 'Analysis Interval', 'Apply' => 'Apply', 'ApplyingStateChange' => 'Applying State Change', 'ArchArchived' => 'Archived Only', @@ -137,6 +138,7 @@ $SLANG = array( 'BackgroundFilter' => 'Run filter in background', 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', 'BadChannel' => 'Channel must be set to an integer of zero or more', 'BadDevice' => 'Device must be set to a valid value', 'BadFormat' => 'Format must be set to a valid value', diff --git a/web/lang/es_ar.php b/web/lang/es_ar.php index 1445437f6..03a945df8 100644 --- a/web/lang/es_ar.php +++ b/web/lang/es_ar.php @@ -42,6 +42,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Alerta', 'All' => 'Todo', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Aplicar', 'ApplyingStateChange' => 'Aplicar Cambio Estado', 'ArchArchived' => 'Solo Archivados', @@ -78,6 +79,7 @@ $SLANG = array( 'BackgroundFilter' => 'Run filter in background', 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Channel must be set to an integer of zero or more', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Device must be set to a valid value', diff --git a/web/lang/es_es.php b/web/lang/es_es.php index 38b879814..a8ebcd814 100644 --- a/web/lang/es_es.php +++ b/web/lang/es_es.php @@ -91,6 +91,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Alerta', 'All' => 'Todo', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Aplicar', 'ApplyingStateChange' => 'Aplicando cambio de estado...', 'ArchArchived' => 'Sólo archivados', @@ -127,6 +128,7 @@ $SLANG = array( 'BackgroundFilter' => 'Ejecutar filtro en segundo plano', 'BadAlarmFrameCount' => 'El número de marcos de alarma debe tener un número entero de uno o más', 'BadAlarmMaxFPS' => 'Máximos MPS de alarma debe ser un valor entero positivo o de punto flotante', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'El canal debe estar establecido en un entero de cero o más', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2015-04-18 'BadDevice' => 'El dispositivo debe tener un valor válido', diff --git a/web/lang/et_ee.php b/web/lang/et_ee.php index 21274663d..2af78c7de 100644 --- a/web/lang/et_ee.php +++ b/web/lang/et_ee.php @@ -92,6 +92,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Hoiatus', 'All' => 'All', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Apply', 'ApplyingStateChange' => 'Applying State Change', 'ArchArchived' => 'Arhiveeritud Ainult', @@ -128,6 +129,7 @@ $SLANG = array( 'BackgroundFilter' => 'Käivita filter taustal', 'BadAlarmFrameCount' => 'Alarmi kaadri hulga ühik peab olema integer. Kas üks või rohkem', 'BadAlarmMaxFPS' => 'Alarmi maksimaalne FPS peab olema positiivne integer või floating point väärtus', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Kanal peab olema integer, null või rohkem', 'BadColours' => 'Sihtmärgi värv peab olema pandud õige väärtus', // Added - 2011-06-15 'BadDevice' => 'Seadmel peab olema õige väärtus', diff --git a/web/lang/fr_fr.php b/web/lang/fr_fr.php index afab7db14..6ccab784f 100644 --- a/web/lang/fr_fr.php +++ b/web/lang/fr_fr.php @@ -97,6 +97,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> '% fusion image référence en alarme', // Added - 2015-04-18 'Alert' => 'Alerte', 'All' => 'Tous', + 'AnalysisInterval' => 'Interv. d\'analyse (nb images)', // Added - 2015-07-21 'Apply' => 'Appliquer', 'ApplyingStateChange' => 'Appl. chgt état', 'ArchArchived' => 'Archivé seul.', @@ -133,6 +134,7 @@ $SLANG = array( 'BackgroundFilter' => 'Lancer les filtres en arrière-plan', 'BadAlarmFrameCount' => 'Le nombre d\'images en alarme doit être un entier supérieur ou égal à 1', 'BadAlarmMaxFPS' => 'Le nombre maximum d\'i/s en alarme doit être un entier ou un nombre à virgule flottante supérieur à 0', + 'BadAnalysisInterval' => 'Le nombre d\'images pour l\'intervalle d\'analyse doit être un entier supérieur ou égal à 1 et doit rester inférieur à la taille du tampon d\'images', // Added - 2015-07-21 'BadChannel' => 'Le canal doit être un nombre entier supérieur ou égal à 0', 'BadColours' => 'La valeur de la couleur cible est invalide', // Added - 2011-06-15 'BadDevice' => 'Le chemin de l\'équipement être défini', diff --git a/web/lang/he_il.php b/web/lang/he_il.php index b7e89858c..c0aa1b37a 100644 --- a/web/lang/he_il.php +++ b/web/lang/he_il.php @@ -91,6 +91,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => '', 'All' => '', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => '', 'ApplyingStateChange' => ' ', 'ArchArchived' => ' ', @@ -127,6 +128,7 @@ $SLANG = array( 'BackgroundFilter' => ' ', 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Channel must be set to an integer of zero or more', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Device must be set to a valid value', diff --git a/web/lang/hu_hu.php b/web/lang/hu_hu.php index 6c97fa150..d749b9315 100644 --- a/web/lang/hu_hu.php +++ b/web/lang/hu_hu.php @@ -134,6 +134,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Figyelem', 'All' => 'Mind', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Alkalmaz', 'ApplyingStateChange' => 'Állapot váltása...', 'ArchArchived' => 'Csak archivált', @@ -170,6 +171,7 @@ $SLANG = array( 'BackgroundFilter' => 'Szűrő automatikus futtatása a háttérben', 'BadAlarmFrameCount' => 'Riasztáshoz szükséges képkockák száma legyen legalább 1', 'BadAlarmMaxFPS' => 'Maximális FPS riasztott állapotban legyen megadva', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'A csatorna száma legyen legalább 0', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2015-04-18 'BadDevice' => 'Az eszköz elérése valós legyen', diff --git a/web/lang/it_it.php b/web/lang/it_it.php index b367da15a..eda873089 100644 --- a/web/lang/it_it.php +++ b/web/lang/it_it.php @@ -96,6 +96,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Attenzione', 'All' => 'Tutto', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Applica', 'ApplyingStateChange' => 'Sto applicando le modifiche', 'ArchArchived' => 'Archiviato', @@ -132,6 +133,7 @@ $SLANG = array( 'BackgroundFilter' => 'Esegui filtro in background', 'BadAlarmFrameCount' => 'Il numero di frame di un allarme deve essere un numero intero superiore a uno', 'BadAlarmMaxFPS' => 'Il numero massimo di FPS dell\'allarme deve essere un numero intero positivo o un valore in virgola mobile', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Il canale deve essere settato con un numero intero uguale o maggiore di zero', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Il dispositivo deve essere impostato con un valore valido', diff --git a/web/lang/ja_jp.php b/web/lang/ja_jp.php index 9f0134f0a..e89f72fdf 100644 --- a/web/lang/ja_jp.php +++ b/web/lang/ja_jp.php @@ -91,6 +91,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'x', 'All' => 'S', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Kp', 'ApplyingStateChange' => 'ύXKp', 'ArchArchived' => 'ۑ̂', @@ -127,6 +128,7 @@ $SLANG = array( 'BackgroundFilter' => 'Run filter in background', 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Channel must be set to an integer of zero or more', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Device must be set to a valid value', diff --git a/web/lang/nl_nl.php b/web/lang/nl_nl.php index 298521b6a..706552bfb 100644 --- a/web/lang/nl_nl.php +++ b/web/lang/nl_nl.php @@ -91,6 +91,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Waarschuwing', 'All' => 'Alle', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Voer uit', 'ApplyingStateChange' => 'Status verandering aan het uitvoeren', 'ArchArchived' => 'Alleen gearchiveerd', @@ -127,6 +128,7 @@ $SLANG = array( 'BackgroundFilter' => 'Run filter in achtergrond', 'BadAlarmFrameCount' => 'Alarm frame moet een getal zijn van 1 of meer', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS moet een positiev getal zijn of een floating point waarde', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Kanaal moet een getal zijn van 1 of meer', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2015-04-18 'BadDevice' => 'Apparaat moet een bestaande waarde krijgen', diff --git a/web/lang/pl_pl.php b/web/lang/pl_pl.php index 71c4bbac6..4faad9321 100644 --- a/web/lang/pl_pl.php +++ b/web/lang/pl_pl.php @@ -91,6 +91,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Gotowosc', 'All' => 'Wszystko', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Zastosuj', 'ApplyingStateChange' => 'Zmieniam stan pracy', 'ArchArchived' => 'Tylko zarchiwizowane', @@ -127,6 +128,7 @@ $SLANG = array( 'BackgroundFilter' => 'Run filter in background', 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Channel must be set to an integer of zero or more', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Device must be set to a valid value', diff --git a/web/lang/pt_br.php b/web/lang/pt_br.php index d079db359..35d5327a0 100644 --- a/web/lang/pt_br.php +++ b/web/lang/pt_br.php @@ -31,6 +31,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Alerta', 'All' => 'Tudo', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Aplicar', 'ApplyingStateChange' => 'Aplicando mudana de estado', 'ArchArchived' => 'Somente Arquivados', @@ -67,6 +68,7 @@ $SLANG = array( 'BackgroundFilter' => 'Run filter in background', 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Channel must be set to an integer of zero or more', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Device must be set to a valid value', diff --git a/web/lang/ro_ro.php b/web/lang/ro_ro.php index 1b1bcb6dc..5f1b30470 100644 --- a/web/lang/ro_ro.php +++ b/web/lang/ro_ro.php @@ -62,6 +62,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Alert', 'All' => 'Toate', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Accept', 'ApplyingStateChange' => 'Aplic schimbarea de stare', 'ArchArchived' => 'Numai arhivate', @@ -98,6 +99,7 @@ $SLANG = array( 'BackgroundFilter' => 'Run filter in background', 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Channel must be set to an integer of zero or more', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Device must be set to a valid value', diff --git a/web/lang/ru_ru.php b/web/lang/ru_ru.php index 7c98e4f48..be99ec7c9 100644 --- a/web/lang/ru_ru.php +++ b/web/lang/ru_ru.php @@ -91,6 +91,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => '', 'All' => '', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => '', 'ApplyingStateChange' => ' ', 'ArchArchived' => ' ', @@ -127,6 +128,7 @@ $SLANG = array( 'BackgroundFilter' => 'Run filter in background', 'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Channel must be set to an integer of zero or more', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Device must be set to a valid value', diff --git a/web/lang/se_se.php b/web/lang/se_se.php index ca4f05254..9218ec95f 100644 --- a/web/lang/se_se.php +++ b/web/lang/se_se.php @@ -92,6 +92,7 @@ $SLANG = array( 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'Alert' => 'Varning', 'All' => 'Alla', + 'AnalysisInterval' => 'Analysis Interval', // Added - 2015-07-21 'Apply' => 'Lgg till', 'ApplyingStateChange' => 'Aktivera statusndring', 'ArchArchived' => 'Arkivera endast', @@ -128,6 +129,7 @@ $SLANG = array( 'BackgroundFilter' => 'Kr filter i bakgrunden', 'BadAlarmFrameCount' => 'Ramantalet fr larm mste vara ett heltal, minsta vrdet r 1', 'BadAlarmMaxFPS' => 'Larm fr bilder/s mste vara ett positivt heltal eller ett flyttal', + 'BadAnalysisInterval' => 'Analysis interval image count must be an integer of 1 or more, and less than image buffer size', // Added - 2015-07-21 'BadChannel' => 'Kanalen mste vara ett heltal, noll eller hgre', 'BadColours' => 'Target colour must be set to a valid value', // Added - 2011-06-15 'BadDevice' => 'Enheten mste sttas till ett giltigt vrde', diff --git a/web/skins/classic/views/js/monitor.js.php b/web/skins/classic/views/js/monitor.js.php index 2d017129b..1b8b3b426 100644 --- a/web/skins/classic/views/js/monitor.js.php +++ b/web/skins/classic/views/js/monitor.js.php @@ -121,6 +121,8 @@ function validateForm( form ) errors[errors.length] = ""; if ( !form.elements['newMonitor[FPSReportInterval]'].value || !(parseInt(form.elements['newMonitor[FPSReportInterval]'].value) >= 0 ) ) errors[errors.length] = ""; + if ( !form.elements['newMonitor[AnalysisInterval]'].value || !(parseInt(form.elements['newMonitor[AnalysisInterval]'].value) >= 1 ) || (parseInt(form.elements['newMonitor[AnalysisInterval]'].value) > parseInt(form.elements['newMonitor[ImageBufferCount]'].value)) ) + errors[errors.length] = ""; if ( !form.elements['newMonitor[FrameSkip]'].value || !(parseInt(form.elements['newMonitor[FrameSkip]'].value) >= 0 ) ) errors[errors.length] = ""; if ( !form.elements['newMonitor[MotionFrameSkip]'].value || !(parseInt(form.elements['newMonitor[MotionFrameSkip]'].value) >= 0 ) ) diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index 7140138ba..a0bcadb3c 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -103,6 +103,7 @@ if ( ! empty($_REQUEST['mid']) ) { 'MaxFPS' => "", 'AlarmMaxFPS' => "", 'FPSReportInterval' => 1000, + 'AnalysisInterval' => 1, 'RefBlendPerc' => 6, 'AlarmRefBlendPerc' => 6, 'DefaultView' => 'Events', @@ -598,6 +599,7 @@ if ( $tab != 'misc' ) + @@ -868,6 +870,7 @@ switch ( $tab ) + + "/> - @@ -665,6 +665,7 @@ switch ( $tab ) + - + @@ -871,6 +873,7 @@ switch ( $tab ) +