OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEBRTC_AUDIO_CAPTURER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
15 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "content/common/media/media_stream_options.h" | 17 #include "content/common/media/media_stream_options.h" |
18 #include "content/renderer/media/tagged_list.h" | 18 #include "content/renderer/media/tagged_list.h" |
19 #include "media/audio/audio_input_device.h" | 19 #include "media/audio/audio_input_device.h" |
| 20 #include "media/audio/audio_power_monitor.h" |
20 #include "media/base/audio_capturer_source.h" | 21 #include "media/base/audio_capturer_source.h" |
21 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" | 22 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" |
22 | 23 |
23 namespace media { | 24 namespace media { |
24 class AudioBus; | 25 class AudioBus; |
25 } | 26 } |
26 | 27 |
27 namespace content { | 28 namespace content { |
28 | 29 |
29 class MediaStreamAudioProcessor; | 30 class MediaStreamAudioProcessor; |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 base::TimeDelta audio_delay_; | 201 base::TimeDelta audio_delay_; |
201 bool key_pressed_; | 202 bool key_pressed_; |
202 | 203 |
203 // Flag to help deciding if the data needs audio processing. | 204 // Flag to help deciding if the data needs audio processing. |
204 bool need_audio_processing_; | 205 bool need_audio_processing_; |
205 | 206 |
206 // Raw pointer to the WebRtcAudioDeviceImpl, which is valid for the lifetime | 207 // Raw pointer to the WebRtcAudioDeviceImpl, which is valid for the lifetime |
207 // of RenderThread. | 208 // of RenderThread. |
208 WebRtcAudioDeviceImpl* audio_device_; | 209 WebRtcAudioDeviceImpl* audio_device_; |
209 | 210 |
| 211 // Audio power monitor for logging audio power level. |
| 212 media::AudioPowerMonitor audio_power_monitor_; |
| 213 |
| 214 // Records when the last time audio power level is logged. |
| 215 base::TimeTicks last_audio_level_log_time_; |
| 216 |
210 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); | 217 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturer); |
211 }; | 218 }; |
212 | 219 |
213 } // namespace content | 220 } // namespace content |
214 | 221 |
215 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ | 222 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_ |
OLD | NEW |