Skip to content

Commit bef818d

Browse files
jonexCommit Bot
authored and
Commit Bot
committed
Default disables legacy overhead calculation.
This ensures that overhead calculation is correct by default when enabling the WebRTC-SendSideBwe-WithOverhead field trial. We keep the legacy mode to allow downstream projects already relying on WebRTC-SendSideBwe-WithOverhead to preserve the current behavior. Bug: webrtc:6762 Change-Id: I84369c760d59345a48ec352997dbed6d2db21d13 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167862 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30424}
1 parent 5dca3f1 commit bef818d

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

audio/audio_send_stream.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ AudioSendStream::AudioSendStream(
154154
channel_send_(std::move(channel_send)),
155155
event_log_(event_log),
156156
use_legacy_overhead_calculation_(
157-
!field_trial::IsDisabled("WebRTC-Audio-LegacyOverhead")),
157+
field_trial::IsEnabled("WebRTC-Audio-LegacyOverhead")),
158158
bitrate_allocator_(bitrate_allocator),
159159
rtp_transport_(rtp_transport),
160160
rtp_rtcp_module_(channel_send_->GetRtpRtcp()),

modules/pacing/pacing_controller.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ PacingController::PacingController(Clock* clock,
100100
small_first_probe_packet_(
101101
IsEnabled(*field_trials_, "WebRTC-Pacer-SmallFirstProbePacket")),
102102
ignore_transport_overhead_(
103-
!IsDisabled(*field_trials_, "WebRTC-Pacer-IgnoreTransportOverhead")),
103+
IsEnabled(*field_trials_, "WebRTC-Pacer-IgnoreTransportOverhead")),
104104
min_packet_limit_(kDefaultMinPacketLimit),
105105
transport_overhead_per_packet_(DataSize::Zero()),
106106
last_timestamp_(clock_->CurrentTime()),

modules/pacing/round_robin_packet_queue.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,15 @@ void RoundRobinPacketQueue::SetIncludeOverhead() {
260260
}
261261

262262
void RoundRobinPacketQueue::SetTransportOverhead(DataSize overhead_per_packet) {
263+
if (include_overhead_) {
264+
DataSize previous_overhead = transport_overhead_per_packet_;
265+
// We need to update the size to reflect overhead for existing packets.
266+
for (const auto& stream : streams_) {
267+
int packets = stream.second.packet_queue.size();
268+
size_ -= packets * previous_overhead;
269+
size_ += packets * overhead_per_packet;
270+
}
271+
}
263272
transport_overhead_per_packet_ = overhead_per_packet;
264273
}
265274

0 commit comments

Comments
 (0)