Chromium Code Reviews| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 class CONTENT_EXPORT WebRtcAudioDeviceImpl | 204 class CONTENT_EXPORT WebRtcAudioDeviceImpl |
| 205 : NON_EXPORTED_BASE(public webrtc::AudioDeviceModule), | 205 : NON_EXPORTED_BASE(public webrtc::AudioDeviceModule), |
| 206 NON_EXPORTED_BASE(public media::AudioRendererSink::RenderCallback), | 206 NON_EXPORTED_BASE(public media::AudioRendererSink::RenderCallback), |
| 207 NON_EXPORTED_BASE(public media::AudioInputDevice::CaptureCallback), | 207 NON_EXPORTED_BASE(public media::AudioInputDevice::CaptureCallback), |
| 208 NON_EXPORTED_BASE(public media::AudioInputDevice::CaptureEventHandler) { | 208 NON_EXPORTED_BASE(public media::AudioInputDevice::CaptureEventHandler) { |
| 209 public: | 209 public: |
| 210 // Methods called on main render thread. | 210 // Methods called on main render thread. |
| 211 WebRtcAudioDeviceImpl(); | 211 explicit WebRtcAudioDeviceImpl(int render_view_id); |
| 212 | 212 |
| 213 // webrtc::RefCountedModule implementation. | 213 // webrtc::RefCountedModule implementation. |
| 214 // The creator must call AddRef() after construction and use Release() | 214 // The creator must call AddRef() after construction and use Release() |
| 215 // to release the reference and delete this object. | 215 // to release the reference and delete this object. |
| 216 virtual int32_t AddRef() OVERRIDE; | 216 virtual int32_t AddRef() OVERRIDE; |
| 217 virtual int32_t Release() OVERRIDE; | 217 virtual int32_t Release() OVERRIDE; |
| 218 | 218 |
| 219 // media::AudioRendererSink::RenderCallback implementation. | 219 // media::AudioRendererSink::RenderCallback implementation. |
| 220 virtual int Render(media::AudioBus* audio_bus, | 220 virtual int Render(media::AudioBus* audio_bus, |
| 221 int audio_delay_milliseconds) OVERRIDE; | 221 int audio_delay_milliseconds) OVERRIDE; |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 438 bool playing_; | 438 bool playing_; |
| 439 bool recording_; | 439 bool recording_; |
| 440 | 440 |
| 441 // Local copy of the current Automatic Gain Control state. | 441 // Local copy of the current Automatic Gain Control state. |
| 442 bool agc_is_enabled_; | 442 bool agc_is_enabled_; |
| 443 | 443 |
| 444 // Used for histograms of total recording and playout times. | 444 // Used for histograms of total recording and playout times. |
| 445 base::Time start_capture_time_; | 445 base::Time start_capture_time_; |
| 446 base::Time start_render_time_; | 446 base::Time start_render_time_; |
| 447 | 447 |
| 448 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); | 448 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioDeviceImpl); |
|
jamesr
2012/10/29 22:51:02
why are you changing these? The style guide seems
| |
| 449 }; | 449 }; |
| 450 | 450 |
| 451 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 451 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| OLD | NEW |