Remove Unused AsTextButtonBorder RTTI helper.
[chromium-blink-merge.git] / media / cast / logging / logging_defines.cc
blobd59c045e0e972917a01702df48d35b78221bab98
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.
5 #include "media/cast/logging/logging_defines.h"
7 #include "base/logging.h"
9 #define ENUM_TO_STRING(enum) \
10 case k##enum: \
11 return #enum
13 namespace media {
14 namespace cast {
16 CastLoggingConfig::CastLoggingConfig()
17 : enable_raw_data_collection(false),
18 enable_stats_data_collection(false),
19 enable_tracing(false) {}
21 CastLoggingConfig::~CastLoggingConfig() {}
23 CastLoggingConfig GetDefaultCastSenderLoggingConfig() {
24 return CastLoggingConfig();
27 CastLoggingConfig GetDefaultCastReceiverLoggingConfig() {
28 return CastLoggingConfig();
31 CastLoggingConfig GetLoggingConfigWithRawEventsAndStatsEnabled() {
32 CastLoggingConfig config;
33 config.enable_raw_data_collection = true;
34 config.enable_stats_data_collection = true;
35 return config;
38 std::string CastLoggingToString(CastLoggingEvent event) {
39 switch (event) {
40 // Can happen if the sender and receiver of RTCP log messages are not
41 // aligned.
42 ENUM_TO_STRING(Unknown);
43 ENUM_TO_STRING(RttMs);
44 ENUM_TO_STRING(PacketLoss);
45 ENUM_TO_STRING(JitterMs);
46 ENUM_TO_STRING(VideoAckReceived);
47 ENUM_TO_STRING(RembBitrate);
48 ENUM_TO_STRING(AudioAckSent);
49 ENUM_TO_STRING(VideoAckSent);
50 ENUM_TO_STRING(AudioFrameReceived);
51 ENUM_TO_STRING(AudioFrameCaptured);
52 ENUM_TO_STRING(AudioFrameEncoded);
53 ENUM_TO_STRING(AudioPlayoutDelay);
54 ENUM_TO_STRING(AudioFrameDecoded);
55 ENUM_TO_STRING(VideoFrameCaptured);
56 ENUM_TO_STRING(VideoFrameReceived);
57 ENUM_TO_STRING(VideoFrameSentToEncoder);
58 ENUM_TO_STRING(VideoFrameEncoded);
59 ENUM_TO_STRING(VideoFrameDecoded);
60 ENUM_TO_STRING(VideoRenderDelay);
61 ENUM_TO_STRING(PacketSentToPacer);
62 ENUM_TO_STRING(PacketSentToNetwork);
63 ENUM_TO_STRING(PacketRetransmitted);
64 ENUM_TO_STRING(AudioPacketReceived);
65 ENUM_TO_STRING(VideoPacketReceived);
66 ENUM_TO_STRING(DuplicatePacketReceived);
67 case kNumOfLoggingEvents:
68 NOTREACHED();
69 return "";
71 NOTREACHED();
72 return "";
75 FrameEvent::FrameEvent()
76 : rtp_timestamp(0u), frame_id(kFrameIdUnknown), size(0u), type(kUnknown) {}
77 FrameEvent::~FrameEvent() {}
79 PacketEvent::PacketEvent()
80 : rtp_timestamp(0),
81 frame_id(kFrameIdUnknown),
82 max_packet_id(0),
83 packet_id(0),
84 size(0),
85 type(kUnknown) {}
86 PacketEvent::~PacketEvent() {}
88 GenericEvent::GenericEvent() : type(kUnknown), value(0) {}
89 GenericEvent::~GenericEvent() {}
91 FrameLogStats::FrameLogStats()
92 : event_counter(0),
93 sum_size(0) {}
94 FrameLogStats::~FrameLogStats() {}
96 PacketLogStats::PacketLogStats()
97 : event_counter(0),
98 sum_size(0) {}
99 PacketLogStats::~PacketLogStats() {}
101 GenericLogStats::GenericLogStats()
102 : event_counter(0),
103 sum(0),
104 sum_squared(0),
105 min(0),
106 max(0) {}
107 GenericLogStats::~GenericLogStats() {}
108 } // namespace cast
109 } // namespace media