Skip to content

Fix xHome streaming, Xcode 27 build, and low-latency upscaling - #16

Open
dhartman25 wants to merge 2 commits into
nafields:mainfrom
dhartman25:fix/xhome-streaming-and-xcode27
Open

dhartman25 wants to merge 2 commits into
nafields:mainfrom
dhartman25:fix/xhome-streaming-and-xcode27

Conversation

@dhartman25

@dhartman25 dhartman25 commented Nov 25, 2026 •

Copy link
Copy Markdown

What changed and why

  • xHome state decode: /state replies for healthy xHome sessions include "errorDetails":{"code":null,"message":null}. StreamStateResponse required non-null strings, so every xHome launch failed with State poll error: Decode failed. A null code now decodes as "no error".
  • xHome provisioning wait: xHome sessions go Provisioning → Provisioned and never report ReadyToConnect, so the home path timed out at "Provisioning". It now accepts either state. If ReadyToConnect is reported and an MSA token is available, it runs the /connect auth step the same way the cloud path does.
  • Xcode 27 build: The tvOS SDK in Xcode 27 marks MTLFXSpatialScaler and supportsMetal4FX as tvOS 27.1+, so the tvOS 26 target no longer compiled. MetalFX use is now gated on #available(tvOS 27.1, *). The scaler is stored as AnyObject? behind an availability-gated accessor, because stored properties can't carry availability. On older tvOS it falls back through the existing "MetalFX unavailable" path.
  • Low Latency Mode excludes frame interpolation: VTLowLatencyFrameInterpolation buffers a frame (about 33 ms at 60 fps). On a 1080p to 4K display it stayed eligible as a fallback upscaler even with Low Latency Mode on. The setting is now passed through RenderLadderPlanner to UpscaleCapabilityResolver, which skips LLFI when it is enabled.

Screenshots or recording

N/A

Test plan

  • swift test for StratixModels, StreamingCore, VideoRenderingKit and XCloudAPI: all pass (129 tests).
  • New tests: LLFI excluded in low-latency mode; null, populated and missing errorDetails decoding, and an xHome connect that only ever reports Provisioned with null errorDetails. The existing ReadyToConnect home tests still pass.
  • Device: built Stratix-ReleaseRun with Xcode 27.2 and ran it on an Apple TV 4K (tvOS 27.2.1). Streamed from an Xbox Series X over xHome. Before this change, the launch failed at the decode error and then at the provisioning timeout. After it, the stream connects and plays.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ETMULew4xpK5YpbnhMkSUb

- Decode StreamStateResponse leniently: xHome /state replies include
  "errorDetails":{"code":null,"message":null} on healthy sessions, which
  failed decoding with "State poll error: Decode failed".
- xHome sessions go Provisioning -> Provisioned without passing through
  ReadyToConnect, so the home path timed out waiting for it. Accept either
  state, and perform the /connect auth step if ReadyToConnect is reported
  and an MSA token is available.
- Xcode 27's tvOS SDK marks MTLFXSpatialScaler APIs as tvOS 27.1+, so the
  tvOS 26 target no longer compiled. Gate MetalFX use behind
  #available(tvOS 27.1); older tvOS falls back through the existing
  "MetalFX unavailable" path.
- Add tests for the null errorDetails decode and a Provisioned-only xHome
  connect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETMULew4xpK5YpbnhMkSUb
@dhartman25
dhartman25 requested a review from nafields as a code owner November 25, 2026 19:41
VTLowLatencyFrameInterpolation buffers a frame (~33 ms at 60 fps), and on a
1080p -> 4K display it is eligible as a fallback upscaler even when Low
Latency Mode is on. Thread the low-latency setting through
RenderLadderPlanner into UpscaleCapabilityResolver and exclude LLFI when it
is enabled; toggling the setting re-plans the render ladder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETMULew4xpK5YpbnhMkSUb
@dhartman25 dhartman25 changed the title Fix xHome stream startup and building with Xcode 27 Fix xHome streaming, Xcode 27 build, and low-latency upscaling Nov 25, 2026
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