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> |
11 | 11 |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 namespace cast { | 15 namespace cast { |
16 | 16 |
17 static const uint32 kFrameIdUnknown = 0xFFFFFFFF; | 17 static const uint32 kFrameIdUnknown = 0xFFFFFFFF; |
18 | 18 |
19 typedef uint32 RtpTimestamp; | 19 typedef uint32 RtpTimestamp; |
20 | 20 |
21 struct CastLoggingConfig { | |
22 // Constructs default config - all logging is disabled. | |
23 CastLoggingConfig(); | |
24 ~CastLoggingConfig(); | |
25 | |
26 bool enable_raw_data_collection; | |
27 bool enable_stats_data_collection; | |
28 }; | |
29 | |
30 // Currently these are the same as the default config. | |
31 CastLoggingConfig GetDefaultCastSenderLoggingConfig(); | |
32 CastLoggingConfig GetDefaultCastReceiverLoggingConfig(); | |
33 | |
34 // Enable raw and stats data collection. Disable tracing. | |
35 CastLoggingConfig GetLoggingConfigWithRawEventsAndStatsEnabled(); | |
36 | |
37 enum CastLoggingEvent { | 21 enum CastLoggingEvent { |
38 // Generic events. | 22 // Generic events. |
39 kUnknown, | 23 kUnknown, |
40 kRttMs, | 24 kRttMs, |
41 kPacketLoss, | 25 kPacketLoss, |
42 kJitterMs, | 26 kJitterMs, |
43 kVideoAckReceived, | 27 kVideoAckReceived, |
44 kRembBitrate, | 28 kRembBitrate, |
45 // TODO(imcheng): k{Audio,Video}AckSent may need to be FrameEvents | 29 // TODO(imcheng): k{Audio,Video}AckSent may need to be FrameEvents |
46 // (crbug.com/339590) | 30 // (crbug.com/339590) |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 157 |
174 | 158 |
175 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; | 159 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; |
176 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; | 160 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; |
177 typedef std::map<CastLoggingEvent, GenericLogStats> GenericStatsMap; | 161 typedef std::map<CastLoggingEvent, GenericLogStats> GenericStatsMap; |
178 | 162 |
179 } // namespace cast | 163 } // namespace cast |
180 } // namespace media | 164 } // namespace media |
181 | 165 |
182 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ | 166 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ |
OLD | NEW |