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

onManifestUpdated and getStreamsInfo optimizations #2433

Conversation

Gontran-Molotov
Copy link
Contributor

This PR optimizes the StreamController.onManifestUpdated() method. It removes the manifest passed as argument to adapter.getStreamsInfo() because the DashAdapter instance already got regular periods for the current manifest. So it is useless to re-analyze the manifest once again to get them.

This PR also adds a new limit argument to DashAdapter.getStreamsInfo(). It allows to specify for how many streams we want to get info. Currently, some classes calls getStreamInfos() to uselessly get info for all streams but only use the first one.

@@ -309,7 +309,7 @@ function DashAdapter() {
voAdaptations = {};
}

function getStreamsInfo(externalManifest) {
function getStreamsInfo(externalManifest, limit) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@Gontran-Molotov , it could be interesting to rename limit parameter by, for instance, maxStreamsInfo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's indeed a more explicit variable name. Thanks for the suggestion.

@epiclabsDASH epiclabsDASH added this to the v2.6.7 milestone Feb 28, 2018
@epiclabsDASH epiclabsDASH modified the milestones: v2.6.7, 2.6.8 Mar 7, 2018
@Gontran-Molotov Gontran-Molotov force-pushed the optimizeOnManifestUpdate branch from 77f060d to 463cb67 Compare March 9, 2018 09:26
@Gontran-Molotov
Copy link
Contributor Author

Fix conflict with ProtectionController.js

@epiclabsDASH epiclabsDASH merged commit b440d14 into Dash-Industry-Forum:development Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants