Camera opens at the lowest frame rate meeting the setting instead of the highest (720p30 setting opened 720p60 MJPEG)
Browse files at this commita5b0c2c3fe167ef08115b978fe0c392fb9a8e026Parent: 20f107c- fix
- camera opens at the lowest frame rate meeting the setting instead of the highest (720p30 setting opened 720p60 MJPEG)
- camera decode 11% → 5% of a core on a real webcam
1 changed file +1 -1
crates/client/src/share/camera.rsmodified+1 -1
| @@ -129,7 +129,7 @@ fn pick(formats: &[CameraFormat], top: Quality) -> Option<CameraFormat> { | |||
| 129 | format.frame_rate() < refresh, | 129 | format.frame_rate() < refresh, |
| 130 | format.height(), | 130 | format.height(), |
| 131 | format.format() == FrameFormat::MJPEG, | 131 | format.format() == FrameFormat::MJPEG, |
| 132 | - std::cmp::Reverse(format.frame_rate()), | 132 | + format.frame_rate().abs_diff(refresh), |
| 133 | ) | 133 | ) |
| 134 | }) | 134 | }) |
| 135 | } | 135 | } |