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

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: 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') | webrtc/video/send_statistics_proxy.h » ('J')
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..d41887ffd2f1438f70a6d90e1695805c15c13358 100644
--- a/webrtc/common_types.h
+++ b/webrtc/common_types.h
@@ -211,6 +211,21 @@ struct RtcpPacketTypeCounter {
}
}
+ RtcpPacketTypeCounter Subtract(const RtcpPacketTypeCounter& other) const {
+ RtcpPacketTypeCounter diff = other;
+ diff.nack_packets -= nack_packets;
+ diff.fir_packets -= fir_packets;
+ diff.pli_packets -= pli_packets;
+ diff.nack_requests -= nack_requests;
+ diff.unique_nack_requests -= unique_nack_requests;
+ if (diff.first_packet_time_ms != -1 &&
+ diff.first_packet_time_ms < first_packet_time_ms) {
+ // Use youngest time.
+ diff.first_packet_time_ms = first_packet_time_ms;
+ }
+ return diff;
+ }
+
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') | webrtc/video/send_statistics_proxy.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698