Class SplitParallelSampleBandwidthEstimator.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.upstream.experimental.SplitParallelSampleBandwidthEstimator.Builder
-
- Enclosing class:
- SplitParallelSampleBandwidthEstimator
public static class SplitParallelSampleBandwidthEstimator.Builder extends Object
A builder to createSplitParallelSampleBandwidthEstimatorinstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates a new builder instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SplitParallelSampleBandwidthEstimatorbuild()SplitParallelSampleBandwidthEstimator.BuildersetBandwidthStatistic(BandwidthStatistic bandwidthStatistic)Sets theBandwidthStatisticto be used by the estimator.SplitParallelSampleBandwidthEstimator.BuildersetMinBytesTransferred(long minBytesTransferred)Sets a minimum threshold of bytes that need to be transferred before the estimator can return a bandwidth estimate.SplitParallelSampleBandwidthEstimator.BuildersetMinSamples(int minSamples)Sets a minimum threshold of samples that need to be taken before the estimator can return a bandwidth estimate.
-
-
-
Method Detail
-
setBandwidthStatistic
@CanIgnoreReturnValue public SplitParallelSampleBandwidthEstimator.Builder setBandwidthStatistic(BandwidthStatistic bandwidthStatistic)
Sets theBandwidthStatisticto be used by the estimator. By default, this is set to aSlidingWeightedAverageBandwidthStatistic.- Parameters:
bandwidthStatistic- TheBandwidthStatistic.- Returns:
- This builder for convenience.
-
setMinSamples
@CanIgnoreReturnValue public SplitParallelSampleBandwidthEstimator.Builder setMinSamples(int minSamples)
Sets a minimum threshold of samples that need to be taken before the estimator can return a bandwidth estimate. By default, this is set to0.- Parameters:
minSamples- The minimum number of samples.- Returns:
- This builder for convenience.
-
setMinBytesTransferred
@CanIgnoreReturnValue public SplitParallelSampleBandwidthEstimator.Builder setMinBytesTransferred(long minBytesTransferred)
Sets a minimum threshold of bytes that need to be transferred before the estimator can return a bandwidth estimate. By default, this is set to0.- Parameters:
minBytesTransferred- The minimum number of transferred bytes.- Returns:
- This builder for convenience.
-
build
public SplitParallelSampleBandwidthEstimator build()
-
-