#include "modules/remote_bitrate_estimator/transport_sequence_number_feedback_generator.h"
#include <algorithm>
#include <cstdint>
#include <limits>
#include <memory>
#include <utility>
#include "absl/types/optional.h"
#include "api/units/data_size.h"
#include "api/units/time_delta.h"
#include "modules/rtp_rtcp/source/rtcp_packet/remote_estimate.h"
#include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_minmax.h"
#include "system_wrappers/include/clock.h"
namespace webrtc {
namespace {
constexpr TimeDelta kBackWindow = …;
constexpr TimeDelta kMinInterval = …;
constexpr TimeDelta kMaxInterval = …;
constexpr TimeDelta kDefaultInterval = …;
TimeDelta GetAbsoluteSendTimeDelta(uint32_t new_sendtime,
uint32_t previous_sendtime) { … }
}
TransportSequenceNumberFeedbackGenenerator::
TransportSequenceNumberFeedbackGenenerator(
RtcpSender feedback_sender,
NetworkStateEstimator* network_state_estimator)
: … { … }
TransportSequenceNumberFeedbackGenenerator::
~TransportSequenceNumberFeedbackGenenerator() { … }
void TransportSequenceNumberFeedbackGenenerator::MaybeCullOldPackets(
int64_t sequence_number,
Timestamp arrival_time) { … }
void TransportSequenceNumberFeedbackGenenerator::OnReceivedPacket(
const RtpPacketReceived& packet) { … }
TimeDelta TransportSequenceNumberFeedbackGenenerator::Process(Timestamp now) { … }
void TransportSequenceNumberFeedbackGenenerator::OnSendBandwidthEstimateChanged(
DataRate estimate) { … }
void TransportSequenceNumberFeedbackGenenerator::SetTransportOverhead(
DataSize overhead_per_packet) { … }
void TransportSequenceNumberFeedbackGenenerator::SendPeriodicFeedbacks() { … }
void TransportSequenceNumberFeedbackGenenerator::SendFeedbackOnRequest(
int64_t sequence_number,
const FeedbackRequest& feedback_request) { … }
std::unique_ptr<rtcp::TransportFeedback>
TransportSequenceNumberFeedbackGenenerator::MaybeBuildFeedbackPacket(
bool include_timestamps,
int64_t begin_sequence_number_inclusive,
int64_t end_sequence_number_exclusive,
bool is_periodic_update) { … }
}