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

Unified Diff: webrtc/common_types.h

Issue 1720883002: Move RTCP histograms from vie_channel to video channel stats proxies. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 10 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/video/end_to_end_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_types.h
diff --git a/webrtc/common_types.h b/webrtc/common_types.h
index 8de1659364859baeb5352f144d33eefa81bd6784..2999bc95bc82a353fd820e87506059c29d552d8c 100644
--- a/webrtc/common_types.h
+++ b/webrtc/common_types.h
@@ -211,6 +211,20 @@ struct RtcpPacketTypeCounter {
}
}
+ void Subtract(const RtcpPacketTypeCounter& other) {
+ nack_packets -= other.nack_packets;
+ fir_packets -= other.fir_packets;
+ pli_packets -= other.pli_packets;
+ nack_requests -= other.nack_requests;
+ unique_nack_requests -= other.unique_nack_requests;
+ if (other.first_packet_time_ms != -1 &&
+ (other.first_packet_time_ms > first_packet_time_ms ||
+ first_packet_time_ms == -1)) {
+ // Use youngest time.
+ first_packet_time_ms = other.first_packet_time_ms;
+ }
+ }
+
int64_t TimeSinceFirstPacketInMs(int64_t now_ms) const {
return (first_packet_time_ms == -1) ? -1 : (now_ms - first_packet_time_ms);
}
« no previous file with comments | « no previous file | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698