stream: switch to sub-packages#5593
Merged
Merged
Conversation
9fbd84d to
a50aaca
Compare
Member
Author
|
I've updated the logger names to reduce unnecessary redundancy. |
gravyboat
approved these changes
Oct 7, 2023
gravyboat
left a comment
Member
There was a problem hiding this comment.
Looks good. I agree with you in regards to avoiding the redundant loggers 👍
a50aaca to
3ac69a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#5498
This moves the various stream implementations into dedicated sub-packages, for having a cleaner separation of different stream types, as well as for being able to define the
BaseSegmentin the upcoming PR in a dedicated module. This PR therefore basically just moves the module files and updates the import paths (and mock paths in tests). I decided against naming the individual modules of those sub-packages with a leading underscore character.As a side effect of moving the modules, and I'm not sure whether I like it, the logger names have changed as well (due to the
__name__reference). Example:stream.hls->stream.hls.hlsandstream.hls_playlist->stream.hls.m3u8.I believe it'd be better to override/revert the redundant logger names, which are
stream.segmented.segmented,stream.hls.hlsandstream.dash.dash. The logger names of the parser modules (hls.m3u8anddash.manifest) are fine IMO and should be kept. They will be different no matter what due to the modules being renamed (previouslyhls_parseranddash_manifest).In regards to the exports of the sub-packages, there will be no difference for the segmented stream base classes. The HLS sub-package also exports most of the m3u8 module, which I don't think is necessary, but I added those exports anyway since there are lots of custom HLS implementations. The DASH sub-package however only exports the relevant stuff. If there's a need for plugins to subclass DASH internals for custom implementations, then any missing stuff can be added later.