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> | 9 #include <vector> |
10 | 10 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 public: | 210 public: |
211 // Methods called on main render thread. | 211 // Methods called on main render thread. |
212 WebRtcAudioDeviceImpl(); | 212 WebRtcAudioDeviceImpl(); |
213 | 213 |
214 // webrtc::RefCountedModule implementation. | 214 // webrtc::RefCountedModule implementation. |
215 // The creator must call AddRef() after construction and use Release() | 215 // The creator must call AddRef() after construction and use Release() |
216 // to release the reference and delete this object. | 216 // to release the reference and delete this object. |
217 virtual int32_t AddRef() OVERRIDE; | 217 virtual int32_t AddRef() OVERRIDE; |
218 virtual int32_t Release() OVERRIDE; | 218 virtual int32_t Release() OVERRIDE; |
219 | 219 |
220 // We need this one to support runnable method tasks. | |
221 static bool ImplementsThreadSafeReferenceCounting() { return true; } | |
222 | |
223 // media::AudioRendererSink::RenderCallback implementation. | 220 // media::AudioRendererSink::RenderCallback implementation. |
224 virtual int Render(const std::vector<float*>& audio_data, | 221 virtual int Render(const std::vector<float*>& audio_data, |
225 int number_of_frames, | 222 int number_of_frames, |
226 int audio_delay_milliseconds) OVERRIDE; | 223 int audio_delay_milliseconds) OVERRIDE; |
227 virtual void OnRenderError() OVERRIDE; | 224 virtual void OnRenderError() OVERRIDE; |
228 | 225 |
229 // AudioInputDevice::CaptureCallback implementation. | 226 // AudioInputDevice::CaptureCallback implementation. |
230 virtual void Capture(const std::vector<float*>& audio_data, | 227 virtual void Capture(const std::vector<float*>& audio_data, |
231 int number_of_frames, | 228 int number_of_frames, |
232 int audio_delay_milliseconds, | 229 int audio_delay_milliseconds, |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 bool agc_is_enabled_; | 447 bool agc_is_enabled_; |
451 | 448 |
452 // Used for histograms of total recording and playout times. | 449 // Used for histograms of total recording and playout times. |
453 base::Time start_capture_time_; | 450 base::Time start_capture_time_; |
454 base::Time start_render_time_; | 451 base::Time start_render_time_; |
455 | 452 |
456 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); | 453 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); |
457 }; | 454 }; |
458 | 455 |
459 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 456 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
OLD | NEW |