This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Select Audio Track #13
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
00ebf51
Expose get and set for audioTracks.
18d8cd1
Create a model not tied to exoplayer representing audio tracks.
19146a8
Up the android min version.
d3ea4e1
Add additional information to the PlayerAudioTrack.
9d20b5c
Implement get and set AudioTracks for AndroidMediaPlayer.
3fef8ed
Rename from misleading set to select.
jszmltr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
core/src/main/java/com/novoda/noplayer/PlayerAudioTrack.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package com.novoda.noplayer; | ||
|
||
public class PlayerAudioTrack { | ||
|
||
private final String trackId; | ||
private final String language; | ||
private final String mimeType; | ||
private final int numberOfChannels; | ||
private final int frequency; | ||
|
||
public PlayerAudioTrack(String trackId, String language, String mimeType, int numberOfChannels, int frequency) { | ||
this.trackId = trackId; | ||
this.language = language; | ||
this.mimeType = mimeType; | ||
this.numberOfChannels = numberOfChannels; | ||
this.frequency = frequency; | ||
} | ||
|
||
public String trackId() { | ||
return trackId; | ||
} | ||
|
||
public String language() { | ||
return language; | ||
} | ||
|
||
public String mimeType() { | ||
return mimeType; | ||
} | ||
|
||
public int numberOfChannels() { | ||
return numberOfChannels; | ||
} | ||
|
||
public int frequency() { | ||
return frequency; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
|
||
PlayerAudioTrack that = (PlayerAudioTrack) o; | ||
|
||
if (numberOfChannels != that.numberOfChannels) { | ||
return false; | ||
} | ||
if (frequency != that.frequency) { | ||
return false; | ||
} | ||
if (trackId != null ? !trackId.equals(that.trackId) : that.trackId != null) { | ||
return false; | ||
} | ||
if (language != null ? !language.equals(that.language) : that.language != null) { | ||
return false; | ||
} | ||
return mimeType != null ? mimeType.equals(that.mimeType) : that.mimeType == null; | ||
|
||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = trackId != null ? trackId.hashCode() : 0; | ||
result = 31 * result + (language != null ? language.hashCode() : 0); | ||
result = 31 * result + (mimeType != null ? mimeType.hashCode() : 0); | ||
result = 31 * result + numberOfChannels; | ||
result = 31 * result + frequency; | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
same as the other?
select