chromium/third_party/blink/renderer/platform/media/buffered_data_source_host_impl.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/platform/media/buffered_data_source_host_impl.h"

#include "media/base/timestamp_constants.h"

namespace blink {

// We want a relatively small window for estimating bandwidth,
// that way we don't need to worry too much about seeks and pause
// throwing off the estimates.
constexpr base::TimeDelta kDownloadHistoryWindowSeconds =;

// Limit the number of entries in the rate estimator queue.
// 1024 entries should be more than enough.
constexpr size_t kDownloadHistoryMaxEntries =;

// Just in case someone gives progress one byte at a time,
// let's aggregate progress updates together until we reach
// at least this many bytes.
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) {}

}  // namespace blink