Epic: #113 · Milestone: MC6 — Media engine
Why
Subtitles are a top-3 media-center feature. Parsers exist in the stdlib (video/src/subtitles/{srt,ass,vtt,ttml,pgs}.zig); rendering needs the TrueType stack (#76) and the compositor's alpha layer.
Tasks
- Parser bindings for SRT, VTT, ASS/SSA (support bold/italic/colour/position/alignment; full ASS animation out of scope), PGS bitmaps (decode RLE → alpha bitmap).
- Renderer: outline + shadow text, safe-area positioning, 2-line wrap, ASS
\pos/\an; PGS scaled to the UI plane. - Timing: cue scheduling on the master clock; seek invalidation; external file discovery (
movie.en.srt) and embedded tracks; charset detection (UTF-8/UTF-16/latin-1 fallback). - Settings: size, colour, background box, vertical offset, default language.
Acceptance
Subtitle conformance samples render matching golden frames in QEMU; on the Pi, subtitle changes never cause a full UI-plane repaint (dirty-rect counter).