lint the test targets, make the fps setting real, and stop tonemapping sdr captures

This commit is contained in:
2026-09-21 06:45:23 +03:00
parent 4b850096a1
commit aef64fa4e3
8 changed files with 221 additions and 40 deletions
+6 -3
View File
@@ -586,7 +586,6 @@ fn start_capture(
output,
ffmpeg,
cfg.capture.capture_cursor,
cfg.capture.capture_audio,
crop,
fps,
cfg.capture.capture_quality,
@@ -700,7 +699,7 @@ fn resume_capture(app: AppHandle, state: State<'_, AppState>) -> Result<(), Stri
if !ffmpeg.is_file() {
return Err("ffmpeg.exe not found".to_string());
}
let session = capture::start(output, ffmpeg, capture_cursor, audio, crop, fps, quality)
let session = capture::start(output, ffmpeg, capture_cursor, crop, fps, quality)
.map_err(|e| format!("{e:#}"))?;
let audio_path = audio_segment_path(&state.app_dir, next_idx);
@@ -1118,6 +1117,10 @@ fn estimate_gif_params_table(request: GifTableRequest) -> GifEstimateTable {
#[cfg(test)]
mod tests {
// Tests fail by panicking, which is the harness contract; unwrap and expect
// are denied to keep panics out of the shipping paths.
#![allow(clippy::unwrap_used, reason = "a failing test is meant to panic")]
use super::*;
fn make_request(target_bytes: u64, fps: u32, mode: GifBudgetMode) -> PreviewRequest {
@@ -1136,7 +1139,7 @@ mod tests {
/// Windows keeps whatever case a name was created with, so the temp sweep
/// matches extensions case-insensitively. It used to compare with
/// ends_with(".mp4"), which silently missed an upper-case recording.
/// `ends_with(".mp4")`, which silently missed an upper-case recording.
#[test]
fn extension_match_ignores_case() {
assert!(has_ext("segment-001.mp4", "mp4"));