Enabling EDR on Apple TV for custom HDR video playback with VideoToolbox

How is it possible to enable EDR on Apple TV without AVFoundation for custom HDR video playback? The use case is a custom video player for HDR playback via VideoToolbox and Metal, which seem to render colors correctly on iOS but not on tvOS.

All related documentation and WWDC sessions describe APIs that are unavailable for tvOS:

let metalLayer = CAMetalLayer()
metalLayer.wantsExtendedDynamicRangeContent = true
metalLayer.edrMetadata = CAEDRMetadata.hdr10(minLuminance: 0.0, maxLuminance: 1000, opticalOutputScale: 100)

What's the alternative path for tvOS to have correct system tone mapping for a setup like:

metalLayer.pixelFormat = .rgba16Float // (or .bgr10_xr)
metalLayer.colorspace = CGColorSpace(name: CGColorSpace.itur_2100_PQ)

Video format: HEVC, YUV 4:2:0 10bit, BT.2020 PQ.

We do set the preferredDisplayCriteria on AVDisplayManager and thus video range matching is in place.

WWDC Ref: https://developer.apple.com/videos/play/wwdc2022/110565?time=557

Man, I also encountered this problem recently, enabling HDR Content in a Metal Layer at tvOS.I check this doc "https://developer.apple.com/documentation/metal/hdr_content/displaying_hdr_content_in_a_metal_layer", But it seems there is no tvOS support yet

Enabling EDR on Apple TV for custom HDR video playback with VideoToolbox
 
 
Q