Commit Graph

4878 Commits

Author SHA1 Message Date
Isaac Connor
dec440ead1 Unset holdbuffer so that when we connect, we reset the shm buffer pointer. cleanup initializers in Image 2022-01-19 15:01:37 -05:00
Isaac Connor
05043a37b1 include image index in debug 2022-01-19 12:27:16 -05:00
Isaac Connor
ebcb3abf2e image_count is only relevant to capture. decode and analysis should use packet->image_index for indexing into image_buffer, etc. 2022-01-19 09:33:33 -05:00
Jonathan Bennett
04cfe372f8 Wrap public access function in Gsoap ifdef to remove build warning 2022-01-19 00:56:36 -06:00
Jonathan Bennett
fb832e7d1b Adds janus_enable_audio, a switch to try to enable audio in live stream viewing. 2022-01-19 00:14:52 -06:00
Isaac Connor
13ee39b1e9 Log errors talking to Janus. Log if janus is turned on but not compiled in 2022-01-18 23:02:26 -05:00
Isaac Connor
d2d9721c4e spacing, remove redundant debug 2022-01-18 23:02:26 -05:00
Isaac Connor
0c055edb5e I think in all my changes I got rid of the code that opens events on Alarm. 2022-01-18 12:20:19 -05:00
Jonathan Bennett
688f505f28 Adds better error handling, changes expected location of janus.js 2022-01-16 19:44:52 -06:00
Isaac Connor
5f17cb6e9a Debug the size returned as compared to the file size 2022-01-15 17:19:35 -05:00
Isaac Connor
1ae61afd47 Merge pull request #3408 from jp-bennett/janus
Adds Janus h264 streaming
2022-01-14 16:34:19 -05:00
Isaac Connor
aba387f202 Fix !== which should be >= 2022-01-14 16:31:52 -05:00
Isaac Connor
3296e14264 Move RECORD/MOCORD length close code after the state machine. If the state machine has taken action, this code likely won't trigger, but the way it was before it could ignore current state. Plus I think it logically keeps relevant logic closer together. Must use packetqueue.unlock after decoding as analysis might be waiting in the packetqueue. Doing this will do both notifies. Disable de-interlacing for decoding style monitors. 2022-01-14 15:19:28 -05:00
Jonathan Bennett
9e9bdd183c Merge branch 'ZoneMinder:master' into janus 2022-01-14 14:05:23 -06:00
Isaac Connor
a4b0aa442a Introduce event->Duration() 2022-01-14 14:35:26 -05:00
Isaac Connor
1fe4bbedc0 use min_section_length instead of 0 when testing minimumm section length. Use event->Duration instead of snap-event->StartTime because this snap will not be included in the event. This results in events of 29.59 seconds instead of 30 seconds. 2022-01-14 14:35:16 -05:00
Isaac Connor
eb59b4de7f Clear out dead code 2022-01-14 14:20:17 -05:00
Isaac Connor
8b99b15b41 Use a scope to shorten the lock on event_lock 2022-01-14 14:17:07 -05:00
Isaac Connor
9240a93ef5 Revert my idea of having ONVIF and TRIGGER code start/end events. Move code to tst for Ready() up above ONVIF and TRIGGER code. When waiting for decode, junk the idea of locking in the packetqueue. Since waiting releases the lock, we should be ok waiting and notifying in the packet. (I know there was a time when I felt this was necessary and I think it had to do with the deinterlacing case, but I've simplified that code too). 2022-01-14 14:09:18 -05:00
Jonathan Bennett
212d51f933 Merge branch 'ZoneMinder:master' into janus 2022-01-13 12:16:16 -06:00
Isaac Connor
44b11389ce Merge pseudo:sandbox/ZoneMinder.connortechnology into event_thread 2022-01-13 12:00:17 -05:00
Jonathan Bennett
2beffeb1b4 Add Janus to Cycle view. Remove debug Alert() messages 2022-01-12 22:47:35 -06:00
Isaac Connor
f764cfbc32 Fix deadlock on deleting event. Cannot race for the lock, joining will do the job 2022-01-12 23:11:19 -05:00
Isaac Connor
3d04228485 rework ::Analyse. The state engine will only go into alarm on actual motion, not on a skipped frame. TRIGGERS and ONVIF events will immediately create events. 2022-01-12 23:10:17 -05:00
Isaac Connor
a9f7b257ea Rough in a queue and a thread into the event to process packets. We do this so that the event creator can get back to analysis as fast as possible so as to avoid the packetqueue filling up. 2022-01-12 17:16:49 -05:00
Jonathan Bennett
aeefc512ab Merge branch 'master' into janus 2022-01-12 13:04:13 -06:00
Isaac Connor
c9db5f44a4 cherry pick Add check to prevent tight busy loop if ONVIF setup fails 2022-01-12 12:05:33 -05:00
Jonathan Bennett
84a73bb007 Add check to prevent tight busy loop if ONVIF setup fails 2022-01-12 09:37:48 -06:00
Jonathan Bennett
7a5a05fe94 Clean up warnings 2022-01-12 01:29:32 -06:00
Jonathan Bennett
cb46b94ea1 Add error handling to libcurl calls to Janus 2022-01-12 00:19:54 -06:00
Isaac Connor
c27b0aff97 Move analysis image assignment up to where motion detection is done do remove duplication and simplify logic. Free analysis images as well as captured images after analysis. remove extra copy of image to analysis_image. Replae a packetqueue.unlock with just deleting the locked packet. No one waits for analysis. Re-introduce sleeping in the analysis thread on error to prevent spinning 2022-01-11 22:11:28 -05:00
Isaac Connor
ff91ac62fb add comment documenting why we sleep 2022-01-11 17:02:05 -05:00
Isaac Connor
cd6c44db47 Revert "Remove sleeping from Analysis thread. It is uneccessary and results in us starting off way behind the capture thread. It also limits us to 30fps."
This reverts commit 6c4156a483.
2022-01-11 17:01:04 -05:00
Jonathan Bennett
2729e1de22 Merge branch 'ZoneMinder:master' into janus 2022-01-11 10:37:29 -06:00
Isaac Connor
aaaf87abdb Don't try again if the error was ENOSPACE. it crashes and there is just no point. 2022-01-11 09:08:01 -05:00
Isaac Connor
90cbf5a018 Fix == instead of = 2022-01-11 09:06:43 -05:00
Jonathan Bennett
3a9c16aeea First working Janus build 2022-01-10 23:22:37 -06:00
Isaac Connor
b88e699d7e Merge branch 'master' of github.com:ZoneMinder/zoneminder 2022-01-10 19:56:04 -05:00
Isaac Connor
81fc392bc2 If error is ENOSPACE just give up. ffmpeg crashes if we try again. 2022-01-10 19:56:00 -05:00
Isaac Connor
cb30f7639f revert broken commit. Isaac doesn't know what he's doing. 2022-01-10 18:47:26 -05:00
Isaac Connor
a0c34f0d96 Fix. cppcheck was wrong about divider being able to go into deeper scope. 2022-01-10 18:33:01 -05:00
Isaac Connor
3f7b9dfff7 fix cppcheck error about lo_x. Inner scope overwriting it. 2022-01-10 17:36:50 -05:00
Isaac Connor
376d7fd7e5 log error if avcodec_parameters_to_context fails. Mostly to quiet cppcheck. Remove duplicated assignment to sample_fmt. 2022-01-10 17:36:50 -05:00
Isaac Connor
78a10b6095 cppcheck fixes 2022-01-10 17:36:49 -05:00
Isaac Connor
9f86fd3b16 add default_width and height to constructor 2022-01-10 17:36:49 -05:00
Isaac Connor
4697e36f11 add explicit 2022-01-10 17:36:49 -05:00
Isaac Connor
037771539d spacing, return a success value from setupCodec instead of using Fatal 2022-01-10 17:36:49 -05:00
Isaac Connor
b406bf8fd1 remove last_send_image_width/height. Not really useful or relevant 2022-01-10 17:36:49 -05:00
Isaac Connor
ed7bc7c4b4 whitespace 2022-01-10 15:25:15 -05:00
Isaac Connor
ec95c8da57 Rename the monitor type define from CURL to LIBCURL to fix namespace conflict 2022-01-10 15:25:15 -05:00