Expand description
Live camera capture: an in-app viewfinder frame source.
Unlike the one-shot image_picker (which presents the
system camera UI), this exposes a running capture session whose latest frame
the app polls to render its own viewfinder and run per-frame detection —
matching the Android/desktop live-preview experience.
The platform backend installs an implementation via set_platform_camera
(iOS AVCaptureSession, desktop nokhwa, …). No default: camera returns
None where live capture is unsupported, so the app can fall back to the
image picker.
Structs§
- Camera
Frame - A single captured frame as tightly-packed RGBA8 (
width * height * 4bytes, row-major, no padding).
Enums§
Traits§
- Camera
- A running (or startable) live camera. Implementations are
Send + Syncso a background preview pump can start/stop and poll frames off the UI thread.
Functions§
- camera
- The registered live camera, or
Nonewhere live capture is unsupported. - clear_
platform_ camera - Removes any registered platform camera (tests/teardown).
- set_
platform_ camera - Installs the platform live camera, replacing any previous one.