Skip to main content

Crate bairelay

Crate bairelay 

Source

Modules§

audio_presence
Per-camera audio presence state. Written by the stream-source reader task and by startup_wake::warm_one; read by CameraProvider::subscribe to decide whether to wait for an audio track’s SDP params before returning a subscription to the RTSP server.
bc_opts
BcCameraOpt builder shared by the camera connect loop and CLI.
bcmedia_dump
Opt-in on-disk capture of raw BcMedia packets for fixture replay.
camera
camera_provider
Adapter from the RTSP StreamProvider trait to the binary’s CameraHandle + StreamSource.
camera_tasks
Per-camera async tasks that run while a camera session is active.
capabilities
Per-camera capability cache.
cli
cli_convert
CLI → oneshot-action converters and log-directive helpers.
config
grace_period
hassio
HA add-on glue: parse Supervisor’s options.json + an optional TOML overlay into a single bairelay crate::config::Config, validate, and emit. Exposed via the bairelay render-hassio-config subcommand.
local_time
Local-time support for log timestamps and the set-time one-shot.
mqtt_dispatch
Routes incoming MQTT control commands to the appropriate BcCamera methods.
mqtt_loop
MQTT-side event-loop helpers extracted from main.rs so the per- event branch table can be unit-tested without spinning up a real broker + rumqttc::EventLoop.
oneshot
orchestrator
preview_overlay
Render a camera-state caption onto the MQTT preview JPEG.
preview_state
Per-camera state used to drive the MQTT preview overlay.
push_listener
TCP listener that turns the camera’s motion-time HTTPS connect attempt into a local motion event.
run_support
Pure-logic helpers extracted from main.rs so each step of the bring-up / teardown pipeline is unit-testable without a real broker, orchestrator, or signal-handler wiring.
startup_wake
Startup wake cycle: warm each camera’s last-frame buffer at boot.
status_cache
Per-camera cache of the most-recent MQTT status values.
stream_source
Per-(camera, stream_kind) live media source.
supervisor
Lightweight service supervisor for main.rs.
tls_load
Load and parse the TLS PEMs referenced by [Config].
wake_lock
watchdog