Back to Exoplayer

BandwidthStatistic (ExoPlayer library)

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

latest2.2 KB
Original Source

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

Interface BandwidthStatistic

  • All Known Implementing Classes: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.

Method Summary

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. |

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, or BandwidthEstimator.ESTIMATE_NOT_AVAILABLE if 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.