#include "third_party/blink/renderer/platform/media/buffered_data_source_host_impl.h"
#include "media/base/timestamp_constants.h"
namespace blink {
constexpr base::TimeDelta kDownloadHistoryWindowSeconds = …;
constexpr size_t kDownloadHistoryMaxEntries = …;
constexpr int64_t kDownloadHistoryMinBytesPerEntry = …;
BufferedDataSourceHostImpl::BufferedDataSourceHostImpl(
base::RepeatingClosure progress_cb,
const base::TickClock* tick_clock)
: … { … }
BufferedDataSourceHostImpl::~BufferedDataSourceHostImpl() = default;
void BufferedDataSourceHostImpl::SetTotalBytes(int64_t total_bytes) { … }
int64_t BufferedDataSourceHostImpl::UnloadedBytesInInterval(
const Interval<int64_t>& interval) const { … }
void BufferedDataSourceHostImpl::AddBufferedByteRange(int64_t start,
int64_t end) { … }
static base::TimeDelta TimeForByteOffset(int64_t byte_offset,
int64_t total_bytes,
base::TimeDelta duration) { … }
void BufferedDataSourceHostImpl::AddBufferedTimeRanges(
media::Ranges<base::TimeDelta>* buffered_time_ranges,
base::TimeDelta media_duration) const { … }
bool BufferedDataSourceHostImpl::DidLoadingProgress() { … }
double BufferedDataSourceHostImpl::DownloadRate() const { … }
bool BufferedDataSourceHostImpl::CanPlayThrough(
base::TimeDelta current_position,
base::TimeDelta media_duration,
double playback_rate) const { … }
void BufferedDataSourceHostImpl::SetTickClockForTest(
const base::TickClock* tick_clock) { … }
}