public static final class AdaptiveTrackSelection.Factory extends java.lang.Object implements TrackSelection.Factory
AdaptiveTrackSelection instances.| Constructor and Description |
|---|
Factory()
Creates an adaptive track selection factory with default parameters.
|
Factory(BandwidthMeter bandwidthMeter)
Deprecated.
Use
#Factory() instead. Custom bandwidth meter should be directly passed
to the player in ExoPlayerFactory. |
Factory(BandwidthMeter bandwidthMeter,
int minDurationForQualityIncreaseMs,
int maxDurationForQualityDecreaseMs,
int minDurationToRetainAfterDiscardMs,
float bandwidthFraction)
Deprecated.
Use
#Factory(int, int, int, float) instead. Custom bandwidth meter should
be directly passed to the player in ExoPlayerFactory. |
Factory(BandwidthMeter bandwidthMeter,
int minDurationForQualityIncreaseMs,
int maxDurationForQualityDecreaseMs,
int minDurationToRetainAfterDiscardMs,
float bandwidthFraction,
float bufferedFractionToLiveEdgeForQualityIncrease,
long minTimeBetweenBufferReevaluationMs,
Clock clock)
Deprecated.
Use
#Factory(int, int, int, float, float, long, Clock) instead. Custom
bandwidth meter should be directly passed to the player in ExoPlayerFactory. |
Factory(int minDurationForQualityIncreaseMs,
int maxDurationForQualityDecreaseMs,
int minDurationToRetainAfterDiscardMs,
float bandwidthFraction)
Creates an adaptive track selection factory.
|
Factory(int minDurationForQualityIncreaseMs,
int maxDurationForQualityDecreaseMs,
int minDurationToRetainAfterDiscardMs,
float bandwidthFraction,
float bufferedFractionToLiveEdgeForQualityIncrease,
long minTimeBetweenBufferReevaluationMs,
Clock clock)
Creates an adaptive track selection factory.
|
| Modifier and Type | Method and Description |
|---|---|
AdaptiveTrackSelection |
createTrackSelection(TrackGroup group,
BandwidthMeter bandwidthMeter,
int... tracks)
Creates a new selection.
|
public Factory()
@Deprecated public Factory(BandwidthMeter bandwidthMeter)
#Factory() instead. Custom bandwidth meter should be directly passed
to the player in ExoPlayerFactory.public Factory(int minDurationForQualityIncreaseMs,
int maxDurationForQualityDecreaseMs,
int minDurationToRetainAfterDiscardMs,
float bandwidthFraction)
minDurationForQualityIncreaseMs - The minimum duration of buffered data required for the
selected track to switch to one of higher quality.maxDurationForQualityDecreaseMs - The maximum duration of buffered data required for the
selected track to switch to one of lower quality.minDurationToRetainAfterDiscardMs - When switching to a track of significantly higher
quality, the selection may indicate that media already buffered at the lower quality can
be discarded to speed up the switch. This is the minimum duration of media that must be
retained at the lower quality.bandwidthFraction - The fraction of the available bandwidth that the selection should
consider available for use. Setting to a value less than 1 is recommended to account for
inaccuracies in the bandwidth estimator.@Deprecated public Factory(BandwidthMeter bandwidthMeter, int minDurationForQualityIncreaseMs, int maxDurationForQualityDecreaseMs, int minDurationToRetainAfterDiscardMs, float bandwidthFraction)
#Factory(int, int, int, float) instead. Custom bandwidth meter should
be directly passed to the player in ExoPlayerFactory.public Factory(int minDurationForQualityIncreaseMs,
int maxDurationForQualityDecreaseMs,
int minDurationToRetainAfterDiscardMs,
float bandwidthFraction,
float bufferedFractionToLiveEdgeForQualityIncrease,
long minTimeBetweenBufferReevaluationMs,
Clock clock)
minDurationForQualityIncreaseMs - The minimum duration of buffered data required for the
selected track to switch to one of higher quality.maxDurationForQualityDecreaseMs - The maximum duration of buffered data required for the
selected track to switch to one of lower quality.minDurationToRetainAfterDiscardMs - When switching to a track of significantly higher
quality, the selection may indicate that media already buffered at the lower quality can
be discarded to speed up the switch. This is the minimum duration of media that must be
retained at the lower quality.bandwidthFraction - The fraction of the available bandwidth that the selection should
consider available for use. Setting to a value less than 1 is recommended to account for
inaccuracies in the bandwidth estimator.bufferedFractionToLiveEdgeForQualityIncrease - For live streaming, the fraction of the
duration from current playback position to the live edge that has to be buffered before
the selected track can be switched to one of higher quality. This parameter is only
applied when the playback position is closer to the live edge than minDurationForQualityIncreaseMs, which would otherwise prevent switching to a higher
quality from happening.minTimeBetweenBufferReevaluationMs - The track selection may periodically reevaluate its
buffer and discard some chunks of lower quality to improve the playback quality if
network conditions have changed. This is the minimum duration between 2 consecutive
buffer reevaluation calls.clock - A Clock.@Deprecated
public Factory(@Nullable
BandwidthMeter bandwidthMeter,
int minDurationForQualityIncreaseMs,
int maxDurationForQualityDecreaseMs,
int minDurationToRetainAfterDiscardMs,
float bandwidthFraction,
float bufferedFractionToLiveEdgeForQualityIncrease,
long minTimeBetweenBufferReevaluationMs,
Clock clock)
#Factory(int, int, int, float, float, long, Clock) instead. Custom
bandwidth meter should be directly passed to the player in ExoPlayerFactory.public AdaptiveTrackSelection createTrackSelection(TrackGroup group, BandwidthMeter bandwidthMeter, int... tracks)
TrackSelection.FactorycreateTrackSelection in interface TrackSelection.Factorygroup - The TrackGroup. Must not be null.bandwidthMeter - A BandwidthMeter which can be used to select tracks.tracks - The indices of the selected tracks within the TrackGroup. Must not be
null or empty. May be in any order.