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

Side by Side Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 11783059: Ensures that WebRTC works for device selection using a different sample rate than default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed content_unittests Created 7 years, 11 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 | Annotate | Revision Log
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/browser/renderer_host/media/media_stream_manager.h" 5 #include "content/browser/renderer_host/media/media_stream_manager.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (media_observer == NULL) 103 if (media_observer == NULL)
104 return; 104 return;
105 105
106 // If we appended a device_id scheme, we want to remove it when notifying 106 // If we appended a device_id scheme, we want to remove it when notifying
107 // observers which may be in different modules since this scheme is only 107 // observers which may be in different modules since this scheme is only
108 // used internally within the content module. 108 // used internally within the content module.
109 std::string device_id = 109 std::string device_id =
110 WebContentsCaptureUtil::StripWebContentsDeviceScheme( 110 WebContentsCaptureUtil::StripWebContentsDeviceScheme(
111 requested_device_id); 111 requested_device_id);
112 112
113 // TODO(henrika): possibly add new sample rate and channel configuration
114 // here as well. See AudioInputDeviceManager::EnumerateOnDeviceThread()
115 // for details.
113 media_observer->OnMediaRequestStateChanged( 116 media_observer->OnMediaRequestStateChanged(
114 render_process_id, render_view_id, 117 render_process_id, render_view_id,
115 MediaStreamDevice( 118 MediaStreamDevice(
116 stream_type, device_id, device_id), new_state); 119 stream_type, device_id, device_id), new_state);
117 } 120 }
118 121
119 MediaRequestState state(MediaStreamType stream_type) const { 122 MediaRequestState state(MediaStreamType stream_type) const {
120 return state_[stream_type]; 123 return state_[stream_type];
121 } 124 }
122 125
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 } 1096 }
1094 1097
1095 // Always do enumeration even though some enumeration is in progress, 1098 // Always do enumeration even though some enumeration is in progress,
1096 // because those enumeration commands could be sent before these devices 1099 // because those enumeration commands could be sent before these devices
1097 // change. 1100 // change.
1098 ++active_enumeration_ref_count_[stream_type]; 1101 ++active_enumeration_ref_count_[stream_type];
1099 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); 1102 GetDeviceManager(stream_type)->EnumerateDevices(stream_type);
1100 } 1103 }
1101 1104
1102 } // namespace content 1105 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698