Allow configuring pacer burst through RtcConfiguration
This allow exernal applications to control how many packets can be sent relative current BWE. This is a partial revert of https://webrtc-review.googlesource.com/c/src/+/311102 Bug: chromium:1354491 Change-Id: Ia236aaacc468ddac12341efa555041bb2dfdde62 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330580 Commit-Queue: Per Kjellander <perkj@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41343}
This commit is contained in:
parent
eb14497d7c
commit
86b1cf776e
@ -686,7 +686,6 @@ class RTC_EXPORT PeerConnectionInterface : public webrtc::RefCountInterface {
|
||||
PortAllocatorConfig port_allocator_config;
|
||||
|
||||
// The burst interval of the pacer, see TaskQueuePacedSender constructor.
|
||||
// TODO(hbos): Deprecated, Remove once Chromium is not setting it.
|
||||
absl::optional<TimeDelta> pacer_burst_interval;
|
||||
|
||||
//
|
||||
|
||||
@ -31,6 +31,7 @@ RtpTransportConfig CallConfig::ExtractTransportConfig() const {
|
||||
network_state_predictor_factory;
|
||||
transportConfig.task_queue_factory = &env.task_queue_factory();
|
||||
transportConfig.trials = &env.field_trials();
|
||||
transportConfig.pacer_burst_interval = pacer_burst_interval;
|
||||
|
||||
return transportConfig;
|
||||
}
|
||||
|
||||
@ -70,6 +70,9 @@ struct CallConfig {
|
||||
|
||||
Metronome* decode_metronome = nullptr;
|
||||
|
||||
// The burst interval of the pacer, see TaskQueuePacedSender constructor.
|
||||
absl::optional<TimeDelta> pacer_burst_interval;
|
||||
|
||||
// Enables send packet batching from the egress RTP sender.
|
||||
bool enable_send_packet_batching = false;
|
||||
};
|
||||
|
||||
@ -44,6 +44,9 @@ struct RtpTransportConfig {
|
||||
// Key-value mapping of internal configurations to apply,
|
||||
// e.g. field trials.
|
||||
const FieldTrialsView* trials = nullptr;
|
||||
|
||||
// The burst interval of the pacer, see TaskQueuePacedSender constructor.
|
||||
absl::optional<TimeDelta> pacer_burst_interval;
|
||||
};
|
||||
} // namespace webrtc
|
||||
|
||||
|
||||
@ -111,6 +111,10 @@ RtpTransportControllerSend::RtpTransportControllerSend(
|
||||
pacer_.SetPacingRates(
|
||||
DataRate::BitsPerSec(config.bitrate_config.start_bitrate_bps),
|
||||
DataRate::Zero());
|
||||
if (config.pacer_burst_interval) {
|
||||
// Default burst interval overriden by config.
|
||||
pacer_.SetSendBurstInterval(*config.pacer_burst_interval);
|
||||
}
|
||||
}
|
||||
|
||||
RtpTransportControllerSend::~RtpTransportControllerSend() {
|
||||
|
||||
@ -344,6 +344,7 @@ std::unique_ptr<Call> PeerConnectionFactory::CreateCall_w(
|
||||
call_config.rtp_transport_controller_send_factory =
|
||||
transport_controller_send_factory_.get();
|
||||
call_config.decode_metronome = decode_metronome_.get();
|
||||
call_config.pacer_burst_interval = configuration.pacer_burst_interval;
|
||||
return context_->call_factory()->CreateCall(call_config);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user