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/media_stream_dependency_factory.h" | 5 #include "content/renderer/media/media_stream_dependency_factory.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 // If the default capturer does not exist or |render_view_id| == -1, create | 808 // If the default capturer does not exist or |render_view_id| == -1, create |
809 // a new capturer. | 809 // a new capturer. |
810 bool is_new_capturer = false; | 810 bool is_new_capturer = false; |
811 if (!capturer.get()) { | 811 if (!capturer.get()) { |
812 capturer = WebRtcAudioCapturer::CreateCapturer(); | 812 capturer = WebRtcAudioCapturer::CreateCapturer(); |
813 is_new_capturer = true; | 813 is_new_capturer = true; |
814 } | 814 } |
815 | 815 |
816 if (!capturer->Initialize( | 816 if (!capturer->Initialize( |
817 render_view_id, | 817 render_view_id, |
818 static_cast<media::ChannelLayout>(device_info.device.channel_layout), | 818 static_cast<media::ChannelLayout>( |
819 device_info.device.sample_rate, device_info.session_id, | 819 device_info.device.input.channel_layout), |
| 820 device_info.device.input.sample_rate, |
| 821 device_info.session_id, |
820 device_info.device.id)) { | 822 device_info.device.id)) { |
821 return NULL; | 823 return NULL; |
822 } | 824 } |
823 | 825 |
824 // Add the capturer to the WebRtcAudioDeviceImpl if it is a new capturer. | 826 // Add the capturer to the WebRtcAudioDeviceImpl if it is a new capturer. |
825 if (is_new_capturer) | 827 if (is_new_capturer) |
826 GetWebRtcAudioDevice()->AddAudioCapturer(capturer); | 828 GetWebRtcAudioDevice()->AddAudioCapturer(capturer); |
827 | 829 |
828 return capturer; | 830 return capturer; |
829 } | 831 } |
830 | 832 |
831 } // namespace content | 833 } // namespace content |
OLD | NEW |