stream.segmented: add common base Segment class #5594
Merged
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 PR currently includes the commits of #5593. I will rebase and remove those commits once #5593 got merged intomaster.As explained in #5498, all segmented streams should operate on segments which inherit from a common base segment. This base segment should define common attributes like
uri,numandduration. The goal is to be able to have logic for a max stream duration and a stream start offset in the segmented stream base classes instead of having to implement this in each individual stream type separately.DASHSegment, so they align with the baseSegmentSince the HLS spec (RFC 8216) defines segment sources as URIs (superset of URLs) because data can be retrieved from literally anywhere, I used that terminology.
Segmentand make segment dataclasses of each segmented stream implementation inherit from itHLSSegmentandDASHSegmentinto dedicated modules as well