Skip to content

Conversation

@bastimeyer
Copy link
Member

  • Convert isodate.Duration instances to datetime.timedelta in SegmentTemplate.format_media() in order to be able to compare with datetime.datetime in the timeline generator
  • Keep isodate.Duration or datetime.timedelta instances in SegmentTemplate.segment_numbers() before subtracting from since_start, as isodate.Duration() can't be converted to seconds without a reference datetime.datetime
  • Replace all isodate.Duration() attribute default values with datetime.timedelta() for simplicity/performance reasons
  • Set the 3 seconds default value of MPD.suggestedPresentationDelay on the attribute's default definition instead of using constants in the SegmentTemplate methods

- Convert `isodate.Duration` instances to `datetime.timedelta`
  in `SegmentTemplate.format_media()` in order to be able to compare
  with `datetime.datetime` in the timeline generator
- Keep `isodate.Duration` or `datetime.timedelta` instances
  in `SegmentTemplate.segment_numbers()` before subtracting from
  `since_start`, as `isodate.Duration()` can't be converted to seconds
  without a reference `datetime.datetime`
- Replace all `isodate.Duration()` attribute default values with
  `datetime.timedelta()` for simplicity/performance reasons
- Set the 3 seconds default value of `MPD.suggestedPresentationDelay`
  on the attribute's default definition instead of using constants
  in the `SegmentTemplate` methods
@gravyboat gravyboat merged commit 350cb58 into streamlink:master Mar 4, 2023
@bastimeyer bastimeyer deleted the stream/dash/fix-suggested-presentation-delay branch March 4, 2023 21:19
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