Back to Exoplayer

SlidingWeightedAverageBandwidthStatistic.SampleEvictionFunction (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/upstream/experimental/SlidingWeightedAverageBandwidthStatistic.SampleEvictionFunction.html

latest1.6 KB
Original Source

Package com.google.android.exoplayer2.upstream.experimental

Interface SlidingWeightedAverageBandwidthStatistic.SampleEvictionFunction


public static interfaceSlidingWeightedAverageBandwidthStatistic.SampleEvictionFunction

An interface to decide if samples need to be evicted from the estimator.

Method Summary

All Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description | | --- | --- | --- | | boolean | shouldEvictSample​(Deque<SlidingWeightedAverageBandwidthStatistic.Sample> samples) | Whether the sample at the front of the queue needs to be evicted. |

Method Detail

- 

shouldEvictSample

boolean shouldEvictSample​([Deque](https://developer.android.com/reference/java/util/Deque.html "class or interface in java.util")<[SlidingWeightedAverageBandwidthStatistic.Sample](SlidingWeightedAverageBandwidthStatistic.Sample.html "class in com.google.android.exoplayer2.upstream.experimental")> samples)

Whether the sample at the front of the queue needs to be evicted. Called before adding a next sample. Parameters:samples - A queue of samples, ordered by SlidingWeightedAverageBandwidthStatistic.Sample.timeAddedMs. The oldest sample is at front of the queue. The queue must not be modified.