Repository navigation
Description
Split out of #493, where it turned up as a side finding while measuring something else. Reported and diagnosed by @Rasmusmart57, down to the two line numbers.
What happens
On the loopback route the engine publishes videoFormat = .hdr10 for a Dolby Vision Profile 5 source on macOS, while AVFoundation has already parsed the served item's video track as dvh1 and the engine's own host has logged it:
[Marten] badge output=HDR10/PQ source=Dolby Vision P5 -> HDR10/PQ
[NativeAVPlayerHost] #1 remote-HLS videoFormat=dolbyVision subType='dvh1'
A host reading videoFormat therefore badges a Dolby Vision session HDR10. The reporter worked around it host-side by reading the sample entry off nativePlayerLayer, which is public, so nothing is blocked; the engine's published label is the wrong one.
Where it comes from
NativeAVPlayerHost.publishDetectedVideoFormat (Native/NativeAVPlayerHost.swift:2234) has no route gate. It runs at readyToPlay and again at the first .playing for every native session, loopback included, and sets detectedVideoFormat. The engine subscribes to host.$detectedVideoFormat in exactly one place, AetherEngine+Loading.swift:396, inside loadRemoteHLS. loadNative never reads it.
That is correct as far as it goes: the remote-HLS bypass runs no libav probe, so AVFoundation's parse is the only source it has for both sourceVideoFormat and videoFormat, and the sink sets both unconditionally. The loopback route has a probe, so sourceVideoFormat is already right there, and videoFormat is the effective label clamped against displayCapabilities.
The clamp is what produces .hdr10: AVPlayer.availableHDRModes is API_UNAVAILABLE(macos), so supportsDolbyVision is false on every Mac unless the host asserts it (LoadOptions.panelPresentsDolbyVision), and effectiveVideoFormat sends a PQ base to .hdr10. Measured in #493 with the assertion off, on a 16" XDR: Profile 5 and Profile 8.1 both strobe against Dolby's reference content, so the RPU reaches the pixels with no claim set anywhere. The label is the only thing that was still following the clamp.
Why the sink cannot simply be mirrored
Copying the loadRemoteHLS sink into loadNative would let AVFoundation's parse overwrite the clamped label on every platform, and the case that breaks is tvOS: a Profile 5 master carries a dvh1 sample entry on any panel, so a session on a panel parked in SDR, whose label is deliberately .sdr, would republish .dolbyVision. That is the label the clamp exists to prevent. It would also overwrite a sourceVideoFormat the probe had already answered better.
Planned shape
An upgrade only, on the pattern of handleHDR10PlusDetected:
- only when the published label reads
.hdr10, which is the one value a clamped DV source can hold. An SDR label (macOS on an SDR display, tvOS parked in SDR) and an already asserted.dolbyVisionare both left alone by that guard. - only when the source is Dolby Vision and the item's sample entry parses as
dvh1/dvhe. Profile 8.1 reportshvc1and keeps.hdr10, which is honest: it composes on that display, and nothing in the stack says so. - only where the platform has no per-mode capability table, which today means macOS. tvOS and iOS read
availableHDRModesand the label follows their answer.
Not settled here, and worth its own measurement if anyone wants it: whether a Profile 5 that AVFoundation tonemaps onto an HDR10-only panel deserves the Dolby Vision badge on tvOS. The panel does not present DV, the RPU is still applied, and the current label follows the panel.
Also in scope, because it cost the reporter time: publishDetectedVideoFormat logs its line as remote-HLS on every route, including the loopback one where the name is wrong.
Activity
Merge fix/loopback-dv-label-515: the loopback route takes its Dolby V…
superuser404notfound commentedon Sep 8, 2026
On
mainin895ccd0c, not released.AetherEngine.dolbyVisionLabelUpgradecarries the rule and the reason for each of its four terms; the loopback route readshost.$detectedVideoFormatthrough it, andsourceVideoFormatis left where the probe put it. 7 tests, and each one pins a case the rule keeps out rather than the case it lets in, since that is where a mirror would have gone wrong. Full suite green on both runners (XCTest 607 with 1 skipped, swift-testing 2781 in 379 suites).What it should look like from a host, with no assertion and no local patch:
videoFormatreads.dolbyVision, with[AetherEngine] item carries a Dolby Vision sample entry, upgrading videoFormat hdr10 → dolbyVisionin the log once, atreadyToPlay..hdr10. It reportshvc1, it composes on that display anyway, and nothing in the stack reports that..sdrlabel even though the item carriesdvh1.item videoFormat=instead ofremote-HLS videoFormat=on every route.Left open for a retest on real hardware, since the arm it rests on is one display and two files.
fix(hdr): the loopback route takes its Dolby Vision label back from t…
superuser404notfound commentedon Sep 9, 2026
Released in 6.75.0 (
f436d89).superuser404notfound commentedon Sep 10, 2026
Closing this one.
The loopback label has carried the parsed Dolby Vision configuration since 6.75.0, and there is no open question left on the thread: the remaining step is a run on this side, not something the issue is waiting to hear.
Reopen, or file fresh, if a
dvh1item ever comes back labelled HDR10 on that route again.