Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(919)

Side by Side Diff: media/cast/logging/logging_defines.cc

Issue 210303003: Cast: Remove LoggingStats in favor of event subscribers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/cast/logging/logging_defines.h ('k') | media/cast/logging/logging_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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: \
11 return #enum 11 return #enum
12 12
13 namespace media { 13 namespace media {
14 namespace cast { 14 namespace cast {
15 15
16 CastLoggingConfig::CastLoggingConfig()
17 : enable_raw_data_collection(false),
18 enable_stats_data_collection(false) {}
19
20 CastLoggingConfig::~CastLoggingConfig() {}
21
22 CastLoggingConfig GetDefaultCastSenderLoggingConfig() {
23 return CastLoggingConfig();
24 }
25
26 CastLoggingConfig GetDefaultCastReceiverLoggingConfig() {
27 return CastLoggingConfig();
28 }
29
30 CastLoggingConfig GetLoggingConfigWithRawEventsAndStatsEnabled() {
31 CastLoggingConfig config;
32 config.enable_raw_data_collection = true;
33 config.enable_stats_data_collection = true;
34 return config;
35 }
36
37 const char* CastLoggingToString(CastLoggingEvent event) { 16 const char* CastLoggingToString(CastLoggingEvent event) {
38 switch (event) { 17 switch (event) {
39 // Can happen if the sender and receiver of RTCP log messages are not 18 // Can happen if the sender and receiver of RTCP log messages are not
40 // aligned. 19 // aligned.
41 ENUM_TO_STRING(Unknown); 20 ENUM_TO_STRING(Unknown);
42 ENUM_TO_STRING(RttMs); 21 ENUM_TO_STRING(RttMs);
43 ENUM_TO_STRING(PacketLoss); 22 ENUM_TO_STRING(PacketLoss);
44 ENUM_TO_STRING(JitterMs); 23 ENUM_TO_STRING(JitterMs);
45 ENUM_TO_STRING(VideoAckReceived); 24 ENUM_TO_STRING(VideoAckReceived);
46 ENUM_TO_STRING(RembBitrate); 25 ENUM_TO_STRING(RembBitrate);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 118
140 GenericLogStats::GenericLogStats() 119 GenericLogStats::GenericLogStats()
141 : event_counter(0), 120 : event_counter(0),
142 sum(0), 121 sum(0),
143 sum_squared(0), 122 sum_squared(0),
144 min(0), 123 min(0),
145 max(0) {} 124 max(0) {}
146 GenericLogStats::~GenericLogStats() {} 125 GenericLogStats::~GenericLogStats() {}
147 } // namespace cast 126 } // namespace cast
148 } // namespace media 127 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/logging/logging_defines.h ('k') | media/cast/logging/logging_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698