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

Side by Side Diff: talk/media/webrtc/webrtcvoiceengine.cc

Issue 1347353004: Reduce LS_INFO spam from voice_engine/. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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 | « talk/media/webrtc/webrtcvoiceengine.h ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 std::find(opts.begin(), opts.end(), "recordEC"); 1235 std::find(opts.begin(), opts.end(), "recordEC");
1236 if (recordEC != opts.end()) { 1236 if (recordEC != opts.end()) {
1237 ++recordEC; 1237 ++recordEC;
1238 if (recordEC != opts.end()) 1238 if (recordEC != opts.end())
1239 StartAecDump(recordEC->c_str()); 1239 StartAecDump(recordEC->c_str());
1240 else 1240 else
1241 StopAecDump(); 1241 StopAecDump();
1242 } 1242 }
1243 } 1243 }
1244 1244
1245 // Ignore spammy trace messages, mostly from the stats API when we haven't
1246 // gotten RTCP info yet from the remote side.
1247 bool WebRtcVoiceEngine::ShouldIgnoreTrace(const std::string& trace) {
1248 static const char* kTracesToIgnore[] = {
1249 "\tfailed to GetReportBlockInformation",
1250 "GetRecCodec() failed to get received codec",
1251 "GetReceivedRtcpStatistics: Could not get received RTP statistics",
1252 "GetRemoteRTCPData() failed to measure statistics due to lack of received RT P and/or RTCP packets", // NOLINT
1253 "GetRemoteRTCPData() failed to retrieve sender info for remote side",
1254 "GetRTPStatistics() failed to measure RTT since no RTP packets have been rec eived yet", // NOLINT
1255 "GetRTPStatistics() failed to read RTP statistics from the RTP/RTCP module",
1256 "GetRTPStatistics() failed to retrieve RTT from the RTP/RTCP module",
1257 "SenderInfoReceived No received SR",
1258 "StatisticsRTP() no statistics available",
1259 "TransmitMixer::TypingDetection() VE_TYPING_NOISE_WARNING message has been p osted", // NOLINT
1260 "TransmitMixer::TypingDetection() pending noise-saturation warning exists", // NOLINT
1261 "GetRecPayloadType() failed to retrieve RX payload type (error=10026)", // N OLINT
1262 "StopPlayingFileAsMicrophone() isnot playing (error=8088)",
1263 NULL
1264 };
1265 for (const char* const* p = kTracesToIgnore; *p; ++p) {
1266 if (trace.find(*p) != std::string::npos) {
1267 return true;
1268 }
1269 }
1270 return false;
1271 }
1272
1273 void WebRtcVoiceEngine::Print(webrtc::TraceLevel level, const char* trace, 1245 void WebRtcVoiceEngine::Print(webrtc::TraceLevel level, const char* trace,
1274 int length) { 1246 int length) {
1275 rtc::LoggingSeverity sev = rtc::LS_VERBOSE; 1247 rtc::LoggingSeverity sev = rtc::LS_VERBOSE;
1276 if (level == webrtc::kTraceError || level == webrtc::kTraceCritical) 1248 if (level == webrtc::kTraceError || level == webrtc::kTraceCritical)
1277 sev = rtc::LS_ERROR; 1249 sev = rtc::LS_ERROR;
1278 else if (level == webrtc::kTraceWarning) 1250 else if (level == webrtc::kTraceWarning)
1279 sev = rtc::LS_WARNING; 1251 sev = rtc::LS_WARNING;
1280 else if (level == webrtc::kTraceStateInfo || level == webrtc::kTraceInfo) 1252 else if (level == webrtc::kTraceStateInfo || level == webrtc::kTraceInfo)
1281 sev = rtc::LS_INFO; 1253 sev = rtc::LS_INFO;
1282 else if (level == webrtc::kTraceTerseInfo) 1254 else if (level == webrtc::kTraceTerseInfo)
1283 sev = rtc::LS_INFO; 1255 sev = rtc::LS_INFO;
1284 1256
1285 // Skip past boilerplate prefix text 1257 // Skip past boilerplate prefix text
1286 if (length < 72) { 1258 if (length < 72) {
1287 std::string msg(trace, length); 1259 std::string msg(trace, length);
1288 LOG(LS_ERROR) << "Malformed webrtc log message: "; 1260 LOG(LS_ERROR) << "Malformed webrtc log message: ";
1289 LOG_V(sev) << msg; 1261 LOG_V(sev) << msg;
1290 } else { 1262 } else {
1291 std::string msg(trace + 71, length - 72); 1263 std::string msg(trace + 71, length - 72);
1292 if (!ShouldIgnoreTrace(msg)) { 1264 LOG_V(sev) << "webrtc: " << msg;
1293 LOG_V(sev) << "webrtc: " << msg;
1294 }
1295 } 1265 }
1296 } 1266 }
1297 1267
1298 void WebRtcVoiceEngine::CallbackOnError(int channel_num, int err_code) { 1268 void WebRtcVoiceEngine::CallbackOnError(int channel_num, int err_code) {
1299 rtc::CritScope lock(&channels_cs_); 1269 rtc::CritScope lock(&channels_cs_);
1300 WebRtcVoiceMediaChannel* channel = NULL; 1270 WebRtcVoiceMediaChannel* channel = NULL;
1301 uint32 ssrc = 0; 1271 uint32 ssrc = 0;
1302 LOG(LS_WARNING) << "VoiceEngine error " << err_code << " reported on channel " 1272 LOG(LS_WARNING) << "VoiceEngine error " << err_code << " reported on channel "
1303 << channel_num << "."; 1273 << channel_num << ".";
1304 if (FindChannelAndSsrc(channel_num, &channel, &ssrc)) { 1274 if (FindChannelAndSsrc(channel_num, &channel, &ssrc)) {
(...skipping 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after
3550 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); 3520 LOG(LS_WARNING) << "Unknown codec " << ToString(codec);
3551 return false; 3521 return false;
3552 } 3522 }
3553 } 3523 }
3554 return true; 3524 return true;
3555 } 3525 }
3556 3526
3557 } // namespace cricket 3527 } // namespace cricket
3558 3528
3559 #endif // HAVE_WEBRTC_VOICE 3529 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.h ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698