| 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_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ |
| 7 | 7 |
| 8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
| 9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 using webrtc::AudioProcessorInterface; | 39 using webrtc::AudioProcessorInterface; |
| 40 | 40 |
| 41 // This class owns an object of webrtc::AudioProcessing which contains signal | 41 // This class owns an object of webrtc::AudioProcessing which contains signal |
| 42 // processing components like AGC, AEC and NS. It enables the components based | 42 // processing components like AGC, AEC and NS. It enables the components based |
| 43 // on the getUserMedia constraints, processes the data and outputs it in a unit | 43 // on the getUserMedia constraints, processes the data and outputs it in a unit |
| 44 // of 10 ms data chunk. | 44 // of 10 ms data chunk. |
| 45 class CONTENT_EXPORT MediaStreamAudioProcessor : | 45 class CONTENT_EXPORT MediaStreamAudioProcessor : |
| 46 NON_EXPORTED_BASE(public WebRtcPlayoutDataSource::Sink), | 46 NON_EXPORTED_BASE(public WebRtcPlayoutDataSource::Sink), |
| 47 NON_EXPORTED_BASE(public AudioProcessorInterface) { | 47 NON_EXPORTED_BASE(public AudioProcessorInterface) { |
| 48 public: | 48 public: |
| 49 // Returns false if |kDisableAudioTrackProcessing| is set to true, otherwise | 49 // Returns true if |kEnableAudioTrackProcessing| is on or if the |
| 50 // returns true. | 50 // |MediaStreamAudioTrackProcessing| finch experiment is enabled. |
| 51 static bool IsAudioTrackProcessingEnabled(); | 51 static bool IsAudioTrackProcessingEnabled(); |
| 52 | 52 |
| 53 // |playout_data_source| is used to register this class as a sink to the | 53 // |playout_data_source| is used to register this class as a sink to the |
| 54 // WebRtc playout data for processing AEC. If clients do not enable AEC, | 54 // WebRtc playout data for processing AEC. If clients do not enable AEC, |
| 55 // |playout_data_source| won't be used. | 55 // |playout_data_source| won't be used. |
| 56 MediaStreamAudioProcessor(const blink::WebMediaConstraints& constraints, | 56 MediaStreamAudioProcessor(const blink::WebMediaConstraints& constraints, |
| 57 int effects, | 57 int effects, |
| 58 WebRtcPlayoutDataSource* playout_data_source); | 58 WebRtcPlayoutDataSource* playout_data_source); |
| 59 | 59 |
| 60 // Called when format of the capture data has changed. | 60 // Called when format of the capture data has changed. |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 // This flag is used to show the result of typing detection. | 190 // This flag is used to show the result of typing detection. |
| 191 // It can be accessed by the capture audio thread and by the libjingle thread | 191 // It can be accessed by the capture audio thread and by the libjingle thread |
| 192 // which calls GetStats(). | 192 // which calls GetStats(). |
| 193 base::subtle::Atomic32 typing_detected_; | 193 base::subtle::Atomic32 typing_detected_; |
| 194 }; | 194 }; |
| 195 | 195 |
| 196 } // namespace content | 196 } // namespace content |
| 197 | 197 |
| 198 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ | 198 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ |
| OLD | NEW |