From 17c147cc84c7be9aa3d2a2c9a0e192a1c66ef118 Mon Sep 17 00:00:00 2001 From: Per Kjellander Date: Wed, 20 Feb 2019 12:06:17 +0100 Subject: [PATCH] Feed PacedSender with RTP packet size This cl change RtpSender to feed the PacedSender with RTP packet size rather than payload size in experiment WebRTC-SendSideBwe-WithOverhead. Before this cl, the congestion controller was feed with packet size but not the pacer. That means that the pacer budget was updated with an estimate that includes the RTP headers, but the media budget only use the payloads. BUG: webrtc:10325 webrtc:6762 Change-Id: I35c8350603a7881ea162debcd89ed901cbb50950 Reviewed-on: https://webrtc-review.googlesource.com/c/123444 Reviewed-by: Danil Chapovalov Reviewed-by: Sebastian Jansson Commit-Queue: Per Kjellander Cr-Commit-Position: refs/heads/master@{#26788} --- modules/rtp_rtcp/source/rtp_sender.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc index c11034bf99..9be7058294 100644 --- a/modules/rtp_rtcp/source/rtp_sender.cc +++ b/modules/rtp_rtcp/source/rtp_sender.cc @@ -670,7 +670,8 @@ bool RTPSender::SendToNetwork(std::unique_ptr packet, // Correct offset between implementations of millisecond time stamps in // TickTime and Clock. int64_t corrected_time_ms = packet->capture_time_ms() + clock_delta_ms_; - size_t payload_length = packet->payload_size(); + size_t packet_size = + send_side_bwe_with_overhead_ ? packet->size() : packet->payload_size(); if (ssrc == FlexfecSsrc()) { // Store FlexFEC packets in the history here, so they can be found // when the pacer calls TimeToSendPacket. @@ -681,7 +682,7 @@ bool RTPSender::SendToNetwork(std::unique_ptr packet, } paced_sender_->InsertPacket(priority, ssrc, seq_no, corrected_time_ms, - payload_length, false); + packet_size, false); return true; }