SequenceableLoader
@UnstableApi
public interface SequenceableLoader
ChunkSampleStream |
A |
CompositeSequenceableLoader |
A |
MediaPeriod |
Loads media corresponding to a |
ClippingMediaPeriod |
Wraps a |
FakeAdaptiveMediaPeriod |
Fake |
FakeMediaPeriod |
Fake |
MaskingMediaPeriod |
Media period that defers calling |
A loader that can proceed in approximate synchronization with other loaders.
Summary
Nested types |
|---|
public interface SequenceableLoader.Callback<T extends SequenceableLoader>A callback to be notified of |
Public methods |
|
|---|---|
abstract boolean |
continueLoading(LoadingInfo loadingInfo)Attempts to continue loading. |
abstract long |
Returns an estimate of the position up to which data is buffered. |
abstract long |
Returns the next load time, or |
abstract boolean |
Returns whether the loader is currently loading. |
abstract void |
reevaluateBuffer(long positionUs)Re-evaluates the buffer given the playback position. |
Public methods
continueLoading
abstract boolean continueLoading(LoadingInfo loadingInfo)
Attempts to continue loading.
| Parameters | |
|---|---|
LoadingInfo loadingInfo |
The |
| Returns | |
|---|---|
boolean |
True if progress was made, meaning that |
getBufferedPositionUs
abstract long getBufferedPositionUs()
Returns an estimate of the position up to which data is buffered.
| Returns | |
|---|---|
long |
An estimate of the absolute position in microseconds up to which data is buffered, or |
getNextLoadPositionUs
abstract long getNextLoadPositionUs()
Returns the next load time, or TIME_END_OF_SOURCE if loading has finished.
reevaluateBuffer
abstract void reevaluateBuffer(long positionUs)
Re-evaluates the buffer given the playback position.
Re-evaluation may discard buffered media or cancel ongoing loads so that media can be re-buffered in a different quality.
| Parameters | |
|---|---|
long positionUs |
The current playback position in microseconds. If playback of this period has not yet started, the value will be the starting position in this period minus the duration of any media in previous periods still to be played. |