-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
update the use of streamProcessorDict in AbrController #1961
update the use of streamProcessorDict in AbrController #1961
Conversation
0d6b0b5
to
7f3f8b8
Compare
7f3f8b8
to
f082fc2
Compare
add tests
2c75cd6
to
7b76764
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.
It's a good refactor but looks like some things changed in the development branch in the meantime?
const streamId = streamInfo ? streamInfo.id : null; | ||
const oldQuality = getQualityFor(type); | ||
const rulesContext = RulesContext(context).create({ | ||
streamProcessor: streamProcessorDict[type], |
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.
Lack of abrController in the rulesContext causes errors in ThroughputRule.js
if (getAutoSwitchBitrateFor(type)) { | ||
const topQualityIdx = getTopQualityIndexFor(type, streamId); | ||
const switchRequest = abrRulesCollection.getMaxQuality(rulesContext); | ||
let newQuality = switchRequest.value; |
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.
Current development version should be switchRequest.quality
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.
Indeed, it 's the result of a very bad rebase....sorry!
Thanks a lot @robertbryer !
Hi,
this PR has to use, actually, streamProcessorDict attribute. Each time a streamProcessor is created,it is stored in streamProcessorDict array. So, the consequence is that the functions of AbrController just need type as parameter, not the streamProcessor reference.
Nicolas