mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Remove unused method.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=117338990
This commit is contained in:
parent
1eff6cf210
commit
3c5a509af8
7 changed files with 8 additions and 45 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue