public interface FormatEvaluator
Modifier and Type | Interface and Description |
---|---|
static class |
FormatEvaluator.AdaptiveEvaluator
An adaptive evaluator for video formats, which attempts to select the best quality possible
given the current network conditions and state of the buffer.
|
static class |
FormatEvaluator.Evaluation
A format evaluation.
|
static class |
FormatEvaluator.FixedEvaluator
Always selects the first format.
|
static class |
FormatEvaluator.RandomEvaluator
Selects randomly between the available formats.
|
Modifier and Type | Method and Description |
---|---|
void |
disable()
Disables the evaluator.
|
void |
enable()
Enables the evaluator.
|
void |
evaluate(List<? extends MediaChunk> queue,
long playbackPositionUs,
Format[] formats,
FormatEvaluator.Evaluation evaluation)
Update the supplied evaluation.
|
void enable()
void disable()
void evaluate(List<? extends MediaChunk> queue, long playbackPositionUs, Format[] formats, FormatEvaluator.Evaluation evaluation)
When the method is invoked, evaluation
will contain the currently selected
format (null for the first evaluation), the most recent trigger (TRIGGER_INITIAL for the
first evaluation) and the current queue size. The implementation should update these
fields as necessary.
The trigger should be considered "sticky" for as long as a given representation is selected, and so should only be changed if the representation is also changed.
queue
- A read only representation of the currently buffered MediaChunk
s.playbackPositionUs
- The current playback position.formats
- The formats from which to select, ordered by decreasing bandwidth.evaluation
- The evaluation.