Remove unused method.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117338990
This commit is contained in:
olly 2016-03-16 07:03:19 -07:00 committed by Oliver Woodman
parent 1eff6cf210
commit 3c5a509af8
7 changed files with 8 additions and 45 deletions

View file

@ -146,11 +146,6 @@ public final class FrameworkSampleSource implements SampleSource {
return true;
}
@Override
public boolean isPrepared() {
return prepared;
}
@Override
public long getDurationUs() {
return C.UNKNOWN_TIME_US;

View file

@ -36,16 +36,16 @@ public class MultiSampleSource implements SampleSource {
@Override
public boolean prepare(long positionUs) throws IOException {
if (this.prepared) {
if (prepared) {
return true;
}
boolean prepared = true;
boolean sourcesPrepared = true;
for (int i = 0; i < sources.length; i++) {
prepared &= sources[i].prepare(positionUs);
sourcesPrepared &= sources[i].prepare(positionUs);
}
if (prepared) {
this.prepared = true;
this.durationUs = C.UNKNOWN_TIME_US;
if (sourcesPrepared) {
prepared = true;
durationUs = C.UNKNOWN_TIME_US;
int totalTrackGroupCount = 0;
for (int i = 0; i < sources.length; i++) {
totalTrackGroupCount += sources[i].getTrackGroups().length;
@ -66,11 +66,6 @@ public class MultiSampleSource implements SampleSource {
return prepared;
}
@Override
public boolean isPrepared() {
return prepared;
}
@Override
public TrackGroupArray getTrackGroups() {
return trackGroups;

View file

@ -34,13 +34,6 @@ public interface SampleSource {
*/
boolean prepare(long positionUs) throws IOException;
/**
* Returns whether the source is prepared.
*
* @return True if the source is prepared. False otherwise.
*/
boolean isPrepared();
/**
* Returns the duration of the source.
* <p>
@ -58,7 +51,7 @@ public interface SampleSource {
*
* @return The {@link TrackGroup}s.
*/
public TrackGroupArray getTrackGroups();
TrackGroupArray getTrackGroups();
/**
* Indicates to the source that it should continue buffering data for its enabled tracks.
@ -103,7 +96,7 @@ public interface SampleSource {
* @param positionUs The current playback position in microseconds.
* @return A {@link TrackStream} from which the enabled track's data can be read.
*/
public TrackStream enable(TrackSelection selection, long positionUs);
TrackStream enable(TrackSelection selection, long positionUs);
/**
* Releases the source.

View file

@ -95,11 +95,6 @@ public final class SingleSampleSource implements SampleSource, TrackStream, Load
return true;
}
@Override
public boolean isPrepared() {
return loader != null;
}
@Override
public long getDurationUs() {
return durationUs;

View file

@ -167,11 +167,6 @@ public class ChunkSampleSource implements SampleSource, TrackStream, Loader.Call
return true;
}
@Override
public boolean isPrepared() {
return state != STATE_IDLE;
}
@Override
public long getDurationUs() {
return durationUs;

View file

@ -351,11 +351,6 @@ public final class ExtractorSampleSource implements SampleSource, ExtractorOutpu
return false;
}
@Override
public boolean isPrepared() {
return prepared;
}
@Override
public long getDurationUs() {
return durationUs;

View file

@ -176,11 +176,6 @@ public final class HlsSampleSource implements SampleSource, Loader.Callback {
return false;
}
@Override
public boolean isPrepared() {
return prepared;
}
@Override
public long getDurationUs() {
return chunkSource.getDurationUs();