Add RTCStats for keyFramesEncoded, keyFramesDecoded.
This implements the correspondingly named JavaScript fields defined in
https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict* and
https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict*.
Bug: webrtc:7066
Change-Id: I431045bca80bf5faf27132c54f59c1f723c92952
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143683
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28404}
diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc
index 4f10a1d..79d6faf 100644
--- a/pc/rtc_stats_integrationtest.cc
+++ b/pc/rtc_stats_integrationtest.cc
@@ -804,11 +804,13 @@
if (inbound_stream.media_type.is_defined() &&
*inbound_stream.media_type == "video") {
verifier.TestMemberIsDefined(inbound_stream.frames_decoded);
+ verifier.TestMemberIsDefined(inbound_stream.key_frames_decoded);
// The integration test is not set up to test screen share; don't require
// this to be present.
verifier.MarkMemberTested(inbound_stream.content_type, true);
} else {
verifier.TestMemberIsUndefined(inbound_stream.frames_decoded);
+ verifier.TestMemberIsUndefined(inbound_stream.key_frames_decoded);
verifier.TestMemberIsUndefined(inbound_stream.content_type);
}
return verifier.ExpectAllMembersSuccessfullyTested();
@@ -838,6 +840,7 @@
if (outbound_stream.media_type.is_defined() &&
*outbound_stream.media_type == "video") {
verifier.TestMemberIsDefined(outbound_stream.frames_encoded);
+ verifier.TestMemberIsDefined(outbound_stream.key_frames_encoded);
verifier.TestMemberIsNonNegative<double>(
outbound_stream.total_encode_time);
verifier.TestMemberIsNonNegative<uint64_t>(
@@ -850,6 +853,7 @@
verifier.MarkMemberTested(outbound_stream.content_type, true);
} else {
verifier.TestMemberIsUndefined(outbound_stream.frames_encoded);
+ verifier.TestMemberIsUndefined(outbound_stream.key_frames_encoded);
verifier.TestMemberIsUndefined(outbound_stream.total_encode_time);
verifier.TestMemberIsUndefined(
outbound_stream.total_encoded_bytes_target);