Thanks to visit codestin.com
Credit goes to github.com

Skip to content

stream.dash: fix suggestedPresentationDelay#5215

Merged
gravyboat merged 1 commit into
streamlink:masterfrom
bastimeyer:stream/dash/fix-suggested-presentation-delay
Mar 4, 2023
Merged

stream.dash: fix suggestedPresentationDelay#5215
gravyboat merged 1 commit into
streamlink:masterfrom
bastimeyer:stream/dash/fix-suggested-presentation-delay

Conversation

@bastimeyer

Copy link
Copy Markdown
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