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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // This class owns an object of webrtc::AudioProcessing which contains signal | 44 // This class owns an object of webrtc::AudioProcessing which contains signal |
45 // processing components like AGC, AEC and NS. It enables the components based | 45 // processing components like AGC, AEC and NS. It enables the components based |
46 // on the getUserMedia constraints, processes the data and outputs it in a unit | 46 // on the getUserMedia constraints, processes the data and outputs it in a unit |
47 // of 10 ms data chunk. | 47 // of 10 ms data chunk. |
48 class CONTENT_EXPORT MediaStreamAudioProcessor : | 48 class CONTENT_EXPORT MediaStreamAudioProcessor : |
49 NON_EXPORTED_BASE(public WebRtcPlayoutDataSource::Sink), | 49 NON_EXPORTED_BASE(public WebRtcPlayoutDataSource::Sink), |
50 NON_EXPORTED_BASE(public AudioProcessorInterface), | 50 NON_EXPORTED_BASE(public AudioProcessorInterface), |
51 NON_EXPORTED_BASE(public AecDumpMessageFilter::AecDumpDelegate) { | 51 NON_EXPORTED_BASE(public AecDumpMessageFilter::AecDumpDelegate) { |
52 public: | 52 public: |
53 // Returns false if |kDisableAudioTrackProcessing| is set to true, otherwise | |
54 // returns true. | |
55 static bool IsAudioTrackProcessingEnabled(); | |
56 | |
57 // |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 |
58 // 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, |
59 // |playout_data_source| won't be used. | 55 // |playout_data_source| won't be used. |
60 MediaStreamAudioProcessor(const blink::WebMediaConstraints& constraints, | 56 MediaStreamAudioProcessor(const blink::WebMediaConstraints& constraints, |
61 int effects, | 57 int effects, |
62 WebRtcPlayoutDataSource* playout_data_source); | 58 WebRtcPlayoutDataSource* playout_data_source); |
63 | 59 |
64 // Called when the format of the capture data has changed. | 60 // Called when the format of the capture data has changed. |
65 // Called on the main render thread. The caller is responsible for stopping | 61 // Called on the main render thread. The caller is responsible for stopping |
66 // the capture thread before calling this method. | 62 // the capture thread before calling this method. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // Communication with browser for AEC dump. | 196 // Communication with browser for AEC dump. |
201 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_; | 197 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_; |
202 | 198 |
203 // Flag to avoid executing Stop() more than once. | 199 // Flag to avoid executing Stop() more than once. |
204 bool stopped_; | 200 bool stopped_; |
205 }; | 201 }; |
206 | 202 |
207 } // namespace content | 203 } // namespace content |
208 | 204 |
209 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ | 205 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ |
OLD | NEW |