Skip to content
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

Allows discard of overlapping iFrame only chunks #10407

Closed

Commits on Jul 5, 2022

  1. Allows discard of overlapping iFrame only chunks

    Consider two I-Frame only playlists, to allow adaption based on frame rate the two playlist have different I-Frame duration.
    
    The I-Frame only segment has a single sample (IDR), of sub-second duration (e.g. 0.0333s for 30fps source) but a
    duration equal to the time distance between the I-Frames.
    
    Playlist P1 -- 6 seconds between IDR samples, and Playlist P2 -- 4 seconds between IDR samples:
    
    ````
    +-----+-----+-----+
    |  1  |  2  |  3  |
    +-----+-----+-----+
    +---+---+---+---+---+
    | 1 | 2 | 3 | 4 | 5 |
    +---+---+---+---+---+
    ````
    
    If the `AdaptiveTrackSelection` changes from P2 after loading segments from P1 there appears to be a sample overlap that
    would trigger `shouldSpliceIn` to be set on the iFrame `MediaChunk` when no sample splicing is required.
    
    ````
    +-----+---
    |  1  |  2    --- loaded in P1
    +-----+---
            +---+---+---+
            | 3 | 4 | 5 |  -- switched to P2
            +---+---+---+
    ````
    
    Because the `startTimeUs` of P2 segment 3 is less then the `endTimeUs` of P1 segment 3 it appears samples would overlap,
    as there is only one sample in each segment this is not possible.   Setting this `shouldSpliceIn` flag incorrectly
    prevents pruning the buffered chunks.
    stevemayhew committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    3db86e6 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2022

  1. Add test cases for shouldSpliceIn(...) method

    Add test cases to cover the exiting logic for `shouldSpliceIn(...)` including two cases that cover:
    
    1. Current pull request proposed changes (Intra-iframe only track switch
    2. Proposed logic for to/from iFrame only track
    stevemayhew committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    d79a450 View commit details
    Browse the repository at this point in the history