Skip to content

feat(engine): publish the effective video route (#321) - #333

Merged
superuser404notfound merged 1 commit into
mainfrom
feat/issue-321-effective-video-route
Aug 7, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
feat/issue-321-effective-video-route

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Closes nothing on its own: #321 stays open until the reporter has the value in hand.

LoadOptions.nativeRemoteHLS is the request. What actually serves the session can differ, and until now nothing said so:

loadedOptions is internal and playbackBackend is .native for both native pipelines, so the split was invisible.

What this adds

@Published public internal(set) var videoRoute: VideoRoute with .none / .remoteBypass / .loopback / .software / .audio.

Derived, not stored twice: a pure fold over playbackBackend and the session's effective options, recomputed from each one's didSet, assigned only on a real change. That is the playbackPhase arrangement, 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

  • 1606 tests in 238 suites green, including 12 new ones (derivation table plus engine wiring: request-without-backend, both reroute directions, software dispatch, teardown, no re-emit on an unrelated options write)
  • -strict-concurrency=complete clean, tvOS Simulator BUILD SUCCEEDED
  • Real media, not only units: a local MP4 settles on route=loopback; the Apple CMAF master (bipbop_adv_example_hevc) takes the AE#154 reroute and publishes route=remoteBypass at the moment of the reroute, with no misleading .loopback emission in front of it

aetherctl play prints route= next to backend=, so the value is capturable from the harness.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE

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
@superuser404notfound
superuser404notfound merged commit 369c55e into main Aug 7, 2026
3 checks passed
@superuser404notfound
superuser404notfound deleted the feat/issue-321-effective-video-route branch August 8, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant