| 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 #include <vector> | |
| 10 | 9 |
| 11 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 13 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/message_loop_proxy.h" | 14 #include "base/message_loop_proxy.h" |
| 16 #include "base/time.h" | 15 #include "base/time.h" |
| 17 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 18 #include "media/audio/audio_input_device.h" | 17 #include "media/audio/audio_input_device.h" |
| 19 #include "media/base/audio_renderer_sink.h" | 18 #include "media/base/audio_renderer_sink.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // Methods called on main render thread. | 210 // Methods called on main render thread. |
| 212 WebRtcAudioDeviceImpl(); | 211 WebRtcAudioDeviceImpl(); |
| 213 | 212 |
| 214 // webrtc::RefCountedModule implementation. | 213 // webrtc::RefCountedModule implementation. |
| 215 // The creator must call AddRef() after construction and use Release() | 214 // The creator must call AddRef() after construction and use Release() |
| 216 // to release the reference and delete this object. | 215 // to release the reference and delete this object. |
| 217 virtual int32_t AddRef() OVERRIDE; | 216 virtual int32_t AddRef() OVERRIDE; |
| 218 virtual int32_t Release() OVERRIDE; | 217 virtual int32_t Release() OVERRIDE; |
| 219 | 218 |
| 220 // media::AudioRendererSink::RenderCallback implementation. | 219 // media::AudioRendererSink::RenderCallback implementation. |
| 221 virtual int Render(const std::vector<float*>& audio_data, | 220 virtual int Render(media::AudioBus* audio_bus, |
| 222 int number_of_frames, | 221 int number_of_frames, |
| 223 int audio_delay_milliseconds) OVERRIDE; | 222 int audio_delay_milliseconds) OVERRIDE; |
| 224 virtual void OnRenderError() OVERRIDE; | 223 virtual void OnRenderError() OVERRIDE; |
| 225 | 224 |
| 226 // AudioInputDevice::CaptureCallback implementation. | 225 // AudioInputDevice::CaptureCallback implementation. |
| 227 virtual void Capture(const std::vector<float*>& audio_data, | 226 virtual void Capture(media::AudioBus* audio_bus, |
| 228 int number_of_frames, | 227 int number_of_frames, |
| 229 int audio_delay_milliseconds, | 228 int audio_delay_milliseconds, |
| 230 double volume) OVERRIDE; | 229 double volume) OVERRIDE; |
| 231 virtual void OnCaptureError() OVERRIDE; | 230 virtual void OnCaptureError() OVERRIDE; |
| 232 | 231 |
| 233 // AudioInputDevice::CaptureEventHandler implementation. | 232 // AudioInputDevice::CaptureEventHandler implementation. |
| 234 virtual void OnDeviceStarted(const std::string& device_id) OVERRIDE; | 233 virtual void OnDeviceStarted(const std::string& device_id) OVERRIDE; |
| 235 virtual void OnDeviceStopped() OVERRIDE; | 234 virtual void OnDeviceStopped() OVERRIDE; |
| 236 | 235 |
| 237 // webrtc::Module implementation. | 236 // webrtc::Module implementation. |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 bool agc_is_enabled_; | 444 bool agc_is_enabled_; |
| 446 | 445 |
| 447 // Used for histograms of total recording and playout times. | 446 // Used for histograms of total recording and playout times. |
| 448 base::Time start_capture_time_; | 447 base::Time start_capture_time_; |
| 449 base::Time start_render_time_; | 448 base::Time start_render_time_; |
| 450 | 449 |
| 451 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); | 450 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); |
| 452 }; | 451 }; |
| 453 | 452 |
| 454 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 453 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| OLD | NEW |