| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // Receive-side packet events. | 69 // Receive-side packet events. |
| 68 kAudioPacketReceived, | 70 kAudioPacketReceived, |
| 69 kVideoPacketReceived, | 71 kVideoPacketReceived, |
| 70 kDuplicateAudioPacketReceived, | 72 kDuplicateAudioPacketReceived, |
| 71 kDuplicateVideoPacketReceived, | 73 kDuplicateVideoPacketReceived, |
| 72 kNumOfLoggingEvents, | 74 kNumOfLoggingEvents, |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 std::string CastLoggingToString(CastLoggingEvent event); | 77 std::string CastLoggingToString(CastLoggingEvent event); |
| 76 | 78 |
| 77 typedef uint32 RtpTimestamp; | 79 // CastLoggingEvent are classified into one of three following types. |
| 80 enum EventMediaType { AUDIO_EVENT, VIDEO_EVENT, OTHER_EVENT }; |
| 81 |
| 82 EventMediaType GetEventMediaType(CastLoggingEvent event); |
| 78 | 83 |
| 79 struct FrameEvent { | 84 struct FrameEvent { |
| 80 FrameEvent(); | 85 FrameEvent(); |
| 81 ~FrameEvent(); | 86 ~FrameEvent(); |
| 82 | 87 |
| 83 RtpTimestamp rtp_timestamp; | 88 RtpTimestamp rtp_timestamp; |
| 84 uint32 frame_id; | 89 uint32 frame_id; |
| 85 size_t size; // Encoded size only. | 90 size_t size; // Encoded size only. |
| 86 | 91 |
| 87 // Time of event logged. | 92 // Time of event logged. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 171 |
| 167 | 172 |
| 168 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; | 173 typedef std::map<CastLoggingEvent, FrameLogStats> FrameStatsMap; |
| 169 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; | 174 typedef std::map<CastLoggingEvent, PacketLogStats> PacketStatsMap; |
| 170 typedef std::map<CastLoggingEvent, GenericLogStats> GenericStatsMap; | 175 typedef std::map<CastLoggingEvent, GenericLogStats> GenericStatsMap; |
| 171 | 176 |
| 172 } // namespace cast | 177 } // namespace cast |
| 173 } // namespace media | 178 } // namespace media |
| 174 | 179 |
| 175 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ | 180 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_ |
| OLD | NEW |