#include "modules/rtp_rtcp/source/rtp_sender_egress.h"
#include <algorithm>
#include <limits>
#include <memory>
#include <utility>
#include "absl/strings/match.h"
#include "api/units/timestamp.h"
#include "logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.h"
#include "rtc_base/logging.h"
namespace webrtc {
namespace {
constexpr uint32_t kTimestampTicksPerMs = …;
constexpr TimeDelta kBitrateStatisticsWindow = …;
constexpr size_t kRtpSequenceNumberMapMaxEntries = …;
constexpr TimeDelta kUpdateInterval = …;
bool GetUseNtpTimeForAbsoluteSendTime(const FieldTrialsView* field_trials) { … }
}
RtpSenderEgress::NonPacedPacketSender::NonPacedPacketSender(
TaskQueueBase& worker_queue,
RtpSenderEgress* sender,
PacketSequencer* sequencer)
: … { … }
RtpSenderEgress::NonPacedPacketSender::~NonPacedPacketSender() { … }
void RtpSenderEgress::NonPacedPacketSender::EnqueuePackets(
std::vector<std::unique_ptr<RtpPacketToSend>> packets) { … }
void RtpSenderEgress::NonPacedPacketSender::PrepareForSend(
RtpPacketToSend* packet) { … }
RtpSenderEgress::RtpSenderEgress(const RtpRtcpInterface::Configuration& config,
RtpPacketHistory* packet_history)
: … { … }
RtpSenderEgress::~RtpSenderEgress() { … }
void RtpSenderEgress::SendPacket(std::unique_ptr<RtpPacketToSend> packet,
const PacedPacketInfo& pacing_info) { … }
void RtpSenderEgress::OnBatchComplete() { … }
void RtpSenderEgress::CompleteSendPacket(const Packet& compound_packet,
bool last_in_batch) { … }
RtpSendRates RtpSenderEgress::GetSendRates(Timestamp now) const { … }
void RtpSenderEgress::GetDataCounters(StreamDataCounters* rtp_stats,
StreamDataCounters* rtx_stats) const { … }
void RtpSenderEgress::ForceIncludeSendPacketsInAllocation(
bool part_of_allocation) { … }
bool RtpSenderEgress::MediaHasBeenSent() const { … }
void RtpSenderEgress::SetMediaHasBeenSent(bool media_sent) { … }
void RtpSenderEgress::SetTimestampOffset(uint32_t timestamp) { … }
std::vector<RtpSequenceNumberMap::Info> RtpSenderEgress::GetSentRtpPacketInfos(
rtc::ArrayView<const uint16_t> sequence_numbers) const { … }
void RtpSenderEgress::SetFecProtectionParameters(
const FecProtectionParams& delta_params,
const FecProtectionParams& key_params) { … }
std::vector<std::unique_ptr<RtpPacketToSend>>
RtpSenderEgress::FetchFecPackets() { … }
void RtpSenderEgress::OnAbortedRetransmissions(
rtc::ArrayView<const uint16_t> sequence_numbers) { … }
bool RtpSenderEgress::HasCorrectSsrc(const RtpPacketToSend& packet) const { … }
bool RtpSenderEgress::SendPacketToNetwork(const RtpPacketToSend& packet,
const PacketOptions& options,
const PacedPacketInfo& pacing_info) { … }
void RtpSenderEgress::UpdateRtpStats(Timestamp now,
uint32_t packet_ssrc,
RtpPacketMediaType packet_type,
RtpPacketCounter counter,
size_t packet_size) { … }
void RtpSenderEgress::PeriodicUpdate() { … }
}