Expand description
The built-in (printer chamber) camera seam for the server — distinct from the
external IP-camera proxy, which is just a URL on super::AppState. Live mode
grabs a JPEG over TCP:6000 (see crate::camera); fake / no-target mode has
no built-in camera. Abstracted as a trait so the server stays testable without
a real printer.
Structs§
- External
Camera - One configured external IP camera: a human label plus the snapshot URL the server proxies. The URL is an internal LAN address kept server-side — it’s only exposed on the gated config endpoint, never on the open camera listing.
- Live
Camera - Live built-in camera: a one-shot TCP:6000 grab against the printer.
- NoCamera
- No built-in camera — fake mode, or
bambu servewithout a printer target. - Opened
Camera Stream - An opened MJPEG stream: the upstream
content-type(which carries the multipart boundary) plus a blocking reader over the long-lived body.
Traits§
- Camera
Source - Source of built-in-camera frames.
Functions§
- open_
mjpeg_ stream - Open
url’s MJPEG stream (blocking): connect and return the content-type plus a reader over the endless multipart body. A connect timeout bounds the handshake and a per-read timeout ends a stalled stream, but there is deliberately no overall timeout — the stream is meant to be endless. Shared by the HTTP reverse-proxy and the plain-timelapse stream recorder. - url_
stream_ opener - A
StreamOpenthat re-opensurlon each call.
Type Aliases§
- Stream
Open - Opens a camera’s MJPEG stream on demand. A closure, not a URL, so a recorder can reconnect (re-open) without knowing the source and tests can inject a fake that yields canned readers.