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/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc
index 50c49a7..9d6cf77 100644
--- a/pc/rtc_stats_collector.cc
+++ b/pc/rtc_stats_collector.cc
@@ -256,7 +256,9 @@
inbound_stats->packets_received =
static_cast<uint32_t>(media_receiver_info.packets_rcvd);
inbound_stats->bytes_received =
- static_cast<uint64_t>(media_receiver_info.bytes_rcvd);
+ static_cast<uint64_t>(media_receiver_info.payload_bytes_rcvd);
+ inbound_stats->header_bytes_received =
+ static_cast<uint64_t>(media_receiver_info.header_and_padding_bytes_rcvd);
inbound_stats->packets_lost =
static_cast<int32_t>(media_receiver_info.packets_lost);
}
@@ -343,7 +345,9 @@
outbound_stats->retransmitted_packets_sent =
media_sender_info.retransmitted_packets_sent;
outbound_stats->bytes_sent =
- static_cast<uint64_t>(media_sender_info.bytes_sent);
+ static_cast<uint64_t>(media_sender_info.payload_bytes_sent);
+ outbound_stats->header_bytes_sent =
+ static_cast<uint64_t>(media_sender_info.header_and_padding_bytes_sent);
outbound_stats->retransmitted_bytes_sent =
media_sender_info.retransmitted_bytes_sent;
}