Allow nullptr retransmition rate limiter
as iniditcation retransmission shouldn't be limited because of rate. Bug: None Change-Id: I579261749515260b972631779dadc6349dfcab46 Reviewed-on: https://webrtc-review.googlesource.com/99541 Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24690}
This commit is contained in:

committed by
Commit Bot

parent
def21e346d
commit
c7fff58d1e
@ -37,7 +37,6 @@ const int64_t kOneWayNetworkDelayMs = 100;
|
||||
const uint8_t kBaseLayerTid = 0;
|
||||
const uint8_t kHigherLayerTid = 1;
|
||||
const uint16_t kSequenceNumber = 100;
|
||||
const int64_t kMaxRttMs = 1000;
|
||||
|
||||
class RtcpRttStatsTestImpl : public RtcpRttStats {
|
||||
public:
|
||||
@ -116,7 +115,6 @@ class RtpRtcpModule : public RtcpPacketTypeCounterObserver {
|
||||
explicit RtpRtcpModule(SimulatedClock* clock)
|
||||
: receive_statistics_(ReceiveStatistics::Create(clock)),
|
||||
remote_ssrc_(0),
|
||||
retransmission_rate_limiter_(clock, kMaxRttMs),
|
||||
clock_(clock) {
|
||||
CreateModuleImpl();
|
||||
transport_.SimulateNetworkDelay(kOneWayNetworkDelayMs, clock);
|
||||
@ -129,7 +127,6 @@ class RtpRtcpModule : public RtcpPacketTypeCounterObserver {
|
||||
RtcpRttStatsTestImpl rtt_stats_;
|
||||
std::unique_ptr<ModuleRtpRtcpImpl> impl_;
|
||||
uint32_t remote_ssrc_;
|
||||
RateLimiter retransmission_rate_limiter_;
|
||||
RtpKeepAliveConfig keepalive_config_;
|
||||
RtcpIntervalConfig rtcp_interval_config_;
|
||||
|
||||
@ -180,7 +177,6 @@ class RtpRtcpModule : public RtcpPacketTypeCounterObserver {
|
||||
config.receive_statistics = receive_statistics_.get();
|
||||
config.rtcp_packet_type_counter_observer = this;
|
||||
config.rtt_stats = &rtt_stats_;
|
||||
config.retransmission_rate_limiter = &retransmission_rate_limiter_;
|
||||
config.keepalive_config = keepalive_config_;
|
||||
config.rtcp_interval_config = rtcp_interval_config_;
|
||||
|
||||
|
@ -650,22 +650,24 @@ int32_t RTPSender::ReSendPacket(uint16_t packet_id) {
|
||||
|
||||
const int32_t packet_size = static_cast<int32_t>(stored_packet->payload_size);
|
||||
|
||||
// Skip retransmission rate check if sending screenshare and the experiment
|
||||
// is on.
|
||||
bool skip_retransmission_rate_limit;
|
||||
{
|
||||
rtc::CritScope lock(&send_critsect_);
|
||||
skip_retransmission_rate_limit =
|
||||
unlimited_retransmission_experiment_ && video_content_type_ &&
|
||||
videocontenttypehelpers::IsScreenshare(*video_content_type_);
|
||||
}
|
||||
// Skip retransmission rate check if not configured.
|
||||
if (retransmission_rate_limiter_) {
|
||||
// Skip retransmission rate check if sending screenshare and the experiment
|
||||
// is on.
|
||||
bool skip_retransmission_rate_limit = false;
|
||||
if (unlimited_retransmission_experiment_) {
|
||||
rtc::CritScope lock(&send_critsect_);
|
||||
skip_retransmission_rate_limit =
|
||||
video_content_type_ &&
|
||||
videocontenttypehelpers::IsScreenshare(*video_content_type_);
|
||||
}
|
||||
|
||||
RTC_DCHECK(retransmission_rate_limiter_);
|
||||
// Check if we're overusing retransmission bitrate.
|
||||
// TODO(sprang): Add histograms for nack success or failure reasons.
|
||||
if (!skip_retransmission_rate_limit &&
|
||||
!retransmission_rate_limiter_->TryUseRate(packet_size)) {
|
||||
return -1;
|
||||
// Check if we're overusing retransmission bitrate.
|
||||
// TODO(sprang): Add histograms for nack success or failure reasons.
|
||||
if (!skip_retransmission_rate_limit &&
|
||||
!retransmission_rate_limiter_->TryUseRate(packet_size)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (paced_sender_) {
|
||||
|
Reference in New Issue
Block a user