Re-land of RTCInboundRTPStreamStats.qpSum collected.
This was previously only collected for local tracks
(RTCOutboundRTPStreamStats.qpSum).
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcrtpstreamstats-qpsum
This CL also improves some testing in rtcstatscollector_unittest.cc.
Default and non-default values are tested in the same unittests,
removing the test that was specific to default-values, which was
otherwise code duplication.
This is a re-land of https://codereview.webrtc.org/2675943002 after
dependent CL that was re-landed.
BUG=webrtc:7065
TBR=hta@webrtc.org, sakal@webrtc.org
Review-Url: https://codereview.webrtc.org/2703503003
Cr-Commit-Position: refs/heads/master@{#16642}
diff --git a/webrtc/pc/rtcstats_integrationtest.cc b/webrtc/pc/rtcstats_integrationtest.cc
index a20a909..f27157b 100644
--- a/webrtc/pc/rtcstats_integrationtest.cc
+++ b/webrtc/pc/rtcstats_integrationtest.cc
@@ -536,7 +536,14 @@
const RTCInboundRTPStreamStats& inbound_stream) {
RTCStatsVerifier verifier(report_, &inbound_stream);
VerifyRTCRTPStreamStats(inbound_stream, &verifier);
- verifier.TestMemberIsUndefined(inbound_stream.qp_sum);
+ // TODO(hbos): As soon as the decoders provide |qp_sum| values, this
+ // if-statement needs to be included. https://bugs.webrtc.org/7065
+ // if (inbound_stream.media_type.is_defined() &&
+ // *inbound_stream.media_type == "video") {
+ // verifier.TestMemberIsNonNegative<uint64_t>(inbound_stream.qp_sum);
+ // } else {
+ verifier.TestMemberIsUndefined(inbound_stream.qp_sum);
+ // }
verifier.TestMemberIsNonNegative<uint32_t>(inbound_stream.packets_received);
verifier.TestMemberIsNonNegative<uint64_t>(inbound_stream.bytes_received);
verifier.TestMemberIsNonNegative<uint32_t>(inbound_stream.packets_lost);