-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
ZoneMinder 1.38 changed the SharedData struct layout in shared memory, adding new fields (image_count, latitude, longitude, capturing, analysing, recording, janus_pin, etc.) and renaming active → capturing. The struct size grew from 760 to 872 bytes.
Changes
- Replace inline Perl comment blocks with declarative
_LAYOUT_760and_LAYOUT_872tuple lists - Add
_build_struct_info()helper to derive format string, field names, and string-field list from layouts - Build a
_REGISTRYdict keyed bystruct.calcsize()for automatic version detection - Auto-detect ZM version by reading the
sizefield (first uint32) from shared memory and looking it up in the registry - Extract TriggerData format to module-level constants
- Add backward-compatibility alias:
active←capturingfor ZM 1.38
Design
Adding support for a future ZM version requires only:
- Define a new
_LAYOUT_xxxlist - Append it to the registry loop
No if/else branches, no duplicate format strings.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request