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

minBufferTime config should not be overriden by dash manifest #1547

Closed
fadomire opened this issue Aug 15, 2018 · 9 comments
Closed

minBufferTime config should not be overriden by dash manifest #1547

fadomire opened this issue Aug 15, 2018 · 9 comments
Labels
flag: good first issue This might be a relatively easy issue; good for new contributors flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@fadomire
Copy link
Contributor

fadomire commented Aug 15, 2018

Hello, i understand that currently the code behave as follow :
A DASH manifest's minBufferTime, if greater, overrides rebufferingGoal.

The problem i see in that behavior is that client knows better about network conditions and may want to adapt the rebufferingGoal value based on that. Currently it is not possible.

Why not make the following rule :
config takes precedence over dash manifest that takes precedence over default value

@fadomire fadomire changed the title minBufferTime config should not be override by dash manifest minBufferTime config should not be overriden by dash manifest Aug 15, 2018
@ismena ismena added type: question A question from the community and removed needs triage labels Aug 15, 2018
@ismena
Copy link
Contributor

ismena commented Aug 15, 2018

Hi, thanks for reaching out.

Having config be the source of truth might mean we're no longer compliant with the dash spec, but let me see if our TL is open to a discussion on this @joeyparrish

@joeyparrish
Copy link
Member

That seems reasonable. I'll put this on the backlog, but we would be happy to accept a PR for this if you have time to work on it. Thanks!

@joeyparrish joeyparrish added type: enhancement New feature or request flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this flag: good first issue This might be a relatively easy issue; good for new contributors and removed type: question A question from the community labels Aug 15, 2018
@joeyparrish joeyparrish added this to the Backlog milestone Aug 15, 2018
@fadomire
Copy link
Contributor Author

yes sure i’ll prepare a PR in the following weeks

@fadomire
Copy link
Contributor Author

fadomire commented Sep 5, 2018

this seems less easy than i first thought because of the following flow:
specific config overrides default value and is then passed to manifest parsers

so when the parser get the dash manifest minBufferTime it does not know if the config value is the default one or a specific config one

i can think of some hack around it, but i don't like that

i'll need more time to come with a proper solution if any, so i'll let you know

ideas welcome

@vaage
Copy link
Contributor

vaage commented Sep 5, 2018

@fadomire I'll want @joeyparrish to chime in on this suggestion, but what we could do is replace minBufferTime: number with resolveMinBufferTime:function(?number). With this, the app could replace the logic that determines what min buffer time to use (using the manifest provided value as a guiding principle).

From the manifest parser they would then have a callback usable as:

// When the manifest does not have their own value.
const minBufferTime = this.config_.resolveMinBufferTime(null);

and

// When the manifest has their own value.
const minBufferTime = this.config_.resolveMinBufferTime(this.mySuggestedMinBufferTime);

The library could provide a default like:

(manifestMinBufferTime) => {
  const myDefault = /* some number */;
  return manifestMinBufferTime ? Math.max(manifestMinBufferTime, myDefault) : myDefault;
};

Then apps could replace it further with whatever logic they need/want.

@fadomire
Copy link
Contributor Author

@vaage thanks for the suggestion, it seems a good path

i still made a pull request with minor changes, but i feel it does not fit well with the current code flow :
default config merged with specific user config

tho i will use this fork for demo purpose and see later how shaka team wants to implement it

@joeyparrish
Copy link
Member

After some more discussion internally, I think we should add the config field manifest.dash.ignoreMinBufferTime, which will default to false. If true, the DASH parser will ignore minBufferTime in the manifest, such that streaming.rebufferingGoal is the only factor in play.

@fadomire
Copy link
Contributor Author

i updated the PR #1581 to implement manifest.dash.ignoreMinBufferTime logic

let me know if ok for you or if it needs some tweak

thanks !

@joeyparrish joeyparrish modified the milestones: Backlog, v2.5 Sep 21, 2018
@joeyparrish
Copy link
Member

Released in v2.5.0-beta2.

@shaka-project shaka-project locked and limited conversation to collaborators Nov 20, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
flag: good first issue This might be a relatively easy issue; good for new contributors flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants