Repository navigation
macOS reads its own display instead of asserting it has none (#493) - #501
Merged
Merged
Conversation
… none (#493) Two bugs with one root: the engine answered "what can this display present" from a per-platform readout macOS never had. `AVPlayer.availableHDRModes` is API_UNAVAILABLE(macos), so the capability branch there returned a table of false. That is not "unknown", it is an assertion, and `effectiveVideoFormat` clamps a DV source's PQ base against it, so a Dolby Vision title on an XDR display resolved to .sdr. Eligibility is the honest answer for the two flavours that only need EDR, and Dolby Vision stays unclaimed: eligibility proves EDR, not that AVFoundation will accept a DV variant, and a refusal costs -11868 with nothing playing. That one belongs to a host assertion, next round. `videoFormat` took the tvOS branch on macOS, where `currentPanelIsHDR()` is a hard false, so every HDR title was labelled SDR whatever the display was doing. iOS already sits outside that branch because a panel that engages EDR on demand has no handshake to read. macOS composites EDR per window with no display mode switch, which is the same physics, so it belongs there too. This is the half that makes plain HDR10 and HLG read SDR; the capability stub only ever reached DV sources, measured here with `aetherctl play` on a plain HDR10 clip, which resolved `effective-format=hdr10` before the change as well. 3 new tests. Full suite green on both runners: XCTest 606 (1 skipped), swift-testing 2665 in 366 suites, exit 0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014tQ8MerNbZQdWBpDStitoD
superuser404notfound
deleted the
fix/ae493-macos-display-capabilities
branch
September 6, 2026 08:11
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.
Addresses the two halves of #493 that need no hedge. The Dolby Vision half (a host assertion) is a
separate round, so this does not close the issue.
Capability stub
AVPlayer.availableHDRModesisAPI_UNAVAILABLE(macos), so that branch had nothing to read for theper-mode split and returned all
false.effectiveVideoFormatclamps against it, which is how a DVP8.1 on a 16" XDR resolved to
.sdr. Now derived fromAVPlayer.eligibleForHDRPlayback, which isdisplay-configuration aware and already reads
falseon an SDR-only Mac (#98).supportsDolbyVisiondeliberately staysfalse. Eligibility proves EDR, not that AVFoundation willaccept a given DV variant on this display, and a refusal surfaces as -11868 with nothing playing.
NSScreen.maximumPotentialExtendedDynamicRangeColorComponentValuewas the other candidate and is notused: eligibility already answers on the reported hardware, and NSScreen is main-actor isolated while
this is read per load off the main actor.
Label branch
videoFormatwent throughpresentedVideoFormat(panelPresentsHDR:)on macOS with a hardfalse,since
currentPanelIsHDR()is#if os(tvOS). iOS already sits outside that branch: a panel thatengages EDR on demand has no handshake to read. macOS composites EDR per window with no display mode
switch, so it belongs on the same branch.
One correction to the report, measured
The two halves do not overlap the way the title suggests.
effectiveVideoFormatstarts withguard detected == .dolbyVision, so the capability stub only ever reached DV sources. A plain HDR10clip through
aetherctl playon macOS resolveseffective-format=hdr10before this change as well.The "HDR10 and HLG play as SDR" symptom is the label branch alone, which is also why the reporter's
log shows
videoRange=pq useMaster=truewitheffective-format=sdr: the served stream was neverdowngraded.
3 new tests. Full suite green on both runners: XCTest 606 (1 skipped, 0 failures), swift-testing 2665
in 366 suites,
REAL EXIT=0.🤖 Generated with Claude Code
https://claude.ai/code/session_014tQ8MerNbZQdWBpDStitoD