Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions backend/tests/common/stinger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pub const GL_ELEMENTS: &[&str] = &[
/// last frame now and then, which makes frame counts flaky.
pub const CODEC_ELEMENTS: &[&str] = &["pngenc", "pngdec", "qtmux", "qtdemux"];

/// The stinger preroll the tests run with: see where the mixer is built.
pub const TEST_PREROLL_MS: u64 = 250;

/// Where clip frame `i`'s matte edge is: white (new source) left of it.
pub fn matte_edge(i: usize) -> u32 {
(i as u32 * W) / (N as u32 - 1)
Expand Down Expand Up @@ -305,6 +308,17 @@ pub fn build_flow(tag: &str, backend: &str, clips: &[std::path::PathBuf]) -> Flo
("multiview_resolution", PV::String(format!("{W}x{H}"))),
("pgm_framerate", PV::String("30/1".into())),
("enable_stinger", PV::Bool(true)),
// The clip starts this far ahead of its first output frame. The
// default (80 ms) is enough on a real machine; the macOS CI
// runner, a virtual M1 on three cores, needs about 150 ms, and
// its frames then arrive late and are dropped. The tests guard
// that a take is frame-exact given the preroll it needs, which
// is the operator's to set; `stinger_bench` measures how low it
// can go.
(
strom_types::stinger::STINGER_PREROLL_PROPERTY,
PV::UInt(TEST_PREROLL_MS),
),
]),
position: strom_types::block::Position { x: 0.0, y: 0.0 },
runtime_data: None,
Expand Down
8 changes: 8 additions & 0 deletions backend/tests/stinger_api_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,10 @@ async fn wait_for_layout(
/// failing, and is refused while a stinger is on air.
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[serial_test::serial(stinger)]
#[cfg_attr(
windows,
ignore = "Windows refuses to replace a file another handle holds open, and the parked player holds the clip open"
)]
async fn reload_picks_up_a_clip_rewritten_on_disk() {
use strom_types::stinger::StingerLayout;
if !common::plugins_available(CODEC_ELEMENTS) {
Expand Down Expand Up @@ -510,6 +514,10 @@ async fn reload_picks_up_a_clip_rewritten_on_disk() {
/// the new file, with no reload.
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[serial_test::serial(stinger)]
#[cfg_attr(
windows,
ignore = "Windows refuses to replace a file another handle holds open, and the parked player holds the clip open"
)]
async fn a_cue_loads_a_parked_clip_rewritten_on_disk() {
use strom_types::stinger::StingerLayout;
if !common::plugins_available(CODEC_ELEMENTS) {
Expand Down
Loading