From: Calin Crisan Date: Sun, 7 Dec 2014 16:27:54 +0000 (+0200) Subject: added support for minimum motion frames X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=fc49e5abaa014fdb589e958f483a60c2047081e7;p=motioneye-debian added support for minimum motion frames --- diff --git a/src/config.py b/src/config.py index aaa1554..d15ff29 100644 --- a/src/config.py +++ b/src/config.py @@ -555,6 +555,7 @@ def camera_ui_to_dict(ui): 'event_gap': int(ui['event_gap']), 'pre_capture': int(ui['pre_capture']), 'post_capture': int(ui['post_capture']), + 'minimum_motion_frames': int(ui['minimum_motion_frames']), # movies 'ffmpeg_output_movies': ui['motion_movies'], @@ -810,6 +811,7 @@ def camera_dict_to_ui(data): 'event_gap': int(data['event_gap']), 'pre_capture': int(data['pre_capture']), 'post_capture': int(data['post_capture']), + 'minimum_motion_frames': int(data['minimum_motion_frames']), # motion movies 'motion_movies': data['ffmpeg_output_movies'], @@ -1323,6 +1325,7 @@ def _set_default_motion_camera(camera_id, data, old_motion=False): data.setdefault('pre_capture', 2) data.setdefault('post_capture', 4) + data.setdefault('minimum_motion_frames', 1) if old_motion: data.setdefault('output_normal', False) diff --git a/static/js/main.js b/static/js/main.js index 632f190..d9e8c52 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -282,6 +282,7 @@ function initUI() { makeNumberValidator($('#eventGapEntry'), 1, 86400, false, false, true); makeNumberValidator($('#preCaptureEntry'), 0, 100, false, false, true); makeNumberValidator($('#postCaptureEntry'), 0, 100, false, false, true); + makeNumberValidator($('#minimumMotionFramesEntry'), 1, 1000, false, false, true); makeNumberValidator($('#smtpPortEntry'), 1, 65535, false, false, true); /* time validators */ @@ -759,6 +760,7 @@ function cameraUi2Dict() { 'event_gap': $('#eventGapEntry').val(), 'pre_capture': $('#preCaptureEntry').val(), 'post_capture': $('#postCaptureEntry').val(), + 'minimum_motion_frames': $('#minimumMotionFramesEntry').val(), /* motion movies */ 'motion_movies': $('#motionMoviesSwitch')[0].checked, @@ -980,6 +982,7 @@ function dict2CameraUi(dict) { $('#eventGapEntry').val(dict['event_gap']); $('#preCaptureEntry').val(dict['pre_capture']); $('#postCaptureEntry').val(dict['post_capture']); + $('#minimumMotionFramesEntry').val(dict['minimum_motion_frames']); /* motion movies */ $('#motionMoviesSwitch')[0].checked = dict['motion_movies']; diff --git a/templates/main.html b/templates/main.html index 035c932..eb70c5a 100644 --- a/templates/main.html +++ b/templates/main.html @@ -406,6 +406,11 @@ frames ? + + Minimum Motion Frames + frames + ? +
Motion Movies