Commit Graph

6267 Commits

Author SHA1 Message Date
Isaac Connor
6ef2950d21 refactor: consolidate GSOAP ifdefs in ONVIF class
- Wrap all GSOAP-dependent code in a single #ifdef WITH_GSOAP block
- Move GSOAP-specific members and methods inside the conditional
- Provide minimal stubs (constructor, destructor, start) for non-GSOAP builds
- Remove unnecessary stub methods for private members that can't be called
- Code now compiles cleanly with or without GSOAP support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:36:51 -05:00
Isaac Connor
e7618f3caf Add arm 32 and 64bit support to backtrace 2026-01-28 16:10:37 -05:00
Isaac Connor
2033b5eb73 Update Storage DiskSpace once event has been finalized. As we decrement DIskSpace on event deletion, we were getting negative DIskSpace in the Storage table. 2026-01-28 15:15:59 -05:00
Isaac Connor
1d23bd297f Warn about too slow send_packet only if debug is on 2026-01-28 14:51:15 -05:00
Isaac Connor
687003f67d Merge branch 'master' of github.com:ZoneMinder/zoneminder 2026-01-27 15:17:35 -05:00
Isaac Connor
141df0a912 Only do y_image stuff if we have a decoded in_frame 2026-01-27 15:17:29 -05:00
Isaac Connor
bb5ebe8f7e Merge pull request #4573 from BHMSD-bdailey/ONVIFHonorTerminationTime
feat: add per-topic alarm expiry using PullMessagesResponse Terminati…
2026-01-27 12:54:07 -05:00
Isaac Connor
aa0a899c59 Test for soap in set_credentials 2026-01-27 11:51:51 -05:00
Isaac Connor
0f917ae1ed refactor: restructure Decode() and fix PacketQueue locking issues
Monitor::Decode():
- Reorganize into 5 clear phases with descriptive comments
- Phase 1: Receive decoded frame from decoder
- Phase 2: Get and send new packet to decoder
- Phase 3: Convert decoded frame to Image
- Phase 4: Prepare Y-channel for analysis
- Phase 5: Process RGB image (deinterlace, rotate, privacy, timestamp)
- Extract applyOrientation() and applyDeinterlacing() helper functions
- Keep slow send_packet detection timing for diagnostics

PacketQueue locking fixes:
- Move lock acquisition before accessing shared state in queuePacket()
- Keep lock held while iterating in stop()
- Add lock to addStream()
- Remove duplicate packet_counts allocation in clear()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:18:50 -05:00
Isaac Connor
7194008fe6 Set decoded=true in error case when de-interlacing 2026-01-27 10:36:03 -05:00
Isaac Connor
5c402ccab4 Add wait parameter to increment_it. Sometimes we should wait and sometimes not. 2026-01-27 09:30:28 -05:00
Isaac Connor
da13e5f1a7 Clean up error case return code 2026-01-27 09:00:01 -05:00
Isaac Connor
ae97d4bd4b Make incremement at end a debug. 2026-01-27 08:05:04 -05:00
Isaac Connor
b0e966c56b Put locking debugging back at level 4 2026-01-27 08:04:35 -05:00
Isaac Connor
f8256a1d0e ONly generate y_image if we are doing analysing. 2026-01-27 07:57:43 -05:00
Ben Dailey
2dc48e4335 feat: add per-topic alarm expiry using PullMessagesResponse TerminationTime
Cameras like Reolink send alarm=true but never send the corresponding
false, causing alarms to stick indefinitely. Use the TerminationTime
from PullMessagesResponse to auto-expire stale per-topic alarms.

- Add AlarmEntry struct with value and termination_time fields
- Extract TerminationTime from each PullMessagesResponse and attach
  it to alarm entries; refresh on re-trigger so active alarms persist
- Sweep expired alarms after processing messages and on poll timeout
- Add expire_alarms option (default: true) to disable via onvif_options
- Fix TOCTOU race: remove unsynchronized alarms.empty() check before
  acquiring mutex in the timeout sweep path
- Simplify SetNoteSet with C++17 structured bindings
- Add Catch2 tests for alarm expiry logic (mirrored struct to avoid
  gSOAP header dependency)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 05:52:31 -05:00
Isaac Connor
8eee695e63 Cleanup return values, kill dead code and duplicated checks 2026-01-26 18:28:59 -05:00
Isaac Connor
46ebe10d73 Fix missing increment_it 2026-01-26 18:01:04 -05:00
Isaac Connor
179d544e3a Fix opening the v4l device on camera object instantiation (including in zms). Fix behaviour when ondemand pause/playing. 2026-01-26 18:00:53 -05:00
Isaac Connor
70c4d7bacd Remove ::decode which is no good. Move hw transfer stuff to transfer_hwframe and needs_hw_transfer 2026-01-26 15:11:38 -05:00
Isaac Connor
5ecb5fdb1c Need to call trasnfer_hwframe in case we are using hwaccel. 2026-01-26 15:11:05 -05:00
Isaac Connor
c743c00e78 Change default pull_timeout_seconds to 1 to improve shutdown speed 2026-01-26 15:10:33 -05:00
Isaac Connor
94702b8932 Codecs can return EAGAIN. We have to queue and wait for it to start giving us decoded frames. 2026-01-26 14:56:18 -05:00
Isaac Connor
107863f228 Move init to constructor. start() now just fires off Run and returns immediately. Run will do the subscribing 2026-01-26 14:40:51 -05:00
Isaac Connor
2eebda8c64 Cleanup hw_pix_fmt and get_hw_format 2026-01-26 14:40:10 -05:00
Isaac Connor
91f5333e7d Cleanup access to y_image using get_y_image(). 2026-01-26 13:18:32 -05:00
Isaac Connor
31c76557be Return a y-image for any suitable format that has a y-plane. Specifically this allows NV12 to work. 2026-01-26 13:18:14 -05:00
Isaac Connor
12ffa835c7 Merge in code to iterate through available codecs and try each one. 2026-01-26 13:17:25 -05:00
Isaac Connor
b79f8b7b51 Add get_y-image 2026-01-26 12:54:31 -05:00
Isaac Connor
edb09314b5 The correct codec name is hevc not h265 2026-01-26 11:56:12 -05:00
Isaac Connor
0a0e29c99b Add get_fps_string to return a string of the fps content to be used later for Debug output. Convert dump_stream to build a string first before Debug 2026-01-26 11:47:21 -05:00
Isaac Connor
d604dd69b6 Implement libjpeg_to_ffmpeg_qv 2026-01-26 11:46:47 -05:00
Isaac Connor
52376d9ed5 Only log about renewal time of renewals are enabled 2026-01-25 18:55:03 -05:00
Isaac Connor
518c8d8de0 Fixup hwtransfer when using hwaccel 2026-01-25 18:00:49 -05:00
Isaac Connor
fd7e2e7935 Fixup sw_pix_fmt options for hevc_vaapi and hevc_cuvid. Add h264_cuvid as an option. 2026-01-25 18:00:28 -05:00
Isaac Connor
4e9904f55d Allow disabling of renew. Detect when Renew doesn't work and just rescubscribe 2026-01-25 12:50:47 -05:00
Isaac Connor
9db065fc9a Merge branch 'master' of github.com:ZoneMinder/zoneminder 2026-01-24 11:22:14 -05:00
Isaac Connor
7ddd404308 Introduce SystemTimePOintToMysqlString 2026-01-24 11:17:57 -05:00
Isaac Connor
41251faefc Use SystemTimePointToMysqlString instead of from_unixtimestamp when insert events. Also we don't have Events_Year yet. 2026-01-24 11:17:40 -05:00
Isaac Connor
bfb213d7c3 Do what evetns_insert_trigger used to do 2026-01-24 11:17:17 -05:00
Isaac Connor
e35cebaa4f Merge branch 'master' of github.com:ZoneMinder/zoneminder 2026-01-24 10:48:16 -05:00
Isaac Connor
57e8abafe6 Only setup the auth on second_path if there is a second path 2026-01-22 22:37:50 -05:00
Isaac Connor
765d58d909 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2026-01-22 22:20:01 -05:00
Isaac Connor
3fc497122c Merge branch 'master' of github.com:ZoneMinder/zoneminder 2026-01-22 22:18:24 -05:00
Isaac Connor
3b413c27ff Fix memleak in zm_monitor_go2rtc.cpp 2026-01-22 22:18:17 -05:00
Isaac Connor
36d0ae82dd Apparently we have to drain packets out of the encoder BEFORE we go into flushing mode or else we may hang. 2026-01-22 22:17:16 -05:00
Isaac Connor
e8adc89e0c Add send_packet and receive_frame, as we move towards deprecating send_packet_receive_frame 2026-01-22 21:43:19 -05:00
Isaac Connor
91aa3b5d90 Remove no longer used dest_frame 2026-01-22 20:54:14 -05:00
Isaac Connor
bef2ea5b9e Allocate the temp frame inside Assign, instead of keeping it around. 2026-01-22 20:54:00 -05:00
Ben Dailey
9e2dae1aa9 fix: ensure plain auth success executes full subscription setup
Previously, when plain UsernameToken authentication succeeded after
digest auth failed, the code would skip the subscription setup code
(initial PullMessages, renewal tracking, initial Renew). This was
because the success path only executed inside an else block that
plain auth success didn't reach.

Restructure attempt_subscription() so both success paths (first attempt
and plain auth retry) fall through to common success handling code:
- Initial PullMessages to clear queued messages
- Update renewal tracking times
- Perform initial subscription renewal

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 13:36:18 -05:00