Skip to main content

dahua_camera_events/
lib.rs

1//! Camera event subscription.
2//!
3//! Two transports, one port. [`dahua_cgi`] attaches to Dahua's
4//! `eventManager.cgi` and reads `multipart/x-mixed-replace` chunks; an ONVIF
5//! PullPoint transport lands alongside it. Both implement
6//! [`EventSource`](dahua_camera_core::ports::EventSource), so nothing
7//! downstream knows which one is in use.
8//!
9//! # Reconnection is not this crate's job
10//!
11//! An [`EventSource`](dahua_camera_core::ports::EventSource) opens a stream
12//! and parses what comes back. The reconnect loop belongs to the shared
13//! supervisor in `dahua-camera-rtsp`, which gives the event channel the same
14//! backoff, stall watchdog and panic isolation that video gets — and keeps the
15//! two reconnecting **independently**, so a camera whose event endpoint is
16//! disabled still streams video normally.
17//!
18//! # Safety
19//!
20//! Events carried by this crate are an operator aid and are **not
21//! safety-rated**. See `SAFETY.md` at the workspace root.
22
23#![warn(missing_docs)]
24#![forbid(unsafe_code)]
25
26pub mod dahua_cgi;
27pub mod parser;
28
29pub use dahua_cgi::{DahuaEventSource, DahuaEventSourceFactory};