Interface BandwidthStatistic
-
- All Known Implementing Classes:
ExponentialWeightedAverageStatistic,SlidingPercentileBandwidthStatistic,SlidingWeightedAverageBandwidthStatistic
@Deprecated public interface BandwidthStatistic
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.The interface for different bandwidth estimation statistics.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddSample(long bytes, long durationUs)Deprecated.Adds a transfer sample to the statistic.longgetBandwidthEstimate()Deprecated.Returns the bandwidth estimate in bits per second, orBandwidthEstimator.ESTIMATE_NOT_AVAILABLEif there is no estimate available yet.voidreset()Deprecated.Resets the statistic.
-
-
-
Method Detail
-
addSample
void addSample(long bytes, long durationUs)Deprecated.Adds a transfer sample to the statistic.- Parameters:
bytes- The number of bytes transferred.durationUs- The duration of the transfer, in microseconds.
-
getBandwidthEstimate
long getBandwidthEstimate()
Deprecated.Returns the bandwidth estimate in bits per second, orBandwidthEstimator.ESTIMATE_NOT_AVAILABLEif there is no estimate available yet.
-
reset
void reset()
Deprecated.Resets the statistic. The statistic should drop all samples and reset to its initial state, similar to right after construction.
-
-