MCPcopy Create free account
hub / github.com/RustCV/RustCV / stop

Method stop

rustcv-backend-msmf/src/stream.rs:478–489  ·  view source on GitHub ↗

Stops the video capture stream. Flushes any pending samples and prevents further callbacks.

(&mut self)

Source from the content-addressed store, hash-verified

476 ///
477 /// Flushes any pending samples and prevents further callbacks.
478 async fn stop(&mut self) -> Result<()> {
479 self.shared.is_running.store(false, Ordering::Release);
480
481 unsafe {
482 let _ = self
483 .source_reader
484 .0
485 .Flush(MF_SOURCE_READER_FIRST_VIDEO_STREAM.0 as u32);
486 }
487
488 Ok(())
489 }
490
491 /// Waits for and returns the next available frame.
492 ///

Callers 1

main_bodyFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected