-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Fix load pending routine. #2564
Conversation
Can you provide more context on what you are trying to achieve here? Any onLoadCompleted() that does not have a corresponding processLoadedPlaylist() is an unnecessary http request (and parsing), so you should have made the network request in the first place. Can you explain and provide concrete examples? |
The philosophy of this modification is limited to where to suppress execution of processLoadedPlaylist, which corresponds to reload processing based on HLS spec v 20, section 6.3.4. |
Can you please clarify:
Again, if possible, a concrete example would be helpful. |
For example, loadPlaylist may be executed also from refreshPlaylist, maybeSelectNewPrimaryUrl, maybeSetPrimaryUrl at present. |
In all three cases it makes sense to make the reloading of the playlist take place later: If there is a pending refresh, it means that we have loaded the playlist recently, and that a reloading will most likely not see anything new. Regarding this particular pull request: Do you agree that we should not discard a playlist that has already been loaded? If so, please close the issue. Regarding
My original aim with the extra condition was to avoid any kind of reloading when a playlist reload is pending. If there is a pending load, it means that the Playlist tracker has decided it needs to try at that point. Any other component has no better knowledge of playlist lifecycle than the tracker, so it does not matter where the loadPlaylist() comes from. Basically, as you said:
I don't think the method's name (I guess you mean |
I certainly think that this is reasonable. Thank you for your reply. |
I agree with that. But, if loaded, it should be processed. This is not the case in the PR.
When would this be the case? Bear in mind that the fact that someone other than the tracker requests a playlist loading does not mean that it is the correct moment to load the playlist. Please clarify why you think it is necessary to reacquire the playlist immediately.
Why? Do you think there is a heavy computational load in processLoadedPlaylist? Otherwise, it will add a lot of synchronization complexity to the tracker, which now runs completely on the playback thread. This is highly desirable. |
I understood the difference in thinking with you.
You think that loadPlaylist from other parts is unnecessary while the tracker is functioning normally. Because there is almost no probability that a difference will occur at the time of reloading. Even if multiple trackers are activated by this correction, they are suppressed and converged in the next routine.
My answer on the question,
That was all it was. As long as you named "RefreshRequired" you should have the most priority other than the tracker. Your answer to this,
And I have not obtained a specific answer. |
Yes. Please let me know if you run into any new issues with the new version. Thanks again for the PR! |
Thanks(`・ω・´)ゞ |
The loadPlaylist method has multiple conditions called.
I do not think that only postDelayed tasks can inhibit it.