diff --git a/crates/engine/tests/audio_export.rs b/crates/engine/tests/audio_export.rs index 0b63953..de965ac 100644 --- a/crates/engine/tests/audio_export.rs +++ b/crates/engine/tests/audio_export.rs @@ -227,6 +227,7 @@ fn exports_the_timeline_as_a_wav() { format: Format::Wav, ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(60)).expect("wav export"); assert_eq!(handle.progress(), 1.0, "finished at full progress"); @@ -249,6 +250,7 @@ fn exports_the_timeline_as_a_flac() { format: Format::Flac, ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(60)).expect("flac export"); assert_eq!(handle.progress(), 1.0, "finished at full progress"); @@ -287,6 +289,7 @@ fn exports_the_timeline_as_an_mp3() { format: Format::Mp3, ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(120)).expect("mp3 export"); assert_eq!(handle.progress(), 1.0, "finished at full progress"); @@ -363,7 +366,7 @@ fn a_still_and_a_song_export_as_an_mp4_with_sound() { color: Default::default(), }; let out = out_path("still_song", "mp4"); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); wait(&handle, Duration::from_secs(300)).expect("an mp4 of a still under a song"); // Picture: two seconds of it, through the demuxer an import uses. @@ -431,7 +434,8 @@ fn a_fader_is_one_tracks_own_and_the_limiter_holds_the_sum() { format: Format::Wav, ..Default::default() }, - ); + None, + ); wait(&handle, Duration::from_secs(60)).unwrap_or_else(|e| panic!("{name}: {e}")); let (audio, samples) = decode(&out); let peak = samples.iter().fold(0.0f32, |m, s| m.max(s.abs())); @@ -521,6 +525,7 @@ fn a_cancelled_audio_export_leaves_no_file() { format: Format::Wav, ..Default::default() }, + None, ); handle.cancel(); let outcome = wait(&handle, Duration::from_secs(120)); @@ -605,7 +610,8 @@ fn the_sound_is_written_at_the_rate_that_was_asked_for() { audio_kbps: kbps, ..Default::default() }, - ); + None, + ); wait(&handle, Duration::from_secs(120)).expect("mp3 export"); let got = mp3_declared_kbps(&out); println!("mp3 asked {kbps:?}, header says {got} kbps"); @@ -681,7 +687,8 @@ fn the_sound_is_written_at_the_rate_that_was_asked_for() { audio_kbps: Some(want), ..Default::default() }, - ); + None, + ); wait(&handle, Duration::from_secs(300)).expect("an mp4 of a still under a song"); let got = mp4_aac_kbps(&out, f64::from(RATE)); println!("mp4 asked {want} kbps, the track measures {got:.1}"); @@ -737,6 +744,7 @@ fn a_silent_clip_exports_as_silence_over_its_own_span() { format: Format::Wav, ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(60)).expect("wav export"); let (audio, samples) = decode(&out); @@ -771,6 +779,7 @@ fn a_silent_timeline_refuses_an_audio_export() { format: Format::Wav, ..Default::default() }, + None, ); let text = wait(&handle, Duration::from_secs(60)) .expect_err("no audio to export") @@ -821,6 +830,7 @@ fn a_51_ac3_source_round_trips_through_a_wav() { format: Format::Wav, ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(60)).expect("wav export of an AC-3 source"); @@ -862,6 +872,7 @@ fn exports_the_timeline_as_an_ogg_vorbis() { format: Format::Ogg, ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(180)).expect("ogg export"); assert_eq!(handle.progress(), 1.0, "finished at full progress"); @@ -947,6 +958,7 @@ fn a_mono_timeline_exports_as_dual_mono_ogg() { format: Format::Ogg, ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(180)).expect("ogg export of a mono timeline"); diff --git a/crates/engine/tests/av1.rs b/crates/engine/tests/av1.rs index 5becdb7..a9a8f1d 100644 --- a/crates/engine/tests/av1.rs +++ b/crates/engine/tests/av1.rs @@ -333,7 +333,7 @@ fn an_mp4_export_of_a_matroska_source_carries_its_sound() { let project = Project::single(asset("test_av1.mkv"), 15); let out = Scratch::file("ve_export_av1", "mp4"); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); let started = Instant::now(); while !handle.is_finished() { assert!(started.elapsed() < Duration::from_secs(900), "export hung"); diff --git a/crates/engine/tests/eq_audio.rs b/crates/engine/tests/eq_audio.rs index d7668cc..780c91e 100644 --- a/crates/engine/tests/eq_audio.rs +++ b/crates/engine/tests/eq_audio.rs @@ -300,7 +300,8 @@ fn the_audio_only_exports_carry_the_same_boost_playback_does() { format, ..Default::default() }, - ); + None, + ); wait(&handle, Duration::from_secs(60)).expect("an audio-only export"); written.push(decode(&out)); std::fs::remove_file(&out).unwrap(); @@ -340,7 +341,7 @@ fn an_mp4_export_carries_the_boost_a_packet_copy_could_not() { for (name, project) in [("flat", &flat), ("eqd", &eqd)] { let out = out_path(name, "mp4"); let settings = ExportSettings::default(); - let handle = engine::export::start(project.clone(), meta(), &out, &settings); + let handle = engine::export::start(project.clone(), meta(), &out, &settings, None); wait(&handle, Duration::from_secs(180)).expect("an equalized timeline exports as mp4"); written.push(decode(&out)); std::fs::remove_file(&out).unwrap(); diff --git a/crates/engine/tests/export.rs b/crates/engine/tests/export.rs index 20047ef..d433f99 100644 --- a/crates/engine/tests/export.rs +++ b/crates/engine/tests/export.rs @@ -271,7 +271,7 @@ fn exports_at_the_project_resolution_with_the_watched_geometry() { color: Default::default(), }; let out = out_path("mixed"); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); wait(&handle, Duration::from_secs(600)).expect("export"); let (written, _) = engine::demux::Demuxer::open(&out).expect("reopen export"); @@ -347,7 +347,7 @@ fn exports_the_audio_stream_the_timeline_plays() { ) .expect("a one-source project on stream 1"); let out = out_path("stream1"); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); wait(&handle, Duration::from_secs(600)).expect("export"); let (audio, _) = engine::AudioSession::open(&out) @@ -429,7 +429,7 @@ fn multi_source_round_trip(name: &str, limit: Duration) { let out = out_path(name); let started = Instant::now(); - let handle = engine::export::start(project.clone(), meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project.clone(), meta, &out, &ExportSettings::default(), None); wait(&handle, limit).expect("export"); println!( "{name}: {total} frames of two sources in {:.2} s", @@ -555,7 +555,7 @@ fn a_vanished_source_fails_the_export() { std::fs::remove_file(&doomed).expect("unlink the second source"); let out = out_path("vanished"); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); let result = wait(&handle, Duration::from_secs(60)); let error = result.expect_err("an export of a missing file cannot succeed"); println!("vanished source: {error}"); @@ -1415,7 +1415,7 @@ fn a_hardware_encoder_killed_mid_export_costs_the_file_nothing() { injected(Some("3"), None, || { // `Auto` is what an untouched export card sends: the seat that *may* // fall back, which is the whole question here. - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); wait(&handle, Duration::from_secs(180)).expect("the export survived its encoder"); }); @@ -1443,7 +1443,7 @@ fn a_hardware_encoder_killed_mid_export_never_pulls_the_bar_backwards() { let out = out_path("hw_child_abort_progress"); let seen = injected(Some("3"), None, || { - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); // Sampled far faster than the export writes, so the retry cannot slip // through between two reads. let started = Instant::now(); @@ -1498,7 +1498,7 @@ fn audio_pass_threads() -> usize { /// The busiest that crowd ever gets while `export` writes this project. fn busiest_audio_pass(project: Project, meta: engine::VideoMeta, out: &Path) -> usize { - let handle = engine::export::start(project, meta, out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, out, &ExportSettings::default(), None); let started = Instant::now(); let mut most = 0; while !handle.is_finished() { @@ -1600,7 +1600,7 @@ fn a_hardware_encoder_killed_at_its_open_is_simply_no_seat() { let out = out_path("hw_child_abort_init"); injected(Some("init"), None, || { - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); wait(&handle, Duration::from_secs(180)).expect("the export survived the open"); }); @@ -1618,7 +1618,7 @@ fn a_hardware_encoder_killed_at_the_drain_costs_the_file_nothing() { let out = out_path("hw_child_abort_drain"); injected(Some("drain"), None, || { - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); wait(&handle, Duration::from_secs(180)).expect("the export survived the drain"); }); @@ -1641,7 +1641,7 @@ fn a_hardware_encoder_that_stops_answering_is_killed_and_replaced() { let started = Instant::now(); injected(None, Some("2"), || { - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); wait(&handle, Duration::from_secs(180)).expect("the export outlived the wedge"); }); println!( @@ -1675,7 +1675,7 @@ fn an_export_that_asked_for_the_gpu_by_name_refuses_instead_of_falling_back() { seat: engine::export::EncoderSeat::Hardware, ..Default::default() }; - let handle = engine::export::start(project, meta, &out, &settings); + let handle = engine::export::start(project, meta, &out, &settings, None); wait(&handle, Duration::from_secs(180)) .expect_err("a named hardware seat that died is not written again in software") }); diff --git a/crates/engine/tests/export_subs.rs b/crates/engine/tests/export_subs.rs index 36aad7e..1e09c5e 100644 --- a/crates/engine/tests/export_subs.rs +++ b/crates/engine/tests/export_subs.rs @@ -157,6 +157,7 @@ fn exported_want( subtitles: picks.to_vec(), ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(1800)).expect("the export finishes"); // The bar ends where it was told it would: the picture loop's own count and @@ -188,6 +189,7 @@ fn exported_mp4(name: &str, project: Project, picks: &[usize]) -> Scratch { subtitles: picks.to_vec(), ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(1800)).expect("the export finishes"); out @@ -570,6 +572,7 @@ fn an_hevc_mp4_keeps_its_rewritten_entry_and_its_text() { subtitles: vec![1], ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(1800)).expect("the export finishes"); let Some(listing) = ffmpeg_streams(&out) else { @@ -662,6 +665,7 @@ fn more_tracks_than_a_block_can_number_are_refused_by_name() { subtitles: (0..over).collect(), ..Default::default() }, + None, ); let said = wait(&handle, Duration::from_secs(1800)) .expect_err("a file that cannot be numbered is not written") @@ -1094,6 +1098,7 @@ fn more_lanes_than_a_block_can_number_are_refused_by_name() { format: Format::Hevc, ..Default::default() }, + None, ); let said = wait(&handle, Duration::from_secs(1800)) .expect_err("a file that cannot be numbered is not written") diff --git a/crates/engine/tests/hevc.rs b/crates/engine/tests/hevc.rs index 38d2f8e..6aa7859 100644 --- a/crates/engine/tests/hevc.rs +++ b/crates/engine/tests/hevc.rs @@ -242,7 +242,7 @@ fn an_hevc_source_exports_as_h264() { let project = Project::single(asset("test_hevc.mp4"), meta.frame_count); let out = Scratch::file("ve_export_hevc", "mp4"); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); let started = Instant::now(); while !handle.is_finished() { assert!(started.elapsed() < Duration::from_secs(120), "export hung"); diff --git a/crates/engine/tests/hevc_hvc1.rs b/crates/engine/tests/hevc_hvc1.rs index d35e497..42f09de 100644 --- a/crates/engine/tests/hevc_hvc1.rs +++ b/crates/engine/tests/hevc_hvc1.rs @@ -127,7 +127,7 @@ fn an_hvc1_source_exports_as_h264() { let project = Project::single(asset(HVC1), meta.frame_count); let out = Scratch::file("ve_export_hvc1", "mp4"); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); let started = Instant::now(); while !handle.is_finished() { assert!(started.elapsed() < Duration::from_secs(120), "export hung"); diff --git a/crates/engine/tests/import_mp4_subs.rs b/crates/engine/tests/import_mp4_subs.rs index d6b7b84..a8372c1 100644 --- a/crates/engine/tests/import_mp4_subs.rs +++ b/crates/engine/tests/import_mp4_subs.rs @@ -98,6 +98,7 @@ fn exported_mp4(name: &str) -> Scratch { subtitles: vec![0, 1], ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(300)).expect("the export finishes"); out diff --git a/crates/engine/tests/lanes.rs b/crates/engine/tests/lanes.rs index f5afc9c..b1fb59b 100644 --- a/crates/engine/tests/lanes.rs +++ b/crates/engine/tests/lanes.rs @@ -266,7 +266,7 @@ fn the_mp4_copy_follows_the_lane_that_holds_the_sound() { let out = out_path("a2_only", "mp4"); let (meta, _) = engine::demux::Demuxer::open(&source).unwrap(); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); wait(&handle, Duration::from_secs(300)).expect("export the A2-only timeline"); let written = decoded_audio(&out); @@ -323,7 +323,7 @@ fn two_audio_lanes_are_summed() { format: Format::Wav, ..Default::default() }; - let handle = engine::export::start(project, meta, &out, &settings); + let handle = engine::export::start(project, meta, &out, &settings, None); wait(&handle, Duration::from_secs(120)).expect("wav export"); let mut reader = hound::WavReader::open(&out).expect("reopen the wav"); let spec = reader.spec(); @@ -377,7 +377,7 @@ fn two_audio_lanes_are_summed() { // this decodes both lanes and encodes the sum instead (`export::copy_audio` // routes to `encode_audio`), which is the same mix the WAV above measured. let out = out_path("mixed", "mp4"); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); wait(&handle, Duration::from_secs(180)).expect("an mp4 of two audio lanes"); let (audio, chunks) = engine::AudioSession::open(&out) .expect("reopen the export") diff --git a/crates/engine/tests/opus_export.rs b/crates/engine/tests/opus_export.rs index 98fa1d3..2affe6a 100644 --- a/crates/engine/tests/opus_export.rs +++ b/crates/engine/tests/opus_export.rs @@ -124,6 +124,7 @@ fn export(name: &str, project: Project, video: &Path) -> Scratch { format: Format::Hevc, ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(600)).expect("the export finishes"); out @@ -455,6 +456,7 @@ fn a_copied_picture_names_the_sound_it_was_written_with() { format: Format::Hevc, ..Default::default() }, + None, ); let line = { wait(&handle, Duration::from_secs(600)).expect("the export finishes"); diff --git a/crates/engine/tests/silence.rs b/crates/engine/tests/silence.rs index bda8930..9c349fe 100644 --- a/crates/engine/tests/silence.rs +++ b/crates/engine/tests/silence.rs @@ -385,6 +385,7 @@ fn scanning_a_clip_and_cutting_what_it_finds() { true, engine::export::EncoderSeat::default(), p.limiter(), + None, 0, ) .expect("save"); diff --git a/crates/engine/tests/speed.rs b/crates/engine/tests/speed.rs index d96d895..f21034c 100644 --- a/crates/engine/tests/speed.rs +++ b/crates/engine/tests/speed.rs @@ -280,6 +280,7 @@ fn a_wav_export_of_a_2x_timeline_matches_the_preview() { format: Format::Wav, ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(120)).expect("wav export"); let mut reader = hound::WavReader::open(&out).expect("read the export back"); @@ -316,7 +317,7 @@ fn an_mp4_export_resamples_a_speeded_sound_clip() { .expect("room enough"); let heard = beep_at(&play(&project)); let out = out_path("speeded", "mp4"); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); wait(&handle, Duration::from_secs(180)).expect("an mp4 of a speeded sound clip"); let (audio, chunks) = AudioSession::open(&out) .expect("reopen the export") @@ -468,6 +469,7 @@ fn a_wav_export_of_a_2x_clip_keeps_the_beeps_pitch() { format: Format::Wav, ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(120)).expect("wav export"); let mut reader = hound::WavReader::open(&out).expect("read the export back"); @@ -528,7 +530,7 @@ fn an_mp4_export_honours_a_speeded_picture_across_a_rate_change() { assert_eq!(total, fast + 90, "45 fast frames then 90 slow ones"); let out = out_path("honoured", "mp4"); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); wait(&handle, Duration::from_secs(300)).expect("an mp4 export of a speeded picture"); let (_, frames) = DecodeSession::open(&out).expect("reopen the export"); let frames: Vec<_> = frames.into_iter().collect(); @@ -575,6 +577,7 @@ fn an_av1_export_honours_a_speeded_take_whole() { format: Format::Av1, ..Default::default() }, + None, ); wait(&handle, Duration::from_secs(600)).expect("an AV1 export of a speeded take"); assert!(out.exists(), "AV1 never refuses a rate"); diff --git a/crates/engine/tests/vp9.rs b/crates/engine/tests/vp9.rs index d361c4a..e9ea1ed 100644 --- a/crates/engine/tests/vp9.rs +++ b/crates/engine/tests/vp9.rs @@ -195,7 +195,7 @@ fn a_vp9_source_exports_as_h264() { let project = Project::single(asset("test_vp9.mp4"), meta.frame_count); let out = Scratch::file("ve_export_vp9", "mp4"); - let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); + let handle = engine::export::start(project, meta, &out, &ExportSettings::default(), None); let started = Instant::now(); while !handle.is_finished() { assert!(started.elapsed() < Duration::from_secs(120), "export hung");