docs/doc/reference/com/google/android/exoplayer2/upstream/experimental/BandwidthStatistic.html
Package com.google.android.exoplayer2.upstream.experimental
ExponentialWeightedAverageStatistic, SlidingPercentileBandwidthStatistic, SlidingWeightedAverageBandwidthStatistic[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceBandwidthStatistic
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.
All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | addSample(long bytes, long durationUs) |
Deprecated.
Adds a transfer sample to the statistic.
|
| long | getBandwidthEstimate() |
Deprecated.
Returns the bandwidth estimate in bits per second, or BandwidthEstimator.ESTIMATE_NOT_AVAILABLE if there is no estimate available yet.
|
| void | reset() |
Deprecated.
Resets the statistic. |
-
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.
-
long getBandwidthEstimate()
Deprecated.
Returns the bandwidth estimate in bits per second, or BandwidthEstimator.ESTIMATE_NOT_AVAILABLE if there is no estimate available yet.
-
void reset()
Deprecated.
Resets the statistic. The statistic should drop all samples and reset to its initial state, similar to right after construction.