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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from novoda/audio_described_track
Select Audio Track
- Loading branch information
Showing
8 changed files
with
181 additions
and
2 deletions.
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