WIP - MSE: Drop non-keyframes that lack keyframe dependency
This change relaxes the previous requirement that all media segments'
(e.g. WebM clusters', MP4 moofs', etc.) tracks begin with keyframes.
Specifically, this change:
* Modifies the coded frame processing algorithm to signal "new coded
frame group", rather than "new media segment", when it detects an
append discontinuity. Parser's signaling of begin and end of media
segments is retained so that the API can behave correctly depending on
Update: See separate WIP CL for this piece: https://codereview.chromium.org/1091293005/
* Updates SourceState(?? TODO or SBS?? :: needs to know GC side-effect
as well as Remove() from API) to signal the coded frame processing
algorithm when range removals occur. CFP then uses this to determine
if the range removal impacts any of the tracks such that an append
discontinuity in the current coded frame group could have been
* Retains previous behavior (in compliant coded frame processor) that
drops non-keyframes occurring at the beginning of a "coded frame
group" following an append discontinuity.
* Changes the SourceBufferStream::Append() decode error when a media
segment begins with a non-keyframe to a CHECK when a new coded frame
group begins with a non-keyframe. The coded frame processor is
depended upon to emit the "new coded frame group" signal correctly and
to drop any leading non-keyframes in a new coded frame group.
TEST=New SourceBufferStreamTests: LeadingNonKeyframes_Kept, LeadingNonKeyframes_Dropped, NonKeyframesDirectlyFollowingRemovedRange_Dropped
TODO: more tests (layout, chunkdemuxer (muxed coded frame group behaviour around remove, for instance))