Rename discarded_primary_packets to packets_discarded.

This it what it is called in the spec:
https://w3c.github.io/webrtc-stats/#dom-rtcreceivedrtpstreamstats-packetsdiscarded

Also log the metric in neteq_rtpplay.

Bug: webrtc:8199
Change-Id: Ie0262d17b913eb6949daa703844d90327eee0aa4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263725
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37063}
This commit is contained in:
Jakob Ivarsson
2022-05-25 22:00:14 +02:00
committed by WebRTC LUCI CQ
parent c4b5f4da97
commit 1a5a81340d
7 changed files with 23 additions and 32 deletions

View File

@ -651,8 +651,8 @@ TEST_F(NetEqImplTest, ReorderedPacket) {
// out-of-order packet should have been discarded.
EXPECT_TRUE(packet_buffer_->Empty());
// NetEq `discarded_primary_packets` should capture this packet discard.
EXPECT_EQ(1u, neteq_->GetOperationsAndState().discarded_primary_packets);
// NetEq `packets_discarded` should capture this packet discard.
EXPECT_EQ(1u, neteq_->GetLifetimeStatistics().packets_discarded);
// Verify `output.packet_infos_`. Expect to only see the second packet.
ASSERT_THAT(output.packet_infos_, SizeIs(1));