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

Side by Side Diff: media/cast/logging/stats_event_subscriber.h

Issue 1515433002: Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Speculative workaround fix for win8_chromium_ng compile error. Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_ 5 #ifndef MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_
6 #define MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_ 6 #define MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 ~FrameInfo(); 179 ~FrameInfo();
180 180
181 base::TimeTicks capture_time; 181 base::TimeTicks capture_time;
182 base::TimeTicks capture_end_time; 182 base::TimeTicks capture_end_time;
183 base::TimeTicks encode_end_time; 183 base::TimeTicks encode_end_time;
184 bool encoded; 184 bool encoded;
185 }; 185 };
186 186
187 typedef std::map<CastStat, double> StatsMap; 187 typedef std::map<CastStat, double> StatsMap;
188 typedef std::map<CastStat, linked_ptr<SimpleHistogram> > HistogramMap; 188 typedef std::map<CastStat, linked_ptr<SimpleHistogram> > HistogramMap;
189 typedef std::map<RtpTimestamp, FrameInfo> FrameInfoMap; 189 typedef std::map<RtpTimeTicks, FrameInfo> FrameInfoMap;
190 typedef std::map<std::pair<RtpTimestamp, uint16_t>, 190 typedef std::map<std::pair<RtpTimeTicks, uint16_t>,
191 std::pair<base::TimeTicks, CastLoggingEvent>> 191 std::pair<base::TimeTicks, CastLoggingEvent>>
192 PacketEventTimeMap; 192 PacketEventTimeMap;
193 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; 193 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap;
194 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; 194 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap;
195 195
196 static const char* CastStatToString(CastStat stat); 196 static const char* CastStatToString(CastStat stat);
197 197
198 void InitHistograms(); 198 void InitHistograms();
199 199
200 // Assigns |stats_map| with stats data. Used for testing. 200 // Assigns |stats_map| with stats data. Used for testing.
201 void GetStatsInternal(StatsMap* stats_map) const; 201 void GetStatsInternal(StatsMap* stats_map) const;
202 202
203 // Return a histogram of the type specified. 203 // Return a histogram of the type specified.
204 SimpleHistogram* GetHistogramForTesting(CastStat stats) const; 204 SimpleHistogram* GetHistogramForTesting(CastStat stats) const;
205 205
206 void UpdateFirstLastEventTime(base::TimeTicks timestamp, 206 void UpdateFirstLastEventTime(base::TimeTicks timestamp,
207 bool is_receiver_event); 207 bool is_receiver_event);
208 bool GetReceiverOffset(base::TimeDelta* offset); 208 bool GetReceiverOffset(base::TimeDelta* offset);
209 void MaybeInsertFrameInfo(RtpTimestamp rtp_timestamp, 209 void MaybeInsertFrameInfo(RtpTimeTicks rtp_timestamp,
210 const FrameInfo& frame_info); 210 const FrameInfo& frame_info);
211 void RecordFrameCaptureTime(const FrameEvent& frame_event); 211 void RecordFrameCaptureTime(const FrameEvent& frame_event);
212 void RecordCaptureLatency(const FrameEvent& frame_event); 212 void RecordCaptureLatency(const FrameEvent& frame_event);
213 void RecordEncodeLatency(const FrameEvent& frame_event); 213 void RecordEncodeLatency(const FrameEvent& frame_event);
214 void RecordFrameTxLatency(const FrameEvent& frame_event); 214 void RecordFrameTxLatency(const FrameEvent& frame_event);
215 void RecordE2ELatency(const FrameEvent& frame_event); 215 void RecordE2ELatency(const FrameEvent& frame_event);
216 void RecordPacketSentTime(const PacketEvent& packet_event); 216 void RecordPacketSentTime(const PacketEvent& packet_event);
217 void ErasePacketSentTime(const PacketEvent& packet_event); 217 void ErasePacketSentTime(const PacketEvent& packet_event);
218 void RecordPacketRelatedLatencies(const PacketEvent& packet_event); 218 void RecordPacketRelatedLatencies(const PacketEvent& packet_event);
219 void UpdateLastResponseTime(base::TimeTicks receiver_time); 219 void UpdateLastResponseTime(base::TimeTicks receiver_time);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 HistogramMap histograms_; 279 HistogramMap histograms_;
280 280
281 base::ThreadChecker thread_checker_; 281 base::ThreadChecker thread_checker_;
282 DISALLOW_COPY_AND_ASSIGN(StatsEventSubscriber); 282 DISALLOW_COPY_AND_ASSIGN(StatsEventSubscriber);
283 }; 283 };
284 284
285 } // namespace cast 285 } // namespace cast
286 } // namespace media 286 } // namespace media
287 287
288 #endif // MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_ 288 #endif // MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_
OLDNEW
« no previous file with comments | « media/cast/logging/simple_event_subscriber_unittest.cc ('k') | media/cast/logging/stats_event_subscriber.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698