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/child/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/webrtc_audio_capturer_sink_owner.h" | 13 #include "content/renderer/media/webrtc_audio_capturer_sink_owner.h" |
14 #include "content/renderer/media/webrtc_audio_device_impl.h" | 14 #include "content/renderer/media/webrtc_audio_device_impl.h" |
15 #include "media/audio/audio_util.h" | 15 #include "media/audio/audio_util.h" |
16 #include "media/audio/sample_rates.h" | 16 #include "media/audio/sample_rates.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 // Supported hardware sample rates for input and output sides. | 20 // Supported hardware sample rates for input and output sides. |
21 #if defined(OS_WIN) || defined(OS_MACOSX) | 21 #if defined(OS_WIN) || defined(OS_MACOSX) |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 } | 367 } |
368 | 368 |
369 media::AudioParameters WebRtcAudioCapturer::audio_parameters() const { | 369 media::AudioParameters WebRtcAudioCapturer::audio_parameters() const { |
370 base::AutoLock auto_lock(lock_); | 370 base::AutoLock auto_lock(lock_); |
371 // |buffer_| can be NULL when SetCapturerSource() or Initialize() has not | 371 // |buffer_| can be NULL when SetCapturerSource() or Initialize() has not |
372 // been called. | 372 // been called. |
373 return buffer_.get() ? buffer_->params() : media::AudioParameters(); | 373 return buffer_.get() ? buffer_->params() : media::AudioParameters(); |
374 } | 374 } |
375 | 375 |
376 } // namespace content | 376 } // namespace content |
OLD | NEW |