OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LOGGING_DEFINES_H_ | 5 #ifndef MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ |
6 #define MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ | 6 #define MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // kVideoAckReceived - Frame ID | 112 // kVideoAckReceived - Frame ID |
113 // kRembBitrate - Receiver Estimated Maximum Bitrate | 113 // kRembBitrate - Receiver Estimated Maximum Bitrate |
114 // kAudioAckSent - Frame ID | 114 // kAudioAckSent - Frame ID |
115 // kVideoAckSent - Frame ID | 115 // kVideoAckSent - Frame ID |
116 int value; | 116 int value; |
117 | 117 |
118 // Time of event logged. | 118 // Time of event logged. |
119 base::TimeTicks timestamp; | 119 base::TimeTicks timestamp; |
120 }; | 120 }; |
121 | 121 |
122 // Generic statistics given the raw data. More specific data (e.g. frame rate | |
123 // and bit rate) can be computed given the basic metrics. | |
124 // Some of the metrics will only be set when applicable, e.g. delay and size. | |
125 struct FrameLogStats { | |
126 FrameLogStats(); | |
127 ~FrameLogStats(); | |
128 base::TimeTicks first_event_time; | |
129 base::TimeTicks last_event_time; | |
130 int event_counter; | |
131 size_t sum_size; | |
132 base::TimeDelta min_delay; | |
133 base::TimeDelta max_delay; | |
134 base::TimeDelta sum_delay; | |
135 }; | |
136 | |
137 struct PacketLogStats { | |
138 PacketLogStats(); | |
139 ~PacketLogStats(); | |
140 base::TimeTicks first_event_time; | |
141 base::TimeTicks last_event_time; | |
142 int event_counter; | |
143 size_t sum_size; | |
144 }; | |
145 | |
146 struct GenericLogStats { | |
147 GenericLogStats(); | |
148 ~GenericLogStats(); | |
149 base::TimeTicks first_event_time; | |
150 base::TimeTicks last_event_time; | |
151 int event_counter; | |
152 int sum; | |
153 uint64 sum_squared; | |
154 int min; | |
155 int max; | |
156 }; | |
157 | |
158 | |
159 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; | |
160 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; | |
161 typedef std::map<CastLoggingEvent, GenericLogStats> GenericStatsMap; | |
162 | |
163 } // namespace cast | 122 } // namespace cast |
164 } // namespace media | 123 } // namespace media |
165 | 124 |
166 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ | 125 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ |
OLD | NEW |