Skip to main content

stop_preview

Function stop_preview 

Source
pub fn stop_preview(
    state: State<'_, PreviewState>,
    pipeline_state: State<'_, CameraPipelineHandle>,
)
Expand description

Stop the camera preview pipeline (M-CAM.2 / AUT-256 + M-CAM.3 / AUT-257).

Drops the CameraPipeline worker — which cancels the loop, joins the thread, and (via gstreamer_video::VideoStream’s own Drop) kills the gst-launch child. The worker thread itself resets the lifecycle to Idle on its way out, but we also do it here as a belt-and-braces guard in case the worker already exited (gst failure path).