| 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 { | 21 struct CastLoggingConfig { |
| 22 // Constructs default config - all logging is disabled. | 22 // Constructs default config - all logging is disabled. |
| 23 CastLoggingConfig(); | 23 CastLoggingConfig(); |
| 24 CastLoggingConfig(bool enable_raw_data_collection, |
| 25 bool enable_stats_data_collection, |
| 26 bool enable_tracing); |
| 24 ~CastLoggingConfig(); | 27 ~CastLoggingConfig(); |
| 25 | 28 |
| 26 bool enable_raw_data_collection; | 29 bool enable_raw_data_collection; |
| 27 bool enable_stats_data_collection; | 30 bool enable_stats_data_collection; |
| 28 bool enable_tracing; | 31 bool enable_tracing; |
| 29 }; | 32 }; |
| 30 | 33 |
| 31 // Currently these are the same as the default config. | 34 // Currently these are the same as the default config. |
| 32 CastLoggingConfig GetDefaultCastSenderLoggingConfig(); | 35 CastLoggingConfig GetDefaultCastSenderLoggingConfig(); |
| 33 CastLoggingConfig GetDefaultCastReceiverLoggingConfig(); | 36 CastLoggingConfig GetDefaultCastReceiverLoggingConfig(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 64 kVideoRenderDelay, | 67 kVideoRenderDelay, |
| 65 // Send-side packet events. | 68 // Send-side packet events. |
| 66 kPacketSentToPacer, | 69 kPacketSentToPacer, |
| 67 kPacketSentToNetwork, | 70 kPacketSentToNetwork, |
| 68 kPacketRetransmitted, | 71 kPacketRetransmitted, |
| 69 // Receive-side packet events. | 72 // Receive-side packet events. |
| 70 kAudioPacketReceived, | 73 kAudioPacketReceived, |
| 71 kVideoPacketReceived, | 74 kVideoPacketReceived, |
| 72 kDuplicateAudioPacketReceived, | 75 kDuplicateAudioPacketReceived, |
| 73 kDuplicateVideoPacketReceived, | 76 kDuplicateVideoPacketReceived, |
| 74 kNumOfLoggingEvents, | 77 kNumOfLoggingEvents |
| 75 }; | 78 }; |
| 76 | 79 |
| 77 std::string CastLoggingToString(CastLoggingEvent event); | 80 std::string CastLoggingToString(CastLoggingEvent event); |
| 78 | 81 |
| 79 // CastLoggingEvent are classified into one of three following types. | 82 // CastLoggingEvent are classified into one of three following types. |
| 80 enum EventMediaType { AUDIO_EVENT, VIDEO_EVENT, OTHER_EVENT }; | 83 enum EventMediaType { AUDIO_EVENT, VIDEO_EVENT, OTHER_EVENT }; |
| 81 | 84 |
| 82 EventMediaType GetEventMediaType(CastLoggingEvent event); | 85 EventMediaType GetEventMediaType(CastLoggingEvent event); |
| 83 | 86 |
| 84 struct FrameEvent { | 87 struct FrameEvent { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 174 |
| 172 | 175 |
| 173 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; | 176 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; |
| 174 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; | 177 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; |
| 175 typedef std::map<CastLoggingEvent, GenericLogStats> GenericStatsMap; | 178 typedef std::map<CastLoggingEvent, GenericLogStats> GenericStatsMap; |
| 176 | 179 |
| 177 } // namespace cast | 180 } // namespace cast |
| 178 } // namespace media | 181 } // namespace media |
| 179 | 182 |
| 180 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ | 183 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ |
| OLD | NEW |