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

DateRange parsing and validation enhancements for Interstitials #6213

Merged
merged 8 commits into from
Jun 6, 2024

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Feb 14, 2024

This PR will...

  • Add DateRange parsing and validation enhancements for Interstitials:
    • Parse CUE attribute (and legacy X-CUE)
    • Anchor each DateRange to a Segment with an EXT-X-PROGRAM-DATE-TIME tag which encapsulates the DateRange start date between its date time and the end of a subsequent EXT-X-PROGRAM-DATE-TIME tag. This keeps DateRange object start times aligned to the media buffer as parsed times diverge from playlist times and ensures correct mapping between DateRanges and Segment program date time.
      • When the last PDT does not satisfy this condition, search for an anchor starting at the last PDT tag.
      • When a DateRange starts earlier than all PDT tags, map it to the first PDT tag.
    • Maintain Playlist DateRange index (tagOrder) for ordering of Preroll and Postrolls
  • Warn when attributes expected to have quoted-attribute values are missing quotes (Relates to #6203)
  • Move Variable Substitution logic into AttrList where all quoted-string attribute values can have variable definition replacement performed
  • Adjust DateRange metadata Cue start and end times when Playlist segment start times differ from media segment start times by more than 1/100th of a second 0c5ca21 (Resolves EXT-X-DATERANGE metadata synchronisation vs video stream in presence of frequent EXT-X-DISCONTINUITYs #6203)
  • Improved Delta Playlist merging and added tests to ensure DateRanges and PDT are properly merged with updates using the EXT-X-SKIP tag
    • Emit a LEVEL_PARSING_ERROR when more than one EXT-X-SKIP tag is found in a Playlist

Why is this Pull Request needed?

Are there any points in the code the reviewer needs to double check?

  • Anchor each DateRange to a Segment assigned a date time by an EXT-X-PROGRAM-DATE-TIME tag, which encapsulates the DateRange start date between its date time and the end of a subsequent Segment before the next EXT-X-PROGRAM-DATE-TIME tag. This keeps DateRange object start times aligned to the media buffer as parsed times diverge from playlist times and ensures correct mapping between DateRanges and Segment program date time.

Does not align DATERANGE tags whose START-DATE is greater than or equal to the last EXT-X-PROGRAM-DATE-TIME to that last tag but appear earlier in the playlist and map to earlier segments. This is only an issue when Playlists have overlapping or non-ascending program date time (invalid) and comparing to HLS clients with different mapping.

Resolves issues:

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@robwalch robwalch force-pushed the feature/date-range-parsing branch from ec4fcc5 to f46e754 Compare June 4, 2024 19:03
(Do not parse start and end date attributes already parsed in another DateRange tag with the same ID)
@robwalch robwalch merged commit 514cc10 into master Jun 6, 2024
16 checks passed
@robwalch robwalch deleted the feature/date-range-parsing branch June 6, 2024 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

EXT-X-DATERANGE metadata synchronisation vs video stream in presence of frequent EXT-X-DISCONTINUITYs
1 participant