|
| BandwidthEstimator (size_t num_blocks) |
|
void | AddBlock (uint64_t size, double duration) |
|
uint64_t | Estimate () const |
|
uint64_t | Max () const |
|
Definition at line 17 of file bandwidth_estimator.h.
◆ AddBlock()
void shaka::BandwidthEstimator::AddBlock |
( |
uint64_t |
size, |
|
|
double |
duration |
|
) |
| |
- Parameters
-
size | is the size of the block in bytes. Should be positive. |
duration | is the length in seconds. Should be positive. |
Definition at line 19 of file bandwidth_estimator.cc.
◆ Estimate()
uint64_t shaka::BandwidthEstimator::Estimate |
( |
| ) |
const |
- Returns
- The estimate bandwidth, in bits per second, from the harmonic mean of the number of blocks specified in the constructor. The value is rounded up to the nearest integer.
Definition at line 28 of file bandwidth_estimator.cc.
◆ Max()
uint64_t shaka::BandwidthEstimator::Max |
( |
| ) |
const |
- Returns
- The max bandwidth, in bits per second, of the number of blocks specified in the constructor. The value is rounded up to the nearest integer.
Definition at line 35 of file bandwidth_estimator.cc.
◆ kUseAllBlocks
constexpr size_t shaka::BandwidthEstimator::kUseAllBlocks = 0 |
|
static |
- Parameters
-
num_blocks | is the number of latest blocks to use. 0 uses all. |
Definition at line 20 of file bandwidth_estimator.h.
The documentation for this class was generated from the following files: