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

Method get_exposure

rustcv-backend-msmf/src/controls.rs:77–85  ·  view source on GitHub ↗

Gets the current exposure time. # Returns The exposure time in microseconds, or a default value if unavailable.

(&self)

Source from the content-addressed store, hash-verified

75 ///
76 /// The exposure time in microseconds, or a default value if unavailable.
77 fn get_exposure(&self) -> Result<u32> {
78 unsafe {
79 Ok(
80 get_media_type_uint64(&self.source_reader.0, &MF_MT_VIDEO_LIGHTING)
81 .map(|v| v as u32)
82 .unwrap_or(DEFAULT_EXPOSURE_US),
83 )
84 }
85 }
86}
87
88/// Lens control implementation for MSMF cameras.

Callers 1

main_bodyFunction · 0.45

Calls 1

get_media_type_uint64Function · 0.85

Tested by

no test coverage detected