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

/*
 *  Copyright (c) 2016 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/trendline_estimator.h"

#include <math.h>

#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <memory>
#include <string>
#include <utility>

#include "absl/strings/match.h"
#include "absl/types/optional.h"
#include "api/field_trials_view.h"
#include "api/network_state_predictor.h"
#include "api/transport/bandwidth_usage.h"
#include "rtc_base/checks.h"
#include "rtc_base/experiments/struct_parameters_parser.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_minmax.h"

namespace webrtc {

namespace {

// Parameters for linear least squares fit of regression line to noisy data.
constexpr double kDefaultTrendlineSmoothingCoeff =;
constexpr double kDefaultTrendlineThresholdGain =;
const char kBweWindowSizeInPacketsExperiment[] =;

size_t ReadTrendlineFilterWindowSize(const FieldTrialsView* key_value_config) {}

absl::optional<double> LinearFitSlope(
    const std::deque<TrendlineEstimator::PacketTiming>& packets) {}

absl::optional<double> ComputeSlopeCap(
    const std::deque<TrendlineEstimator::PacketTiming>& packets,
    const TrendlineEstimatorSettings& settings) {}

constexpr double kMaxAdaptOffsetMs =;
constexpr double kOverUsingTimeThreshold =;
constexpr int kMinNumDeltas =;
constexpr int kDeltaCounterMax =;

}  // namespace

constexpr char TrendlineEstimatorSettings::kKey[];

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

std::unique_ptr<StructParametersParser> TrendlineEstimatorSettings::Parser() {}

TrendlineEstimator::TrendlineEstimator(
    const FieldTrialsView* key_value_config,
    NetworkStatePredictor* network_state_predictor)
    :{}

TrendlineEstimator::~TrendlineEstimator() {}

void TrendlineEstimator::UpdateTrendline(double recv_delta_ms,
                                         double send_delta_ms,
                                         int64_t send_time_ms,
                                         int64_t arrival_time_ms,
                                         size_t packet_size) {}

void TrendlineEstimator::Update(double recv_delta_ms,
                                double send_delta_ms,
                                int64_t send_time_ms,
                                int64_t arrival_time_ms,
                                size_t packet_size,
                                bool calculated_deltas) {}

BandwidthUsage TrendlineEstimator::State() const {}

void TrendlineEstimator::Detect(double trend, double ts_delta, int64_t now_ms) {}

void TrendlineEstimator::UpdateThreshold(double modified_trend,
                                         int64_t now_ms) {}

}  // namespace webrtc