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

This change takes the segment duration into account when checking if … #4594

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

dsilhavy
Copy link
Collaborator

…a new request shall be scheduled. This addresses #4588

@dsilhavy dsilhavy added this to the 5.0.0 milestone Oct 14, 2024
@dsilhavy dsilhavy merged commit 16543f6 into development Oct 14, 2024
2 of 4 checks passed
@dsilhavy dsilhavy deleted the fix/#4588 branch October 14, 2024 08:59
const bufferLevel = dashMetrics.getCurrentBufferLevel(type);
return bufferLevel < getBufferTarget();

return bufferLevel + segmentDuration < getBufferTarget();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a risk that the set buffer target is less than the segment duration? If so, what should the behavior be? My thinking is that either (a) the target is implicitly set to segmentDuration, or that (b) _shouldBuffer should throw an exception. Or, do the checking everywhere the segmentDuration and buffer target are changed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @wschidol that is a good point.

It does not make sense from an application point of view to set bufferTarget < segmentDuration but we should be robust here. I will add another PR for this.

I think we should ignore the segment duration if it is larger than the buffer target. If we set segmentDuration = bufferTarget we risk stalling as well as the video playback will typically stall prior to the buffer being level being 0.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an addition, for CMAF low latency streaming the buffer target might in fact be smaller than the segment duration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants