stream.hls: cache parsed multivariant playlist #4568
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
M3U8Parser.base_uri
toM3U8.uri
multivariant
to{,Muxed}HLSStream
and deprecateurl_master
:multivariant
inHLSStream.parse_variant_playlist
instead ofurl_master
, so that stream instances can keep a reference oftheir parsed multivariant playlist.
This is required for implementing the
EXT-X-SESSION-{DATA,KEY}
HLS tags, or for accessing custom tags in HLS subclasses.
to_manifest_url
TODO: rename method / refactor interface
The
url_master
parameter was not removed from{,Muxed}HLSStream
for backwards compatibility reasons. This can be done later when other HLS method signatures get changed in the future.Instead of "master", I chose the name "multivariant", because that's how master playlists will be called in future versions of the HLS spec. This avoids one unnecessary parameter name change later on and keeps it consistent with future spec implementations.