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

/*
 *  Copyright 2021 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_bwe_v2.h"

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <cstdlib>
#include <limits>
#include <vector>

#include "absl/algorithm/container.h"
#include "absl/types/optional.h"
#include "api/array_view.h"
#include "api/field_trials_view.h"
#include "api/transport/network_types.h"
#include "api/units/data_rate.h"
#include "api/units/data_size.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
#include "modules/remote_bitrate_estimator/include/bwe_defines.h"
#include "rtc_base/experiments/field_trial_list.h"
#include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/logging.h"

namespace webrtc {

namespace {

constexpr TimeDelta kInitHoldDuration =;
constexpr TimeDelta kMaxHoldDuration =;

bool IsValid(DataRate datarate) {}

bool IsValid(absl::optional<DataRate> datarate) {}

bool IsValid(Timestamp timestamp) {}

double ToKiloBytes(DataSize datasize) {}

double GetLossProbability(double inherent_loss,
                          DataRate loss_limited_bandwidth,
                          DataRate sending_rate) {}

}  // namespace

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

bool LossBasedBweV2::IsEnabled() const {}

bool LossBasedBweV2::IsReady() const {}

bool LossBasedBweV2::ReadyToUseInStartPhase() const {}

bool LossBasedBweV2::UseInStartPhase() const {}

LossBasedBweV2::Result LossBasedBweV2::GetLossBasedResult() const {}

void LossBasedBweV2::SetAcknowledgedBitrate(DataRate acknowledged_bitrate) {}

void LossBasedBweV2::SetBandwidthEstimate(DataRate bandwidth_estimate) {}

void LossBasedBweV2::SetMinMaxBitrate(DataRate min_bitrate,
                                      DataRate max_bitrate) {}

void LossBasedBweV2::UpdateBandwidthEstimate(
    rtc::ArrayView<const PacketResult> packet_results,
    DataRate delay_based_estimate,
    bool in_alr) {}

bool LossBasedBweV2::IsEstimateIncreasingWhenLossLimited(
    DataRate old_estimate, DataRate new_estimate) {}

// Returns a `LossBasedBweV2::Config` iff the `key_value_config` specifies a
// configuration for the `LossBasedBweV2` which is explicitly enabled.
absl::optional<LossBasedBweV2::Config> LossBasedBweV2::CreateConfig(
    const FieldTrialsView* key_value_config) {}

bool LossBasedBweV2::IsConfigValid() const {}

double LossBasedBweV2::GetAverageReportedLossRatio() const {}

double LossBasedBweV2::GetAverageReportedPacketLossRatio() const {}

double LossBasedBweV2::GetAverageReportedByteLossRatio() const {}

DataRate LossBasedBweV2::GetCandidateBandwidthUpperBound() const {}

std::vector<LossBasedBweV2::ChannelParameters> LossBasedBweV2::GetCandidates(
    bool in_alr) const {}

LossBasedBweV2::Derivatives LossBasedBweV2::GetDerivatives(
    const ChannelParameters& channel_parameters) const {}

double LossBasedBweV2::GetFeasibleInherentLoss(
    const ChannelParameters& channel_parameters) const {}

double LossBasedBweV2::GetInherentLossUpperBound(DataRate bandwidth) const {}

double LossBasedBweV2::AdjustBiasFactor(double loss_rate,
                                        double bias_factor) const {}

double LossBasedBweV2::GetHighBandwidthBias(DataRate bandwidth) const {}

double LossBasedBweV2::GetObjective(
    const ChannelParameters& channel_parameters) const {}

DataRate LossBasedBweV2::GetSendingRate(
    DataRate instantaneous_sending_rate) const {}

DataRate LossBasedBweV2::GetInstantUpperBound() const {}

void LossBasedBweV2::CalculateInstantUpperBound() {}

DataRate LossBasedBweV2::GetInstantLowerBound() const {}

void LossBasedBweV2::CalculateInstantLowerBound() {}

void LossBasedBweV2::CalculateTemporalWeights() {}

void LossBasedBweV2::NewtonsMethodUpdate(
    ChannelParameters& channel_parameters) const {}

bool LossBasedBweV2::PushBackObservation(
    rtc::ArrayView<const PacketResult> packet_results) {}

bool LossBasedBweV2::IsInLossLimitedState() const {}

bool LossBasedBweV2::CanKeepIncreasingState(DataRate estimate) const {}

bool LossBasedBweV2::PaceAtLossBasedEstimate() const {}

}  // namespace webrtc