| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 uint32 frame_id; | 100 uint32 frame_id; |
| 101 uint16 max_packet_id; | 101 uint16 max_packet_id; |
| 102 uint16 packet_id; | 102 uint16 packet_id; |
| 103 size_t size; | 103 size_t size; |
| 104 | 104 |
| 105 // Time of event logged. | 105 // Time of event logged. |
| 106 base::TimeTicks timestamp; | 106 base::TimeTicks timestamp; |
| 107 CastLoggingEvent type; | 107 CastLoggingEvent type; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 // Generic statistics given the raw data. More specific data (e.g. frame rate | |
| 111 // and bit rate) can be computed given the basic metrics. | |
| 112 // Some of the metrics will only be set when applicable, e.g. delay and size. | |
| 113 struct FrameLogStats { | |
| 114 FrameLogStats(); | |
| 115 ~FrameLogStats(); | |
| 116 base::TimeTicks first_event_time; | |
| 117 base::TimeTicks last_event_time; | |
| 118 int event_counter; | |
| 119 size_t sum_size; | |
| 120 base::TimeDelta min_delay; | |
| 121 base::TimeDelta max_delay; | |
| 122 base::TimeDelta sum_delay; | |
| 123 }; | |
| 124 | |
| 125 struct PacketLogStats { | |
| 126 PacketLogStats(); | |
| 127 ~PacketLogStats(); | |
| 128 base::TimeTicks first_event_time; | |
| 129 base::TimeTicks last_event_time; | |
| 130 int event_counter; | |
| 131 size_t sum_size; | |
| 132 }; | |
| 133 | |
| 134 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; | |
| 135 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; | |
| 136 | |
| 137 } // namespace cast | 110 } // namespace cast |
| 138 } // namespace media | 111 } // namespace media |
| 139 | 112 |
| 140 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ | 113 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ |
| OLD | NEW |