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

DASH content type parsing fails to deduce text type on AdaptationSet #631

Closed
joeyparrish opened this issue Dec 13, 2016 · 0 comments
Closed
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@joeyparrish
Copy link
Member

The DASH parser fails to deduce the content type of MIME type "application/mp4" with codecs "stpp" or "wvtt". It calls the AdaptationSet's contentType "application" instead of "text". After this, Player sends bad data to AbrManager, and we end up with the errors INVALID_STREAMS_CHOSEN and RESTRICTIONS_CANNOT_BE_MET.

We need to fix the bug in the DASH parser (contentType should be "text") and fix the Player to avoid misleading and confusing error messages when the DASH parser fails in this way.

Reported by Thomas Melcher here: https://groups.google.com/forum/#!msg/shaka-player-users/TzuJGrtqIbY/wAIVwVLfCgAJ

@joeyparrish joeyparrish added the type: bug Something isn't working correctly label Dec 13, 2016
@joeyparrish joeyparrish added this to the v2.1.0 milestone Dec 13, 2016
@joeyparrish joeyparrish self-assigned this Dec 13, 2016
ismena pushed a commit that referenced this issue Dec 15, 2016
The DASH parser was not always correctly deducing the content type.

For unspecified content types, the type can be deduced from the MIME
type.  For example, video/mp4 is video, and audio/webm is audio.

For text, things are a little more complicated.  Text types do not
always start with text/.  In particular, embedded text, such as VTT
in MP4, have a MIME type that starts with application/mp4.

To deal with that, if we see an unknown type, we ask TextEngine if it
supports it.  If so, we deduce that the content type should be text.

This check against TextEngine was only happening for MIME types
specified on the Representation, but not on AdaptationSet.  This
replaces a weaker deduction in the general frame parser with the same
TextEngine check we were using elsewhere.

Furthermore, Player mishandled the content types it passed to
AbrManager.  AbrManager will only choose audio, video, and text
streams.  It ignores all other types.  Player, meanwhile, threw a
confusing error if AbrManager failed to choose some of the types
passed to it.  Therefore, Player should only pass audio, video, and
text types to AbrManager.

This fixes both issues and adds new unit tests for both.

Closes #631

Change-Id: Ib1311d37d00c3989367fd066f66e1eba85652e40
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 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
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants