Commit Graph

235 Commits

Author SHA1 Message Date
Isaac Connor 7f72d5399f add decoding_enabled and DecodingEnabled function 2020-12-10 14:05:46 -05:00
Isaac Connor 3a943d6f09 Add ServerId method, code style 2020-11-27 13:29:05 -05:00
Isaac Connor 08a8155b47 Implement a Monitor::disconnect function. Fix Fatals during connect and cleanup Analysis Monitor code to wait around for zmc. Handle zmc going away gracefully. Fixes a slow zma startup due to zmc not being setup yet. 2020-11-13 12:27:51 -05:00
Isaac Connor de74a15ab1 Move diag_fifo pipes in SOCKS_DIR instead of assigned Storage area. Storage areas could be a fs that cannot handle sockets or fifos like NFS. 2020-11-12 11:53:51 -05:00
Isaac Connor 1257a7ea37 improvements reported by cppcheck 2020-11-01 16:11:19 -05:00
Isaac Connor 5dd83d41fa Add LabelSize to get label_size from monitor 2020-10-05 13:15:58 -04:00
Isaac Connor 98aad6abbc Make status UNKNOWN be -1 so that zmu -s retains backwards compatibility. Fixes #3048 2020-09-21 14:25:41 -04:00
Isaac Connor 794474afab Add UNKNOWN status type. test for shared_data in ShmValid() 2020-09-02 17:22:00 -04:00
Isaac Connor a19990f4d7 Merge branch 'release-1.34' 2020-08-06 11:57:35 -04:00
Isaac Connor d8cd4386cf rename GetOptEncoderParams to GetOptEncoderParams to GetOptEncoderParamsVec so that we can get at the std::string if we want to.
Use EncoderParams when setting movflags in VideoStore.

Move the content of this option to a help popup so that we can remove the comments from it. av_dict_parse doesn't handle the hash tag as a comment.
2020-07-30 15:06:05 -04:00
Isaac Connor e9681fcdcf fix use of int or unsigned long instead of int for monitor id 2020-07-23 19:31:12 -04:00
Isaac Connor 2eac69dd88 fix duplicate extrapad names 2020-07-04 17:16:43 -04:00
Isaac Connor 2db65d3821 Merge branch 'release-1.34' 2020-07-04 09:09:24 -04:00
Isaac Connor 31a3be5c8e check shared_data->valid when checking if LinkedMonitor is connected 2020-06-23 15:05:17 -04:00
Isaac Connor a15aace2fb introduce shared_data->zmc_heartbeat_time and zma_heartbeat_time. 2020-06-22 10:40:00 -04:00
Isaac Connor 3d278eddf8 erge branch 'master' into batch_frame_records 2020-05-08 20:16:36 -04:00
hax0kartik 1d3ad05bb5 Start implementing VNC 2020-03-25 23:21:34 -07:00
Selva Nair 5260563ec4 Update frame deltas in the database to be relative to the video start time
Currenltly the frames written to database have delta time measured
from the event start time. As these deltas are also used to generate
any frame on the fly from the recorded video, these should be relative
to the video start time.

Adjust by subtracting the offset of the video start from event start.
Done when the event is closed.

If video is not stored, this has no effect.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2019-11-15 21:55:40 -05:00
Selva Nair 2e7fad68d1 Properly compute video buffer length when analysis fps is set
Currently the number of video frames kept in the buffer is set as the
pre_event_count. This falls short when the capture fps is larger
than the analysis fps. Fix by computing the retained video duration
as pre_event_count/analysis_fps

No change if analysis fps is not set.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2019-11-15 21:55:40 -05:00
Isaac Connor 48ad8d47fc Add capture_max_fps to monitor object instead of just calculating the delay. 2019-07-31 11:23:02 -04:00
Isaac Connor 434bbce954 Add loading decoder_hwaccel in Monitor 2019-06-25 15:34:17 -04:00
Isaac Connor 6ed0074077
End continuous events on alarm (#2644)
* Reference /run/zm instead of /var/run/zm because systemd-tmpfiles complains about it

* Spacing, google code style and tabs to spaces

* add update script to add MinSectionLength

* Add min_section_length to enforce a minimum event length when closing continuous events on alarm
2019-06-24 11:29:00 -04:00
Isaac Connor f28af7b729 store diag_path in the object and initialize them in constructor instead of constantly checking to see if they have been initialized in DetectMotion. Also use a string instead of a static char[MAX_PATH]. Also split it into diag_path_r and diag_path_d to fix the bug that only diag_path_r would ever get created and would be overwritten by the delta image. 2019-04-15 13:26:55 -04:00
Isaac Connor 19e4ef99bc add get_fps to Monitor and use it to adjust the # of frames to cache before writing to db 2018-12-16 16:22:25 -05:00
Isaac Connor 73c52705f2 Merge branch 'fix_32bit_alignment' into storageareas 2018-11-13 14:22:06 -05:00
Isaac Connor 31b0ed107d remove epadding2, to restore the 64bit alignment of startup_time. A proper fix instead of #2258 2018-11-13 14:02:44 -05:00
Isaac Connor dae31d226b add GetImageBufferCount to monitor 2018-10-15 11:33:16 -04:00
Isaac Connor 89cd7ceaf8 Whitespace, extra parentheses, google code style 2018-09-23 16:47:06 -04:00
Isaac Connor d9fff848e7 change Groups to a vector, add GroupNames function 2018-05-12 14:37:26 -07:00
Isaac Connor 548cbd2b66 add groups 2018-05-02 12:20:07 -07:00
Isaac Connor 20f6985dff implement capturing bandwidth 2018-04-24 14:11:27 -04:00
Isaac Connor cc77561826 fix last_event being uint64 2018-04-24 11:40:38 -04:00
Isaac Connor 56186a42ef change signal_check_points to a per-monitor variable instead of parts of config. Only call SignalCheck if signal_check_points is > 0 2018-04-19 10:10:14 -04:00
Isaac Connor fd1c69d48a switch to uint64_t for event_id because long long can actually be 128 bit 2018-04-17 13:51:20 -04:00
Isaac Connor 34111251d9 Introduce Close() to camera and monitor api. Use it to close a camera when there is an error with capturing. Remove the sleep10 on error. 2018-04-17 07:02:52 -07:00
Isaac Connor f9f78e9aa3 Convert event_id to a 64bit unsigned int 2018-04-12 13:40:11 -07:00
Isaac Connor 27736fb5d9 Merge ../ZoneMinder.master into storageareas 2018-03-15 11:04:41 -04:00
Pliable Pixels 704ccaee73 2059 alarm cause (#2060)
* added alarm_cause as a test

* initial attempt to integrate with notes

* testing sizeof

* add zone labels

* fixed typo

* fixed typo

* comments and formatting

* Downgraded invalid attribute to error

* Removed Error downgrade. Instead do a undefined check on field params

* Added help text
2018-03-12 19:38:12 -04:00
Isaac Connor dcf7c4fdde rework loading Monitor using consistent db query 2018-03-09 07:23:40 -05:00
Isaac Connor 128c4c73e9 Add official sql for loading a Monitor 2018-03-03 13:29:39 -08:00
Isaac Connor 28342b907b add a thread for deleting the event. This is because writing out the final frames of an mp4 can take a long time, during which we are not analyzing. 2018-03-01 19:22:22 -08:00
Isaac Connor 344539f5dc cleanup 2017-11-28 11:55:47 -05:00
Isaac Connor 22ff831859 more cppcheck recommendations 2017-11-16 21:21:56 -05:00
Isaac Connor 085d239a6e Merge branch 'master' into storageareas 2017-06-13 18:02:28 -04:00
Isaac Connor 42100d9a33 introduce current_event in videostore_data so we know which event we are writing a video file for. Also, GetLastEventId so that non-friends can find out the event id of the current event. 2017-06-13 17:05:37 -04:00
Isaac Connor a515041e14 Merge branch 'master' into storageareas 2017-05-23 15:17:46 -04:00
Isaac Connor 457d7e5c94 code documentation, whitespace 2017-05-20 09:03:51 -04:00
Isaac Connor 7caeee6bf8 Merge branch 'master' into storageareas 2017-05-19 15:09:44 -04:00
Isaac Connor e7ca892efd merge more differences from SA 2017-05-19 15:07:41 -04:00
Isaac Connor f4224bb88e Merge branch 'master' into storageareas 2017-05-17 17:47:39 -04:00