From a2dcccd9b9b9d11df1df79c25ba37aa3d2b780c5 Mon Sep 17 00:00:00 2001 From: Moe Date: Mon, 23 Sep 2019 15:58:33 -0700 Subject: [PATCH] fix monitor import base object + add copy stream channels --- definitions/en_CA.js | 27 ++++- languages/en_CA.json | 1 + web/libs/js/dash2.monitoredit.js | 181 +++---------------------------- 3 files changed, 39 insertions(+), 170 deletions(-) diff --git a/definitions/en_CA.js b/definitions/en_CA.js index 515d6864..d7eb67ca 100644 --- a/definitions/en_CA.js +++ b/definitions/en_CA.js @@ -631,7 +631,7 @@ module.exports = function(s,config,lang){ }, "Stream": { "name": lang.Stream, - + "color": "navy", "id": "monSectionStream", "isSection": true, @@ -1850,7 +1850,7 @@ module.exports = function(s,config,lang){ "Timelapse Watermark": { "id": "monSectionRecordingWatermark", "name": lang['Recording Watermark'], - + "color": "red", isAdvanced: true, "section-class": "h_rec_ti_input h_rec_ti_1", @@ -2969,7 +2969,7 @@ module.exports = function(s,config,lang){ { hidden: true, "name": lang['Traditional Recording'], - + "color": "orange", id: "monSectionDetectorTraditionalRecording", isSection: true, @@ -3369,7 +3369,7 @@ module.exports = function(s,config,lang){ "Copy Settings": { id: "monSectionCopying", "name": lang['Copy Settings'], - + "color": "orange", isSection: true, "info": [ @@ -3411,6 +3411,25 @@ module.exports = function(s,config,lang){ } ] }, + { + "field": lang['Copy Stream Channels'], + "description": "", + "default": "0", + "example": "", + "fieldType": "select", + "attribute": `copy="field=detail=stream_channels"`, + "form-group-class": "h_copy_settings_input h_copy_settings_1", + "possible": [ + { + "name": lang.No, + "value": "0" + }, + { + "name": lang.Yes, + "value": "1" + } + ] + }, { "field": lang['Copy Connection Settings'], "description": "", diff --git a/languages/en_CA.json b/languages/en_CA.json index b4dbb6df..13773669 100644 --- a/languages/en_CA.json +++ b/languages/en_CA.json @@ -940,6 +940,7 @@ "Show Regions of Interest":"Show Regions of Interest", "Confidence of Detection":"Confidence of Detection", "Edit Selected":"Edit Selected", + "Copy Stream Channels":"Copy Stream Channels", "Copy Settings":"Copy Settings", "Copy to Settings":"Copy to Settings", "Copy Mode":"Copy Mode", diff --git a/web/libs/js/dash2.monitoredit.js b/web/libs/js/dash2.monitoredit.js index 04376368..59b3f38c 100644 --- a/web/libs/js/dash2.monitoredit.js +++ b/web/libs/js/dash2.monitoredit.js @@ -8,172 +8,21 @@ $.aM.maps=$('#monSectionInputMaps') $.aM.e.find('.follow-list ul').affix(); $.aM.generateDefaultMonitorSettings=function(){ return { - "mode": "start", - "mid": $.ccio.gid(), - "name": "Some Stream", - "type": "h264", - "protocol": "rtsp", - "host": "", - "port": "", - "path": "", - "ext": "mp4", - "fps": "1", - "width": "640", - "height": "480", - "details": JSON.stringify({ - "fatal_max": "0", - "notes": "", - "dir": "", - "auto_host_enable": "1", - "auto_host": "", - "rtsp_transport": "tcp", - "muser": "", - "mpass": "", - "port_force": "0", - "aduration": "1000000", - "probesize": "1000000", - "stream_loop": "0", - "sfps": "", - "accelerator": "0", - "hwaccel": "auto", - "hwaccel_vcodec": "", - "hwaccel_device": "", - "stream_type": "mp4", - "stream_flv_type": "ws", - "stream_mjpeg_clients": "", - "stream_vcodec": "copy", - "stream_acodec": "no", - "hls_time": "2", - "preset_stream": "ultrafast", - "hls_list_size": "3", - "signal_check": "10", - "signal_check_log": "0", - "stream_quality": "15", - "stream_fps": "2", - "stream_scale_x": "", - "stream_scale_y": "", - "rotate_stream": "no", - "svf": "", - "rtmp_vcodec": "h264", - "rtmp_acodec": "aac", - "stream_timestamp": "0", - "stream_timestamp_font": "", - "stream_timestamp_font_size": "", - "stream_timestamp_color": "", - "stream_timestamp_box_color": "", - "stream_timestamp_x": "", - "stream_timestamp_y": "", - "stream_watermark": "0", - "stream_watermark_location": "", - "stream_watermark_position": "tr", - "snap": "0", - "snap_fps": "", - "snap_scale_x": "", - "snap_scale_y": "", - "snap_vf": "", - "rawh264": "0", - "rawh264_vcodec": "copy", - "rawh264_acodec": "", - "rawh264_fps": "", - "rawh264_scale_x": "", - "rawh264_scale_y": "", - "rawh264_crf": "", - "rawh264_vf": "", - "vcodec": "copy", - "crf": "1", - "preset_record": "", - "acodec": "no", - "dqf": "0", - "cutoff": "15", - "rotate_record": "no", - "vf": "", - "timestamp": "0", - "timestamp_font": "", - "timestamp_font_size": "10", - "timestamp_color": "white", - "timestamp_box_color": "0x00000000@1", - "timestamp_x": "(w-tw)/2", - "timestamp_y": "0", - "watermark": "0", - "watermark_location": "", - "watermark_position": "tr", - "cust_input": "", - "cust_snap": "", - "cust_rawh264": "", - "cust_detect": "", - "cust_stream": "", - "cust_stream_server": "", - "cust_record": "", - "custom_output": "", - "detector": "0", - "detector_pam": "1", - "detector_webhook": "0", - "detector_webhook_url": "", - "detector_command_enable": "0", - "detector_command": "", - "detector_command_timeout": "", - "detector_lock_timeout": "", - "detector_save": "0", - "detector_frame_save": "0", - "detector_mail": "0", - "detector_mail_timeout": "", - "detector_record_method": "sip", - "detector_trigger": "1", - "detector_trigger_record_fps": "", - "detector_timeout": "10", - "watchdog_reset": "0", - "detector_delete_motionless_videos": "0", - "detector_send_frames": "1", - "detector_region_of_interest": "0", - "detector_fps": "", - "detector_scale_x": "640", - "detector_scale_y": "480", - "detector_use_motion": "1", - "detector_use_detect_object": "0", - "detector_frame": "0", - "detector_sensitivity": "", - "detector_max_sensitivity": "", - "detector_threshold": "1", - "detector_color_threshold": "", - "cords": "[]", - "detector_buffer_vcodec": "auto", - "detector_buffer_fps": "", - "detector_buffer_hls_time": "", - "detector_buffer_hls_list_size": "", - "detector_buffer_start_number": "", - "detector_buffer_live_start_index": "", - "detector_lisence_plate": "0", - "detector_lisence_plate_country": "us", - "detector_notrigger": "0", - "detector_notrigger_mail": "0", - "detector_notrigger_timeout": "", - "control": "0", - "control_base_url": "", - "control_stop": "0", - "control_url_stop_timeout": "", - "control_url_center": "", - "control_url_left": "", - "control_url_left_stop": "", - "control_url_right": "", - "control_url_right_stop": "", - "control_url_up": "", - "control_url_up_stop": "", - "control_url_down": "", - "control_url_down_stop": "", - "control_url_enable_nv": "", - "control_url_disable_nv": "", - "control_url_zoom_out": "", - "control_url_zoom_out_stop": "", - "control_url_zoom_in": "", - "control_url_zoom_in_stop": "", - "tv_channel": "0", - "groups": "[]", - "loglevel": "warning", - "sqllog": "0", - "detector_cascades": "" - }), - "shto": "[]", - "shfr": "[]" + "mode": "start", + "mid": "Gdvu1tX6Eq", + "name": "Some Stream", + "type": "h264", + "host": "", + "port": "", + "path": "/", + "height": "480", + "width": "640", + "ext": "mp4", + "protocol": "http", + "fps": "1", + "details": "{\"max_keep_days\":\"\",\"notes\":\"\",\"dir\":\"\",\"rtmp_key\":\"\",\"auto_host_enable\":\"1\",\"auto_host\":\"\",\"rtsp_transport\":\"tcp\",\"muser\":\"\",\"mpass\":\"\",\"port_force\":\"0\",\"fatal_max\":\"0\",\"skip_ping\":null,\"is_onvif\":null,\"onvif_port\":\"\",\"primary_input\":null,\"aduration\":\"1000000\",\"probesize\":\"1000000\",\"stream_loop\":\"0\",\"sfps\":\"\",\"accelerator\":\"0\",\"hwaccel\":\"auto\",\"hwaccel_vcodec\":\"\",\"hwaccel_device\":\"\",\"use_coprocessor\":null,\"stream_type\":\"mp4\",\"stream_flv_type\":\"ws\",\"stream_flv_maxLatency\":\"\",\"stream_mjpeg_clients\":\"\",\"stream_vcodec\":\"copy\",\"stream_acodec\":\"no\",\"hls_time\":\"2\",\"hls_list_size\":\"3\",\"preset_stream\":\"ultrafast\",\"signal_check\":\"10\",\"signal_check_log\":\"0\",\"stream_quality\":\"15\",\"stream_fps\":\"2\",\"stream_scale_x\":\"\",\"stream_scale_y\":\"\",\"rotate_stream\":\"no\",\"svf\":\"\",\"tv_channel\":\"0\",\"tv_channel_id\":\"\",\"tv_channel_group_title\":\"\",\"stream_timestamp\":\"0\",\"stream_timestamp_font\":\"\",\"stream_timestamp_font_size\":\"\",\"stream_timestamp_color\":\"\",\"stream_timestamp_box_color\":\"\",\"stream_timestamp_x\":\"\",\"stream_timestamp_y\":\"\",\"stream_watermark\":\"0\",\"stream_watermark_location\":\"\",\"stream_watermark_position\":\"tr\",\"snap\":\"0\",\"snap_fps\":\"\",\"snap_scale_x\":\"\",\"snap_scale_y\":\"\",\"snap_vf\":\"\",\"vcodec\":\"copy\",\"crf\":\"1\",\"acodec\":\"no\",\"record_scale_y\":\"\",\"record_scale_x\":\"\",\"cutoff\":\"15\",\"rotate_record\":\"no\",\"vf\":\"\",\"timestamp\":\"0\",\"timestamp_font\":\"\",\"timestamp_font_size\":\"10\",\"timestamp_color\":\"white\",\"timestamp_box_color\":\"0x00000000@1\",\"timestamp_x\":\"(w-tw)/2\",\"timestamp_y\":\"0\",\"watermark\":\"0\",\"watermark_location\":\"\",\"watermark_position\":\"tr\",\"record_timelapse\":null,\"record_timelapse_mp4\":null,\"record_timelapse_fps\":null,\"record_timelapse_scale_x\":\"\",\"record_timelapse_scale_y\":\"\",\"record_timelapse_vf\":\"\",\"record_timelapse_watermark\":null,\"record_timelapse_watermark_location\":\"\",\"record_timelapse_watermark_position\":null,\"cust_input\":\"\",\"cust_stream\":\"\",\"cust_snap\":\"\",\"cust_record\":\"\",\"cust_detect\":\"\",\"cust_sip_record\":\"\",\"custom_output\":\"\",\"detector\":\"0\",\"detector_http_api\":null,\"detector_send_frames\":\"1\",\"detector_lock_timeout\":\"\",\"detector_save\":\"0\",\"detector_fps\":\"\",\"detector_scale_x\":\"640\",\"detector_scale_y\":\"480\",\"detector_record_method\":\"sip\",\"detector_trigger\":\"1\",\"detector_trigger_record_fps\":\"\",\"detector_timeout\":\"10\",\"detector_send_video_length\":\"\",\"watchdog_reset\":\"0\",\"detector_delete_motionless_videos\":\"0\",\"det_multi_trig\":null,\"group_detector_multi\":\"\",\"detector_webhook\":\"0\",\"detector_webhook_url\":\"\",\"detector_webhook_method\":null,\"detector_command_enable\":\"0\",\"detector_command\":\"\",\"detector_command_timeout\":\"\",\"detector_mail\":\"0\",\"detector_mail_timeout\":\"\",\"detector_discordbot\":null,\"detector_discordbot_send_video\":null,\"detector_discordbot_timeout\":\"\",\"use_detector_filters\":null,\"use_detector_filters_object\":null,\"cords\":\"[]\",\"detector_filters\":\"\",\"detector_pam\":\"1\",\"detector_show_matrix\":null,\"detector_sensitivity\":\"\",\"detector_max_sensitivity\":\"\",\"detector_threshold\":\"1\",\"detector_color_threshold\":\"\",\"detector_frame\":\"0\",\"detector_noise_filter\":null,\"detector_noise_filter_range\":\"\",\"detector_notrigger\":\"0\",\"detector_notrigger_mail\":\"0\",\"detector_notrigger_timeout\":\"\",\"detector_audio\":null,\"detector_audio_min_db\":\"\",\"detector_audio_max_db\":\"\",\"detector_use_detect_object\":\"0\",\"detector_send_frames_object\":null,\"detector_obj_region\":null,\"detector_use_motion\":\"1\",\"detector_fps_object\":\"\",\"detector_scale_x_object\":\"\",\"detector_scale_y_object\":\"\",\"detector_lisence_plate\":\"0\",\"detector_lisence_plate_country\":\"us\",\"detector_buffer_vcodec\":\"auto\",\"detector_buffer_acodec\":null,\"detector_buffer_fps\":\"\",\"detector_buffer_hls_time\":\"\",\"detector_buffer_hls_list_size\":\"\",\"detector_buffer_start_number\":\"\",\"detector_buffer_live_start_index\":\"\",\"control\":\"0\",\"control_base_url\":\"\",\"control_url_method\":null,\"control_digest_auth\":null,\"control_stop\":\"0\",\"control_url_stop_timeout\":\"\",\"control_url_center\":\"\",\"control_url_left\":\"\",\"control_url_left_stop\":\"\",\"control_url_right\":\"\",\"control_url_right_stop\":\"\",\"control_url_up\":\"\",\"control_url_up_stop\":\"\",\"control_url_down\":\"\",\"control_url_down_stop\":\"\",\"control_url_enable_nv\":\"\",\"control_url_disable_nv\":\"\",\"control_url_zoom_out\":\"\",\"control_url_zoom_out_stop\":\"\",\"control_url_zoom_in\":\"\",\"control_url_zoom_in_stop\":\"\",\"groups\":\"[]\",\"loglevel\":\"warning\",\"sqllog\":\"0\",\"detector_cascades\":\"\",\"stream_channels\":\"\",\"input_maps\":\"\",\"input_map_choices\":\"\"}", + "shto": "[]", + "shfr": "[]" } } $.aM.sections = {}