Consolidate FEC book-keeping
Number of received FEC bytes is used for the
WebRTC.Video.FecBitrateReceivedInKbps UMA histogram. Before this cl,
that value is based on a FEC packet counter updated by
ReceiveStatistics::FecPacketReceived. This cl deletes that method, and
instead adds a byte count to the FecPacketCounter struct, which is
maintained by the UlpFecReceiver and used for other FEC-related stats.
Bug: webrtc:10917
Change-Id: I24bd494b6909a2fe109d28e2b71ca8f413d05911
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150533
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28976}
diff --git a/video/rtp_video_stream_receiver.cc b/video/rtp_video_stream_receiver.cc
index 6f478f8..cef5602 100644
--- a/video/rtp_video_stream_receiver.cc
+++ b/video/rtp_video_stream_receiver.cc
@@ -725,7 +725,6 @@
if (packet.PayloadType() == config_.rtp.red_payload_type &&
packet.payload_size() > 0) {
if (packet.payload()[0] == config_.rtp.ulpfec_payload_type) {
- rtp_receive_statistics_->FecPacketReceived(packet);
// Notify video_receiver about received FEC packets to avoid NACKing these
// packets.
NotifyReceiverOfEmptyPacket(packet.SequenceNumber());
@@ -866,6 +865,11 @@
static_cast<int>(counter.num_recovered_packets *
100 / counter.num_fec_packets));
}
+ if (config_.rtp.ulpfec_payload_type != -1) {
+ RTC_HISTOGRAM_COUNTS_10000(
+ "WebRTC.Video.FecBitrateReceivedInKbps",
+ static_cast<int>(counter.num_bytes * 8 / elapsed_sec / 1000));
+ }
}
void RtpVideoStreamReceiver::InsertSpsPpsIntoTracker(uint8_t payload_type) {