chromium/third_party/webrtc/modules/congestion_controller/goog_cc/loss_based_bandwidth_estimation.cc

/*
 *  Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "modules/congestion_controller/goog_cc/loss_based_bandwidth_estimation.h"

#include <algorithm>
#include <cmath>
#include <vector>

#include "absl/strings/match.h"
#include "absl/strings/string_view.h"
#include "api/field_trials_view.h"
#include "api/transport/network_types.h"
#include "api/units/data_rate.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
#include "rtc_base/checks.h"
#include "rtc_base/experiments/field_trial_parser.h"

namespace webrtc {
namespace {
const char kBweLossBasedControl[] =;

// Expecting RTCP feedback to be sent with roughly 1s intervals, a 5s gap
// indicates a channel outage.
constexpr TimeDelta kMaxRtcpFeedbackInterval =;

// Increase slower when RTT is high.
double GetIncreaseFactor(const LossBasedControlConfig& config, TimeDelta rtt) {}

double LossFromBitrate(DataRate bitrate,
                       DataRate loss_bandwidth_balance,
                       double exponent) {}

DataRate BitrateFromLoss(double loss,
                         DataRate loss_bandwidth_balance,
                         double exponent) {}

double ExponentialUpdate(TimeDelta window, TimeDelta interval) {}

bool IsEnabled(const webrtc::FieldTrialsView& key_value_config,
               absl::string_view name) {}

}  // namespace

LossBasedControlConfig::LossBasedControlConfig(
    const FieldTrialsView* key_value_config)
    :{}
LossBasedControlConfig::LossBasedControlConfig(const LossBasedControlConfig&) =
    default;
LossBasedControlConfig::~LossBasedControlConfig() = default;

LossBasedBandwidthEstimation::LossBasedBandwidthEstimation(
    const FieldTrialsView* key_value_config)
    :{}

void LossBasedBandwidthEstimation::UpdateLossStatistics(
    const std::vector<PacketResult>& packet_results,
    Timestamp at_time) {}

void LossBasedBandwidthEstimation::UpdateAcknowledgedBitrate(
    DataRate acknowledged_bitrate,
    Timestamp at_time) {}

DataRate LossBasedBandwidthEstimation::Update(Timestamp at_time,
                                              DataRate min_bitrate,
                                              DataRate wanted_bitrate,
                                              TimeDelta last_round_trip_time) {}

void LossBasedBandwidthEstimation::Initialize(DataRate bitrate) {}

double LossBasedBandwidthEstimation::loss_reset_threshold() const {}

double LossBasedBandwidthEstimation::loss_increase_threshold() const {}

double LossBasedBandwidthEstimation::loss_decrease_threshold() const {}

DataRate LossBasedBandwidthEstimation::decreased_bitrate() const {}
}  // namespace webrtc