Back to Exoplayer

SlidingWeightedAverageBandwidthStatistic.Sample (ExoPlayer library)

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

latest2.1 KB
Original Source

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

Class SlidingWeightedAverageBandwidthStatistic.Sample


public static classSlidingWeightedAverageBandwidthStatistic.Sampleextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Represents a bandwidth sample.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | long | bitrate | The sample bitrate. | | long | timeAddedMs | The time this sample was added, in milliseconds. | | double | weight | The sample weight. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Sample​(long bitrate, double weight, long timeAddedMs) | Creates a new sample. |

Method Summary

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

bitrate

public final long bitrate

The sample bitrate.

- 

weight

public final double weight

The sample weight.

- 

timeAddedMs

public final long timeAddedMs

The time this sample was added, in milliseconds. Timestamps should come from the same source, so that samples can reliably be ordered in time. It is suggested to use Clock.elapsedRealtime().

Constructor Detail

- 

Sample

public Sample​(long bitrate,
              double weight,
              long timeAddedMs)

Creates a new sample.