Skip to content

Conversation

@theRealRobG
Copy link
Collaborator

@theRealRobG theRealRobG commented Aug 31, 2024

Description

This PR introduces support for the EXT-X-SKIP tag.

The important addition as a result of supporting this tag (outside of what is already possible by users of the library creating a custom tag descriptor to support it) is that we now properly update the mediaSequence property when calculating each MediaSegmentTagGroup. Before this change Mamba would provide incorrect values for each mediaSequence occurring after an EXT-X-SKIP tag (which could break users of the library that receive a playlist delta update and rely on the library's media sequence calculations).

Support for other playlist tags related the playlist delta updates (i.e. EXT-X-SERVER-CONTROL) will be done separately (in an attempt to keep this PR focused).

Change Notes

  • Added new value (EXT_X_SKIP) to the PantosTag enum and made the necessary updates for the HLSTagDescriptor conformance.
  • Added new values to PantosValue to account for attributes related to EXT-X-SKIP (.skippedSegments and .recentlyRemovedDateranges).
  • Updated generateMediaGroups for HLSPlaylistStructure to account for any SKIPPED-SEGMENTS when calculating media sequence values for segment tag groups.

Pre-submission Checklist

  • I ran the unit tests locally before checking in.
  • I made sure there were no compiler warnings before checking in.
  • I have written useful documentation for all public code.
  • I have written unit tests for this new feature.

Copy link
Collaborator

@rmigneco rmigneco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good and mostly some minor comments.

Question:
Sometimes media sequence numbers are published along with EXTINF tags, i.e.

#EXTINF:2.000,842920575

In this case we trust the server that those MS numbers correctly account for skipped segments and require no updating, right?

@theRealRobG
Copy link
Collaborator Author

I think this is good and mostly some minor comments.

Question: Sometimes media sequence numbers are published along with EXTINF tags, i.e.

#EXTINF:2.000,842920575

In this case we trust the server that those MS numbers correctly account for skipped segments and require no updating, right?

I think that should be fine, because ultimately the application of the Playlist Delta Update is the responsibility of the server, and so if the server is publishing those media sequence numbers in the EXTINF titles, then it is also the responsibility of the server to keep those up to date after applying the EXT-X-SKIP. Anecdotally from when I made a POC for this, it should be fine for the server to manage this, as it's just filtering out information that it no longer needs to send to the client, but the information should all be already calculated.

Long story short, I think that shouldn't pose any issues for us here.

@rmigneco
Copy link
Collaborator

rmigneco commented Sep 4, 2024

👍
Merge in develop_1.x and LGTM

@rmigneco rmigneco merged commit db05335 into develop_1.x Sep 4, 2024
@rmigneco rmigneco deleted the playlist-delta-updates branch September 4, 2024 15:39
@theRealRobG theRealRobG mentioned this pull request Oct 4, 2024
4 tasks
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.

3 participants