diff --git a/db/Makefile.am b/db/Makefile.am index cf98c561e..9a3fbb180 100644 --- a/db/Makefile.am +++ b/db/Makefile.am @@ -28,4 +28,5 @@ EXTRA_DIST = \ zmalter-1.21.0.sql \ zmalter-1.21.1.sql \ zmalter-1.21.2.sql \ - zmalter-1.21.3.sql + zmalter-1.21.3.sql \ + zmalter-1.21.4.sql diff --git a/db/zmalter-1.21.4.sql b/db/zmalter-1.21.4.sql new file mode 100644 index 000000000..5a70eae2a --- /dev/null +++ b/db/zmalter-1.21.4.sql @@ -0,0 +1,14 @@ +-- +-- This updates a 1.21.3 database to 1.21.4 +-- +alter table Monitors add column DefaultRate smallint unsigned not null default 100 after ReturnDelay; +alter table Monitors modify column DefaultRate smallint unsigned not null default 100; +-- +-- These are optional, but we might as well do it now +-- +optimize table Frames; +optimize table Events; +optimize table Filters; +optimize table Zones; +optimize table Monitors; +optimize table Stats; diff --git a/db/zmschema.sql.z b/db/zmschema.sql.z index e3956054b..f2f95ffb8 100644 --- a/db/zmschema.sql.z +++ b/db/zmschema.sql.z @@ -265,6 +265,7 @@ CREATE TABLE Monitors ( TrackDelay smallint(5) unsigned NOT NULL default '0', ReturnLocation tinyint(3) NOT NULL default '-1', ReturnDelay smallint(5) unsigned NOT NULL default '0', + DefaultRate smallint(5) unsigned NOT NULL default '100', DefaultScale smallint(5) unsigned NOT NULL default '100', WebColour varchar(32) NOT NULL default 'red', Sequence smallint(5) unsigned default NULL, diff --git a/web/zm_config.php.z b/web/zm_config.php.z index 30d3f667c..ab6a4afa8 100644 --- a/web/zm_config.php.z +++ b/web/zm_config.php.z @@ -122,8 +122,7 @@ switch ( $bandwidth ) } case "mobile" : // Very incomplete at present { - define( "ZM_WEB_REFRESH_MAIN", ZM_WEB_P_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes - define( "ZM_WEB_REFRESH_IMAGE", ZM_WEB_P_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming) + define( "ZM_WEB_DEFAULT_RATE", ZM_WEB_P_DEFAULT_RATE ); // What the default replay rate factor applied to 'event' views is (%) break; } } diff --git a/web/zm_html_view_event.php b/web/zm_html_view_event.php index a4bb61b5d..29450288b 100644 --- a/web/zm_html_view_event.php +++ b/web/zm_html_view_event.php @@ -40,7 +40,7 @@ else $mid_sql = ''; } -$sql = "select E.*,M.Name as MonitorName,M.Width,M.Height,M.DefaultScale from Events as E inner join Monitors as M on E.MonitorId = M.Id where E.Id = '$eid'$mid_sql"; +$sql = "select E.*,M.Name as MonitorName,M.Width,M.Height,M.DefaultRate,M.DefaultScale from Events as E inner join Monitors as M on E.MonitorId = M.Id where E.Id = '$eid'$mid_sql"; $result = mysql_query( $sql ); if ( !$result ) die( mysql_error() ); @@ -76,7 +76,7 @@ while ( $row = mysql_fetch_assoc( $result ) ) } if ( !isset( $rate ) ) - $rate = ZM_WEB_DEFAULT_RATE; + $rate = reScale( RATE_SCALE, $event['DefaultRate'], ZM_WEB_DEFAULT_RATE ); if ( !isset( $scale ) ) $scale = reScale( SCALE_SCALE, $event['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); diff --git a/web/zm_html_view_monitor.php b/web/zm_html_view_monitor.php index d4c39ebce..02fa56666 100644 --- a/web/zm_html_view_monitor.php +++ b/web/zm_html_view_monitor.php @@ -95,6 +95,7 @@ else $monitor['MaxFPS'] = 0; $monitor['FPSReportInterval'] = 1000; $monitor['RefBlendPerc'] = 10; + $monitor['DefaultRate'] = '100'; $monitor['DefaultScale'] = '100'; $monitor['WebColour'] = 'red'; $monitor['Triggers'] = ""; @@ -328,6 +329,7 @@ if ( $tab != 'misc' ) + +        'lowband', }, { - name => "ZM_WEB_P_REFRESH_MAIN", - default => "300", - description => "How often (in seconds) the main console window should refresh itself", - introduction => "The next few options control what happens when the WAP client is being accessed over a mobile phone link. You should set these options for when accessing the ZoneMinder WAP client over a mobile dialup or GPRS link. In most cases the default values will be suitable as a starting point.", - help => "The main console window lists a general status and the event totals for all monitors. This is not a trivial task and should not be repeated too frequently or it may affect the performance of the rest of the system.", - type => $types{integer}, - category => 'phoneband', - }, - { - name => "ZM_WEB_P_REFRESH_IMAGE", - default => "30", - description => "How often (in seconds) the watched image is refreshed", - help => "The live images from a monitor are viewed as a sequence of still images. This option determines how the image is refreshed. Though the images are small setting this at too frequent a value may rapidly consume a lot of bandwidth resource.", + name => "ZM_WEB_P_DEFAULT_RATE", + default => "100", + description => "What the default replay rate factor applied to 'event' views is (%)", + help => "Normally ZoneMinder will display 'event' streams at their native rate, i.e. as close to real-time as possible. However if you have long events it is often convenient to replay them at a faster rate for review. This option lets you specify what the default replay rate will be. It is expressed as a percentage so 100 is normal rate, 200 is double speed etc.", type => $types{integer}, category => 'phoneband', },