Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: webrtc/api/rtcstats_integrationtest.cc

Issue 2588373005: RTC[In/Out]boundRTPStreamStats: qpSum,framesDecoded,framesEncoded added. (Closed)
Patch Set: Rebase with master Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/api/rtcstatscollector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/rtcstats_integrationtest.cc
diff --git a/webrtc/api/rtcstats_integrationtest.cc b/webrtc/api/rtcstats_integrationtest.cc
index 577cc064f02af93aec5c759c753ba9136ad69d1b..af955473b6b3145689a29b706f94e002418efea2 100644
--- a/webrtc/api/rtcstats_integrationtest.cc
+++ b/webrtc/api/rtcstats_integrationtest.cc
@@ -508,6 +508,7 @@ class RTCStatsReportVerifier {
const RTCInboundRTPStreamStats& inbound_stream) {
RTCStatsVerifier verifier(report_, &inbound_stream);
VerifyRTCRTPStreamStats(inbound_stream, &verifier);
+ 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);
@@ -528,6 +529,12 @@ class RTCStatsReportVerifier {
verifier.TestMemberIsUndefined(inbound_stream.burst_discard_rate);
verifier.TestMemberIsUndefined(inbound_stream.gap_loss_rate);
verifier.TestMemberIsUndefined(inbound_stream.gap_discard_rate);
+ if (inbound_stream.media_type.is_defined() &&
+ *inbound_stream.media_type == "video") {
+ verifier.TestMemberIsDefined(inbound_stream.frames_decoded);
+ } else {
+ verifier.TestMemberIsUndefined(inbound_stream.frames_decoded);
+ }
return verifier.ExpectAllMembersSuccessfullyTested();
}
@@ -535,11 +542,23 @@ class RTCStatsReportVerifier {
const RTCOutboundRTPStreamStats& outbound_stream) {
RTCStatsVerifier verifier(report_, &outbound_stream);
VerifyRTCRTPStreamStats(outbound_stream, &verifier);
+ if (outbound_stream.media_type.is_defined() &&
+ *outbound_stream.media_type == "video") {
+ verifier.TestMemberIsNonNegative<uint64_t>(outbound_stream.qp_sum);
+ } else {
+ verifier.TestMemberIsUndefined(outbound_stream.qp_sum);
sakal 2017/01/09 07:13:55 nit: QP sum should also be undefined if frames_enc
hbos 2017/01/09 08:47:57 Ah, I should change below: verifier.TestMemberIsDe
+ }
verifier.TestMemberIsNonNegative<uint32_t>(outbound_stream.packets_sent);
verifier.TestMemberIsNonNegative<uint64_t>(outbound_stream.bytes_sent);
verifier.TestMemberIsUndefined(outbound_stream.target_bitrate);
// TODO(hbos): Defined in video but not audio case. Why? crbug.com/669877
verifier.MarkMemberTested(outbound_stream.round_trip_time, true);
+ if (outbound_stream.media_type.is_defined() &&
+ *outbound_stream.media_type == "video") {
+ verifier.TestMemberIsDefined(outbound_stream.frames_encoded);
+ } else {
+ verifier.TestMemberIsUndefined(outbound_stream.frames_encoded);
+ }
return verifier.ExpectAllMembersSuccessfullyTested();
}
« no previous file with comments | « no previous file | webrtc/api/rtcstatscollector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698