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 <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26788}
This commit is contained in:
Per Kjellander
2019-02-20 12:06:17 +01:00
committed by Commit Bot
parent 252725d986
commit 17c147cc84

View File

@ -670,7 +670,8 @@ bool RTPSender::SendToNetwork(std::unique_ptr<RtpPacketToSend> 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<RtpPacketToSend> packet,
}
paced_sender_->InsertPacket(priority, ssrc, seq_no, corrected_time_ms,
payload_length, false);
packet_size, false);
return true;
}