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 #include "content/renderer/media/webrtc_local_audio_renderer.h" | 5 #include "content/renderer/media/webrtc_local_audio_renderer.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
11 #include "content/renderer/media/audio_device_factory.h" | 11 #include "content/renderer/media/audio_device_factory.h" |
12 #include "content/renderer/media/webrtc_audio_capturer.h" | 12 #include "content/renderer/media/webrtc_audio_capturer.h" |
13 #include "media/audio/audio_output_device.h" | 13 #include "media/audio/audio_output_device.h" |
14 #include "media/base/audio_bus.h" | 14 #include "media/base/audio_bus.h" |
| 15 #include "media/base/audio_fifo.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 // media::AudioRendererSink::RenderCallback implementation | 19 // media::AudioRendererSink::RenderCallback implementation |
19 int WebRtcLocalAudioRenderer::Render( | 20 int WebRtcLocalAudioRenderer::Render( |
20 media::AudioBus* audio_bus, int audio_delay_milliseconds) { | 21 media::AudioBus* audio_bus, int audio_delay_milliseconds) { |
21 base::AutoLock auto_lock(thread_lock_); | 22 base::AutoLock auto_lock(thread_lock_); |
22 | 23 |
23 if (!playing_) { | 24 if (!playing_) { |
24 audio_bus->Zero(); | 25 audio_bus->Zero(); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 if (!sink_) | 218 if (!sink_) |
218 return base::TimeDelta(); | 219 return base::TimeDelta(); |
219 return total_render_time(); | 220 return total_render_time(); |
220 } | 221 } |
221 | 222 |
222 bool WebRtcLocalAudioRenderer::IsLocalRenderer() const { | 223 bool WebRtcLocalAudioRenderer::IsLocalRenderer() const { |
223 return true; | 224 return true; |
224 } | 225 } |
225 | 226 |
226 } // namespace content | 227 } // namespace content |
OLD | NEW |