Commit 3c5a509a by olly Committed by Oliver Woodman

Remove unused method.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117338990
parent 1eff6cf2
...@@ -147,11 +147,6 @@ public final class FrameworkSampleSource implements SampleSource { ...@@ -147,11 +147,6 @@ public final class FrameworkSampleSource implements SampleSource {
} }
@Override @Override
public boolean isPrepared() {
return prepared;
}
@Override
public long getDurationUs() { public long getDurationUs() {
return C.UNKNOWN_TIME_US; return C.UNKNOWN_TIME_US;
} }
......
...@@ -36,16 +36,16 @@ public class MultiSampleSource implements SampleSource { ...@@ -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;
...@@ -67,11 +67,6 @@ public class MultiSampleSource implements SampleSource { ...@@ -67,11 +67,6 @@ public class MultiSampleSource implements SampleSource {
} }
@Override @Override
public boolean isPrepared() {
return prepared;
}
@Override
public TrackGroupArray getTrackGroups() { public TrackGroupArray getTrackGroups() {
return trackGroups; return trackGroups;
} }
......
...@@ -35,13 +35,6 @@ public interface SampleSource { ...@@ -35,13 +35,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>
* This method should only be called after the source has been prepared. * This method should only be called after the source has been prepared.
...@@ -58,7 +51,7 @@ public interface SampleSource { ...@@ -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 { ...@@ -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.
......
...@@ -96,11 +96,6 @@ public final class SingleSampleSource implements SampleSource, TrackStream, Load ...@@ -96,11 +96,6 @@ public final class SingleSampleSource implements SampleSource, TrackStream, Load
} }
@Override @Override
public boolean isPrepared() {
return loader != null;
}
@Override
public long getDurationUs() { public long getDurationUs() {
return durationUs; return durationUs;
} }
......
...@@ -168,11 +168,6 @@ public class ChunkSampleSource implements SampleSource, TrackStream, Loader.Call ...@@ -168,11 +168,6 @@ public class ChunkSampleSource implements SampleSource, TrackStream, Loader.Call
} }
@Override @Override
public boolean isPrepared() {
return state != STATE_IDLE;
}
@Override
public long getDurationUs() { public long getDurationUs() {
return durationUs; return durationUs;
} }
......
...@@ -352,11 +352,6 @@ public final class ExtractorSampleSource implements SampleSource, ExtractorOutpu ...@@ -352,11 +352,6 @@ public final class ExtractorSampleSource implements SampleSource, ExtractorOutpu
} }
@Override @Override
public boolean isPrepared() {
return prepared;
}
@Override
public long getDurationUs() { public long getDurationUs() {
return durationUs; return durationUs;
} }
......
...@@ -177,11 +177,6 @@ public final class HlsSampleSource implements SampleSource, Loader.Callback { ...@@ -177,11 +177,6 @@ public final class HlsSampleSource implements SampleSource, Loader.Callback {
} }
@Override @Override
public boolean isPrepared() {
return prepared;
}
@Override
public long getDurationUs() { public long getDurationUs() {
return chunkSource.getDurationUs(); return chunkSource.getDurationUs();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment