Skip to content

stream.hls: cache parsed multivariant playlist #4568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bastimeyer
Copy link
Member

  • Move M3U8Parser.base_uri to M3U8.uri
  • Add multivariant to {,Muxed}HLSStream and deprecate url_master:
    • Set multivariant in HLSStream.parse_variant_playlist instead of
      url_master, so that stream instances can keep a reference of
      their parsed multivariant playlist.
      This is required for implementing the EXT-X-SESSION-{DATA,KEY}
      HLS tags, or for accessing custom tags in HLS subclasses.
    • Update to_manifest_url
      TODO: rename method / refactor interface
  • Fix subclasses in various plugins

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.

- Move `M3U8Parser.base_uri` to `M3U8.uri`
- Add `multivariant` to `{,Muxed}HLSStream` and deprecate `url_master`:
  - Set `multivariant` in `HLSStream.parse_variant_playlist` instead of
    `url_master`, so that stream instances can keep a reference of
    their parsed multivariant playlist.
    This is required for implementing the `EXT-X-SESSION-{DATA,KEY}`
    HLS tags, or for accessing custom tags in HLS subclasses.
  - Update `to_manifest_url`
    TODO: rename method / refactor interface
- Fix subclasses in various plugins
@gravyboat gravyboat merged commit 7cb0ebe into streamlink:master Jun 4, 2022
@gravyboat
Copy link
Member

gravyboat commented Jun 4, 2022

Nice job getting ahead of this! The naming makes sense to me.

@bastimeyer bastimeyer deleted the stream/hls/parsed-multivariant branch June 4, 2022 01:46
Billy2011 added a commit to Billy2011/streamlink-27 that referenced this pull request Jun 7, 2022
- Move `M3U8Parser.base_uri` to `M3U8.uri`
- Add `multivariant` to `{,Muxed}HLSStream` and deprecate `url_master`:
  - Set `multivariant` in `HLSStream.parse_variant_playlist` instead of
    `url_master`, so that stream instances can keep a reference of
    their parsed multivariant playlist.
    This is required for implementing the `EXT-X-SESSION-{DATA,KEY}`
    HLS tags, or for accessing custom tags in HLS subclasses.
  - Update `to_manifest_url`
    TODO: rename method / refactor interface
- Fix subclasses in various plugins
Billy2011 added a commit to Billy2011/streamlink-27 that referenced this pull request Jun 7, 2022
- Move `M3U8Parser.base_uri` to `M3U8.uri`
- Add `multivariant` to `{,Muxed}HLSStream` and deprecate `url_master`:
  - Set `multivariant` in `HLSStream.parse_variant_playlist` instead of
    `url_master`, so that stream instances can keep a reference of
    their parsed multivariant playlist.
    This is required for implementing the `EXT-X-SESSION-{DATA,KEY}`
    HLS tags, or for accessing custom tags in HLS subclasses.
  - Update `to_manifest_url`
    TODO: rename method / refactor interface
- Fix subclasses in various plugins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants