Merge remote-tracking branch 'Sune1337/motion/FrameSkip'

Conflicts:
	db/zm_update-1.27.1.sql
	web/lang/nl_nl.php
pull/406/head
Kfir Itzhak 2014-04-22 20:13:11 +03:00
commit 3cee6a133d
29 changed files with 102 additions and 13 deletions

View File

@ -353,6 +353,7 @@ CREATE TABLE `Monitors` (
`AlarmFrameCount` smallint(5) unsigned NOT NULL default '1',
`SectionLength` int(10) unsigned NOT NULL default '600',
`FrameSkip` smallint(5) unsigned NOT NULL default '0',
`MotionFrameSkip` smallint(5) unsigned NOT NULL default '0',
`MaxFPS` decimal(5,2) default NULL,
`AlarmMaxFPS` decimal(5,2) default NULL,
`FPSReportInterval` smallint(5) unsigned NOT NULL default '250',

View File

@ -138,3 +138,20 @@ SET @s = (SELECT IF(
PREPARE stmt FROM @s;
EXECUTE stmt;
--
-- Add MotionSkipFrame field for controlling how many frames motion detection should skip.
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Monitors'
AND table_schema = DATABASE()
AND column_name = 'MotionFrameSkip'
) > 0,
"SELECT 1",
"ALTER TABLE `Monitors` ADD `MotionFrameSkip` smallint(5) unsigned NOT NULL default '0' AFTER `FrameSkip`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;

View File

@ -291,6 +291,7 @@ Monitor::Monitor(
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,
@ -316,6 +317,7 @@ Monitor::Monitor(
stream_replay_buffer( p_stream_replay_buffer ),
section_length( p_section_length ),
frame_skip( p_frame_skip ),
motion_frame_skip( p_motion_frame_skip ),
capture_delay( p_capture_delay ),
alarm_capture_delay( p_alarm_capture_delay ),
alarm_frame_count( p_alarm_frame_count ),
@ -327,6 +329,7 @@ Monitor::Monitor(
delta_image( width, height, ZM_COLOUR_GRAY8, ZM_SUBPIX_ORDER_NONE ),
ref_image( width, height, p_camera->Colours(), p_camera->SubpixelOrder() ),
purpose( p_purpose ),
last_motion_score(0),
camera( p_camera ),
n_zones( p_n_zones ),
zones( p_zones )
@ -1308,7 +1311,12 @@ bool Monitor::Analyse()
else if ( signal && Active() && (function == MODECT || function == MOCORD) )
{
Event::StringSet zoneSet;
int motion_score = DetectMotion( *snap_image, zoneSet );
int motion_score = last_motion_score;
if ( !(image_count % (motion_frame_skip+1) ) )
{
// Get new score.
motion_score = last_motion_score = DetectMotion( *snap_image, zoneSet );
}
//int motion_score = DetectBlack( *snap_image, zoneSet );
if ( motion_score )
{
@ -1642,7 +1650,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, 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, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = '%d'", id );
if ( mysql_query( &dbconn, sql ) )
{
@ -1678,6 +1686,7 @@ void Monitor::Reload()
alarm_frame_count = atoi(dbrow[index++]);
section_length = atoi(dbrow[index++]);
frame_skip = atoi(dbrow[index++]);
motion_frame_skip = atoi(dbrow[index++]);
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++]);
@ -1833,11 +1842,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, Method, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, 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, 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) );
}
else
{
snprintf( sql, sizeof(sql), "select Id, Name, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, Method, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, 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, 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 );
}
if ( mysql_query( &dbconn, sql ) )
{
@ -1895,6 +1904,7 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose
int alarm_frame_count = atoi(dbrow[col]); col++;
int section_length = atoi(dbrow[col]); col++;
int frame_skip = atoi(dbrow[col]); col++;
int motion_frame_skip = atoi(dbrow[col]); col++;
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++;
@ -1952,6 +1962,7 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose
alarm_frame_count,
section_length,
frame_skip,
motion_frame_skip,
capture_delay,
alarm_capture_delay,
fps_report_interval,
@ -1985,11 +1996,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, 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, 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, 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, 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 ) )
{
@ -2048,6 +2059,7 @@ int Monitor::LoadRemoteMonitors( const char *protocol, const char *host, const c
int alarm_frame_count = atoi(dbrow[col]); col++;
int section_length = atoi(dbrow[col]); col++;
int frame_skip = atoi(dbrow[col]); col++;
int motion_frame_skip = atoi(dbrow[col]); col++;
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++;
@ -2123,6 +2135,7 @@ int Monitor::LoadRemoteMonitors( const char *protocol, const char *host, const c
alarm_frame_count,
section_length,
frame_skip,
motion_frame_skip,
capture_delay,
alarm_capture_delay,
fps_report_interval,
@ -2156,11 +2169,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, 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, 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, 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, RefBlendPerc, AlarmRefBlendPerc, TrackMotion from Monitors where Function != 'None' and Type = 'File' and Path = '%s'", file );
}
if ( mysql_query( &dbconn, sql ) )
{
@ -2215,6 +2228,7 @@ int Monitor::LoadFileMonitors( const char *file, Monitor **&monitors, Purpose pu
int alarm_frame_count = atoi(dbrow[col]); col++;
int section_length = atoi(dbrow[col]); col++;
int frame_skip = atoi(dbrow[col]); col++;
int motion_frame_skip = atoi(dbrow[col]); col++;
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++;
@ -2258,6 +2272,7 @@ int Monitor::LoadFileMonitors( const char *file, Monitor **&monitors, Purpose pu
alarm_frame_count,
section_length,
frame_skip,
motion_frame_skip,
capture_delay,
alarm_capture_delay,
fps_report_interval,
@ -2268,7 +2283,6 @@ int Monitor::LoadFileMonitors( const char *file, Monitor **&monitors, Purpose pu
purpose,
0,
0
);
Zone **zones = 0;
int n_zones = Zone::Load( monitors[i], zones );
@ -2292,11 +2306,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, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, 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, 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) );
}
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, 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, 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 );
}
if ( mysql_query( &dbconn, sql ) )
{
@ -2351,6 +2365,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose
int alarm_frame_count = atoi(dbrow[col]); col++;
int section_length = atoi(dbrow[col]); col++;
int frame_skip = atoi(dbrow[col]); col++;
int motion_frame_skip = atoi(dbrow[col]); col++;
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++;
@ -2394,6 +2409,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose
alarm_frame_count,
section_length,
frame_skip,
motion_frame_skip,
capture_delay,
alarm_capture_delay,
fps_report_interval,
@ -2425,7 +2441,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, Protocol, Method, Host, Port, Path, 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, 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, Protocol, Method, Host, Port, Path, 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 );
if ( mysql_query( &dbconn, sql ) )
{
Error( "Can't run query: %s", mysql_error( &dbconn ) );
@ -2489,6 +2505,7 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose )
int alarm_frame_count = atoi(dbrow[col]); col++;
int section_length = atoi(dbrow[col]); col++;
int frame_skip = atoi(dbrow[col]); col++;
int motion_frame_skip = atoi(dbrow[col]); col++;
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++;
@ -2677,6 +2694,7 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose )
alarm_frame_count,
section_length,
frame_skip,
motion_frame_skip,
capture_delay,
alarm_capture_delay,
fps_report_interval,

View File

@ -230,6 +230,7 @@ protected:
int stream_replay_buffer; // How many frames to store to support DVR functions, IGNORED from this object, passed directly into zms now
int section_length; // How long events should last in continuous modes
int frame_skip; // How many frames to skip in continuous modes
int motion_frame_skip; // How many frames to skip in motion detection
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
int alarm_frame_count; // How many alarm frames are required before an event is triggered
@ -255,6 +256,7 @@ protected:
time_t start_time;
time_t last_fps_time;
time_t auto_resume_time;
unsigned int last_motion_score;
EventCloseMode event_close_mode;
@ -288,7 +290,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_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_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[] );

View File

@ -51,6 +51,7 @@ $statusData = array(
"AlarmFrameCount" => true,
"SectionLength" => true,
"FrameSkip" => true,
"MotionFrameSkip" => true,
"MaxFPS" => true,
"AlarmMaxFPS" => true,
"FPSReportInterval" => true,

View File

@ -136,6 +136,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to an integer of zero or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -338,6 +339,7 @@ $SLANG = array(
'FrameId' => '框架 Id',
'FrameRate' => '框架速率',
'FrameSkip' => '框架忽略',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => '框架',
'Func' => 'Func',
'Function' => '功能',

View File

@ -132,6 +132,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS帧数报告间隔缓冲数必须是0以上整数',
'BadFormat' => '格式必须设为大于零的整数',
'BadFrameSkip' => '跳帧数必须设为大于零的整数',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => '高度必须设为有效值',
'BadHost' => '主机必须设为有效IP地址或主机名不要包含 http://',
'BadImageBufferCount' => '图像缓冲器大小必须设为大于10的整数',
@ -334,6 +335,7 @@ $SLANG = array(
'FrameId' => '帧 Id',
'FrameRate' => '帧率',
'FrameSkip' => '跳帧',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => '帧',
'Func' => '功能',
'Function' => '功能',

View File

@ -132,6 +132,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to an integer of zero or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -334,6 +335,7 @@ $SLANG = array(
'FrameId' => 'Snímek Id',
'FrameRate' => 'Rychlost snímkù',
'FrameSkip' => 'Vynechat snímek',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Snímky',
'Func' => 'Funkce',
'Function' => 'Funkce',

View File

@ -132,6 +132,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'Der FPS-Intervall-Puffer-Zähler muss ganzzahlig 0 oder größer sein',
'BadFormat' => 'Das Format muss ganzzahlig 0 oder größer sein',
'BadFrameSkip' => 'Der Auslasszähler für Frames muss ganzzahlig 0 oder größer sein',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Die Höhe muss auf einen gültigen Wert eingestellt sein',
'BadHost' => 'Der Host muss auf eine gültige IP-Adresse oder einen Hostnamen (ohne http://) eingestellt sein',
'BadImageBufferCount' => 'Die Größe des Bildpuffers muss ganzzahlig 10 oder größer sein',
@ -334,6 +335,7 @@ $SLANG = array(
'FrameId' => 'Bild-ID',
'FrameRate' => 'Abspielgeschwindigkeit',
'FrameSkip' => 'Bilder auslassen',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Bilder',
'Func' => 'Fkt.',
'Function' => 'Funktion',

View File

@ -133,6 +133,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to an integer of zero or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -335,6 +336,7 @@ $SLANG = array(
'FrameId' => 'Billede Id',
'FrameRate' => 'Billede Rate',
'FrameSkip' => 'Billede Skip',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Billede',
'Func' => 'Func',
'Function' => 'Funktion',

View File

@ -141,6 +141,7 @@ $SLANG = array(
'BadFormat' => 'Format must be set to a valid value',
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -341,6 +342,7 @@ $SLANG = array(
'FrameRate' => 'Frame Rate',
'Frames' => 'Frames',
'FrameSkip' => 'Frame Skip',
'MotionFrameSkip' => 'Motion Frame Skip',
'FTP' => 'FTP',
'Func' => 'Func',
'Function' => 'Function',

View File

@ -83,6 +83,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to an integer of zero or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -285,6 +286,7 @@ $SLANG = array(
'FrameId' => 'Id Cuadro',
'FrameRate' => 'Velocidad del video',
'FrameSkip' => 'Saltear Cuadro',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Cuadros',
'Func' => 'Func',
'Function' => 'Función',

View File

@ -130,6 +130,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'El registro de intervalo de recuento búfer de MPS debe ser un entero de 100 o más',
'BadFormat' => 'El formato debe tener un valor válido',
'BadFrameSkip' => 'El número de omisión de marcos debe ser un entero de cero o más',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'La altura debe tener un valor válido',
'BadHost' => 'El host debe tener una dirección ip o nombre de host válidos, no incluir http://',
'BadImageBufferCount' => 'El tamaño de búfer de imagen debe serun entero de 10 o más',
@ -331,6 +332,7 @@ $SLANG = array(
'FrameId' => 'Id del marco',
'FrameRate' => 'Ratío del marco',
'FrameSkip' => 'Omisión de marcos',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Marcos',
'Func' => 'Func',
'Function' => 'Función',

View File

@ -128,6 +128,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to a valid value',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -329,6 +330,7 @@ $SLANG = array(
'FrameId' => 'Frame Id',
'FrameRate' => 'Frame Rate',
'FrameSkip' => 'Frame Skip',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Kaadrid',
'Func' => 'Func',
'Function' => 'Funktsioon',

View File

@ -132,6 +132,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to an integer of zero or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -334,6 +335,7 @@ $SLANG = array(
'FrameId' => 'N° image',
'FrameRate' => 'Débit image',
'FrameSkip' => 'Saut image',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'images',
'Func' => 'Fct',
'Function' => 'Fonction',

View File

@ -132,6 +132,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to an integer of zero or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -334,6 +335,7 @@ $SLANG = array(
'FrameId' => 'Frame Id',
'FrameRate' => 'Frame Rate',
'FrameSkip' => 'ãìâ ôøééí',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'ôøééîéí',
'Func' => 'ôåð÷',
'Function' => 'ôåð÷öéä',

View File

@ -173,6 +173,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'Az FPS naplózásának gyakorisága legyen legalább 0',
'BadFormat' => 'A típus 0 vagy nagyobb egész szám legyen',
'BadFrameSkip' => 'Az eldobott képkockák száma legyen legalább 0',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'A képmagasság legyen érvényes érték képpontban megadva',
'BadHost' => 'A hoszt legyen valós IP cím vagy hosztnév http:// nélkül',
'BadImageBufferCount' => 'A képkockák száma a pufferben legyen legalább 10',
@ -374,6 +375,7 @@ $SLANG = array(
'FrameId' => 'Képkocka azonosító',
'FrameRate' => 'FPS',
'FrameSkip' => 'Képkocka kihagyás',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Képkocka',
'Func' => 'Funk.',
'Function' => 'Funkció',

View File

@ -137,6 +137,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'L\'intervallo di FPS per i report deve essere un numero intero superiore a 0',
'BadFormat' => 'Il formato deve essere impostato con un numero intero come 0 o maggiore',
'BadFrameSkip' => 'Il numero di Frame da scartare deve essere un intero uguale a 0 o superiore',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'L\'altezza deve essere impostata con un valore valido',
'BadHost' => 'L\'host deve essere impostato con un indirizzo ip valido o con un hostname, non includendo http://',
'BadImageBufferCount' => 'La dimensione del buffer dell\'immagine deve essere impostata con un numero intero pari a 10 o maggiore',
@ -339,6 +340,7 @@ $SLANG = array(
'FrameId' => 'Id Immagine',
'FrameRate' => 'Immagini al secondo',
'FrameSkip' => 'Immagini saltate',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Immagini',
'Func' => 'Funz',
'Function' => 'Funzione',

View File

@ -132,6 +132,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to an integer of zero or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -334,6 +335,7 @@ $SLANG = array(
'FrameId' => 'ÌÚ°Ñ ID',
'FrameRate' => 'ÌÚ°ÑÚ°Ä',
'FrameSkip' => 'Ìڰѽ·¯Ìß',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'ÌÚ°Ñ',
'Func' => '@”\\',
'Function' => '@”\\',

View File

@ -130,6 +130,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS rapport interval buffer en aantal moet een nummer groter dan nul zijn',
'BadFormat' => 'Formaat moet een nummer nul of groter zijn',
'BadFrameSkip' => 'Frame skip aantal moet een nummer nul of groter zijn',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Hoogte moet een geldige waarde zijn',
'BadHost' => 'Host moet een juiste address or hostname zijn, laat http:// weg ',
'BadImageBufferCount' => 'Foto buffer groote moet een nummer 10 of groter zijn',
@ -331,6 +332,7 @@ $SLANG = array(
'FrameId' => 'Frame id',
'FrameRate' => 'Frame rate',
'FrameSkip' => 'Frame overgeslagen',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Frames',
'Func' => 'Func',
'Function' => 'Functie',

View File

@ -132,6 +132,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to an integer of zero or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -334,6 +335,7 @@ $SLANG = array(
'FrameId' => 'Nr ramki',
'FrameRate' => 'Tempo ramek',
'FrameSkip' => 'Pomiñ ramkê',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Ramek',
'Func' => 'Funkcja',
'Function' => 'Funkcja',

View File

@ -72,6 +72,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to an integer of zero or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -274,6 +275,7 @@ $SLANG = array(
'FrameId' => 'Id de Imagem',
'FrameRate' => 'Velocidade de Imagem',
'FrameSkip' => 'Salto de Imagem',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Imagens',
'Func' => 'Func',
'Function' => 'Função',

View File

@ -103,6 +103,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to an integer of zero or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -305,6 +306,7 @@ $SLANG = array(
'FrameId' => 'Nr. cadru',
'FrameRate' => 'Frecv. cadre',
'FrameSkip' => 'Omite cadre',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Cadre',
'Func' => 'Func',
'Function' => 'Funcţie',

View File

@ -132,6 +132,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
'BadFormat' => 'Format must be set to an integer of zero or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
@ -334,6 +335,7 @@ $SLANG = array(
'FrameId' => 'Id ËÁÄÒÁ',
'FrameRate' => 'óËÏÒÏÓÔØ',
'FrameSkip' => 'ðÒÏÐÕÓËÁÔØ ËÁÄÒÙ',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'ËÁÄÒÙ',
'Func' => 'æÕÎË.',
'Function' => 'æÕÎËÃÉÑ',

View File

@ -133,6 +133,7 @@ $SLANG = array(
'BadFPSReportInterval' => 'Buffern för ramintervallrapporten måste vara ett heltal på minst 0 eller högre',
'BadFormat' => 'Formatet måste vara ett heltal, noll eller högre',
'BadFrameSkip' => 'Värdet för ramöverhopp måste vara ett heltal på 0 eller högre',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Höjden måste sättas till ett giltigt värde',
'BadHost' => 'Detta fält ska innehålla en giltig ip-adress eller värdnamn, inkludera inte http://',
'BadImageBufferCount' => 'Bufferstorleken för avbilden måste vara ett heltal på minst 10 eller högre',
@ -335,6 +336,7 @@ $SLANG = array(
'FrameId' => 'Ram id',
'FrameRate' => 'Ram hastighet',
'FrameSkip' => 'Hoppa över ram',
'MotionFrameSkip' => 'Motion Frame Skip',
'Frames' => 'Ramar',
'Func' => 'Funk',
'Function' => 'Funktion',

View File

@ -123,6 +123,8 @@ function validateForm( form )
errors[errors.length] = "<?= $SLANG['BadFPSReportInterval'] ?>";
if ( !form.elements['newMonitor[FrameSkip]'].value || !(parseInt(form.elements['newMonitor[FrameSkip]'].value) >= 0 ) )
errors[errors.length] = "<?= $SLANG['BadFrameSkip'] ?>";
if ( !form.elements['newMonitor[MotionFrameSkip]'].value || !(parseInt(form.elements['newMonitor[MotionFrameSkip]'].value) >= 0 ) )
errors[errors.length] = "<?= $SLANG['BadMotionFrameSkip'] ?>";
if ( form.elements['newMonitor[Type]'].value == 'Local' )
if ( !form.elements['newMonitor[SignalCheckColour]'].value || !form.elements['newMonitor[SignalCheckColour]'].value.match( /^[#0-9a-zA-Z]+$/ ) )
errors[errors.length] = "<?= $SLANG['BadSignalCheckColour'] ?>";

View File

@ -93,6 +93,7 @@ else
'ReturnDelay' => "",
'SectionLength' => 600,
'FrameSkip' => 0,
'MotionFrameSkip' => 0,
'EventPrefix' => 'Event-',
'MaxFPS' => "",
'AlarmMaxFPS' => "",
@ -570,6 +571,7 @@ if ( $tab != 'misc' )
<input type="hidden" name="newMonitor[EventPrefix]" value="<?= validHtmlStr($newMonitor['EventPrefix']) ?>"/>
<input type="hidden" name="newMonitor[SectionLength]" value="<?= validHtmlStr($newMonitor['SectionLength']) ?>"/>
<input type="hidden" name="newMonitor[FrameSkip]" value="<?= validHtmlStr($newMonitor['FrameSkip']) ?>"/>
<input type="hidden" name="newMonitor[MotionFrameSkip]" value="<?= validHtmlStr($newMonitor['MotionFrameSkip']) ?>"/>
<input type="hidden" name="newMonitor[FPSReportInterval]" value="<?= validHtmlStr($newMonitor['FPSReportInterval']) ?>"/>
<input type="hidden" name="newMonitor[DefaultView]" value="<?= validHtmlStr($newMonitor['DefaultView']) ?>"/>
<input type="hidden" name="newMonitor[DefaultRate]" value="<?= validHtmlStr($newMonitor['DefaultRate']) ?>"/>
@ -813,6 +815,7 @@ switch ( $tab )
<tr><td><?= $SLANG['EventPrefix'] ?></td><td><input type="text" name="newMonitor[EventPrefix]" value="<?= validHtmlStr($newMonitor['EventPrefix']) ?>" size="24"/></td></tr>
<tr><td><?= $SLANG['Sectionlength'] ?></td><td><input type="text" name="newMonitor[SectionLength]" value="<?= validHtmlStr($newMonitor['SectionLength']) ?>" size="6"/></td></tr>
<tr><td><?= $SLANG['FrameSkip'] ?></td><td><input type="text" name="newMonitor[FrameSkip]" value="<?= validHtmlStr($newMonitor['FrameSkip']) ?>" size="6"/></td></tr>
<tr><td><?= $SLANG['MotionFrameSkip'] ?></td><td><input type="text" name="newMonitor[MotionFrameSkip]" value="<?= validHtmlStr($newMonitor['MotionFrameSkip']) ?>" size="6"/></td></tr>
<tr><td><?= $SLANG['FPSReportInterval'] ?></td><td><input type="text" name="newMonitor[FPSReportInterval]" value="<?= validHtmlStr($newMonitor['FPSReportInterval']) ?>" size="6"/></td></tr>
<tr><td><?= $SLANG['DefaultView'] ?></td><td><select name="newMonitor[DefaultView]">
<?php

View File

@ -123,6 +123,8 @@ function validateForm( form )
errors[errors.length] = "<?= $SLANG['BadFPSReportInterval'] ?>";
if ( !form.elements['newMonitor[FrameSkip]'].value || !(parseInt(form.elements['newMonitor[FrameSkip]'].value) >= 0 ) )
errors[errors.length] = "<?= $SLANG['BadFrameSkip'] ?>";
if ( !form.elements['newMonitor[MotionFrameSkip]'].value || !(parseInt(form.elements['newMonitor[MotionFrameSkip]'].value) >= 0 ) )
errors[errors.length] = "<?= $SLANG['BadMotionFrameSkip'] ?>";
if ( form.elements['newMonitor[Type]'].value == 'Local' )
if ( !form.elements['newMonitor[SignalCheckColour]'].value || !form.elements['newMonitor[SignalCheckColour]'].value.match( /^[#0-9a-zA-Z]+$/ ) )
errors[errors.length] = "<?= $SLANG['BadSignalCheckColour'] ?>";

View File

@ -93,6 +93,7 @@ else
'ReturnDelay' => "",
'SectionLength' => 600,
'FrameSkip' => 0,
'MotionFrameSkip' => 0,
'EventPrefix' => 'Event-',
'MaxFPS' => "",
'AlarmMaxFPS' => "",
@ -571,6 +572,7 @@ if ( $tab != 'misc' )
<input type="hidden" name="newMonitor[EventPrefix]" value="<?= validHtmlStr($newMonitor['EventPrefix']) ?>"/>
<input type="hidden" name="newMonitor[SectionLength]" value="<?= validHtmlStr($newMonitor['SectionLength']) ?>"/>
<input type="hidden" name="newMonitor[FrameSkip]" value="<?= validHtmlStr($newMonitor['FrameSkip']) ?>"/>
<input type="hidden" name="newMonitor[MotionFrameSkip]" value="<?= validHtmlStr($newMonitor['MotionFrameSkip']) ?>"/>
<input type="hidden" name="newMonitor[FPSReportInterval]" value="<?= validHtmlStr($newMonitor['FPSReportInterval']) ?>"/>
<input type="hidden" name="newMonitor[DefaultView]" value="<?= validHtmlStr($newMonitor['DefaultView']) ?>"/>
<input type="hidden" name="newMonitor[DefaultRate]" value="<?= validHtmlStr($newMonitor['DefaultRate']) ?>"/>
@ -814,6 +816,7 @@ switch ( $tab )
<tr><td><?= $SLANG['EventPrefix'] ?></td><td><input type="text" name="newMonitor[EventPrefix]" value="<?= validHtmlStr($newMonitor['EventPrefix']) ?>" size="24"/></td></tr>
<tr><td><?= $SLANG['Sectionlength'] ?></td><td><input type="text" name="newMonitor[SectionLength]" value="<?= validHtmlStr($newMonitor['SectionLength']) ?>" size="6"/></td></tr>
<tr><td><?= $SLANG['FrameSkip'] ?></td><td><input type="text" name="newMonitor[FrameSkip]" value="<?= validHtmlStr($newMonitor['FrameSkip']) ?>" size="6"/></td></tr>
<tr><td><?= $SLANG['MotionFrameSkip'] ?></td><td><input type="text" name="newMonitor[MotionFrameSkip]" value="<?= validHtmlStr($newMonitor['MotionFrameSkip']) ?>" size="6"/></td></tr>
<tr><td><?= $SLANG['FPSReportInterval'] ?></td><td><input type="text" name="newMonitor[FPSReportInterval]" value="<?= validHtmlStr($newMonitor['FPSReportInterval']) ?>" size="6"/></td></tr>
<tr><td><?= $SLANG['DefaultView'] ?></td><td><select name="newMonitor[DefaultView]">
<?php