chromium/third_party/openscreen/src/cast/streaming/impl/bandwidth_estimator.cc

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

#include "cast/streaming/impl/bandwidth_estimator.h"

#include <algorithm>

#include "util/osp_logging.h"
#include "util/saturate_cast.h"

namespace openscreen::cast {

operator<<;

namespace {

// Converts units from |bytes| per |time_window| number of Clock ticks into
// bits-per-second.
int ToClampedBitsPerSecond(int32_t bytes, Clock::duration time_window) {}

}  // namespace

BandwidthEstimator::BandwidthEstimator(int max_packets_per_timeslice,
                                       Clock::duration timeslice_duration,
                                       Clock::time_point start_time)
    :{}

BandwidthEstimator::~BandwidthEstimator() = default;

void BandwidthEstimator::OnBurstComplete(int num_packets_sent,
                                         Clock::time_point when) {}

void BandwidthEstimator::OnRtcpReceived(
    Clock::time_point arrival_time,
    Clock::duration estimated_round_trip_time) {}

void BandwidthEstimator::OnPayloadReceived(
    int payload_bytes_acknowledged,
    Clock::time_point ack_arrival_time,
    Clock::duration estimated_round_trip_time) {}

int BandwidthEstimator::ComputeNetworkBandwidth() const {}

// static
constexpr int BandwidthEstimator::kNumTimeslices;

BandwidthEstimator::FlowTracker::FlowTracker(Clock::duration timeslice_duration,
                                             Clock::time_point begin_time)
    :{}

BandwidthEstimator::FlowTracker::~FlowTracker() = default;

void BandwidthEstimator::FlowTracker::AdvanceToIncludeTime(
    Clock::time_point until) {}

void BandwidthEstimator::FlowTracker::Accumulate(int32_t amount,
                                                 Clock::time_point when) {}

int32_t BandwidthEstimator::FlowTracker::Sum() const {}

}  // namespace openscreen::cast