7 #ifndef MPD_BASE_BANDWIDTH_ESTIMATOR_H_ 8 #define MPD_BASE_BANDWIDTH_ESTIMATOR_H_ 23 void AddBlock(uint64_t size_in_bytes,
double duration);
42 uint64_t size_in_bits;
46 double GetAverageBlockDuration()
const;
49 uint64_t GetBitrate(
const Block& block,
double target_block_duration)
const;
51 std::vector<Block> initial_blocks_;
54 double target_block_duration_ = 0;
56 uint64_t total_size_in_bits_ = 0;
57 double total_duration_ = 0;
58 uint64_t max_bitrate_ = 0;
63 #endif // MPD_BASE_BANDWIDTH_ESTIMATOR_H_ All the methods that are virtual are virtual for mocking.
void AddBlock(uint64_t size_in_bytes, double duration)
uint64_t Estimate() const