SlidingWeightedAverageBandwidthStatistic.Sample


public class SlidingWeightedAverageBandwidthStatistic.Sample


Represents a bandwidth sample.

Summary

Public fields

final long

The sample bitrate.

final long

The time this sample was added, in milliseconds.

final double

The sample weight.

Public constructors

Sample(long bitrate, double weight, long timeAddedMs)

Creates a new sample.

Public fields

bitrate

public final long bitrate

The sample bitrate.

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

weight

public final double weight

The sample weight.

Public constructors

Sample

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

Creates a new sample.