Repository navigation
test(vision mixer): run the letterbox wipe test where the runner keeps real time - #1027
Merged
Merged
Conversation
…s real time On the macOS runner the wipe test failed almost every run with 'classic wipe: animated=false'. A trace on the runner showed the take slot rendering the mask correctly, but the mixer skipping each masked frame as late (gst_aggregator_pad_skip_buffers): GL there renders at about 20 fps, the slot falls behind the mixer's clock deadline, and the pad keeps the last unmasked frame. Render at 640x360 instead of 1280x720, which the runner keeps up with. The test also never ran a GLib main loop, so the source rects were fitted to their aspect only by chance, sometimes mid-take. Run one, and wait for the letterboxed opening picture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1013, #994
Problem
vision_mixer_fx_test::wipe_between_letterboxed_sources_animatesfails on the macOS runner on every main push since the perf merges:classic wipe: animated=false end white=0.00 red=0.76(and sometimesinverted wipe should animate). It passes locally. The Linux llvmpipe runner showed the same signature before #1007 (see #994).I traced it on
macos-latestfrom a diagnostic branch. The traces ruled out the shader, the uniforms and the passthrough switch:fx_take_1leaves passthrough on the wipe's first buffer, itsuniformshold the latchedu_startandu_duration=2, and a readback of its output shows the mask, with alpha 0 and the edge entering from the right on time.sink_1keeps one buffer as its current one for the whole wipe. That buffer has PTS 0.684 and is an unmasked frame from before the take, while PGM runs from 1.0 s to 3 s.GST_DEBUG=aggregator:6says why. Every masked frame arrives after the mixer has produced the output frame it belongs to, and is dropped:gst_aggregator_pad_skip_buffers Skipping pts 0:00:09.049087417, and so on for each frame.On the runner GL renders at about 20 fps, below the flow's 30. The mixer produces each frame at the clock plus its 86 ms latency. Once the take slot renders instead of passing through, it falls behind that deadline, so all its frames are late. PGM keeps the last on-time frame, which is unmasked, and the wipe reads as a cut. Before #1007 every FX slot rendered all the time, so the whole mixer ran behind the clock and nothing counted as late. That is why the failure appeared with the perf merges.
The traces also showed the take sometimes starting on a stretched, unfitted picture (
white=1.00). The vision mixer fits a source's rect to its aspect from the GLib main context once the source's caps arrive. This tokio test never ran a main loop, so the fit happened only by chance. Sometimes that was mid-take, which re-applied the layout under the wipe.Change
Test only:
vision_mixer_underlay_upload_testdoes.Rejected:
latencyin the test. The runner's GL is slower than real time, so the take slot falls further behind every frame and a larger budget only delays the drop.Evidence
vision_mixer_fx_testpassed onmacos-latestwith this change (run 37604297865), each about 5 s. The 1280x720 runs on the diagnostic branch before it failed 17 of 20.program_wipe_at_first_buffernot called on the classic path (local edit, reverted), the test fails with the CI signature:classic wipe: animated=false end white=0.00 red=0.76,classic wipe should animate.(0,0,640,360)with caps640x266for 30 s (PGM never settled on the letterboxed white source).Tests
Ran (macOS, GStreamer 1.28.6, GL):
STROM_REQUIRE_GL=1 cargo test --test vision_mixer_fx_test, 3 runs, 2 passed each; once with the classic mask removed, failing as above. On the macOS runner: 6 runs from the diagnostic branch, as above.Not run: Linux (left to CI).
For the reviewer
🤖 Generated with Claude Code