Comcast / mamba

Mamba is a Swift iOS, tvOS and macOS framework to parse, validate and write HTTP Live Streaming (HLS) data.
Apache License 2.0
177 stars 37 forks source link

Cache the `playlistType` for `VariantPlaylist`. Invalidate the cache when changes are made. #56

Closed dcoufal closed 5 years ago

dcoufal commented 5 years ago

Description

This PR implements #41 .

The playlistType is now maintained by the PlaylistStructure and the VariantPlaylist just asks the structure for its value.

The PlaylistStructure value is calculated when the structure is calculated. It's recalculated whenever tag changes are made.

This should be a minor performance improvement for code that checks playlistType often.

Change Notes

Pre-submission Checklist