Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.cc

Issue 2766323006: Correcting the amount of padding when send side bwe includes RTP overhead.
Patch Set: another find Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtp_sender.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
index 2fd8b3eff51b14efe27fe3f0c3660234a029a35b..4620460a685fedb2b14a9ce3c5411793b0dbc917 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
@@ -462,6 +462,11 @@ size_t RTPSender::TrySendRedundantPayloads(size_t bytes_to_send,
if (!PrepareAndSendPacket(std::move(packet), true, false, pacing_info))
break;
bytes_left -= payload_size;
+ if (send_side_bwe_with_overhead_) {
+ // When WebRTC-SendSideBwe-WithOverhead is enabled, the padding budget
+ // includes overhead.
+ bytes_left -= packet->headers_size();
danilchap 2017/03/24 08:47:20 packet was moved, so you should not use it. save t
minyue-webrtc 2017/03/24 09:08:54 Thanks! of course
+ }
}
return bytes_to_send - bytes_left;
}
@@ -577,6 +582,11 @@ size_t RTPSender::SendPadData(size_t bytes,
break;
bytes_sent += padding_bytes_in_packet;
+ if (send_side_bwe_with_overhead_) {
+ // When WebRTC-SendSideBwe-WithOverhead is enabled, the padding budget
+ // includes overhead.
+ bytes_sent += padding_packet.headers_size();
danilchap 2017/03/24 08:47:20 may be if else is better: if (with_overhead_) {
minyue-webrtc 2017/03/24 09:08:54 I like that too.
+ }
UpdateRtpStats(padding_packet, over_rtx, false);
}

Powered by Google App Engine
This is Rietveld 408576698