Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(833)

Side by Side Diff: content/renderer/media/media_stream_dependency_factory.cc

Issue 23731007: Implicit audio output device selection for getUserMedia. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/public/common/media_stream_request.cc ('k') | content/renderer/media/media_stream_dependency_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698