Skip to content

AetherEngine 1.4.2

Choose a tag to compare

@superuser404notfound superuser404notfound released this 26 May 04:57
· 435 commits to main since this release

Features

Codec dispatch: MPEG-4 Part 2, MPEG-2, VC-1 routed to the SW path

Added to the software dispatch in AetherEngine.load. AVPlayer's HLS-fMP4 pipeline does not accept mp4v.20.X, mp2v, or vc-1 in its CODECS attribute (none are in Apple's HLS Authoring Spec list), so prior to this they fell through the default branch and silently failed on the native AVPlayer path. They now route to SoftwarePlaybackHost and decode via libavcodec.

FFmpegBuild already ships the native decoders for all three (--enable-decoder=mpeg4, mpeg2video, vc1); SoftwareVideoDecoder is codec-generic via avcodec_find_decoder. Covers the XVID / DIVX / SP / ASP universe, DVB and over-the-air recordings (MPEG-2), and the long tail of WMV-in-MKV remuxes (VC-1).

Live-stream scaffolding

Initial scaffold for IPTV / live.ts playback:

  • LoadOptions.isLive opt-in flag for hosts to signal the source is live.
  • @Published var isLive: Bool on the engine for host UIs (hide scrubber, hide duration).
  • seek(to:) becomes a no-op with a warning log when isLive.
  • SourceProbe.isLive hint (no advertised duration + network-feed URL scheme) so hosts can decide whether to flip the opt-in.

H.264 / HEVC inside MPEG-TS routes through the native AVPlayer path via the existing HLS-fMP4 remuxer. MPEG-2 / MPEG-4 Part 2 / VC-1 inside MPEG-TS routes through the SW path.

Not yet shipped: sliding-window segment eviction in SegmentCache, MEDIA-SEQUENCE advance, and producer restart on upstream disconnect. Long-form IPTV sessions on the native path will accumulate cached segments until those land. Tracked separately.

Fixes

DV 8.1 signaling: hvc1 sample entry + SUPPLEMENTAL-CODECS /db1p

The prior P8.1 emission branched on panel state (dvh1 sample entry on DV panels, hvc1 on non-DV panels), both without a SUPPLEMENTAL-CODECS attribute. Per Apple's HLS Authoring Spec appendix on SUPPLEMENTAL-CODECS (post-WWDC22), backward-compatible DV ships with hvc1 sample entry + hvcC + dvvC boxes, primary CODECS hvc1.2.4.LXX, and SUPPLEMENTAL-CODECS dvh1.08.XX/db1p. The /db1p brand identifier marks the supplemental as DV with HDR10 base for AVPlayer's profile matching; without it the variant is treated as plain HDR10 and the DV pipeline never engages.

Mirrors the P8.4 pattern that's been working empirically. The mp4 muxer with strict=-2 automatically writes a dvvC box alongside hvcC when the source codecpar carries DV side data (we preserve it for P8.1), so AVKit's auto-criteria parser reads the DV profile from the live AVPlayerItem.formatDescription via the private CoreMedia hook.

DisplayCriteriaController.reset() no-ops under sole-writer mode

reset() now tracks whether apply() actually wrote preferredDisplayCriteria during the session and no-ops otherwise. Under AVKit-sole-writer hosts (those passing LoadOptions.suppressDisplayCriteria = true), the engine now makes ZERO writes against avDisplayManager for the entire session lifecycle.

The prior unconditional nil-write on every stopInternal() (including audio-track-switch reloads) raced AVKit's in-flight criteria negotiation and surfaced as mid-session panel-mode regressions, including the "RESET RESET RESET" log sequence and EDR-headroom collapse to 1.0 @DrHurt reported on the succeeding DV 5 retry attempt in #4.

Acknowledgements

@DrHurt for Build 176 testing on #4 that surfaced both the missing /db1p brand identifier and the reset() race.


Full changelog: 1.4.1...1.4.2