Reland "Only include overhead if using send side bandwidth estimation."
This is a reland of 8c79c6e1af354c526497082c79ccbe12af03a33e Original change's description: > Only include overhead if using send side bandwidth estimation. > > Bug: webrtc:11298 > Change-Id: Ia2daf690461b55d394c1b964d6a7977a98be8be2 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166820 > Reviewed-by: Oskar Sundbom <ossu@webrtc.org> > Reviewed-by: Sam Zackrisson <saza@webrtc.org> > Reviewed-by: Ali Tofigh <alito@webrtc.org> > Reviewed-by: Erik Språng <sprang@webrtc.org> > Commit-Queue: Sebastian Jansson <srte@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#30382} Bug: webrtc:11298 Change-Id: I33205e869a8ae27c15ffe991f6d985973ed6d15a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167524 Reviewed-by: Ali Tofigh <alito@webrtc.org> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Oskar Sundbom <ossu@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30390}
This commit is contained in:
committed by
Commit Bot
parent
7a284e1614
commit
086055d0fd
@ -99,8 +99,6 @@ PacingController::PacingController(Clock* clock,
|
||||
pace_audio_(IsEnabled(*field_trials_, "WebRTC-Pacer-BlockAudio")),
|
||||
small_first_probe_packet_(
|
||||
IsEnabled(*field_trials_, "WebRTC-Pacer-SmallFirstProbePacket")),
|
||||
send_side_bwe_with_overhead_(
|
||||
IsEnabled(*field_trials_, "WebRTC-SendSideBwe-WithOverhead")),
|
||||
min_packet_limit_(kDefaultMinPacketLimit),
|
||||
last_timestamp_(clock_->CurrentTime()),
|
||||
paused_(false),
|
||||
@ -120,7 +118,8 @@ PacingController::PacingController(Clock* clock,
|
||||
congestion_window_size_(DataSize::PlusInfinity()),
|
||||
outstanding_data_(DataSize::Zero()),
|
||||
queue_time_limit(kMaxExpectedQueueLength),
|
||||
account_for_audio_(false) {
|
||||
account_for_audio_(false),
|
||||
include_overhead_(false) {
|
||||
if (!drain_large_queues_) {
|
||||
RTC_LOG(LS_WARNING) << "Pacer queues will not be drained,"
|
||||
"pushback experiment must be enabled.";
|
||||
@ -226,6 +225,11 @@ void PacingController::SetAccountForAudioPackets(bool account_for_audio) {
|
||||
account_for_audio_ = account_for_audio;
|
||||
}
|
||||
|
||||
void PacingController::SetIncludeOverhead() {
|
||||
include_overhead_ = true;
|
||||
packet_queue_.SetIncludeOverhead();
|
||||
}
|
||||
|
||||
TimeDelta PacingController::ExpectedQueueTime() const {
|
||||
RTC_DCHECK_GT(pacing_bitrate_, DataRate::Zero());
|
||||
return TimeDelta::ms(
|
||||
@ -517,10 +521,10 @@ void PacingController::ProcessPackets() {
|
||||
RTC_DCHECK(rtp_packet);
|
||||
RTC_DCHECK(rtp_packet->packet_type().has_value());
|
||||
const RtpPacketToSend::Type packet_type = *rtp_packet->packet_type();
|
||||
const DataSize packet_size = DataSize::bytes(
|
||||
send_side_bwe_with_overhead_
|
||||
? rtp_packet->size()
|
||||
: rtp_packet->payload_size() + rtp_packet->padding_size());
|
||||
const DataSize packet_size =
|
||||
DataSize::bytes(include_overhead_ ? rtp_packet->size()
|
||||
: rtp_packet->payload_size() +
|
||||
rtp_packet->padding_size());
|
||||
packet_sender_->SendRtpPacket(std::move(rtp_packet), pacing_info);
|
||||
|
||||
data_sent += packet_size;
|
||||
|
||||
Reference in New Issue
Block a user