Commit Graph

1154 Commits

Author SHA1 Message Date
Isaac Connor
997c1197cf Implement decoding=Keyframes + OnDemand 2022-05-10 14:25:34 -04:00
Isaac Connor
27ba6a8159 Shorten the time we hold the event lock when closing the event 2022-05-05 09:06:44 -04:00
Isaac Connor
9779ab1830 Fix lockup on logrot by not releasing the event lock 2022-05-02 09:55:51 -04:00
Isaac Connor
133500fc7a Add a notify_all before waiting in case decoder is waiting in packetqueue 2022-04-28 16:41:36 -04:00
Isaac Connor
a0a7c5c5a5 INF logging of alarm frames in alert state should be debug 2022-04-28 16:18:37 -04:00
Isaac Connor
6f967f7a0b Simplify openEvent. Move packetqeue clearing below event closing as packets might be in use 2022-04-28 10:36:06 -04:00
Isaac Connor
a047cedd47 Initialize Poll_Trigger_State(false),
+  Event_Poller_Healthy(false),
2022-04-20 09:10:46 -04:00
Isaac Connor
f8366864b5 Remove dead code 2022-04-18 18:05:32 -04:00
Isaac Connor
9235b696ed Add index of packet that we have seen before 2022-04-04 16:26:52 -04:00
Isaac Connor
166ed2631f reference shared_data->recording instead of recording. Fix recording changing to ONMOTION due to use of = instead of == in an if 2022-04-03 16:53:14 -04:00
Isaac Connor
9cb59aced9 Fix last_write_index not incrementing hence live view broken 2022-04-01 12:40:59 -04:00
Isaac Connor
ed0f244c70 Don't use packet->index to calculate index into shmem. If we are skipping the increase might not be monotonic 2022-03-29 17:19:31 -04:00
Isaac Connor
39d45e527c Switch from DecodingEnabled to DecodingOption. Implement the logic in ::Decode. 2022-03-28 17:44:44 -04:00
Isaac Connor
75833abbe7 Move convertContext code to it's own function for readability. Use it to clean up code in Decode 2022-03-26 20:32:05 -04:00
Isaac Connor
9f404f7b97 Add test for event before calling event->Duration. 2022-03-26 12:47:26 -04:00
Isaac Connor
1c9c3d34f5 Free up raw images early when not recording also. Also free up decoded frame ram 2022-03-25 13:50:12 -04:00
Isaac Connor
8458eb741a Don't store keyframes in packetqueue if we are not recording at all. 2022-03-25 12:26:05 -04:00
Isaac Connor
99e78debf5 Use shared_data->analysing instead of analysing in tests since we could be disabled by zmu. 2022-03-21 15:58:01 -04:00
Isaac Connor
ed41e63980 Can't treat anlysing as a boolean because ANALYSING_NONE==1. Should fix zm oing motion detection when set to NONE 2022-03-20 19:13:46 -04:00
Isaac Connor
eee6053293 Only startup a new event if recording==ALWAYS 2022-02-28 13:35:11 -05:00
Isaac Connor
980aaa5942 Fix case of recording events when Recording==NONE 2022-02-28 12:10:14 -05:00
Isaac Connor
e31b18a1a6 Use a define to disable y-channel use 2022-02-28 12:02:09 -05:00
Isaac Connor
a40b305065 Merge branch 'master' into replace_function_concept 2022-02-20 09:52:03 -05:00
Isaac Connor
fe69261f10 Include MonitorId as second argument of EventStartCommand and EventEndCOmmand at @baudneo's request. 2022-02-19 15:33:05 -05:00
Isaac Connor
dc8f1bc8ed Set shared_data->score before state transitions so that linked monitors pick it up. Should help with missed linked events 2022-02-18 17:44:23 -05:00
Isaac Connor
1983801004 Merge branch 'master' into replace_function_concept 2022-02-16 18:49:01 -05:00
Isaac Connor
b9e6cf8038 Spacing, remove dead code, add comments. When implementing CLOSE_ALARM mode, check Alarm Frames against alarm_frame_count instead of 0. 2022-02-16 17:27:17 -05:00
Isaac Connor
2bc0ec269a Merge branch 'master' into replace_function_concept 2022-02-15 17:02:03 -05:00
Isaac Connor
956579d557 handle snap->in_frame being null. 2022-02-15 10:41:42 -05:00
Isaac Connor
e3631099f6 Rename v_image to y_image cuz that's what it is 2022-02-12 22:14:51 -05:00
Isaac Connor
684078e72f re-enable y-channel motion detection 2022-02-08 12:08:41 -05:00
Isaac Connor
f66a463574 Merge branch 'master' into replace_function_concept 2022-02-08 12:07:30 -05:00
Isaac Connor
1982c21e1f Merge pull request #3423 from jp-bennett/master
Starts moving elements from zm_monitor.cpp into nested classes and dedicated files.
2022-02-03 17:53:31 -05:00
Jonathan Bennett
dde3884084 Moves Janus and Amcrest into their own nested classes 2022-02-03 16:31:07 -06:00
Isaac Connor
524662e6c7 Merge branch 'master' into replace_function_concept 2022-02-03 12:41:46 -05:00
Isaac Connor
da4c880233 0 out another used of y-image 2022-02-03 12:16:01 -05:00
Isaac Connor
02a2c783e4 Disable alleged y-channel image motion detection. Doesn't work. 2022-02-03 11:57:27 -05:00
Isaac Connor
67ac0fdffd Disable alleged y-channel image motion detection. Doesn't work. 2022-02-03 11:57:00 -05:00
Isaac Connor
b05bc211f7 Apparently it is actually the Y channel that we want. 2022-02-03 10:50:40 -05:00
Isaac Connor
7e9c707f92 V plane is actually the 3rd array entry, not the 4th 2022-02-03 10:06:36 -05:00
Isaac Connor
fd7f7f851a V plane is actually the 3rd array entry, not the 4th 2022-02-03 08:19:08 -05:00
Isaac Connor
10e39b3b13 :wqMerge branch 'master' into replace_function_concept 2022-02-02 17:08:01 -05:00
Isaac Connor
606c47ba87 If possible, use the v-channel from the yuv420p image for motion detection instead of the rgba data. 2022-02-02 14:33:58 -05:00
Isaac Connor
3feb4fcc51 Merge branch 'master' into master 2022-02-02 12:28:17 -05:00
Isaac Connor
3d5767b326 Merge branch 'master' into multistream 2022-02-01 16:52:42 -05:00
Isaac Connor
6b8cc14723 Don't free image data if we added the packet to an event. The lock moves to the event so it's not safe 2022-01-31 12:07:09 -05:00
Isaac Connor
e5792c21c9 Push locked packets into event packetqueue instead of unlcoked contents. Prevents freeing of data before writing to event, hence crashing. 2022-01-28 15:38:18 -05:00
Isaac Connor
23bfbcd6ce Merge branch 'master' into multistream 2022-01-26 10:13:20 -05:00
Jonathan Bennett
ec9403fb6f Adds Amcrest On-camera Motion Detection 2022-01-25 22:38:00 -06:00
Isaac Connor
f10d0fd3f5 Merge pull request #3413 from jp-bennett/master
Adds janus updates
2022-01-23 12:35:42 -05:00