-
Notifications
You must be signed in to change notification settings - Fork 3k
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
demux: make hysteresis-secs respect cache-secs #12702
Conversation
Download the artifacts for this pull request: |
Need a hysteresis percentage that will cache to a percentage of demuxer-max-bytes or caches-sec, whichever is greater. OR at least a demuxer-hysteresis-bytes as it's hard to get it useful for both high bitrate and low bitrate in it's current state. |
Reading the docs, seems like this was intended. But this isn't intuitive/doesn't make sense since if the goal is to save power by prefetching in bursts then it make sense to do it when |
But then the docs mention @kerneltoast Since you were the one who added this flag, do you have any comment on all of this? |
4073c5c
to
418ce26
Compare
This was lightly discussed on the original PR. |
I wasn't talking out 1 or the other but the option to specify both (if you ignore the % idea). |
3a25b1d
to
f64f7bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the goal is to save power by prefetching in bursts then it make sense to do it when cache-secs fills up before max-bytes as well.
Exactly my thoughts, this bothered me too for some time.
Change LGTM and works as advertised. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a rebase but seems fine.
- brace goes to next line for multi-line conditional - sort standard headers some more
currently hysteresis-secs only works when the demuxer-max-bytes fills up. but it's possible for the cache-secs/demuxer-readahead-secs to be reached first. in those cases, hysteresis-secs doesn't work and keeps buffering non-stop. but the goal of this option was to save power by avoiding non-stop buffering so go ahead and make it respect cache-secs as well. additionally remove some redundant repetition from the docs.
currently hyst_active is only reactivated when the memory limit fills up. but we might stop prefetching due to hitting cache-secs as well, which might occur well before hitting the memory limit. and in those cases, hyst_active never gets reactivated and thus is broken.
this patch activates hysteresis whenever there's nothing more to read or prefetch.