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

Unified Diff: talk/app/webrtc/statscollector.h

Issue 1204493002: Set / verify stats report timestamps. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 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 | « talk/app/webrtc/peerconnection_unittest.cc ('k') | talk/app/webrtc/statscollector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/statscollector.h
diff --git a/talk/app/webrtc/statscollector.h b/talk/app/webrtc/statscollector.h
index 3c0aaf9b8ec86f78bf365f6f72acc7d405b2b68a..99130a3f0133791ebf9d9e89119edb9c0b78ee7b 100644
--- a/talk/app/webrtc/statscollector.h
+++ b/talk/app/webrtc/statscollector.h
@@ -52,6 +52,9 @@ const char* IceCandidateTypeToStatsType(const std::string& candidate_type);
// only used by stats collector.
const char* AdapterTypeToStatsType(rtc::AdapterType type);
+// A mapping between track ids and their StatsReport.
+typedef std::map<std::string, StatsReport*> TrackIdMap;
+
class StatsCollector {
public:
// The caller is responsible for ensuring that the session outlives the
@@ -139,8 +142,12 @@ class StatsCollector {
bool GetTrackIdBySsrc(uint32 ssrc, std::string* track_id,
StatsReport::Direction direction);
+ // Helper method to update the timestamp of track records.
+ void UpdateTrackReports();
+
// A collection for all of our stats reports.
StatsCollection reports_;
+ TrackIdMap track_ids_;
// Raw pointer to the session the statistics are gathered from.
WebRtcSession* const session_;
double stats_gathering_started_;
« no previous file with comments | « talk/app/webrtc/peerconnection_unittest.cc ('k') | talk/app/webrtc/statscollector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698