| OLD | NEW |
| 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 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| 11 #include "base/time/time.h" | |
| 12 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 13 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" | 12 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" |
| 14 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" | 13 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" |
| 15 | 14 |
| 16 namespace webrtc { | 15 namespace webrtc { |
| 17 | 16 |
| 18 class AudioFrame; | 17 class AudioFrame; |
| 19 class AudioProcessing; | 18 class AudioProcessing; |
| 20 class MediaConstraintsInterface; | 19 class MediaConstraintsInterface; |
| 21 class TypingDetection; | 20 class TypingDetection; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 bool default_audio_processing_constraint_value_; | 85 bool default_audio_processing_constraint_value_; |
| 87 }; | 86 }; |
| 88 | 87 |
| 89 // A helper class to log echo information in general and Echo Cancellation | 88 // A helper class to log echo information in general and Echo Cancellation |
| 90 // quality in particular. | 89 // quality in particular. |
| 91 class CONTENT_EXPORT EchoInformation { | 90 class CONTENT_EXPORT EchoInformation { |
| 92 public: | 91 public: |
| 93 EchoInformation(); | 92 EchoInformation(); |
| 94 virtual ~EchoInformation(); | 93 virtual ~EchoInformation(); |
| 95 | 94 |
| 96 // Updates delay statistics with a new |delay|. | 95 void UpdateAecDelayStats(AudioProcessing* audio_processing); |
| 97 void UpdateAecDelayStats(int delay); | |
| 98 | 96 |
| 99 private: | 97 private: |
| 100 // Updates UMA histograms with an interval of |kTimeBetweenLogsInSeconds|. | 98 // Updates UMA histograms with an interval of 5 seconds. |
| 101 void LogAecDelayStats(); | 99 void LogAecDelayStats(); |
| 102 | 100 |
| 103 // Counters for determining how often the estimated delay in the AEC is out of | 101 // Counters to be able to aquire a 5 second aggregated metric out of 1 second |
| 104 // bounds. | 102 // aggregated webrtc::EchoCancellation::GetEchoDelayMetrics() queries. |
| 105 int echo_poor_delay_counts_; | 103 int num_chunks_; |
| 106 int echo_total_delay_counts_; | 104 int num_queries_; |
| 107 base::TimeTicks last_log_time_; | 105 float echo_fraction_poor_delays_; |
| 108 | 106 |
| 109 DISALLOW_COPY_AND_ASSIGN(EchoInformation); | 107 DISALLOW_COPY_AND_ASSIGN(EchoInformation); |
| 110 }; | 108 }; |
| 111 | 109 |
| 112 // Enables the echo cancellation in |audio_processing|. | 110 // Enables the echo cancellation in |audio_processing|. |
| 113 void EnableEchoCancellation(AudioProcessing* audio_processing); | 111 void EnableEchoCancellation(AudioProcessing* audio_processing); |
| 114 | 112 |
| 115 // Enables the noise suppression in |audio_processing|. | 113 // Enables the noise suppression in |audio_processing|. |
| 116 void EnableNoiseSuppression(AudioProcessing* audio_processing); | 114 void EnableNoiseSuppression(AudioProcessing* audio_processing); |
| 117 | 115 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 132 void StopEchoCancellationDump(AudioProcessing* audio_processing); | 130 void StopEchoCancellationDump(AudioProcessing* audio_processing); |
| 133 | 131 |
| 134 void EnableAutomaticGainControl(AudioProcessing* audio_processing); | 132 void EnableAutomaticGainControl(AudioProcessing* audio_processing); |
| 135 | 133 |
| 136 void GetAecStats(AudioProcessing* audio_processing, | 134 void GetAecStats(AudioProcessing* audio_processing, |
| 137 webrtc::AudioProcessorInterface::AudioProcessorStats* stats); | 135 webrtc::AudioProcessorInterface::AudioProcessorStats* stats); |
| 138 | 136 |
| 139 } // namespace content | 137 } // namespace content |
| 140 | 138 |
| 141 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ | 139 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ |
| OLD | NEW |