Commit Graph

727 Commits

Author SHA1 Message Date
Mitch Capper eb005e8b9c FIFO support for zoneminder zone debugging (#2594)
Adds fifo options for diagnostic images for much lower impact diagnostics mode.  Diagnostic images are only written when there is a client listening for them (otherwise they are skipped).  Also added a json stream for the detection data so you can see in real time the pixels or blobs detected for the motion.  This allows for easy real time stream of both delta and reference images (as video streams) along with the detection numbers.
2019-05-16 15:37:03 -04:00
Isaac Connor c257fb46f6 Merge branch 'storageareas' of github.com:connortechnology/zoneminder into storageareas 2019-05-13 10:34:45 -04:00
Isaac Connor aada171440 clean up some logic in Analyse 2019-05-12 09:35:48 -04:00
Isaac Connor 3a7b49560a spacing 2019-05-06 12:16:06 -04:00
Isaac Connor 9469ce8c71 Merge branch 'section_length_when_modect' into storageareas 2019-05-06 10:50:41 -04:00
Isaac Connor 9ef912f2ba add missing new event status info 2019-05-06 10:50:12 -04:00
Isaac Connor aaf4665909 Merge branch 'section_length_when_modect' into storageareas 2019-05-03 09:41:41 -04:00
Isaac Connor f6b6daafab close and reopen event when we hit section_length 2019-05-03 09:41:29 -04:00
Isaac Connor 626342f00e Merge branch 'master' into storageareas 2019-04-26 10:44:00 -04:00
Isaac Connor 8bbcf0f631 merge storageareas 2019-04-25 14:49:16 -04:00
Isaac Connor 077ad75516 Merge branch 'storageareas' into origin/zma_to_thread 2019-04-25 12:41:48 -04:00
Pliable Pixels ea7c38ceff Alarm cause fix (#2582)
* move alarm cause code to when the alarm flag is set

* formatting

* added temp info log

* char* not string in log

* merged alarm clause into info message about alarm

* add a comma only if there are more active zones

* JB tweak to slightly optimize leading comma processing
2019-04-24 13:55:57 -04:00
Isaac Connor eb76cd87bb
Revert "Alarm cause fix (#2580)" (#2581)
This reverts commit 6923382485.
2019-04-17 13:53:11 -04:00
Pliable Pixels 6923382485 Alarm cause fix (#2580)
* move alarm cause code to when the alarm flag is set

* formatting

* added temp info log

* char* not string in log
2019-04-17 13:33:38 -04:00
Isaac Connor 22adb243ec Fix crash when reporting an event longer than section length when event was just closed so event is null. 2019-04-16 11:50:41 -04:00
Isaac Connor 2ff1e7ed6d Fix crash when reporting an event longer than section length when event was just closed so event is null. 2019-04-16 11:30:18 -04:00
Isaac Connor 98a9c68b8b spacing and code documentation 2019-04-15 17:54:30 -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 93f0a03d8b spacing and code comments 2019-04-15 12:55:28 -04:00
Isaac Connor 96b7d30d7d Merge branch 'master' into zma_to_thread 2019-04-15 10:47:26 -04:00
Isaac Connor 69f812f5cc force section end when seconds % section_length == 0 which is the old behaviour. 2019-04-09 19:42:24 -04:00
Isaac Connor acb9070b04 Add a warning when an event exceeds section length 2019-03-25 12:33:30 -04:00
Isaac Connor 6c8eac1ac8 Merge branch 'storageareas' into h265 2019-03-06 11:10:01 -05:00
Isaac Connor 62d95e4d6e wip deprecate a lot of the index code. We are basically just using imag_buffer[0] for current image 2019-02-26 09:45:20 -05:00
Isaac Connor 448294f593 wip 2019-02-25 10:21:43 -05:00
Isaac Connor f2e7ec7e36 Sleep less when waiting for zmc to capture an image. Return camera in getCamera 2019-02-19 09:47:04 -05:00
Isaac Connor baba438ce1 use image_count when reporting earlier than fps_report_interval 2019-02-16 11:49:28 -05:00
Isaac Connor a9e2011727 Merge branch 'storageareas' into zma_to_thread 2019-02-13 12:24:38 -05:00
Isaac Connor 9f588d5758 prevent returning infinity from GetFPS 2019-01-21 13:00:10 -05:00
Isaac Connor d068d019fb turn section_length into seconds instead of frames 2019-01-15 11:34:17 -05:00
Isaac Connor f726666f54 Merge branch 'master' into h265 2019-01-14 12:36:11 -05:00
Isaac Connor 751c312609 fix non-ascii char 2018-12-29 09:56:33 -05:00
Isaac Connor 32c88a3a41 Update status as well as fps when updating fps 2018-12-27 13:50:17 -05:00
Isaac Connor db6d943854 If failure in connect, close the fd before returning 2018-12-27 11:53:21 -05:00
Isaac Connor b87ae53a83 merge debug lines and correct spacing 2018-12-27 11:50:43 -05:00
Isaac Connor 28dafd5931 Merge branch 'storageareas' into zma_to_thread 2018-12-26 12:02:00 -05:00
Isaac Connor 1d371b7a17 Fix small memleak of linked_monitors not getting freed on Monitor destruction. Fix unlocking db mutex before logging 2018-12-20 13:41:57 -05:00
Isaac Connor bc5f8d0d8d rework pts/dts of audio stream. Spacing. Fix crash 2018-12-04 18:23:08 -05:00
Isaac Connor 4272225a17 Merge branch 'master' into h265 2018-11-30 16:42:16 -05:00
Isaac Connor 251ccc0ba9 remove extra () 2018-11-26 16:20:52 -05:00
Isaac Connor b16cd7ec84 Merge branch 'h265' into zma_to_thread 2018-11-20 12:38:17 -05:00
Isaac Connor b291c06035 Working zms h265 playing. 2018-11-19 16:45:56 -05:00
Isaac Connor e24a308481 Merge branch 'master' into h265 2018-11-14 17:15:37 -05:00
Isaac Connor a95a012fa5 fix #2302 2018-11-12 11:56:18 -05:00
Isaac Connor a8329465fb Merge branch 'master' into h265 2018-10-22 10:30:01 -04:00
Isaac Connor 5ab1126260 Merge branch 'storageareas' into zma_to_thread 2018-10-20 17:31:14 -04:00
Isaac Connor ee168bf427 Properly initialize preevent frames data structures. Always update analysis fps. Make some warnings on loss of signal be Info's. 2018-09-23 16:49:06 -04:00
Isaac Connor 60b952ab86 Merge branch 'master' into storageareas 2018-09-13 16:20:36 -04:00
Isaac Connor 0ec391354c Merge branch 'fix_zms_from_mp4' into h265 2018-09-13 16:18:28 -04:00
Isaac Connor b3ef347fd5 slight optimisations in frame skipping 2018-09-11 13:22:01 -04:00
Isaac Connor c70fb2f195 When signal loss occurs, trigger an event close so that the event stops because we are no longer writing to the mp4 2018-09-10 17:11:16 -04:00
Isaac Connor fe1e17d097 Capture can reasonably return -1 for EOF. 2018-09-05 11:16:17 -04:00
Isaac Connor 672b4affe1 Merge branch 'storageareas' into zma_to_thread 2018-08-31 19:05:22 -04:00
Isaac Connor 53eae61883 Mostly spacing, but simplified logic removing assumption that local cameras give keyframes. They might not in future. 2018-08-17 16:05:02 -04:00
Isaac Connor 4297d39df6 spacing, code style, remove useless debug logging 2018-08-11 18:49:48 -04:00
Isaac Connor 979b31ffc3 Merge branch 'storageareas' into zma_to_thread 2018-08-11 10:08:30 -04:00
Isaac Connor 97a6a28182 You should just mkdir and handle EEXIST because stating first is a race condition 2018-08-10 11:14:41 -04:00
Isaac Connor 246070793b Fix crash in zma dur to images array not being allocated when analysis_fps not being set 2018-07-31 13:36:03 -04:00
Isaac Connor 908f81c6ef Add some more debug 2018-07-31 13:22:52 -04:00
Isaac Connor 639717eb7b If mysql gets restarted, and there is no change in fps, then the monitor_status record never gets updated. So just always update it. 2018-07-31 12:07:57 -04:00
Isaac Connor 61e7136857 Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas 2018-07-12 17:03:21 -04:00
Isaac Connor ea86cb1181 Add debugging line to try to figure out starttime in the future problem 2018-06-15 10:16:28 -04:00
Isaac Connor 39db8136b3 move pre_event_images init to constructor, getting rid of static_undef tests. Initialize timestamps to 0. Clean up some logic in Analyze 2018-05-26 13:01:30 -04:00
Isaac Connor b7129578c1 fix case where pre_event_count=0 and analysis_fps is set because there are no pre_event_buffers 2018-05-24 10:59:15 -04:00
Isaac Connor 4454ca0072 Merge branch 'storageareas' into zma_to_thread 2018-05-20 10:39:14 -04:00
Isaac Connor 5df2fbfff2 fix logic to handle no pre_event frames 2018-05-15 15:53:25 -04:00
Isaac Connor 4ca77fdd69 Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas 2018-05-15 12:44:36 -04:00
Isaac Connor 98b2a3f6f0 improve structure/spacing 2018-05-15 12:44:24 -04:00
Isaac Connor da8a232f01 Merge branch 'storageareas' into zma_to_thread 2018-05-12 19:45:48 -04:00
Isaac Connor d9fff848e7 change Groups to a vector, add GroupNames function 2018-05-12 14:37:26 -07:00
Isaac Connor 0a5980ce2e Fix prealarmcount > alarm_frames. If Alarm frames is 1 and PreEventCount == 0, then the old line would have evaluated to true. By making it > alarm_count instead of >= alarm_count-1, we get the same behaviour for non-zero preevent counts, and also since alarm_frames >= 1 always, we handle the preeventcount=0 case. 2018-05-11 12:18:24 -04:00
Isaac Connor 94377a4652 Merge branch 'storageareas' into zma_to_thread 2018-05-05 12:57:50 -04:00
Isaac Connor f6139d33ed Merge branch 'storageareas' into zma_to_thread 2018-05-05 12:25:11 -04:00
Isaac Connor 1cd7b73114 turn off closing event in a separate thread, add Groups 2018-05-02 12:20:01 -07:00
Isaac Connor d46c06d201 remove extra event=NULL and spaces 2018-05-01 12:19:46 -04:00
Isaac Connor a4da624f4c break out of loops when zm-terminate is set 2018-04-27 13:20:38 -07:00
Isaac Connor 8a80cf686b Merge branch 'master' into storageareas 2018-04-26 21:58:34 -04:00
Isaac Connor 184596ed4b Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas 2018-04-25 04:29:35 -04:00
Isaac Connor 20f6985dff implement capturing bandwidth 2018-04-24 14:11:27 -04:00
Andy Bauer 678503b992 fix ftbs on el7 2018-04-24 12:16:19 -05:00
Isaac Connor cc525b2397 Output more detailed shared mem size info 2018-04-24 11:41:54 -04:00
Isaac Connor 5f7d404a0c spacing & style. Put locking around db accesses in RealoadLinkedMonitors 2018-04-23 16:24:15 -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 eb21a5113e Add a debug line in SignaCheck function 2018-04-19 09:34: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 3b0282f6ec Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas 2018-04-17 12:32:10 -04:00
Isaac Connor 0198ac832d improve logging around loss of signal and lock around static sql 2018-04-17 12:30:58 -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 73239a0dba If no progress in analysis, bail 2018-04-14 17:03:45 -04:00
Isaac Connor c7deb91319 Merge branch 'zma_to_thread' of github.com:ConnorTechnology/ZoneMinder into zma_to_thread 2018-04-14 14:58:25 -04:00
Isaac Connor cd3046abb3 Merge branch 'storageareas' into zma_to_thread 2018-04-14 11:03:08 -04:00
Isaac Connor f9f78e9aa3 Convert event_id to a 64bit unsigned int 2018-04-12 13:40:11 -07:00
Isaac Connor 8518278476 coverity scan fixes/cleanups 2018-04-12 11:29:35 -04:00
Isaac Connor c766c1ddd1 spacing cleanup 2018-04-12 10:28:22 -04:00
Isaac Connor 71d5984eb0 delete stream after use 2018-04-12 10:26:18 -04:00
Isaac 64cfb39043 do an initial fps report early on 2018-04-06 23:21:22 +02:00
Isaac Connor ec5f955d26 more db locking 2018-04-05 11:30:14 -04:00
Isaac Connor dfc35721f9 ensure that sections are always > section_length 2018-04-03 07:03:12 -07:00
Isaac Connor a5b77a59d3 allow 0 pre_event_count 2018-03-29 12:35:03 -04:00
Isaac Connor b22911f554 wait to closeEvent on monitor shutdown 2018-03-28 14:03:56 -04:00