Skip to content

stream.hls: refactor playlist reload #6347

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bastimeyer
Copy link
Member

Resolves #6340

Opening this as a draft for now, as it's WIP and unfinished. This simply moves stuff into a new intermediate abstract base class, PollingSegmentedStreamWorker, and it simplifies attribute and method names.

I currently don't know if this requires further changes, as I haven't had a look at the DASHStreamWorker yet, which is supposed to utilize the shared code here in the future.

Another thing that's missing, but could be changed later, is renaming the hls-segment-queue-threshold session option and CLI argument, as it's now part of the shared base class. A good opportunity for choosing a better name, e.g. segmented-queue-deadline or something like that.

- Refactor HLSStreamWorker:
  - Rename reload_playlist() to reload()
  - Rename _playlist_reload_time() to _get_reload_time()
  - Rename playlist_reload_last to _reload_last
  - Rename playlist_reload_time to _reload_time
  - Rename playlist_reload_time_override to _reload_time_override
  - Rename playlist_reload_retries to _reload_retries
- TestHlsPlaylistReloadTime:
  - Rename to TestHlsReloadTime
  - Remove prefixes of various test method names
- TestMixinStreamHLS:
  - Rename await_playlist_reload() to await_reload()
Refactor `HLSStreamWorker` and move polling wait-time logic
into `PollingSegmentedStreamWorker`, so it can be re-used in other
segmented stream types eventually, like in DASH for example.
Move logic for stopping the stream early if no new segments were
queued in a specific time frame from `HLSStreamWorker`
to `PollingSegmentedStreamWorker`, and simplify attribute+method names.
Move segment gap warning from `HLSStreamWorker` to
`PollingSegmentedStreamWorker`.
@bastimeyer bastimeyer added WIP Work in process stream: HLS labels Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stream: HLS WIP Work in process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stream.hls: refactor polling-related logic
1 participant