| 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; |
| 20 |
| 19 struct CastLoggingConfig { | 21 struct CastLoggingConfig { |
| 20 // Constructs default config - all logging is disabled. | 22 // Constructs default config - all logging is disabled. |
| 21 CastLoggingConfig(); | 23 CastLoggingConfig(); |
| 22 ~CastLoggingConfig(); | 24 ~CastLoggingConfig(); |
| 23 | 25 |
| 24 bool enable_raw_data_collection; | 26 bool enable_raw_data_collection; |
| 25 bool enable_stats_data_collection; | 27 bool enable_stats_data_collection; |
| 26 bool enable_tracing; | 28 bool enable_tracing; |
| 27 }; | 29 }; |
| 28 | 30 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 kPacketRetransmitted, | 68 kPacketRetransmitted, |
| 67 // Receive-side packet events. | 69 // Receive-side packet events. |
| 68 kAudioPacketReceived, | 70 kAudioPacketReceived, |
| 69 kVideoPacketReceived, | 71 kVideoPacketReceived, |
| 70 kDuplicatePacketReceived, | 72 kDuplicatePacketReceived, |
| 71 kNumOfLoggingEvents, | 73 kNumOfLoggingEvents, |
| 72 }; | 74 }; |
| 73 | 75 |
| 74 std::string CastLoggingToString(CastLoggingEvent event); | 76 std::string CastLoggingToString(CastLoggingEvent event); |
| 75 | 77 |
| 76 typedef uint32 RtpTimestamp; | 78 // CastLoggingEvent are classified into one of three following types. |
| 79 enum EventMediaType { AUDIO_EVENT, VIDEO_EVENT, OTHER_EVENT }; |
| 80 |
| 81 EventMediaType GetEventMediaType(CastLoggingEvent event); |
| 77 | 82 |
| 78 struct FrameEvent { | 83 struct FrameEvent { |
| 79 FrameEvent(); | 84 FrameEvent(); |
| 80 ~FrameEvent(); | 85 ~FrameEvent(); |
| 81 | 86 |
| 82 RtpTimestamp rtp_timestamp; | 87 RtpTimestamp rtp_timestamp; |
| 83 uint32 frame_id; | 88 uint32 frame_id; |
| 84 size_t size; // Encoded size only. | 89 size_t size; // Encoded size only. |
| 85 | 90 |
| 86 // Time of event logged. | 91 // Time of event logged. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 170 |
| 166 | 171 |
| 167 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; | 172 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; |
| 168 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; | 173 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; |
| 169 typedef std::map<CastLoggingEvent, GenericLogStats> GenericStatsMap; | 174 typedef std::map<CastLoggingEvent, GenericLogStats> GenericStatsMap; |
| 170 | 175 |
| 171 } // namespace cast | 176 } // namespace cast |
| 172 } // namespace media | 177 } // namespace media |
| 173 | 178 |
| 174 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ | 179 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ |
| OLD | NEW |