Chromium Code Reviews| 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 #include "media/cast/logging/logging_defines.h" | 5 #include "media/cast/logging/logging_defines.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 #define ENUM_TO_STRING(enum) \ | 9 #define ENUM_TO_STRING(enum) \ |
| 10 case k##enum: \ | 10 case k##enum: \ |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 ENUM_TO_STRING(VideoPacketReceived); | 65 ENUM_TO_STRING(VideoPacketReceived); |
| 66 ENUM_TO_STRING(DuplicatePacketReceived); | 66 ENUM_TO_STRING(DuplicatePacketReceived); |
| 67 case kNumOfLoggingEvents: | 67 case kNumOfLoggingEvents: |
| 68 NOTREACHED(); | 68 NOTREACHED(); |
| 69 return ""; | 69 return ""; |
| 70 } | 70 } |
| 71 NOTREACHED(); | 71 NOTREACHED(); |
| 72 return ""; | 72 return ""; |
| 73 } | 73 } |
| 74 | 74 |
| 75 EventMediaType GetEventMediaType(CastLoggingEvent event) { | |
| 76 switch (event) { | |
| 77 case kUnknown: | |
|
Alpha Left Google
2014/02/14 18:42:39
From kUnoknown to kRembBitrate they are not someth
imcheng
2014/02/14 20:24:17
Ack. The other 4 here (kPacketSentToPacer, kPacket
| |
| 78 case kRttMs: | |
| 79 case kPacketLoss: | |
| 80 case kJitterMs: | |
| 81 case kRembBitrate: | |
| 82 // TODO(imcheng): These need to be split into video/audio events. | |
| 83 case kPacketSentToPacer: | |
| 84 case kPacketSentToNetwork: | |
| 85 case kPacketRetransmitted: | |
| 86 case kDuplicatePacketReceived: | |
| 87 return OTHER_EVENT; | |
| 88 case kAudioAckSent: | |
| 89 case kAudioFrameReceived: | |
| 90 case kAudioFrameCaptured: | |
| 91 case kAudioFrameEncoded: | |
| 92 case kAudioPlayoutDelay: | |
| 93 case kAudioFrameDecoded: | |
| 94 case kAudioPacketReceived: | |
| 95 return AUDIO_EVENT; | |
| 96 case kVideoAckReceived: | |
| 97 case kVideoAckSent: | |
| 98 case kVideoFrameCaptured: | |
| 99 case kVideoFrameReceived: | |
| 100 case kVideoFrameSentToEncoder: | |
| 101 case kVideoFrameEncoded: | |
| 102 case kVideoFrameDecoded: | |
| 103 case kVideoRenderDelay: | |
| 104 case kVideoPacketReceived: | |
| 105 return VIDEO_EVENT; | |
| 106 case kNumOfLoggingEvents: | |
| 107 NOTREACHED(); | |
| 108 return OTHER_EVENT; | |
| 109 } | |
| 110 NOTREACHED(); | |
| 111 return OTHER_EVENT; | |
| 112 } | |
| 113 | |
| 75 FrameEvent::FrameEvent() | 114 FrameEvent::FrameEvent() |
| 76 : rtp_timestamp(0u), frame_id(kFrameIdUnknown), size(0u), type(kUnknown) {} | 115 : rtp_timestamp(0u), frame_id(kFrameIdUnknown), size(0u), type(kUnknown) {} |
| 77 FrameEvent::~FrameEvent() {} | 116 FrameEvent::~FrameEvent() {} |
| 78 | 117 |
| 79 PacketEvent::PacketEvent() | 118 PacketEvent::PacketEvent() |
| 80 : rtp_timestamp(0), | 119 : rtp_timestamp(0), |
| 81 frame_id(kFrameIdUnknown), | 120 frame_id(kFrameIdUnknown), |
| 82 max_packet_id(0), | 121 max_packet_id(0), |
| 83 packet_id(0), | 122 packet_id(0), |
| 84 size(0), | 123 size(0), |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 101 GenericLogStats::GenericLogStats() | 140 GenericLogStats::GenericLogStats() |
| 102 : event_counter(0), | 141 : event_counter(0), |
| 103 sum(0), | 142 sum(0), |
| 104 sum_squared(0), | 143 sum_squared(0), |
| 105 min(0), | 144 min(0), |
| 106 max(0) {} | 145 max(0) {} |
| 107 GenericLogStats::~GenericLogStats() {} | 146 GenericLogStats::~GenericLogStats() {} |
| 108 } // namespace cast | 147 } // namespace cast |
| 109 } // namespace media | 148 } // namespace media |
| 110 | 149 |
| OLD | NEW |