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

Class NegotiatedFormat

rustcv-backend-v4l2/src/device.rs:82–88  ·  view source on GitHub ↗

核心:格式协商算法 遍历硬件支持的所有格式,计算得分,返回最佳配置

Source from the content-addressed store, hash-verified

80/// 核心:格式协商算法
81/// 遍历硬件支持的所有格式,计算得分,返回最佳配置
82struct NegotiatedFormat {
83 width: u32,
84 height: u32,
85 format: PixelFormat,
86 #[allow(dead_code)]
87 fps: u32, // 目标 FPS
88}
89
90fn negotiate_format(dev: &v4l::Device, config: &CameraConfig) -> Result<NegotiatedFormat> {
91 let mut best_score = -1;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected