From 17c193391368c4abb5c1322c021b3d9a25a9e9b1 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 26 Nov 2018 16:20:15 -0500 Subject: [PATCH 1/6] remove an extra l --- web/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/includes/functions.php b/web/includes/functions.php index 53ea7e199..207eba357 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -53,7 +53,7 @@ function CORSHeaders() { preg_match('/^(https?:\/\/)?'.preg_quote($Server->Name(),'/').'/i', $_SERVER['HTTP_ORIGIN']) ) { $valid = true; - Logger::Debug("Setting Access-Controll-Allow-Origin from " . $_SERVER['HTTP_ORIGIN']); + Logger::Debug("Setting Access-Control-Allow-Origin from " . $_SERVER['HTTP_ORIGIN']); header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']); header('Access-Control-Allow-Headers: x-requested-with,x-request'); break; From 251ccc0ba9db962da102020f179c66785cf3f7da Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 26 Nov 2018 16:20:52 -0500 Subject: [PATCH 2/6] remove extra () --- src/zm_monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 8ff0a0a64..9f2d92102 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -749,7 +749,7 @@ void Monitor::AddPrivacyBitmask( Zone *p_zones[] ) { } Monitor::State Monitor::GetState() const { - return( (State)shared_data->state ); + return (State)shared_data->state; } int Monitor::GetImage( int index, int scale ) { From 8404f0ef648a04f634276dc1eb699f2f37f992ed Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 26 Nov 2018 16:21:32 -0500 Subject: [PATCH 3/6] When forcing an alarm, print out the event id --- src/zmu.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/zmu.cpp b/src/zmu.cpp index dd38cb0c0..af6cb603d 100644 --- a/src/zmu.cpp +++ b/src/zmu.cpp @@ -463,10 +463,10 @@ int main(int argc, char *argv[]) { } // end if auth if ( mon_id > 0 ) { - fprintf(stderr,"Monitor %d\n", mon_id); + //fprintf(stderr,"Monitor %d\n", mon_id); Monitor *monitor = Monitor::Load(mon_id, function&(ZMU_QUERY|ZMU_ZONES), Monitor::QUERY); if ( monitor ) { - fprintf(stderr,"Monitor %d(%s)\n", monitor->Id(), monitor->Name()); + //fprintf(stderr,"Monitor %d(%s)\n", monitor->Id(), monitor->Name()); if ( verbose ) { printf("Monitor %d(%s)\n", monitor->Id(), monitor->Name()); } @@ -479,9 +479,9 @@ int main(int argc, char *argv[]) { bool have_output = false; if ( function & ZMU_STATE ) { Monitor::State state = monitor->GetState(); - if ( verbose ) + if ( verbose ) { printf("Current state: %s\n", state==Monitor::ALARM?"Alarm":(state==Monitor::ALERT?"Alert":"Idle")); - else { + } else { if ( have_output ) printf("%c", separator); printf("%d", state); have_output = true; @@ -560,6 +560,11 @@ int main(int argc, char *argv[]) { if ( verbose ) printf( "Forcing alarm on\n" ); monitor->ForceAlarmOn( config.forced_alarm_score, "Forced Web" ); + while ( monitor->GetState() != Monitor::ALARM ) { + // Wait for monitor to notice. + usleep(1000); + } + printf( "Alarmed event id: %" PRIu64 "\n", monitor->GetLastEventId() ); } if ( function & ZMU_NOALARM ) { if ( verbose ) From 94d8e043ce373ecd3fab0aeca87a26d96b83bd44 Mon Sep 17 00:00:00 2001 From: Elmar Pruesse Date: Tue, 27 Nov 2018 16:25:05 -0700 Subject: [PATCH 4/6] Fix unreadable input text when OS theme dark (#2324) * Update skin.css * Update skin.css --- web/skins/classic/css/base/skin.css | 1 + web/skins/classic/css/classic/skin.css | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/web/skins/classic/css/base/skin.css b/web/skins/classic/css/base/skin.css index 3fdd5a12f..47e7864c2 100644 --- a/web/skins/classic/css/base/skin.css +++ b/web/skins/classic/css/base/skin.css @@ -150,6 +150,7 @@ input,textarea,select,button,.btn-primary { font-weight: 400; font-size: 100%; color: #333333; + background-color: #f8f8f8; text-align: left; border-radius:4px; } diff --git a/web/skins/classic/css/classic/skin.css b/web/skins/classic/css/classic/skin.css index ecd9f3949..b90412093 100644 --- a/web/skins/classic/css/classic/skin.css +++ b/web/skins/classic/css/classic/skin.css @@ -85,7 +85,8 @@ input,textarea,select,button { border: 1px #7f7fb2 solid; font-family: inherit; font-size: 100%; - color: #333333; + color: #333333; + background-color: #eeeeee; } input[type=text], input[type=password], textarea { From 9c1578e14ebfda4a0e0d75fb04fe44f67890ad62 Mon Sep 17 00:00:00 2001 From: Elmar Pruesse Date: Tue, 27 Nov 2018 19:49:58 -0700 Subject: [PATCH 5/6] Add description for Stream Replay Image Buffer (#2325) * Add description for Stream Replay Image Buffer I hope this is even correct. * Update definemonitor.rst --- docs/userguide/definemonitor.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/userguide/definemonitor.rst b/docs/userguide/definemonitor.rst index bcd195570..396f98382 100644 --- a/docs/userguide/definemonitor.rst +++ b/docs/userguide/definemonitor.rst @@ -205,7 +205,8 @@ Warm-up Frames Pre/Post Event Image Buffer These options determine how many frames from before and after an event should be preserved with it. This allows you to view what happened immediately prior and subsequent to the event. A value of 10 for both of these will get you started but if you get a lot of short events and would prefer them to run together to form fewer longer ones then increase the Post Event buffer size. The pre-event buffer is a true buffer and should not really exceed half the ring buffer size. However the post-event buffer is just a count that is applied to captured frames and so can be managed more flexibly. You should also bear in mind the frame rate of the camera when choosing these values. For instance a network camera capturing at 1FPS will give you 10 seconds before and after each event if you chose 10 here. This may well be too much and pad out events more than necessary. However a fast video card may capture at 25FPS and you will want to ensure that this setting enables you to view a reasonable time frame pre and post event. Stream Replay Image Buffer - This option ... + The number of frames buffered to allow pausing and rewinding of the stream when live viewing a monitor. A value of 0 disables the feature. + Frames are buffered to ZM_PATH_SWAP. If this path points to a physical drive, a lot of IO will be caused during live view / montage. If you experience high system load in those situations, either disable the feature or use a RAM drive for ZM_PATH_SWAP. Alarm Frame Count This option allows you to specify how many consecutive alarm frames must occur before an alarm event is generated. The usual, and default, value is 1 which implies that any alarm frame will cause or participate in an event. You can enter any value up to 16 here to eliminate bogus events caused perhaps by screen flickers or other transients. Values over 3 or 4 are unlikely to be useful however. Please note that if you have statistics recording enabled then currently statistics are not recorded for the first ‘Alarm Frame Count’-1 frames of an event. So if you set this value to 5 then the first 4 frames will be missing statistics whereas the more usual value of 1 will ensure that all alarm frames have statistics recorded. From 81f345a9cd6066474ed6b1f59c77a4228ad9acb9 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 28 Nov 2018 10:08:27 -0500 Subject: [PATCH 6/6] Add dh-systemd and dh-apache2 to build depends --- distros/ubuntu1604/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/ubuntu1604/control b/distros/ubuntu1604/control index d4fe74e79..e487d17b6 100644 --- a/distros/ubuntu1604/control +++ b/distros/ubuntu1604/control @@ -3,7 +3,7 @@ Section: net Priority: optional Maintainer: Dmitry Smirnov Uploaders: Vagrant Cascadian -Build-Depends: debhelper (>= 9), dh-systemd, python-sphinx | python3-sphinx, apache2-dev, dh-linktree +Build-Depends: debhelper (>= 9), dh-systemd, python-sphinx | python3-sphinx, apache2-dev, dh-linktree, dh-systemd, dh-apache2 ,cmake ,libx264-dev, libmp4v2-dev ,libavdevice-dev (>= 6:10~)