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
reset BlacklistController after url resolution failed #2539
reset BlacklistController after url resolution failed #2539
Conversation
Hi @bbcrddave ! As you have done the whole part about BaseUrl management, could you review this PR ? Thanks |
tl;dr this seems reasonable but it'd be nice to control it. This seems to solve the problem you describe, but I think there's a wider conversation to be had around what to do in case of a failure. This was started at #651. It was also discussed at a F2F I seem to recall, but perhaps it's worth discussing again in May. Anyway .... Most of the behaviour in this area is based around the DVB-DASH spec which clearly states what to do when a segment is missing, and what to do when all base URLs have been exhausted an error should be raised and the session terminated. Calling reset here marks all BaseURLs as selectable again, which may or may not be appropriate, so perhaps it would be worth asking the application (via a config option or something. |
Thanks @bbcrddave for the review. |
We can make it configurable but we can also restrict the reset only in the case of a BasicSelector and not in case of a DVBSelector). As far as I understand, the BasicSelector is not really an implementation of the DVB spec, just a really simple implementation that picks the first available baseurl. But most of the time, there is only one defined in a MPD, so as soon as we have a missing segment we are stucked forever. So my proposition is to modify the PR to do the reset only when having a BasicSelector. |
This solves the problem, and is better, so ship it 👍 I'm still not convinced it's the right way to solve the true problem, but we can have that discussion at a later date. |
Hi @davemevans, If we do not blacklist the base URL, in case of segment failure, then we would be able to get around a missing segment and then seek further this missing segment at application level. I agree we should consider a wider conversation on segment failure, but meanwhile we need to enforce current version. |
I'm not 100% sure of the use case but, if there is only one BaseURL, optionally not blacklisting seems like a pragmatic answer. It isn't clear how you would ever fail at that point since you will retry the segment forever, but I suppose that is for the application to decide ... |
The use case is to be able to seek after a segment download has failed. At the moment, when this happens, an event Events.URL_RESOLUTION_FAILED is fired and stops the schedule controller.
If we want to seek further to bypass a missing segment, we can not start the playing again because the base url of the segment that failed is stored in the black list controller.
By resetting it after the event firing, it allows to try seeking further. Without this PR we can not seek at all after this event. So the only thing this PR changes is to at least let the client to jump over a missing segment.
If needed we can add a configuration to enable/disable this feature. What do you think ?