aboutsummaryrefslogtreecommitdiff
path: root/audio/channel_send.cc
diff options
context:
space:
mode:
authorBjorn A Mellem <mellem@webrtc.org>2019-07-23 06:18:24 -0700
committerCommit Bot <commit-bot@chromium.org>2019-07-23 13:52:55 +0000
commit74a1b4b1321b426392d4c32e4a02361226ad5358 (patch)
tree068fe6376539941d87f4d50e6f8eac67f2fdd691 /audio/channel_send.cc
parentcfefa0aef329aac0206c5e56efd90b3b0bdb88b6 (diff)
downloadwebrtc-74a1b4b1321b426392d4c32e4a02361226ad5358.tar.gz
Only include payload in bytes sent/received.
According to https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict* and https://tools.ietf.org/html/rfc3550#section-6.4.1, the bytes sent statistic should not include headers or padding. Similarly, according to https://www.w3.org/TR/webrtc-stats/#inboundrtpstats-dict*, bytes received are calculated the same way as bytes sent (eg. not including padding or headers). This change stops adding padding and headers to these statistics. Bug: webrtc:8516,webrtc:10525 Change-Id: I891ad5a11a493cc3212afe93e13f62795bf4031f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146180 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Oskar Sundbom <ossu@webrtc.org> Commit-Queue: Bjorn Mellem <mellem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28647}
Diffstat (limited to 'audio/channel_send.cc')
-rw-r--r--audio/channel_send.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/audio/channel_send.cc b/audio/channel_send.cc
index 447dabe761..72eacb3d7e 100644
--- a/audio/channel_send.cc
+++ b/audio/channel_send.cc
@@ -1082,13 +1082,8 @@ CallSendStatistics ChannelSend::GetRTCPStatistics() const {
StreamDataCounters rtp_stats;
StreamDataCounters rtx_stats;
_rtpRtcpModule->GetSendStreamDataCounters(&rtp_stats, &rtx_stats);
- // TODO(https://crbug.com/webrtc/10525): Bytes sent should only include
- // payload bytes, not header and padding bytes.
stats.bytesSent =
- rtp_stats.transmitted.payload_bytes +
- rtp_stats.transmitted.padding_bytes + rtp_stats.transmitted.header_bytes +
- rtx_stats.transmitted.payload_bytes +
- rtx_stats.transmitted.padding_bytes + rtx_stats.transmitted.header_bytes;
+ rtp_stats.transmitted.payload_bytes + rtx_stats.transmitted.payload_bytes;
// TODO(https://crbug.com/webrtc/10555): RTX retransmissions should show up in
// separate outbound-rtp stream objects.
stats.retransmitted_bytes_sent = rtp_stats.retransmitted.payload_bytes;