dschmidt commented on PR #2936:
URL: https://github.com/apache/tika/pull/2936#issuecomment-4935396937
Thanks, that is remarkably thorough feedback, and almost all of it was right.
Addressed in 315e01a30:
1. **Plumbing**: reworked as suggested. The hdlr branch now returns a
`TikaMp4MetaHandler extends Mp4MetaHandler` that fills in the empty
`processSampleDescription`/`processTimeToSample` overrides. The global
minf/stbl/stsd acceptance and the movie-timescale duplication are gone,
`Mp4MetaDirectory` stays alive; only edts/elst remain in
`TikaMp4BoxHandler`.
2. **Edit list**: both bugs fixed: only leading empty edits count, summed,
and the scan stops at the first normal entry. Overflow guard added, and
the per-track state resets on the trak container instead of tkhd.
3. **Sample count**: stts is now read and only single-sample tracks are
reported, which is the actual invariant behind "track start = still
moment" (previously the delay filter only correlated with it).
4. **Tests**: the fixture gained realistic track plumbing (gmhd, dhlr/alis
data handler, dinf/dref, full sample tables) plus tracks covering a
version-1 elst, a non-leading empty edit directly after the delayed
track (state-leak probe), and a delayed multi-sample track. set() is now
add(), and the comment/placement nits are fixed. I re-verified against a
real iPhone 15 Pro Live Photo: output unchanged.
Two shape questions I deliberately did not touch and would like your call
on before merge:
- **Namespace**: keep `<apple key>.track-start-us`, or move to a Tika-owned
scheme? I agree it is hard to rename later, so happy to change it now.
- **Absence vs 0**: with the single-sample invariant in place, emitting 0
for an undelayed single-sample track would make "still is the first
frame" distinguishable from "not a Live Photo" without adding noise on
multi-sample keys. Which do you prefer?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]