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 3 // found in the LICENSE file. 4 5 #include "media/cast/logging/logging_defines.h" 6 7 #include "base/logging.h" 8 9 namespace media { 10 namespace cast { 11 CastLoggingConfig()12CastLoggingConfig::CastLoggingConfig() 13 : enable_data_collection(false), 14 enable_uma_stats(false), 15 enable_tracing(false) {} 16 ~CastLoggingConfig()17CastLoggingConfig::~CastLoggingConfig() {} 18 GetDefaultCastLoggingConfig()19CastLoggingConfig GetDefaultCastLoggingConfig() { 20 CastLoggingConfig config; 21 return config; 22 } 23 CastLoggingToString(CastLoggingEvent event)24std::string CastLoggingToString(CastLoggingEvent event) { 25 switch (event) { 26 case(kUnknown): 27 // Can happen if the sender and receiver of RTCP log messages are not 28 // aligned. 29 return "Unknown"; 30 case(kRttMs): 31 return "RttMs"; 32 case(kPacketLoss): 33 return "PacketLoss"; 34 case(kJitterMs): 35 return "JitterMs"; 36 case(kAckReceived): 37 return "AckReceived"; 38 case(kRembBitrate): 39 return "RembBitrate"; 40 case(kAckSent): 41 return "AckSent"; 42 case(kLastEvent): 43 return "LastEvent"; 44 case(kAudioFrameReceived): 45 return "AudioFrameReceived"; 46 case(kAudioFrameCaptured): 47 return "AudioFrameCaptured"; 48 case(kAudioFrameEncoded): 49 return "AudioFrameEncoded"; 50 case(kAudioPlayoutDelay): 51 return "AudioPlayoutDelay"; 52 case(kAudioFrameDecoded): 53 return "AudioFrameDecoded"; 54 case(kVideoFrameCaptured): 55 return "VideoFrameCaptured"; 56 case(kVideoFrameReceived): 57 return "VideoFrameReceived"; 58 case(kVideoFrameSentToEncoder): 59 return "VideoFrameSentToEncoder"; 60 case(kVideoFrameEncoded): 61 return "VideoFrameEncoded"; 62 case(kVideoFrameDecoded): 63 return "VideoFrameDecoded"; 64 case(kVideoRenderDelay): 65 return "VideoRenderDelay"; 66 case(kPacketSentToPacer): 67 return "PacketSentToPacer"; 68 case(kPacketSentToNetwork): 69 return "PacketSentToNetwork"; 70 case(kPacketRetransmited): 71 return "PacketRetransmited"; 72 case(kPacketReceived): 73 return "PacketReceived"; 74 default: 75 NOTREACHED(); 76 return ""; 77 } 78 } 79 FrameEvent()80FrameEvent::FrameEvent() {} ~FrameEvent()81FrameEvent::~FrameEvent() {} 82 BasePacketInfo()83BasePacketInfo::BasePacketInfo() {} ~BasePacketInfo()84BasePacketInfo::~BasePacketInfo() {} 85 PacketEvent()86PacketEvent::PacketEvent() {} ~PacketEvent()87PacketEvent::~PacketEvent() {} 88 GenericEvent()89GenericEvent::GenericEvent() {} ~GenericEvent()90GenericEvent::~GenericEvent() {} 91 FrameLogStats()92FrameLogStats::FrameLogStats() 93 : framerate_fps(0), 94 bitrate_kbps(0), 95 max_delay_ms(0), 96 min_delay_ms(0), 97 avg_delay_ms(0) {} ~FrameLogStats()98FrameLogStats::~FrameLogStats() {} 99 100 } // namespace cast 101 } // namespace media 102