Skip to main content

Module preview

Module preview 

Source
Expand description

Camera preview lifecycle (M-CAM.2 / AUT-256) + worker (M-CAM.3 / AUT-257).

Owns the PreviewLifecycle state machine that Tauri-managed state holds + the pipeline::CameraPipeline worker that runs the gst capture subprocess on a dedicated thread. M-CAM.2 landed the state machine; M-CAM.3 layers the gst worker on top, with the wisp render + Tauri Channel<T> frame emission shipping in follow-up commits (see pipeline.rs’s “What this commit ships” callout for the explicit boundary).

The state machine is pure Rust (no tauri::* types, no async, no I/O) so the four-state transition contract works on every OS including Windows, where Tauri 2’s mock_builder won’t even link at test-time (per CLAUDE.md).

Re-exports§

pub use diagnostics::DiagnosticsSnapshot;
pub use diagnostics::PreviewDiagnostics;
pub use pipeline::CameraPipeline;
pub use pipeline::CameraPipelineHandle;

Modules§

diagnostics
M-CAM.3 / AUT-257 — runtime diagnostics for the camera pipeline.
pipeline
M-CAM.3 / AUT-257 — camera-pipeline worker thread.

Structs§

PreviewState
Tauri-managed wrapper around PreviewLifecycle. Held in tauri::State so the IPC command handlers + the future frame emitter share one source of truth.

Enums§

CameraError
Error variants the IPC command surface can return to Leptos.
PreviewLifecycle
Lifecycle state of the camera preview pipeline.