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

Function to_v4l_fourcc

rustcv-backend-v4l2/src/pixel_map.rs:42–47  ·  view source on GitHub ↗

将 rustcv-core 的 FourCC 转换为 v4l 的 FourCC 用于请求设备设置格式

(fmt: PixelFormat)

Source from the content-addressed store, hash-verified

40/// 将 rustcv-core 的 FourCC 转换为 v4l 的 FourCC
41/// 用于请求设备设置格式
42pub fn to_v4l_fourcc(fmt: PixelFormat) -> Option<V4lFourCC> {
43 match fmt {
44 PixelFormat::Known(cc) => Some(V4lFourCC::new(&cc.0.to_le_bytes())),
45 PixelFormat::Unknown(_) => None, // 无法主动请求未知的格式
46 }
47}

Callers 1

openFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected