forked from shaka-project/shaka-player
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace find/get callbacks with SegmentIndex
This replaces find/get callbacks in Stream with a SegmentIndex. With the exception of DASH's SegmentTemplate+duration, all manifests were already backed by SegmentIndex. Now, all manifests are backed by SegmentIndex. This will simplify Period-flattening, in which all tracks will be represented by a list of segments, some of which come from different Periods. The SegmentIndex in Stream will not be created until createSegmentIndex is called. Prior to this change, the find/get callbacks could be invoked without createSegmentIndex() in some cases (excluding DASH's SegmentBase), which some lazy tests took advantage of. Now that find/get are methods on SegmentIndex, createSegmentIndex must be called in all cases. The tests have been updated accordingly. Making SegmentIndex generation async in all cases exposed some issues with the parser context being modified in-place between one Representation and the next. So the parser now makes a shallow copy of the context before it is bound into an async callback. To facilitate updating the SegmentIndex for SegmentTemplate+duration content, SegmentIndex now has a method to update its list on a timer. Once per segment duration, the index will be updated to add and remove SegmentReferences. The initial expansion of SegmentTemplate+duration will be limited to a relatively small number of segments, to avoid excessive CPU or memory consumption. This defaults to 1000 segments, but is configurable. Issue shaka-project#1339 Change-Id: I99c007b1096c3b396d04a729750cd7b743cb899d
- Loading branch information
1 parent
285f201
commit 1ada277
Showing
32 changed files
with
614 additions
and
435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.