Skip to content
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

Playlists should be "Master" and "Variant" flavored #5

Closed
dcoufal opened this issue Jan 4, 2018 · 0 comments
Closed

Playlists should be "Master" and "Variant" flavored #5

dcoufal opened this issue Jan 4, 2018 · 0 comments
Assignees
Labels
mamba2.0 A marker for features/bug fixes for a new version of mamba

Comments

@dcoufal
Copy link
Contributor

dcoufal commented Jan 4, 2018

Description

Right now, all HLS playlists are HLSPlaylist type. You can tell if a playlist is master or variant by inspecting the type.

However, there are weak typing issues in HLSPlaylist. The mediaSegmentGroups and all the HLSPlaylistTimelineTranslator don't really make sense unless the playlist is a Variant. Also, this situation leads to a lot of:

guard playlist.type == .master else {
    // exit with an error, exception and possibly an assert
}

which could be avoided with strong typing.

Tasks

It's not 100% clear what the correct solution is. Perhaps the HLSParser could have two success callbacks, one for master and one for variant playlists.

Most functionality should be shared between HLSMasterPlaylist and HLSVariantPlaylist. It's only mediaSegmentGroups and HLSPlaylistTimelineTranslator that are specific to HLSVariantPlaylist. I would imagine that HLSMasterPlaylist could have some specific functionality to deal with #EXT-X-STREAM-INF tags paired with variant urls (similar to mediaSegmentGroups).

We should have an agreement about architecture before going forward.

This will be a large architectural change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mamba2.0 A marker for features/bug fixes for a new version of mamba
Projects
None yet
Development

No branches or pull requests

1 participant