if 'output_normal' in camera_config:
camera_config['output_pictures'] = camera_config.pop('output_normal')
+ if 'output_all' in camera_config:
+ camera_config['emulate_motion'] = camera_config.pop('output_all')
if 'ffmpeg_cap_new' in camera_config:
camera_config['ffmpeg_output_movies'] = camera_config.pop('ffmpeg_cap_new')
if 'locate' in camera_config:
camera_config['stream_maxrate'] = camera_config.pop('webcam_maxrate')
if 'webcam_localhost' in camera_config:
camera_config['stream_localhost'] = camera_config.pop('webcam_localhost')
+ if 'gap' in camera_config:
+ camera_config['event_gap'] = camera_config.pop('gap')
_set_default_motion_camera(camera_id, camera_config, False)
if 'output_pictures' in camera_config:
camera_config['output_normal'] = camera_config.pop('output_pictures')
+ if 'emulate_motion' in camera_config:
+ camera_config['output_all'] = camera_config.pop('emulate_motion')
if 'ffmpeg_output_movies' in camera_config:
camera_config['ffmpeg_cap_new'] = camera_config.pop('ffmpeg_output_movies')
if 'locate_motion_mode' in camera_config:
camera_config['webcam_maxrate'] = camera_config.pop('stream_maxrate')
if 'stream_localhost' in camera_config:
camera_config['webcam_localhost'] = camera_config.pop('stream_localhost')
+ if 'event_gap' in camera_config:
+ camera_config['gap'] = camera_config.pop('event_gap')
_set_default_motion_camera(camera_id, camera_config, old_motion)
# still images
'output_pictures': False,
- 'output_all': False,
- 'output_motion': False,
+ 'emulate_motion': False,
'snapshot_interval': 0,
'picture_filename': '',
'snapshot_filename': '',
'threshold': threshold,
'noise_tune': ui['auto_noise_detect'],
'noise_level': max(1, int(round(int(ui['noise_level']) * 2.55))),
- 'gap': int(ui['gap']),
+ 'event_gap': int(ui['event_gap']),
'pre_capture': int(ui['pre_capture']),
'post_capture': int(ui['post_capture']),
data['snapshot_filename'] = ui['image_file_name']
elif capture_mode == 'all-frames':
- data['output_all'] = True
+ data['emulate_motion'] = True
data['picture_filename'] = ui['image_file_name']
data['quality'] = max(1, int(ui['image_quality']))
'frame_change_threshold': threshold,
'auto_noise_detect': data['noise_tune'],
'noise_level': int(int(data['noise_level']) / 2.55),
- 'gap': int(data['gap']),
+ 'event_gap': int(data['event_gap']),
'pre_capture': int(data['pre_capture']),
'post_capture': int(data['post_capture']),
ui['right_text'] = 'custom-text'
ui['custom_right_text'] = text_right
- output_all = data['output_all']
+ emulate_motion = data['emulate_motion']
output_pictures = data['output_pictures']
picture_filename = data['picture_filename']
snapshot_interval = data['snapshot_interval']
snapshot_filename = data['snapshot_filename']
- if (((output_all or output_pictures) and picture_filename) or
+ if (((emulate_motion or output_pictures) and picture_filename) or
(snapshot_interval and snapshot_filename)):
ui['still_images'] = True
- if output_all:
+ if emulate_motion:
ui['capture_mode'] = 'all-frames'
ui['image_file_name'] = picture_filename
else:
data.setdefault('locate_motion_mode', False)
data.setdefault('locate_motion_style', 'redbox')
+
data.setdefault('threshold', 2000)
data.setdefault('noise_tune', True)
data.setdefault('noise_level', 32)
data.setdefault('minimum_motion_frames', 1)
- data.setdefault('gap', 30)
data.setdefault('pre_capture', 2)
data.setdefault('post_capture', 4)
- data.setdefault('output_all', False)
if old_motion:
data.setdefault('output_normal', False)
data.setdefault('jpeg_filename', '')
-
+ data.setdefault('output_all', False)
+ data.setdefault('gap', 30)
+
else:
data.setdefault('output_pictures', False)
data.setdefault('picture_filename', '')
+ data.setdefault('emulate_motion', False)
+ data.setdefault('event_gap', 30)
+
data.setdefault('snapshot_interval', 0)
data.setdefault('snapshot_filename', '')
data.setdefault('quality', 85)
makeNumberValidator($('#snapshotIntervalEntry'), 1, 86400, false, false, true);
makeNumberValidator($('#picturesLifetime'), 1, 3650, false, false, true);
makeNumberValidator($('#moviesLifetime'), 1, 3650, false, false, true);
- makeNumberValidator($('#gapEntry'), 1, 86400, false, false, true);
+ makeNumberValidator($('#eventGapEntry'), 1, 86400, false, false, true);
makeNumberValidator($('#preCaptureEntry'), 0, 100, false, false, true);
makeNumberValidator($('#postCaptureEntry'), 0, 100, false, false, true);
'frame_change_threshold': $('#frameChangeThresholdSlider').val(),
'auto_noise_detect': $('#autoNoiseDetectSwitch')[0].checked,
'noise_level': $('#noiseLevelSlider').val(),
- 'gap': $('#gapEntry').val(),
+ 'event_gap': $('#eventGapEntry').val(),
'pre_capture': $('#preCaptureEntry').val(),
'post_capture': $('#postCaptureEntry').val(),
$('#frameChangeThresholdSlider').val(dict['frame_change_threshold']);
$('#autoNoiseDetectSwitch')[0].checked = dict['auto_noise_detect'];
$('#noiseLevelSlider').val(dict['noise_level']);
- $('#gapEntry').val(dict['gap']);
+ $('#eventGapEntry').val(dict['event_gap']);
$('#preCaptureEntry').val(dict['pre_capture']);
$('#postCaptureEntry').val(dict['post_capture']);