Repository navigation
fix(vision mixer): a restarted border frame is due on the mixer's next output - #1038
Merged
Merged
Conversation
…t output A border colour change restarts its underlay source, which stamped the frame with the clock's running time. A mixer rendering below real time falls further behind the clock every second, so the frame lay in its future: a border configured while it was behind was missing from the cut frame that revealed it (GPU underlay test on the macOS runner: 'the configured border is missing from the cut frame: (0, 0, 255)'). Stamp it at the compositor's output position plus one frame of margin, never later than the clock's running time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d mixer 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.
Problem
vision_mixer_underlay_upload_test::static_underlays_are_not_reuploaded_gpufails now and then on the macOS runner:the configured border is missing from the cut frame: (0, 0, 255). Seen on #1029's CI after its rebase, and in 1 of 5 runs from a diagnostic branch earlier today.In production, on a host where the vision mixer renders below real time, a border configured while the mixer is behind shows up late, after the take that should reveal it.
A border colour change, or a border starting to hold, restarts its underlay source, and the restart stamped the new frame with the clock's running time. A mixer that renders slower than real time falls further behind the clock every second (the GL mixer on the runner manages about 20 fps of a 30 fps flow). The frame then lies in the mixer's future and is not shown until the mixer gets there.
Change
gst::underlay::frame_timestamps the restarted frame at the compositor's output position (query_positionon the aggregator the source feeds) plus 50 ms. The margin keeps it after the held frame, which a held pad would otherwise drop as from the past. The stamp is never later than the clock's running time, which is the old stamp and is where a mixer that keeps up already is. A held pad (repeat-after-eos) keeps a frame stamped in its past, so the frame is shown on the next output frame.Evidence
borders_keep_up_with_a_mixer_behind_the_clock_gpu: the same flow with the PGM mixer held 60 ms per output frame (test-only BUFFER probe), so it falls behind the clock as on the runner. With the old stamp it fails with the CI signature,the configured border is missing from the cut frame: (0, 0, 255), and did so 2 of 2 times before the fix. With the fix it passes, and the colour change shows after 2 PGM frames (122 ms).Tests
Ran (macOS, GStreamer 1.28.6, GL):
STROM_REQUIRE_GL=1 cargo test --test vision_mixer_underlay_upload_test(3 passed),cargo test --lib underlay(2),vision_mixer_cpu_test,vision_mixer_overlay_upload_test,vision_mixer_source_resize_test,pipeline_lifecycle_test: all passed.cargo clippy --all-targets -D warningsclean.Not run: Linux and Windows (CI). This PR carries
ci:macos.For the reviewer
vision_mixer_underlay_upload_test.🤖 Generated with Claude Code