| 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_DEVICE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // | 194 // |
| 195 // - This class must be created on the main render thread. | 195 // - This class must be created on the main render thread. |
| 196 // - The webrtc::AudioDeviceModule is reference counted. | 196 // - The webrtc::AudioDeviceModule is reference counted. |
| 197 // - AGC is only supported in combination with the WASAPI-based audio layer | 197 // - AGC is only supported in combination with the WASAPI-based audio layer |
| 198 // on Windows, i.e., it is not supported on Windows XP. | 198 // on Windows, i.e., it is not supported on Windows XP. |
| 199 // - All volume levels required for the AGC scheme are transfered in a | 199 // - All volume levels required for the AGC scheme are transfered in a |
| 200 // normalized range [0.0, 1.0]. Scaling takes place in both endpoints | 200 // normalized range [0.0, 1.0]. Scaling takes place in both endpoints |
| 201 // (WebRTC client a media layer). This approach ensures that we can avoid | 201 // (WebRTC client a media layer). This approach ensures that we can avoid |
| 202 // transferring maximum levels between the renderer and the browser. | 202 // transferring maximum levels between the renderer and the browser. |
| 203 // | 203 // |
| 204 |
| 205 namespace content { |
| 206 |
| 204 class CONTENT_EXPORT WebRtcAudioDeviceImpl | 207 class CONTENT_EXPORT WebRtcAudioDeviceImpl |
| 205 : NON_EXPORTED_BASE(public webrtc::AudioDeviceModule), | 208 : NON_EXPORTED_BASE(public webrtc::AudioDeviceModule), |
| 206 NON_EXPORTED_BASE(public media::AudioRendererSink::RenderCallback), | 209 NON_EXPORTED_BASE(public media::AudioRendererSink::RenderCallback), |
| 207 NON_EXPORTED_BASE(public media::AudioInputDevice::CaptureCallback), | 210 NON_EXPORTED_BASE(public media::AudioInputDevice::CaptureCallback), |
| 208 NON_EXPORTED_BASE(public media::AudioInputDevice::CaptureEventHandler) { | 211 NON_EXPORTED_BASE(public media::AudioInputDevice::CaptureEventHandler) { |
| 209 public: | 212 public: |
| 210 // Methods called on main render thread. | 213 // Methods called on main render thread. |
| 211 WebRtcAudioDeviceImpl(); | 214 WebRtcAudioDeviceImpl(); |
| 212 | 215 |
| 213 // webrtc::RefCountedModule implementation. | 216 // webrtc::RefCountedModule implementation. |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 // Local copy of the current Automatic Gain Control state. | 444 // Local copy of the current Automatic Gain Control state. |
| 442 bool agc_is_enabled_; | 445 bool agc_is_enabled_; |
| 443 | 446 |
| 444 // Used for histograms of total recording and playout times. | 447 // Used for histograms of total recording and playout times. |
| 445 base::Time start_capture_time_; | 448 base::Time start_capture_time_; |
| 446 base::Time start_render_time_; | 449 base::Time start_render_time_; |
| 447 | 450 |
| 448 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); | 451 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); |
| 449 }; | 452 }; |
| 450 | 453 |
| 454 } // namespace content |
| 455 |
| 451 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 456 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| OLD | NEW |