Commit Graph

1313 Commits

Author SHA1 Message Date
Isaac Connor
d1d7dd77cc Use a while instead of a pointless for 2024-05-24 16:03:36 -04:00
Isaac Connor
d3f4b63274 Use better format specifiers 2024-05-24 16:03:03 -04:00
Isaac Connor
937cc80b65 Free analysis image regardless of recording mode 2024-05-22 09:15:57 -04:00
Isaac Connor
e6f9dbae2e move image_count to shared mem. Use it in monitorstream to detect when last_write_time % buffer_count hasn't changed, but there is in fact a new image. 2024-05-21 14:53:52 -04:00
Isaac Connor
0048a6bc99 Use quick_exit instead of exit to fix hanging processes when event start/top commands have an error. 2024-05-12 12:07:55 -04:00
Aaron Kling
c4683d90a9 Format code using astyle google format
Commands used:
astyle --style=google --indent=spaces=2 --keep-one-line-blocks src/*.cpp
astyle --style=google --indent=spaces=2 --keep-one-line-blocks src/*.h
2024-03-26 13:43:58 -05:00
Isaac Connor
8e87fc2809 Add default values for ONVIF_EVENTS_PATH and ONVIF_Alarm_Text 2024-03-22 09:31:55 -04:00
Isaac Connor
a184f3adeb Always restart the analysis thread. It is needed. Also free convert_context in Pause 2024-03-19 14:55:21 -04:00
Isaac Connor
92e6a9b5d0 Rough in startup_delay function 2024-03-18 12:54:30 -04:00
Isaac Connor
56fcd8472e Fix motion events having cause continuous. Fixes #3858 2024-03-14 11:54:15 -04:00
Isaac Connor
07153f6773 Don't set snap score when skipping frames. Don't exit alarms when we havn't done motion detection. As a result, alarm_frame_count shouldn't cause immediate alarm anymore and because we aren't clearing prealarm frames, event recording should start 2024-03-12 21:22:58 -04:00
Isaac Connor
3bab238ee4 Limit score to 255 2024-03-04 17:54:25 -05:00
Isaac Connor
fb37cd3c30 Remove refs to event from Info because there might not be an event. Fix crash. 2024-03-04 17:31:06 -05:00
Isaac Connor
04017b20f1 Make recording=onmotion respect post_event_count 2024-02-29 09:02:07 -05:00
Isaac Connor
e78c873944 Remove TAPE state. 2024-02-26 14:36:27 -05:00
Server
58d8cf0adf Makes the "Events" part of the ONVIF URL configurable
as required per some ONVIF version 21.06 cameras
by default sets the Events Path equals to "/Events"
to maintain functionality
2024-02-24 11:05:08 -06:00
Isaac Connor
e1a141ed7d Remove event_start_mode, not going to be used 2024-02-23 16:56:55 -05:00
Isaac Connor
06134c387b Remove event_start_mode, not going to be used 2024-02-23 16:52:21 -05:00
Isaac Connor
920568c704 Use switch instead of ifs and add CLOSE_DURATION as valid value 2024-02-23 16:50:44 -05:00
Isaac Connor
824d6ec032 Remove EventStartMode stuff 2024-02-22 16:58:03 -05:00
Isaac Connor
eeb8856157 Ad EventStartMode and EventCLoseMode to monitor 2024-02-22 10:46:36 -05:00
Isaac Connor
0d98b2523d Split recording=ONMOTION and recording=ALWAYS logic out explicitly, even though it leads to redundant code, it should be easier to debug. 2024-02-22 10:39:38 -05:00
Isaac Connor
ae2dc039ac Merge branch 'master' of github.com:ZoneMinder/zoneminder 2024-02-22 10:02:46 -05:00
Isaac Connor
364d0c438e Split the if so that we get better debug output 2024-02-22 09:52:17 -05:00
BHMSD-bdailey
025fc939a9 Update debug to make it unique 2024-02-22 07:49:49 -05:00
BHMSD-bdailey
ebee72bf65 Prevent events from exceeding the section_length even if we are still in alarm 2024-02-21 17:10:18 -05:00
Isaac Connor
15e4a7ac65 Move setting of last_signal up to where it is used for clarity 2024-02-21 12:09:24 -05:00
BHMSD-bdailey
7e6efde1a9 Simple typo and consistency fixes. 2024-02-21 10:47:53 -05:00
Isaac Connor
602959adce Fix issue with packet have score != -1. We don't set snap->score until after doing motion detection because we give up if we are waiting for decoding. We now always do state transitions regardless of whether we did motion detection. 2024-02-15 09:33:23 -05:00
Isaac Connor
29d70ab79b Revert "Revert "Merge score and snap->score. The effect is to treat all alarms as alarmed frames regardless of source. Should fix linked monitors ending the event early""
This reverts commit efe5c02223.
2024-02-15 09:00:31 -05:00
Isaac Connor
efe5c02223 Revert "Merge score and snap->score. The effect is to treat all alarms as alarmed frames regardless of source. Should fix linked monitors ending the event early"
This reverts commit 0e1cf9beda.
2024-02-15 08:13:45 -05:00
Isaac Connor
0e1cf9beda Merge score and snap->score. The effect is to treat all alarms as alarmed frames regardless of source. Should fix linked monitors ending the event early 2024-02-14 17:22:26 -05:00
Server
0ff48f631e Implements an option to disable soap_wsa code that doesn't work
with some chinese cameras, more common to Latam zone
2024-02-12 19:22:01 -06:00
ovargasp
5d5210b116 Changes to zm_monitor code to enable/disable soap_wsa support
for chinnese cameras that doesn't have it implemented
2024-02-11 07:42:58 -06:00
Isaac Connor
a64b24687c Add warnings when event_close_mode is weird. Fix monitor always being in close_mode=idle. Still do state changes even if packet is not video. Do not set state=ALARM when triggered, let the state machine do that. 2024-02-07 15:56:24 -05:00
Isaac Connor
22a2846218 Can't set alarm when triggering. Must be done by the state machine 2024-02-07 15:56:24 -05:00
Isaac Connor
593f6f1601 Add some more debugging to track down idle events not closing on alarm 2024-02-07 15:56:24 -05:00
Isaac Connor
f92115b4fe Spacing 2024-02-07 15:56:23 -05:00
Isaac Connor
e159948d62 Handle state==TAPE when CLOSE_EVENT_MODE=IDLE 2024-02-05 17:39:05 -05:00
Isaac Connor
c9c2898912 Fix some spacing 2024-02-05 16:11:22 -05:00
Isaac Connor
5285c6e716 cpplint spacing changes. The real change is in Analysis we move the Ready check to only affect motion detection. This hopefully fixes the massive memory leak when Decoding=OnDemand 2024-01-30 09:31:28 -05:00
Isaac Connor
7493230e03 Better debugging, of unsupported codec types and monitor link results 2024-01-27 18:32:22 -05:00
Isaac Connor
219d0b6eba When recording = onmotion, end event after post alarm count instead of section_length. 2024-01-24 13:00:31 -05:00
Isaac Connor
403c63af9b Use Duration instead of timestamp % section_length. Shorter code and actually works. Fixes #3806 2024-01-23 16:39:43 -05:00
Isaac Connor
f1aa08971f group->Name needs a c_str 2024-01-23 16:12:56 -05:00
Isaac Connor
d81b98da25 Set cause = LINKED_CAUSE regardless of whether we are in an event, as we may be ending an idle event to start a new one. Use MonitorLinkExpression.result to get score from the expression instead of just using 20. Imrpove logic around close events to prevent them from lasting too long 2024-01-22 14:25:57 -05:00
Isaac Connor
343d2294d4 Take post_event_frame count into consideration when closing events 2024-01-19 12:26:05 -05:00
Isaac Connor
a0ecbdf0bf Rework state machine, separating the state machine from the code to start/stop event recording. Doing section_length < min_section_length at monitor load time instead of constantly during analysis. 2024-01-17 17:09:42 -05:00
Isaac Connor
08aefd881a Add decoding_image_count, use it in Ready() instead of image_count. Fix hanging processes due to event start/end command failing because it waits writing to db which isn't really open. Stop analysis thread in Pause. 2024-01-16 16:47:14 -05:00
Isaac Connor
fba728d406 Must close events before closing camera because we use it's inputs_streams in videostore. 2024-01-16 09:48:38 -05:00