7 #ifndef MPD_BASE_BANDWIDTH_ESTIMATOR_H_
8 #define MPD_BASE_BANDWIDTH_ESTIMATOR_H_
22 void AddBlock(uint64_t size_in_bytes,
double duration);
41 uint64_t size_in_bits;
45 double GetAverageBlockDuration()
const;
48 uint64_t GetBitrate(
const Block& block,
double target_block_duration)
const;
50 std::vector<Block> initial_blocks_;
53 double target_block_duration_ = 0;
55 uint64_t total_size_in_bits_ = 0;
56 double total_duration_ = 0;
57 uint64_t max_bitrate_ = 0;
void AddBlock(uint64_t size_in_bytes, double duration)
uint64_t Estimate() const
All the methods that are virtual are virtual for mocking.