Delete WebRTC-Bwe-TransportWideFeedbackIntervals as unused

Bug: webrtc:14179
Change-Id: Id8ab9467293a2ea53a411d217024c64e9f48da85
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285640
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38779}
This commit is contained in:
Danil Chapovalov 2022-11-30 13:16:30 +01:00 committed by WebRTC LUCI CQ
parent 77bb688982
commit c19ec96bd7
6 changed files with 18 additions and 46 deletions

View File

@ -27,7 +27,6 @@ rtc_library("congestion_controller") {
] ]
deps = [ deps = [
"../../api/transport:field_trial_based_config",
"../../api/transport:network_control", "../../api/transport:network_control",
"../../api/units:data_rate", "../../api/units:data_rate",
"../../api/units:time_delta", "../../api/units:time_delta",

View File

@ -14,7 +14,6 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "api/transport/field_trial_based_config.h"
#include "api/transport/network_control.h" #include "api/transport/network_control.h"
#include "api/units/data_rate.h" #include "api/units/data_rate.h"
#include "api/units/time_delta.h" #include "api/units/time_delta.h"
@ -78,7 +77,6 @@ class ReceiveSideCongestionController : public CallStatsObserver {
void PickEstimator() RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_); void PickEstimator() RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
Clock& clock_; Clock& clock_;
const FieldTrialBasedConfig field_trial_config_;
RembThrottler remb_throttler_; RembThrottler remb_throttler_;
RemoteEstimatorProxy remote_estimator_proxy_; RemoteEstimatorProxy remote_estimator_proxy_;

View File

@ -84,7 +84,6 @@ ReceiveSideCongestionController::ReceiveSideCongestionController(
: clock_(*clock), : clock_(*clock),
remb_throttler_(std::move(remb_sender), clock), remb_throttler_(std::move(remb_sender), clock),
remote_estimator_proxy_(std::move(feedback_sender), remote_estimator_proxy_(std::move(feedback_sender),
&field_trial_config_,
network_state_estimator), network_state_estimator),
rbe_(new RemoteBitrateEstimatorSingleStream(&remb_throttler_, clock)), rbe_(new RemoteBitrateEstimatorSingleStream(&remb_throttler_, clock)),
using_absolute_send_time_(false), using_absolute_send_time_(false),

View File

@ -27,8 +27,11 @@ namespace webrtc {
namespace { namespace {
// The maximum allowed value for a timestamp in milliseconds. This is lower // The maximum allowed value for a timestamp in milliseconds. This is lower
// than the numerical limit since we often convert to microseconds. // than the numerical limit since we often convert to microseconds.
static constexpr int64_t kMaxTimeMs = constexpr int64_t kMaxTimeMs = std::numeric_limits<int64_t>::max() / 1000;
std::numeric_limits<int64_t>::max() / 1000; constexpr TimeDelta kBackWindow = TimeDelta::Millis(500);
constexpr TimeDelta kMinInterval = TimeDelta::Millis(50);
constexpr TimeDelta kMaxInterval = TimeDelta::Millis(250);
constexpr TimeDelta kDefaultInterval = TimeDelta::Millis(100);
TimeDelta GetAbsoluteSendTimeDelta(uint32_t new_sendtime, TimeDelta GetAbsoluteSendTimeDelta(uint32_t new_sendtime,
uint32_t previous_sendtime) { uint32_t previous_sendtime) {
@ -48,22 +51,20 @@ TimeDelta GetAbsoluteSendTimeDelta(uint32_t new_sendtime,
RemoteEstimatorProxy::RemoteEstimatorProxy( RemoteEstimatorProxy::RemoteEstimatorProxy(
TransportFeedbackSender feedback_sender, TransportFeedbackSender feedback_sender,
const FieldTrialsView* key_value_config,
NetworkStateEstimator* network_state_estimator) NetworkStateEstimator* network_state_estimator)
: feedback_sender_(std::move(feedback_sender)), : feedback_sender_(std::move(feedback_sender)),
send_config_(key_value_config),
last_process_time_(Timestamp::MinusInfinity()), last_process_time_(Timestamp::MinusInfinity()),
network_state_estimator_(network_state_estimator), network_state_estimator_(network_state_estimator),
media_ssrc_(0), media_ssrc_(0),
feedback_packet_count_(0), feedback_packet_count_(0),
packet_overhead_(DataSize::Zero()), packet_overhead_(DataSize::Zero()),
send_interval_(send_config_.default_interval.Get()), send_interval_(kDefaultInterval),
send_periodic_feedback_(true), send_periodic_feedback_(true),
previous_abs_send_time_(0), previous_abs_send_time_(0),
abs_send_timestamp_(Timestamp::Zero()) { abs_send_timestamp_(Timestamp::Zero()) {
RTC_LOG(LS_INFO) RTC_LOG(LS_INFO)
<< "Maximum interval between transport feedback RTCP messages (ms): " << "Maximum interval between transport feedback RTCP messages: "
<< send_config_.max_interval->ms(); << kMaxInterval;
} }
RemoteEstimatorProxy::~RemoteEstimatorProxy() {} RemoteEstimatorProxy::~RemoteEstimatorProxy() {}
@ -72,10 +73,10 @@ void RemoteEstimatorProxy::MaybeCullOldPackets(int64_t sequence_number,
Timestamp arrival_time) { Timestamp arrival_time) {
if (periodic_window_start_seq_ >= if (periodic_window_start_seq_ >=
packet_arrival_times_.end_sequence_number() && packet_arrival_times_.end_sequence_number() &&
arrival_time - Timestamp::Zero() >= send_config_.back_window.Get()) { arrival_time - Timestamp::Zero() >= kBackWindow) {
// Start new feedback packet, cull old packets. // Start new feedback packet, cull old packets.
packet_arrival_times_.RemoveOldPackets( packet_arrival_times_.RemoveOldPackets(sequence_number,
sequence_number, arrival_time - send_config_.back_window.Get()); arrival_time - kBackWindow);
} }
} }
@ -172,19 +173,17 @@ void RemoteEstimatorProxy::OnBitrateChanged(int bitrate_bps) {
// TwccReport size at 250ms interval is 36 byte. // TwccReport size at 250ms interval is 36 byte.
// AverageTwccReport = (TwccReport(50ms) + TwccReport(250ms)) / 2 // AverageTwccReport = (TwccReport(50ms) + TwccReport(250ms)) / 2
constexpr DataSize kTwccReportSize = DataSize::Bytes(20 + 8 + 10 + 30); constexpr DataSize kTwccReportSize = DataSize::Bytes(20 + 8 + 10 + 30);
const DataRate kMinTwccRate = constexpr DataRate kMinTwccRate = kTwccReportSize / kMaxInterval;
kTwccReportSize / send_config_.max_interval.Get();
// Let TWCC reports occupy 5% of total bandwidth. // Let TWCC reports occupy 5% of total bandwidth.
DataRate twcc_bitrate = DataRate twcc_bitrate = DataRate::BitsPerSec(0.05 * bitrate_bps);
DataRate::BitsPerSec(send_config_.bandwidth_fraction * bitrate_bps);
// Check upper send_interval bound by checking bitrate to avoid overflow when // Check upper send_interval bound by checking bitrate to avoid overflow when
// dividing by small bitrate, in particular avoid dividing by zero bitrate. // dividing by small bitrate, in particular avoid dividing by zero bitrate.
TimeDelta send_interval = twcc_bitrate <= kMinTwccRate TimeDelta send_interval =
? send_config_.max_interval.Get() twcc_bitrate <= kMinTwccRate
: std::max(kTwccReportSize / twcc_bitrate, ? kMaxInterval
send_config_.min_interval.Get()); : std::max(kTwccReportSize / twcc_bitrate, kMinInterval);
MutexLock lock(&lock_); MutexLock lock(&lock_);
send_interval_ = send_interval; send_interval_ = send_interval;

View File

@ -26,7 +26,6 @@
#include "modules/remote_bitrate_estimator/packet_arrival_map.h" #include "modules/remote_bitrate_estimator/packet_arrival_map.h"
#include "modules/rtp_rtcp/source/rtcp_packet.h" #include "modules/rtp_rtcp/source/rtcp_packet.h"
#include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" #include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
#include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/numerics/sequence_number_util.h" #include "rtc_base/numerics/sequence_number_util.h"
#include "rtc_base/synchronization/mutex.h" #include "rtc_base/synchronization/mutex.h"
@ -42,7 +41,6 @@ class RemoteEstimatorProxy {
using TransportFeedbackSender = std::function<void( using TransportFeedbackSender = std::function<void(
std::vector<std::unique_ptr<rtcp::RtcpPacket>> packets)>; std::vector<std::unique_ptr<rtcp::RtcpPacket>> packets)>;
RemoteEstimatorProxy(TransportFeedbackSender feedback_sender, RemoteEstimatorProxy(TransportFeedbackSender feedback_sender,
const FieldTrialsView* key_value_config,
NetworkStateEstimator* network_state_estimator); NetworkStateEstimator* network_state_estimator);
~RemoteEstimatorProxy(); ~RemoteEstimatorProxy();
@ -69,22 +67,6 @@ class RemoteEstimatorProxy {
void SetTransportOverhead(DataSize overhead_per_packet); void SetTransportOverhead(DataSize overhead_per_packet);
private: private:
struct TransportWideFeedbackConfig {
FieldTrialParameter<TimeDelta> back_window{"wind", TimeDelta::Millis(500)};
FieldTrialParameter<TimeDelta> min_interval{"min", TimeDelta::Millis(50)};
FieldTrialParameter<TimeDelta> max_interval{"max", TimeDelta::Millis(250)};
FieldTrialParameter<TimeDelta> default_interval{"def",
TimeDelta::Millis(100)};
FieldTrialParameter<double> bandwidth_fraction{"frac", 0.05};
explicit TransportWideFeedbackConfig(
const FieldTrialsView* key_value_config) {
ParseFieldTrial({&back_window, &min_interval, &max_interval,
&default_interval, &bandwidth_fraction},
key_value_config->Lookup(
"WebRTC-Bwe-TransportWideFeedbackIntervals"));
}
};
void MaybeCullOldPackets(int64_t sequence_number, Timestamp arrival_time) void MaybeCullOldPackets(int64_t sequence_number, Timestamp arrival_time)
RTC_EXCLUSIVE_LOCKS_REQUIRED(&lock_); RTC_EXCLUSIVE_LOCKS_REQUIRED(&lock_);
void SendPeriodicFeedbacks() RTC_EXCLUSIVE_LOCKS_REQUIRED(&lock_); void SendPeriodicFeedbacks() RTC_EXCLUSIVE_LOCKS_REQUIRED(&lock_);
@ -111,7 +93,6 @@ class RemoteEstimatorProxy {
bool is_periodic_update) RTC_EXCLUSIVE_LOCKS_REQUIRED(&lock_); bool is_periodic_update) RTC_EXCLUSIVE_LOCKS_REQUIRED(&lock_);
const TransportFeedbackSender feedback_sender_; const TransportFeedbackSender feedback_sender_;
const TransportWideFeedbackConfig send_config_;
Timestamp last_process_time_; Timestamp last_process_time_;
Mutex lock_; Mutex lock_;

View File

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "api/transport/field_trial_based_config.h"
#include "api/transport/network_types.h" #include "api/transport/network_types.h"
#include "api/transport/test/mock_network_control.h" #include "api/transport/test/mock_network_control.h"
#include "api/units/data_size.h" #include "api/units/data_size.h"
@ -79,9 +78,7 @@ class RemoteEstimatorProxyTest : public ::testing::Test {
public: public:
RemoteEstimatorProxyTest() RemoteEstimatorProxyTest()
: clock_(0), : clock_(0),
proxy_(feedback_sender_.AsStdFunction(), proxy_(feedback_sender_.AsStdFunction(), &network_state_estimator_) {}
&field_trial_config_,
&network_state_estimator_) {}
protected: protected:
void IncomingPacket( void IncomingPacket(
@ -100,7 +97,6 @@ class RemoteEstimatorProxyTest : public ::testing::Test {
proxy_.Process(clock_.CurrentTime()); proxy_.Process(clock_.CurrentTime());
} }
FieldTrialBasedConfig field_trial_config_;
SimulatedClock clock_; SimulatedClock clock_;
MockFunction<void(std::vector<std::unique_ptr<rtcp::RtcpPacket>>)> MockFunction<void(std::vector<std::unique_ptr<rtcp::RtcpPacket>>)>
feedback_sender_; feedback_sender_;