Skip to content

stream.segmented: basic code refactoring #5504

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

Merged
merged 5 commits into from
Aug 19, 2023

Conversation

bastimeyer
Copy link
Member

Some basic/trivial changes which should be done before attempting to resolve #5498.

Opening this as a draft, as I'm not sure if more is needed... Will update once I've had the time for another look in the next couple of days or so...

- Move worker below writer, so it aligns with the definitions
  in modules of subclasses, like HLS and DASH
- Reformat docstrings
- Rename `futures` to `_queue`
- Change item format to `tuple[BaseSegment, Future, tuple] | None`
- Remove invalid `retries` keyword from `fetch()` call added to
  the `ThreadPoolExecutor`
- Update DASH accordingly. Other subclasses are not affected, because
  they define their own `put()` method
The argument is unused in the various segmented stream implementations
and the timeout gets set via the `stream-timeout` session option.
@bastimeyer bastimeyer force-pushed the stream/refactor-segmented branch from 6b33bfc to 892f0b9 Compare August 19, 2023 22:14
@bastimeyer bastimeyer marked this pull request as ready for review August 19, 2023 22:15
@bastimeyer bastimeyer merged commit fb7783b into streamlink:master Aug 19, 2023
@bastimeyer bastimeyer deleted the stream/refactor-segmented branch August 19, 2023 22:18
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.

Refactor segmented streams and use a common BaseSegment
1 participant