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

Side by Side Diff: content/renderer/media/media_stream_audio_processor.h

Issue 169803003: Adding typing detection to the APM in chrome. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: addressed the comments. Created 6 years, 10 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 #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/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "media/base/audio_converter.h" 13 #include "media/base/audio_converter.h"
14 #include "third_party/webrtc/modules/audio_processing/include/audio_processing.h " 14 #include "third_party/webrtc/modules/audio_processing/include/audio_processing.h "
15 #include "third_party/webrtc/modules/interface/module_common_types.h" 15 #include "third_party/webrtc/modules/interface/module_common_types.h"
16 16
17 namespace blink { 17 namespace blink {
18 class WebMediaConstraints; 18 class WebMediaConstraints;
19 } 19 }
20 20
21 namespace media { 21 namespace media {
22 class AudioBus; 22 class AudioBus;
23 class AudioFifo; 23 class AudioFifo;
24 class AudioParameters; 24 class AudioParameters;
25 } // namespace media 25 } // namespace media
26 26
27 namespace webrtc { 27 namespace webrtc {
28 class AudioFrame; 28 class AudioFrame;
29 class TypingDetection;
29 } 30 }
30 31
31 namespace content { 32 namespace content {
32 33
33 class RTCMediaConstraints; 34 class RTCMediaConstraints;
34 35
35 // This class owns an object of webrtc::AudioProcessing which contains signal 36 // This class owns an object of webrtc::AudioProcessing which contains signal
36 // processing components like AGC, AEC and NS. It enables the components based 37 // processing components like AGC, AEC and NS. It enables the components based
37 // on the getUserMedia constraints, processes the data and outputs it in a unit 38 // on the getUserMedia constraints, processes the data and outputs it in a unit
38 // of 10 ms data chunk. 39 // of 10 ms data chunk.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 base::ThreadChecker main_thread_checker_; 148 base::ThreadChecker main_thread_checker_;
148 149
149 // Used to DCHECK that some methods are called on the capture audio thread. 150 // Used to DCHECK that some methods are called on the capture audio thread.
150 base::ThreadChecker capture_thread_checker_; 151 base::ThreadChecker capture_thread_checker_;
151 152
152 // Used to DCHECK that PushRenderData() is called on the render audio thread. 153 // Used to DCHECK that PushRenderData() is called on the render audio thread.
153 base::ThreadChecker render_thread_checker_; 154 base::ThreadChecker render_thread_checker_;
154 155
155 // Flag to enable the stereo channels mirroring. 156 // Flag to enable the stereo channels mirroring.
156 bool audio_mirroring_; 157 bool audio_mirroring_;
158
159 // Used by the typing detection.
160 scoped_ptr<webrtc::TypingDetection> typing_detector_;
161
162 // Result from the typing detection.
163 bool typing_detected_;
157 }; 164 };
158 165
159 } // namespace content 166 } // namespace content
160 167
161 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ 168 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698