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; return true;
} }
@Override
public boolean isPrepared() {
return prepared;
}
@Override @Override
public long getDurationUs() { public long getDurationUs() {
return C.UNKNOWN_TIME_US; return C.UNKNOWN_TIME_US;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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