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

SmoothStream audio track language metadata is not made available #1095

Closed
twcapps opened this issue Dec 30, 2015 · 4 comments
Closed

SmoothStream audio track language metadata is not made available #1095

twcapps opened this issue Dec 30, 2015 · 4 comments
Assignees
Labels

Comments

@twcapps
Copy link

twcapps commented Dec 30, 2015

When we request the Audio tracks on a SmoothStream stream the language attribute on the manifest xml is not made available on the MediaFormat language property return from the getTrackFormat method:

public MediaFormat getTrackFormat(int rendererIndex, int trackIndex);

It seems the language attribute is parsed and passed down to the StreamElement
https://github.com/google/ExoPlayer/blob/master/library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifestParser.java#L580

But when the MediaFormat instance is created the language property is linked to the TrackElement (not to the StreamElement):

The TrackElement does not contain the language flag:
https://github.com/google/ExoPlayer/blob/master/library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifest.java#L134

As a result the getTrackFormat will always return a MediaFormat with a language set to null, even if the metadata is available on the manifest.

@ojw28
Copy link
Contributor

ojw28 commented Jan 3, 2016

@AquilesCanta - Fancy looking at this? SmoothStreamingManifestParser needs to be updated so that the Format returned by TrackElement.getFormat includes the language, which it doesn't currently. Note that type is an example of something that's parsed at the stream element level but used in the track element level, which is more or less what needs doing in this case too.

@ojw28
Copy link
Contributor

ojw28 commented Jan 15, 2016

@bartsidee - Your fix looks good to me (aside from the one comment in just added to one of the ref'd changes). Are you planning to send a pull request to fix this, or do we need to do it ourselves? Thanks!

bartsidee pushed a commit to bartsidee/ExoPlayer that referenced this issue Jan 16, 2016
bartsidee pushed a commit to bartsidee/ExoPlayer that referenced this issue Jan 16, 2016
bartsidee pushed a commit to bartsidee/ExoPlayer that referenced this issue Jan 16, 2016
@bartsidee
Copy link

Created a pull request and a new branch which has dev as origin (current was master)

@ojw28
Copy link
Contributor

ojw28 commented Jan 16, 2016

Fixed in #1155.

@ojw28 ojw28 closed this as completed Jan 16, 2016
@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants