Skip to content

SMB/direct-file Dolby Vision doesn't drive the HDR display-mode switch #14

Description

@thatcube

Symptom

Playing a Dolby Vision file from an SMB share does not trigger the Apple TV's HDR/DoVi display-mode switch (no HDR "brightness"), even though we believe the source is known to be Dolby Vision. This likely never worked for direct-file sources.

Diagnosis

The native path drives the tvOS HDMI dynamic-range handshake via AVDisplayManager.preferredDisplayCriteria, gated in PlayerViewModel:

// Sources/FeaturePlayback/PlayerViewModel.swift (~line 981)
displayMode = engineKind == .native ? HDRDisplayMode(request.sourceMetadata) : .sdr

HDRDisplayMode(_:) (Sources/FeaturePlayback/DolbyVisionDisplayCriteria.swift) classifies the source from sourceMetadata.video.videoRangeType (the DOVI* token), falling back to videoRange / colorTransfer.

You get the DoVi handshake only when both:

  1. the item plays on the native engine (Plozzigen is intentionally forced .sdr — only Apple's pipeline can light up the DoVi HDMI handshake), and
  2. sourceMetadata.video.videoRangeType carries a DOVI token.

The gap: videoRangeType is only ever populated by:

  • Sources/ProviderPlex/PlexProvider.swift
  • Sources/ProviderJellyfin/JellyfinProvider.swift
  • the local probe → Sources/CoreModels/ProbedStreamFacts.swift

An SMB share is not its own provider — it arrives as a direct file (WebDAV/MediaTransport) or a Jellyfin/Plex library backed by SMB. For a direct SMB file without Plex/Jellyfin API metadata, the DoVi range can only reach sourceMetadata through the local probe (ProbedStreamFacts). So either:

  • the probe isn't tagging videoRangeType=DOVI for the SMB/direct source, or
  • that item routes to Plozzigen, where displayMode is deliberately forced .sdr.

Where the fix likely lives

Sources/CoreModels/ProbedStreamFacts.swift, Sources/CoreModels/PlaybackModels.swift, and the EnginePlozzigen prober (probe→videoRangeType population), plus possibly the engine-routing decision for direct-file DoVi. Not in FeaturePlayback — the display-switch gate there is correct and unchanged.

Notes

  • Unrelated to the current FeaturePlayback decomposition work; HDRDisplayMode / the line-981 gate are untouched by that refactor.
  • Repro: play a known-DoVi file from an SMB share; observe no HDR display-mode switch. Confirm via the playback diagnostics overlay whether rangeType/videoRangeType is populated and which engine is active.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions