#include "modules/audio_coding/neteq/nack_tracker.h"
#include <cstdint>
#include <utility>
#include "api/field_trials_view.h"
#include "rtc_base/checks.h"
#include "rtc_base/experiments/struct_parameters_parser.h"
#include "rtc_base/logging.h"
namespace webrtc {
namespace {
const int kDefaultSampleRateKhz = …;
const int kMaxPacketSizeMs = …;
constexpr char kNackTrackerConfigFieldTrial[] = …;
}
NackTracker::Config::Config(const FieldTrialsView& field_trials) { … }
NackTracker::NackTracker(const FieldTrialsView& field_trials)
: … { … }
NackTracker::~NackTracker() = default;
void NackTracker::UpdateSampleRate(int sample_rate_hz) { … }
void NackTracker::UpdateLastReceivedPacket(uint16_t sequence_number,
uint32_t timestamp) { … }
absl::optional<int> NackTracker::GetSamplesPerPacket(
uint16_t sequence_number_current_received_rtp,
uint32_t timestamp_current_received_rtp) const { … }
void NackTracker::UpdateList(uint16_t sequence_number_current_received_rtp,
uint32_t timestamp_current_received_rtp) { … }
uint32_t NackTracker::EstimateTimestamp(uint16_t sequence_num,
int samples_per_packet) { … }
void NackTracker::UpdateLastDecodedPacket(uint16_t sequence_number,
uint32_t timestamp) { … }
NackTracker::NackList NackTracker::GetNackList() const { … }
void NackTracker::Reset() { … }
void NackTracker::SetMaxNackListSize(size_t max_nack_list_size) { … }
void NackTracker::LimitNackListSize() { … }
int64_t NackTracker::TimeToPlay(uint32_t timestamp) const { … }
std::vector<uint16_t> NackTracker::GetNackList(int64_t round_trip_time_ms) { … }
void NackTracker::UpdatePacketLossRate(int packets_lost) { … }
}