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

Side by Side Diff: content/renderer/media/media_stream_audio_processor_options.cc

Issue 867233002: UMA histogram: Corrects misspelled histogram name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | 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 "content/renderer/media/media_stream_audio_processor_options.h" 5 #include "content/renderer/media/media_stream_audio_processor_options.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 if (time_since_last_log.InSeconds() < kTimeBetweenLogsInSeconds) 246 if (time_since_last_log.InSeconds() < kTimeBetweenLogsInSeconds)
247 return; 247 return;
248 248
249 // Calculate how frequent the AEC delay was out of bounds since last time we 249 // Calculate how frequent the AEC delay was out of bounds since last time we
250 // updated UMA histograms. Then store the result into one of three histogram 250 // updated UMA histograms. Then store the result into one of three histogram
251 // buckets; see DelayBasedEchoQuality. 251 // buckets; see DelayBasedEchoQuality.
252 float poor_delay_frequency = 0.f; 252 float poor_delay_frequency = 0.f;
253 if (echo_total_delay_counts_ > 0) { 253 if (echo_total_delay_counts_ > 0) {
254 poor_delay_frequency = static_cast<float>(echo_poor_delay_counts_) / 254 poor_delay_frequency = static_cast<float>(echo_poor_delay_counts_) /
255 static_cast<float>(echo_total_delay_counts_); 255 static_cast<float>(echo_total_delay_counts_);
256 UMA_HISTOGRAM_ENUMERATION("Media.AecDelayBasedQuality", 256 UMA_HISTOGRAM_ENUMERATION("WebRTC.AecDelayBasedQuality",
257 EchoDelayFrequencyToQuality(poor_delay_frequency), 257 EchoDelayFrequencyToQuality(poor_delay_frequency),
258 DELAY_BASED_ECHO_QUALITY_MAX); 258 DELAY_BASED_ECHO_QUALITY_MAX);
259 } 259 }
260 echo_poor_delay_counts_ = 0; 260 echo_poor_delay_counts_ = 0;
261 echo_total_delay_counts_ = 0; 261 echo_total_delay_counts_ = 0;
262 last_log_time_ = base::TimeTicks::Now(); 262 last_log_time_ = base::TimeTicks::Now();
263 } 263 }
264 264
265 void EnableEchoCancellation(AudioProcessing* audio_processing) { 265 void EnableEchoCancellation(AudioProcessing* audio_processing) {
266 #if defined(OS_ANDROID) || defined(OS_IOS) 266 #if defined(OS_ANDROID) || defined(OS_IOS)
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 } 370 }
371 371
372 int median = 0, std = 0; 372 int median = 0, std = 0;
373 if (!audio_processing->echo_cancellation()->GetDelayMetrics(&median, &std)) { 373 if (!audio_processing->echo_cancellation()->GetDelayMetrics(&median, &std)) {
374 stats->echo_delay_median_ms = median; 374 stats->echo_delay_median_ms = median;
375 stats->echo_delay_std_ms = std; 375 stats->echo_delay_std_ms = std;
376 } 376 }
377 } 377 }
378 378
379 } // namespace content 379 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698