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/user_media_client_impl.h" | 5 #include "content/renderer/media/user_media_client_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/hash.h" | 9 #include "base/hash.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 options.audio_requested = true; | 153 options.audio_requested = true; |
154 CopyStreamConstraints(user_media_request.audioConstraints(), | 154 CopyStreamConstraints(user_media_request.audioConstraints(), |
155 &options.mandatory_audio, | 155 &options.mandatory_audio, |
156 &options.optional_audio); | 156 &options.optional_audio); |
157 | 157 |
158 // Check if this input device should be used to select a matching output | 158 // Check if this input device should be used to select a matching output |
159 // device for audio rendering. | 159 // device for audio rendering. |
160 std::string enable; | 160 std::string enable; |
161 if (options.GetFirstAudioConstraintByName( | 161 if (options.GetFirstAudioConstraintByName( |
162 kMediaStreamRenderToAssociatedSink, &enable, NULL) && | 162 kMediaStreamRenderToAssociatedSink, &enable, NULL) && |
163 LowerCaseEqualsASCII(enable, "true")) { | 163 base::LowerCaseEqualsASCII(enable, "true")) { |
164 enable_automatic_output_device_selection = true; | 164 enable_automatic_output_device_selection = true; |
165 } | 165 } |
166 } | 166 } |
167 if (user_media_request.video()) { | 167 if (user_media_request.video()) { |
168 options.video_requested = true; | 168 options.video_requested = true; |
169 CopyStreamConstraints(user_media_request.videoConstraints(), | 169 CopyStreamConstraints(user_media_request.videoConstraints(), |
170 &options.mandatory_video, | 170 &options.mandatory_video, |
171 &options.optional_video); | 171 &options.optional_video); |
172 } | 172 } |
173 | 173 |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 return; | 1088 return; |
1089 } | 1089 } |
1090 } | 1090 } |
1091 } | 1091 } |
1092 | 1092 |
1093 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { | 1093 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { |
1094 return !sources_waiting_for_callback_.empty(); | 1094 return !sources_waiting_for_callback_.empty(); |
1095 } | 1095 } |
1096 | 1096 |
1097 } // namespace content | 1097 } // namespace content |
OLD | NEW |