Repository navigation
feat(engine): publish the effective video route (#321) - #333
Merged
Merged
Conversation
LoadOptions.nativeRemoteHLS records what the host asked for, not what serves the session. The #168 carriage watchdog moves a live bypass onto the ingest loopback mid-session, #199 does it at load time for a master whose verdict is remembered, AE#268 does the same for a finite HEVC-in-MPEG-TS VOD, and AE#154 / AE#246 go the other way onto the bypass. None of that was observable: the rewritten options live in an internal property, and playbackBackend reads .native for both native pipelines. AetherEngine.videoRoute publishes .remoteBypass / .loopback / .software / .audio / .none. It is derived rather than stored a second time, the arrangement playbackPhase already uses: a pure fold over playbackBackend and the session's effective options, recomputed from each one's didSet, assigned only on a real change. Every reroute site writes one of those two properties, so the route follows them by construction instead of needing a call at each site that a future reroute could forget. The bit hosts most need it for is subtitle ownership. On the bypass AVPlayer draws the origin's own legible renditions, on the loopback and the software path the host's renderer does, and a host that guesses wrong either draws nothing or draws every cue twice. aetherctl play prints route= next to backend=. Verified on real media: a local MP4 settles on loopback, and the Apple CMAF master takes the AE#154 reroute and publishes remoteBypass at the moment it happens. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE
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.
Closes nothing on its own: #321 stays open until the reporter has the value in hand.
LoadOptions.nativeRemoteHLSis the request. What actually serves the session can differ, and until now nothing said so:loadedOptionsis internal andplaybackBackendis.nativefor both native pipelines, so the split was invisible.What this adds
@Published public internal(set) var videoRoute: VideoRoutewith.none/.remoteBypass/.loopback/.software/.audio.Derived, not stored twice: a pure fold over
playbackBackendand the session's effective options, recomputed from each one'sdidSet, assigned only on a real change. That is theplaybackPhasearrangement, and it is what keeps a future reroute site from forgetting to update the route: every reroute already writes one of those two properties.The reporter's motivating case is subtitle ownership. On the bypass AVPlayer draws the origin's legible renditions; on the loopback and the software path the host's renderer does. Guess wrong and you draw nothing, or every cue twice.
Verification
-strict-concurrency=completeclean, tvOS Simulator BUILD SUCCEEDEDroute=loopback; the Apple CMAF master (bipbop_adv_example_hevc) takes the AE#154 reroute and publishesroute=remoteBypassat the moment of the reroute, with no misleading.loopbackemission in front of itaetherctl playprintsroute=next tobackend=, so the value is capturable from the harness.🤖 Generated with Claude Code
https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE