DescriptionFix mp4 keyframe parsing, removing unused stss parsing.
Lots of history below, TLDR:
Keyframes for video will now be those marked as sync samples AND having no known sample dependency. Previously all sync samples were marked as key to downstream but this caused everything to be marked key for certain media (see bugs).
History:
0. Originally, we just trusted the is_non_sync_sample flag (once called is_difference_sample)
1. http://crrev.com/37603002 - adds parsing of sdtp ("depends on") info
-- http://crbug.com/310712 - working around bad content
-- no tests
-- still here today
2. http://crrev.com/134873002 - adds parsing of stss box
-- no stss box -> all frames are key
-- seems right given this exceprt from spec: "If the sync sample box is not present, every sample is a sync sample."
-- internal bug that motivated http://b/12218009
3. http://crrev.com/282513004 - separates "random_access_point" from "key_frame"
-- in language of this change: RAP=sync sampe, and KF=no known dependencies
-- idea: "Keyframe and random access point info are now tracked separately so things like SPS/PPS insertion will only occur on actual keyframes instead of anything marked as a random access point."
#3 fixes the issues for sps/pps insertion, but since anything marked as random access point is still bubbled up as a keyframe for seeking/buffered-range-management, these things still break whenever media marks it wrong (I suspected this regressed the issue fixed in #1). To fix these lingering issues, this CL combines the conditions for random_access_point and key_frame into one.
Additionally, #3 added new stss box parsing logic but didn't use it. For fragmented mp4, I don't think stss box can actually be used. The keyframe information comes from various flags which fallback to default values when not set. The final authority on defaults is the trex box, which is mandatory for fragmented mp4, so if nothing else, we will take the flags from the trex and have no chance to include stss. Stss box parsing is now removed.
FYI: the spec is available here:
http://standards.iso.org/ittf/PubliclyAvailableStandards/c061988_ISO_IEC_14496-12_2012.zip
BUG=507916, 310712, 367786
Committed: https://crrev.com/b175d2a7d45930d742b1544f3a0bb9dea9fa4fba
Cr-Commit-Position: refs/heads/master@{#346238}
Patch Set 1 #Patch Set 2 : Removing silly stss test. #Patch Set 3 : Minor typo/fixes. #
Total comments: 8
Patch Set 4 : Typo #
Total comments: 2
Patch Set 5 : Fix sizeof nit #
Messages
Total messages: 18 (3 generated)
|