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

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

Issue 1357013006: Add detection for repeated audio in capturing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: some small changes Created 5 years, 2 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/files/file.h" 9 #include "base/files/file.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/synchronization/lock.h" 11 #include "base/synchronization/lock.h"
12 #include "base/threading/thread_checker.h" 12 #include "base/threading/thread_checker.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/public/common/media_stream_request.h" 15 #include "content/public/common/media_stream_request.h"
16 #include "content/renderer/media/aec_dump_message_filter.h" 16 #include "content/renderer/media/aec_dump_message_filter.h"
17 #include "content/renderer/media/audio_repetition_detector.h"
17 #include "content/renderer/media/webrtc_audio_device_impl.h" 18 #include "content/renderer/media/webrtc_audio_device_impl.h"
18 #include "media/base/audio_converter.h" 19 #include "media/base/audio_converter.h"
19 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" 20 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
20 #include "third_party/webrtc/modules/audio_processing/include/audio_processing.h " 21 #include "third_party/webrtc/modules/audio_processing/include/audio_processing.h "
21 22
22 namespace blink { 23 namespace blink {
23 class WebMediaConstraints; 24 class WebMediaConstraints;
24 } 25 }
25 26
26 namespace media { 27 namespace media {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 int process_frames, 147 int process_frames,
147 base::TimeDelta capture_delay, 148 base::TimeDelta capture_delay,
148 int volume, 149 int volume,
149 bool key_pressed, 150 bool key_pressed,
150 float* const* output_ptrs); 151 float* const* output_ptrs);
151 152
152 // Cached value for the render delay latency. This member is accessed by 153 // Cached value for the render delay latency. This member is accessed by
153 // both the capture audio thread and the render audio thread. 154 // both the capture audio thread and the render audio thread.
154 base::subtle::Atomic32 render_delay_ms_; 155 base::subtle::Atomic32 render_delay_ms_;
155 156
157 // Module to detect and report (to UMA) bit exact audio repetition.
158 scoped_ptr<AudioRepetitionDetector> audio_repetition_detector_;
ajm 2015/09/30 00:23:43 I don't see any reason this needs to use a scoped_
minyue 2015/09/30 19:52:32 good point. I simply followed the momentum of othe
159
156 // Module to handle processing and format conversion. 160 // Module to handle processing and format conversion.
157 scoped_ptr<webrtc::AudioProcessing> audio_processing_; 161 scoped_ptr<webrtc::AudioProcessing> audio_processing_;
158 162
159 // FIFO to provide 10 ms capture chunks. 163 // FIFO to provide 10 ms capture chunks.
160 scoped_ptr<MediaStreamAudioFifo> capture_fifo_; 164 scoped_ptr<MediaStreamAudioFifo> capture_fifo_;
161 // Receives processing output. 165 // Receives processing output.
162 scoped_ptr<MediaStreamAudioBus> output_bus_; 166 scoped_ptr<MediaStreamAudioBus> output_bus_;
163 167
164 // FIFO to provide 10 ms render chunks when the AEC is enabled. 168 // FIFO to provide 10 ms render chunks when the AEC is enabled.
165 scoped_ptr<MediaStreamAudioFifo> render_fifo_; 169 scoped_ptr<MediaStreamAudioFifo> render_fifo_;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // Object for logging echo information when the AEC is enabled. Accessible by 205 // Object for logging echo information when the AEC is enabled. Accessible by
202 // the libjingle thread through GetStats(). 206 // the libjingle thread through GetStats().
203 scoped_ptr<EchoInformation> echo_information_; 207 scoped_ptr<EchoInformation> echo_information_;
204 208
205 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioProcessor); 209 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioProcessor);
206 }; 210 };
207 211
208 } // namespace content 212 } // namespace content
209 213
210 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ 214 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698