public static final class AdaptiveVideoTrackSelection.Factory extends Object implements TrackSelection.Factory
AdaptiveVideoTrackSelection
instances.Constructor and Description |
---|
Factory(BandwidthMeter bandwidthMeter) |
Factory(BandwidthMeter bandwidthMeter,
int maxInitialBitrate,
int minDurationForQualityIncreaseMs,
int maxDurationForQualityDecreaseMs,
int minDurationToRetainAfterDiscardMs,
float bandwidthFraction) |
Modifier and Type | Method and Description |
---|---|
AdaptiveVideoTrackSelection |
createTrackSelection(TrackGroup group,
int... tracks)
Creates a new selection.
|
public Factory(BandwidthMeter bandwidthMeter)
bandwidthMeter
- Provides an estimate of the currently available bandwidth.public Factory(BandwidthMeter bandwidthMeter, int maxInitialBitrate, int minDurationForQualityIncreaseMs, int maxDurationForQualityDecreaseMs, int minDurationToRetainAfterDiscardMs, float bandwidthFraction)
bandwidthMeter
- Provides an estimate of the currently available bandwidth.maxInitialBitrate
- The maximum bitrate in bits per second that should be assumed
when a bandwidth estimate is unavailable.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.public AdaptiveVideoTrackSelection createTrackSelection(TrackGroup group, int... tracks)
TrackSelection.Factory
createTrackSelection
in interface TrackSelection.Factory
group
- The TrackGroup
. Must not be null.tracks
- The indices of the selected tracks within the TrackGroup
. Must not be
null or empty. May be in any order.