Class CombinedParallelSampleBandwidthEstimator.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.upstream.experimental.CombinedParallelSampleBandwidthEstimator.Builder
-
- Enclosing class:
- CombinedParallelSampleBandwidthEstimator
public static class CombinedParallelSampleBandwidthEstimator.Builder extends Object
A builder to createCombinedParallelSampleBandwidthEstimator
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a new builder instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CombinedParallelSampleBandwidthEstimator
build()
CombinedParallelSampleBandwidthEstimator.Builder
setBandwidthStatistic(BandwidthStatistic bandwidthStatistic)
Sets theBandwidthStatistic
to be used by the estimator.CombinedParallelSampleBandwidthEstimator.Builder
setMinBytesTransferred(long minBytesTransferred)
Sets a minimum threshold of bytes that need to be transferred before the estimator can return a bandwidth estimate.CombinedParallelSampleBandwidthEstimator.Builder
setMinSamples(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 CombinedParallelSampleBandwidthEstimator.Builder setBandwidthStatistic(BandwidthStatistic bandwidthStatistic)
Sets theBandwidthStatistic
to be used by the estimator. By default, this is set to aSlidingWeightedAverageBandwidthStatistic
.- Parameters:
bandwidthStatistic
- TheBandwidthStatistic
.- Returns:
- This builder for convenience.
-
setMinSamples
@CanIgnoreReturnValue public CombinedParallelSampleBandwidthEstimator.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 CombinedParallelSampleBandwidthEstimator.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 CombinedParallelSampleBandwidthEstimator build()
-
-