Commits
2026-09-19
mp4rotation: record merge-side follow-ups (ff b1503940, P2 guard, gates, cleanup)Ahmet Kaan Gümüş · 153a67dBrowse files
mp4: read the tkhd display matrix and surface it as a typed RotationAhmet Kaan Gümüş · ead0050
mp4: read the tkhd display matrix and surface it as a typed Rotation
ec-core gains a public Rotation (None/Cw90/Cw180/Cw270/Other{a,b,c,d}) and
StreamInfo.rotation, defaulting to None; the only StreamInfo struct literal
in the workspace (the mp4 demuxer) is migrated.
The mp4 demuxer's read_trak now reads the 36-byte tkhd display matrix that
sits before the width/height at the far end of the box, for both box
versions, and maps its 2x2 linear part to a quarter turn clockwise -- the
same reading edith's engine takes, so a consumer no longer needs its own
matrix parser. A matrix that is not a pure quarter turn is carried verbatim
as Other rather than rounded onto a turn it would then apply for real.
Fixtures under crates/ec-mp4/tests/data (rot0/90/180/270/45) are committed
with gen.sh, and the generator reproduces them byte-for-byte. Parse and
surface only: no pixel rotation, and the muxer still writes a unity matrix.