diff options
author | Mirko Bonadei <mbonadei@webrtc.org> | 2017-11-09 11:09:25 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2017-11-09 11:56:32 +0000 |
commit | 675513b96a7a1c79528a5f93099e4c21bb9acf53 (patch) | |
tree | f943d542e6903c1b92d2457747af28bfce05e3a5 /video/overuse_frame_detector.cc | |
parent | 34fa309129595a2b13845168ee81acac720a44a1 (diff) | |
download | webrtc-675513b96a7a1c79528a5f93099e4c21bb9acf53.tar.gz |
Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:
for m in PLOG \
LOG_TAG \
LOG_GLEM \
LOG_GLE_EX \
LOG_GLE \
LAST_SYSTEM_ERROR \
LOG_ERRNO_EX \
LOG_ERRNO \
LOG_ERR_EX \
LOG_ERR \
LOG_V \
LOG_F \
LOG_T_F \
LOG_E \
LOG_T \
LOG_CHECK_LEVEL_V \
LOG_CHECK_LEVEL \
LOG
do
git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format
Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
Diffstat (limited to 'video/overuse_frame_detector.cc')
-rw-r--r-- | video/overuse_frame_detector.cc | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/video/overuse_frame_detector.cc b/video/overuse_frame_detector.cc index f110e1c9cb..7b64c10597 100644 --- a/video/overuse_frame_detector.cc +++ b/video/overuse_frame_detector.cc @@ -91,10 +91,11 @@ CpuOveruseOptions::CpuOveruseOptions() if (kr != KERN_SUCCESS) { // If we couldn't get # of physical CPUs, don't panic. Assume we have 1. n_physical_cores = 1; - LOG(LS_ERROR) << "Failed to determine number of physical cores, assuming 1"; + RTC_LOG(LS_ERROR) + << "Failed to determine number of physical cores, assuming 1"; } else { n_physical_cores = hbi.physical_cpu; - LOG(LS_INFO) << "Number of physical cores:" << n_physical_cores; + RTC_LOG(LS_INFO) << "Number of physical cores:" << n_physical_cores; } // Change init list default for few core systems. The assumption here is that @@ -206,9 +207,9 @@ class OveruseFrameDetector::OverdoseInjector last_toggling_ms_(-1) { RTC_DCHECK_GT(overuse_period_ms, 0); RTC_DCHECK_GT(normal_period_ms, 0); - LOG(LS_INFO) << "Simulating overuse with intervals " << normal_period_ms - << "ms normal mode, " << overuse_period_ms - << "ms overuse mode."; + RTC_LOG(LS_INFO) << "Simulating overuse with intervals " << normal_period_ms + << "ms normal mode, " << overuse_period_ms + << "ms overuse mode."; } ~OverdoseInjector() override {} @@ -223,21 +224,21 @@ class OveruseFrameDetector::OverdoseInjector if (now_ms > last_toggling_ms_ + normal_period_ms_) { state_ = State::kOveruse; last_toggling_ms_ = now_ms; - LOG(LS_INFO) << "Simulating CPU overuse."; + RTC_LOG(LS_INFO) << "Simulating CPU overuse."; } break; case State::kOveruse: if (now_ms > last_toggling_ms_ + overuse_period_ms_) { state_ = State::kUnderuse; last_toggling_ms_ = now_ms; - LOG(LS_INFO) << "Simulating CPU underuse."; + RTC_LOG(LS_INFO) << "Simulating CPU underuse."; } break; case State::kUnderuse: if (now_ms > last_toggling_ms_ + underuse_period_ms_) { state_ = State::kNormal; last_toggling_ms_ = now_ms; - LOG(LS_INFO) << "Actual CPU overuse measurements in effect."; + RTC_LOG(LS_INFO) << "Actual CPU overuse measurements in effect."; } break; } @@ -283,13 +284,14 @@ OveruseFrameDetector::CreateSendProcessingUsage( instance.reset(new OverdoseInjector( options, normal_period_ms, overuse_period_ms, underuse_period_ms)); } else { - LOG(LS_WARNING) + RTC_LOG(LS_WARNING) << "Invalid (non-positive) normal/overuse/underuse periods: " << normal_period_ms << " / " << overuse_period_ms << " / " << underuse_period_ms; } } else { - LOG(LS_WARNING) << "Malformed toggling interval: " << toggling_interval; + RTC_LOG(LS_WARNING) << "Malformed toggling interval: " + << toggling_interval; } } @@ -531,10 +533,10 @@ void OveruseFrameDetector::CheckForOveruse() { int rampup_delay = in_quick_rampup_ ? kQuickRampUpDelayMs : current_rampup_delay_ms_; - LOG(LS_VERBOSE) << " Frame stats: " - << " encode usage " << metrics_->encode_usage_percent - << " overuse detections " << num_overuse_detections_ - << " rampup delay " << rampup_delay; + RTC_LOG(LS_VERBOSE) << " Frame stats: " + << " encode usage " << metrics_->encode_usage_percent + << " overuse detections " << num_overuse_detections_ + << " rampup delay " << rampup_delay; } bool OveruseFrameDetector::IsOverusing(const CpuOveruseMetrics& metrics) { |