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_audio_capturer.h" | 5 #include "content/renderer/media/webrtc_audio_capturer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "content/common/child_process.h" | 11 #include "content/common/child_process.h" |
12 #include "content/renderer/media/audio_device_factory.h" | 12 #include "content/renderer/media/audio_device_factory.h" |
13 #include "content/renderer/media/audio_hardware.h" | |
14 #include "content/renderer/media/webrtc_audio_device_impl.h" | 13 #include "content/renderer/media/webrtc_audio_device_impl.h" |
15 #include "content/renderer/media/webrtc_local_audio_renderer.h" | 14 #include "content/renderer/media/webrtc_local_audio_renderer.h" |
16 #include "media/audio/audio_util.h" | 15 #include "media/audio/audio_util.h" |
17 #include "media/audio/sample_rates.h" | 16 #include "media/audio/sample_rates.h" |
18 | 17 |
19 namespace content { | 18 namespace content { |
20 | 19 |
21 // Supported hardware sample rates for input and output sides. | 20 // Supported hardware sample rates for input and output sides. |
22 #if defined(OS_WIN) || defined(OS_MACOSX) | 21 #if defined(OS_WIN) || defined(OS_MACOSX) |
23 // media::GetAudioInputHardwareSampleRate() asks the audio layer | 22 // media::GetAudioInputHardwareSampleRate() asks the audio layer |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 // Inform the local renderer about the stopped device. | 417 // Inform the local renderer about the stopped device. |
419 // The renderer can then save resources by not asking for more data from | 418 // The renderer can then save resources by not asking for more data from |
420 // the stopped source. We are on the IO thread but the callback task will | 419 // the stopped source. We are on the IO thread but the callback task will |
421 // be posted on the message loop of the main render thread thanks to | 420 // be posted on the message loop of the main render thread thanks to |
422 // usage of BindToLoop() when the callback was initialized. | 421 // usage of BindToLoop() when the callback was initialized. |
423 if (!on_device_stopped_cb_.is_null()) | 422 if (!on_device_stopped_cb_.is_null()) |
424 on_device_stopped_cb_.Run(); | 423 on_device_stopped_cb_.Run(); |
425 } | 424 } |
426 | 425 |
427 } // namespace content | 426 } // namespace content |
OLD | NEW |