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

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

Issue 816193003: Add a new audio constraint, 'googHotword', that requests the hotword input (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. 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
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 { MediaAudioConstraints::kGoogExperimentalAutoGainControl, true }, 60 { MediaAudioConstraints::kGoogExperimentalAutoGainControl, true },
61 { MediaAudioConstraints::kGoogNoiseSuppression, true }, 61 { MediaAudioConstraints::kGoogNoiseSuppression, true },
62 { MediaAudioConstraints::kGoogHighpassFilter, true }, 62 { MediaAudioConstraints::kGoogHighpassFilter, true },
63 { MediaAudioConstraints::kGoogTypingNoiseDetection, true }, 63 { MediaAudioConstraints::kGoogTypingNoiseDetection, true },
64 { MediaAudioConstraints::kGoogExperimentalNoiseSuppression, false }, 64 { MediaAudioConstraints::kGoogExperimentalNoiseSuppression, false },
65 #if defined(OS_WIN) 65 #if defined(OS_WIN)
66 { kMediaStreamAudioDucking, true }, 66 { kMediaStreamAudioDucking, true },
67 #else 67 #else
68 { kMediaStreamAudioDucking, false }, 68 { kMediaStreamAudioDucking, false },
69 #endif 69 #endif
70 { kMediaStreamAudioHotword, false },
70 }; 71 };
71 72
72 bool IsAudioProcessingConstraint(const std::string& key) { 73 bool IsAudioProcessingConstraint(const std::string& key) {
73 // |kMediaStreamAudioDucking| does not require audio processing. 74 // |kMediaStreamAudioDucking| does not require audio processing.
74 return key != kMediaStreamAudioDucking; 75 return key != kMediaStreamAudioDucking;
75 } 76 }
76 77
77 // Used to log echo quality based on delay estimates. 78 // Used to log echo quality based on delay estimates.
78 enum DelayBasedEchoQuality { 79 enum DelayBasedEchoQuality {
79 DELAY_BASED_ECHO_QUALITY_GOOD = 0, 80 DELAY_BASED_ECHO_QUALITY_GOOD = 0,
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 368 }
368 369
369 int median = 0, std = 0; 370 int median = 0, std = 0;
370 if (!audio_processing->echo_cancellation()->GetDelayMetrics(&median, &std)) { 371 if (!audio_processing->echo_cancellation()->GetDelayMetrics(&median, &std)) {
371 stats->echo_delay_median_ms = median; 372 stats->echo_delay_median_ms = median;
372 stats->echo_delay_std_ms = std; 373 stats->echo_delay_std_ms = std;
373 } 374 }
374 } 375 }
375 376
376 } // namespace content 377 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698