AetherEngine 1.3.2
AetherEngine 1.3.2
Patch release on top of 1.3.1. Two user-visible video fixes, one network performance win, plus an engine-wide logging cleanup.
Dolby Vision Profile 7 sources now play (#11)
UHD Blu-ray REMUX MKVs with DV Profile 7 were getting hard-rejected at engine load with unsupported Dolby Vision profile 7.-1 (the -1 was a placeholder; the source's actual dv_bl_signal_compatibility_id was 6). Apple has no P7 decoder, but the bitstream's HEVC Main10 base layer is HDR10 by construction (UHD-BD requires HDR10 backwards-compat), so the BL plays as plain HEVC HDR10 once routed that way.
P7 now packages as hvc1 sample entry, hvc1.2.4.LXX CODECS, PQ VIDEO-RANGE, no supplemental DV hint. AVPlayer's HEVC Main10 decoder ignores nuh_layer_id != 0 NAL units (HEVC Annex F multi-layer extension) so the EL+RPU layers ride along unused in the fMP4 samples. No DV mode is requested at the HDMI handshake.
Required two commits to land:
- Initial routing change (
34e1d04). - Strip the source's
dvcCconfiguration record from the output stream's codecpar beforeavformat_write_header. Without that strip, the mp4 muxer writes advcC profile=7inside thehvc1sample entry and VT's HEVC decoder selection rejects it withkVTVideoDecoderUnsupportedDataFormatErr(-12906). Fix inbe25435. Confirmed by @Delarkz against a Gemini Man 2160p REMUX (init.mp4 dropped from 2098 B to 2066 B, exactly the dvcC box getting stripped).
Scope: P7 only. P8.1 / P8.4 non-DV-display paths still keep dvcC because they work in the field (Apple has P8 decoders so the dvcC + hvc1 combination doesn't bite).
Resolved CDN URL cached across range fetches (#12)
Debrid / proxy playback URLs typically redirect each request from a stable proxy endpoint to a signed CDN object URL. The AVIO reader was paying the proxy + redirect hop on every Range fetch (~6 ops/sec at 4K HEVC bitrates).
AVIOReader now captures dataTask.currentRequest?.url (the URL after the redirect chain) inside ChunkFetchDelegate / ProbeDelegate.didReceive response and stashes it in a per-reader cache. Subsequent fetches use the cached URL instead of the source URL.
Safety rails:
- Cache only populates on 2xx / 206 responses, so 4xx redirect targets can't poison it.
- 401 / 403 / 404 / 410 against the cached URL drops the cache and triggers a one-shot retry against the original source URL so the proxy can re-issue a fresh signed redirect.
Rangeand caller-supplied extra headers are re-applied on cross-host redirects inChunkFetchDelegate(same hookProbeDelegatealready had).
Scope: seekable mode only. Streaming mode (live transcode) is a single GET so caching doesn't help.
Engine logging unified through EngineLog (PR #13)
Two distinct problems with the old layout fixed in one pass:
-
Xcode debug console duplicates.
EngineLog.emitwas writing to OSLog unconditionally, then also callingprint(line)when no host handler was installed. Xcode renders both OSLog activity and process stdout in the same debug-area console, so every emit surfaced twice. The intermediateisatty(STDOUT_FILENO)gate didn't help because Xcode wires GUI-app stdout to a pty. The stdio fallback is removed entirely; sinks are nowOSLog (always) + handler (optional). -
23 raw
print(...)calls scattered acrossAVIOReader,Demuxer,AudioDecoder,AudioOutput,SoftwareVideoDecoder,SampleBufferRenderer, plus a vestigial duplicate inAetherEngineitself. These bypassed OSLog entirely, weren't filterable by category, and never reached any host handler. All routed throughEngineLog.emitwith appropriate categories.
New swPlayback (sw.playback) category carves the custom playback subsystem (SoftwarePlaybackHost plus its decoders and renderers) out of the .engine catch-all so the AV1 / VP9 routes can be filtered on their own via log stream --predicate 'category == "sw.playback"'.
aetherctl probe installs its own stdout handler since it can no longer rely on the removed EngineLog stdio fallback. serve / validate already had timestamped handlers, behaviour unchanged.
Thanks to @Delarkz for the PR.
Engine pin
For Sodalite hosts: bump Package.resolved to b9a8710 (or use the 1.3.2 tag).