#include "modules/congestion_controller/goog_cc/delay_based_bwe.h"
#include <algorithm>
#include <cstdint>
#include <memory>
#include <utility>
#include <vector>
#include "absl/types/optional.h"
#include "api/field_trials_view.h"
#include "api/network_state_predictor.h"
#include "api/rtc_event_log/rtc_event_log.h"
#include "api/transport/bandwidth_usage.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 "logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h"
#include "modules/congestion_controller/goog_cc/delay_increase_detector_interface.h"
#include "modules/congestion_controller/goog_cc/inter_arrival_delta.h"
#include "modules/congestion_controller/goog_cc/trendline_estimator.h"
#include "modules/remote_bitrate_estimator/include/bwe_defines.h"
#include "rtc_base/checks.h"
#include "rtc_base/experiments/struct_parameters_parser.h"
#include "rtc_base/logging.h"
#include "rtc_base/race_checker.h"
#include "system_wrappers/include/metrics.h"
namespace webrtc {
namespace {
constexpr TimeDelta kStreamTimeOut = …;
constexpr TimeDelta kSendTimeGroupLength = …;
constexpr uint32_t kFixedSsrc = …;
}
constexpr char BweSeparateAudioPacketsSettings::kKey[];
BweSeparateAudioPacketsSettings::BweSeparateAudioPacketsSettings(
const FieldTrialsView* key_value_config) { … }
std::unique_ptr<StructParametersParser>
BweSeparateAudioPacketsSettings::Parser() { … }
DelayBasedBwe::Result::Result()
: … { … }
DelayBasedBwe::DelayBasedBwe(const FieldTrialsView* key_value_config,
RtcEventLog* event_log,
NetworkStatePredictor* network_state_predictor)
: … { … }
DelayBasedBwe::~DelayBasedBwe() { … }
DelayBasedBwe::Result DelayBasedBwe::IncomingPacketFeedbackVector(
const TransportPacketsFeedback& msg,
absl::optional<DataRate> acked_bitrate,
absl::optional<DataRate> probe_bitrate,
absl::optional<NetworkStateEstimate> network_estimate,
bool in_alr) { … }
void DelayBasedBwe::IncomingPacketFeedback(const PacketResult& packet_feedback,
Timestamp at_time) { … }
DataRate DelayBasedBwe::TriggerOveruse(Timestamp at_time,
absl::optional<DataRate> link_capacity) { … }
DelayBasedBwe::Result DelayBasedBwe::MaybeUpdateEstimate(
absl::optional<DataRate> acked_bitrate,
absl::optional<DataRate> probe_bitrate,
absl::optional<NetworkStateEstimate> state_estimate,
bool recovered_from_overuse,
bool in_alr,
Timestamp at_time) { … }
bool DelayBasedBwe::UpdateEstimate(Timestamp at_time,
absl::optional<DataRate> acked_bitrate,
DataRate* target_rate) { … }
void DelayBasedBwe::OnRttUpdate(TimeDelta avg_rtt) { … }
bool DelayBasedBwe::LatestEstimate(std::vector<uint32_t>* ssrcs,
DataRate* bitrate) const { … }
void DelayBasedBwe::SetStartBitrate(DataRate start_bitrate) { … }
void DelayBasedBwe::SetMinBitrate(DataRate min_bitrate) { … }
TimeDelta DelayBasedBwe::GetExpectedBwePeriod() const { … }
}