Repository navigation
fix(live): the software live seek publishes its landing on the source axis (#107, #416) - #576
Merged
Merged
Conversation
… axis (#107, #416) `clock.sourceTime` rides the raw synchronizer clock on this path, so that the overlay drainer's playhead and the packet store's timestamps agree; the `$sourceClockSeconds` sink says so. The software live branch then wrote the session-relative target over it, and stated the pump's harvest anchor there too, which is the same confusion #575 fixed for VOD. It does not wedge: the live branch never sets `seekInFlight`, so the host's own tick puts the raw clock back within 250 ms. Inside that window one drain tick reads the whole offset as an unannounced reposition, resets its cursor and scans a stretch the store has nothing at, and the tick after it sees the same offset in the other direction. Two resets and a dark tick for a seek that moved the playhead a few seconds, on any source whose PTS do not start at zero. `SoftwarePlaybackHost.sourceSeconds(forSession:)` now covers both session shapes (live anchors on `sessionStartPts`, VOD on the resolved `clockSessionZero`), and `liveScrubStill` and `seekLiveDVR` go through it instead of each holding their own copy of the addition. Behaviour there is unchanged; the mapping now exists once. The call site itself is not reachable from a unit test, so the guard is on the consequence: `SubtitleOverlayDrainerTests` pins that an axis change reads as a reposition twice and backscans below everything the store holds, while the carried value is the one reposition it really is. swift test: 3164 swift-testing tests and the XCTest half green, exit 0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015PM3xUJB6ZQyqnmGK1fp6F
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.
The live half of the axis confusion #573 and #575 fixed for VOD. Found by following the same question one path further.
What happens
clock.sourceTimerides the raw synchronizer clock on the software path, so that the overlay drainer's playhead and the packet store's timestamps agree. The$sourceClockSecondssink inAetherEngine+Loading.swiftsays exactly that. The software live seek branch then writes the session-relative target over it, and states the pump's harvest anchor there too.It does not wedge. The live branch returns from
seek(to:)beforeseekInFlightis ever set, so the host's 250 ms tick puts the raw clock back on its own. Inside that window, though, one drain tick sees the whole offset as a step it cannot account for, sodrainPlanreads it as an unannounced reposition, resets the cursor and scans a stretch the store has nothing at. The tick after it sees the same offset in the other direction and resets again. Two resets and a dark tick for a seek that moved the playhead a few seconds, on any source whose PTS do not start at zero, which is most MPEG-TS.The change
SoftwarePlaybackHost.sourceSeconds(forSession:)covers both session shapes now: live anchors onsessionStartPts, VOD on theclockSessionZerothe clock anchor resolved. The live branch publishes and anchors through it.liveScrubStillandseekLiveDVReach held their own copy of that addition; both go through the accessor instead. Behaviour there is unchanged, deliberately, down to how a non-finitesessionStartPtsis read. The mapping now exists once.Test plan
swift test: 3164 swift-testing tests and the XCTest half green, exit 0.The call site is not reachable from a unit test (the axis the host is on is private session state), so the guard is on the consequence instead:
SubtitleOverlayDrainerTestspins that an axis change reads as a reposition twice and backscans below everything the store holds, while the carried value is the one reposition it really is.Not device-verified. It needs a live SW session on a tuner whose PTS start well away from zero, and the visible effect is one tick of missing cues after a DVR rewind.
🤖 Generated with Claude Code
https://claude.ai/code/session_015PM3xUJB6ZQyqnmGK1fp6F