Reland "Fix GetStats bytesSent/Received, wireup headerBytesSent/Received"
This is a reland of fbde32e596f06893d6dda13eb7d29f4c251cf08b
The chromium problem should be fixed with
https://chromium-review.googlesource.com/c/chromium/src/+/1862437
Original change's description:
> Fix GetStats bytesSent/Received, wireup headerBytesSent/Received
>
> Changes the standard GetStats, legacy GetStats unchanged.
>
> Bug: webrtc:10525
> Change-Id: Ie10fe8079f1d8b4cc6bbe513f6a2fc91477b5441
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156084
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29462}
Tbr: kwiberg@webrtc.org
Bug: webrtc:10525
Change-Id: I3b61f9535aa3f1fca2ed84f068233803d4ec9fe2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157045
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29485}
diff --git a/audio/audio_send_stream.cc b/audio/audio_send_stream.cc
index dbca457..e86667d 100644
--- a/audio/audio_send_stream.cc
+++ b/audio/audio_send_stream.cc
@@ -440,7 +440,11 @@
stats.target_bitrate_bps = channel_send_->GetBitrate();
webrtc::CallSendStatistics call_stats = channel_send_->GetRTCPStatistics();
- stats.bytes_sent = call_stats.bytesSent;
+ stats.payload_bytes_sent = call_stats.payload_bytes_sent;
+ stats.header_and_padding_bytes_sent =
+ call_stats.header_and_padding_bytes_sent;
+ stats.bytes_sent =
+ stats.payload_bytes_sent + stats.header_and_padding_bytes_sent;
stats.retransmitted_bytes_sent = call_stats.retransmitted_bytes_sent;
stats.packets_sent = call_stats.packetsSent;
stats.retransmitted_packets_sent = call_stats.retransmitted_packets_sent;