4.1.0 — Disc titles + chapters (#67)
Disc title and chapter selection (#67)
A decrypted DVD-Video or Blu-ray disc image now exposes every selectable title and the chapters of the playing title, and the host can switch between them. Requested by @ijuniorfu as a follow-up to the remote-disc work in #64.
Host API
engine.discTitles // @Published [TitleInfo]: id, name, duration, chapterCount (longest first; id 0 = main feature)
engine.selectedDiscTitle // @Published TitleInfo?: the active title
engine.selectTitle(id:) // switch title (rebuilds from the new title's head)
engine.discChapters // @Published [ChapterInfo]: the selected title's chapters
engine.selectChapter(id:) // seek to a chapter (a thin seek, no pipeline rebuild)
try await engine.load(url: …, discTitleID: 2) // open a disc straight to a chosen titleselectTitle survives audio-track switches and background-resume reloads, and a fresh load defaults to the main title (an out-of-range id clamps to it).
Where the data comes from
- Blu-ray: every
.mplsplaylist is a selectable title (trivially short menu / FBI-warning playlists filtered); chapters come from the playlist's PlayListMark entries, made title-relative across the play-item timeline. - DVD-Video: titles come from the VMGI
TT_SRPT, and each title set's duration and chapters come from its program chain (VTS_PGCIT→ main PGCplayback_time+ program map over cumulative cell times). Resolution is whole-VTS; per-cell / episodic splitting is deferred. An unreadable VMGI falls back to the VOB-size grouping; an unreadable VTS IFO leaves a title's duration and chapters empty but still plays.
Chapter starts are title-relative (0-based); selectChapter rebases them onto the playback clock (the native playlist shift, or the software path's container start PTS) so the seek lands.
Diagnostics
aetherctl disc-inspect <image> now prints the full title list with each title's duration and chapter offsets, so a real disc's enumeration can be verified from the CLI without a host UI.
Notes
No breaking changes; everything here is additive public API (minor bump). 197 tests; each phase was adversarially reviewed against the libbluray / libdvdread byte layouts before merge.
Full changelog: https://github.com/superuser404notfound/AetherEngine/blob/main/CHANGELOG.md