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_impl.h" | 5 #include "content/renderer/media/media_stream_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/logging.h" | 10 #include "base/logging.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 options.audio_requested = true; | 130 options.audio_requested = true; |
131 CopyStreamConstraints(user_media_request.audioConstraints(), | 131 CopyStreamConstraints(user_media_request.audioConstraints(), |
132 &options.mandatory_audio, | 132 &options.mandatory_audio, |
133 &options.optional_audio); | 133 &options.optional_audio); |
134 | 134 |
135 // Check if this input device should be used to select a matching output | 135 // Check if this input device should be used to select a matching output |
136 // device for audio rendering. | 136 // device for audio rendering. |
137 std::string enable; | 137 std::string enable; |
138 if (options.GetFirstAudioConstraintByName( | 138 if (options.GetFirstAudioConstraintByName( |
139 kMediaStreamRenderToAssociatedSink, &enable, NULL) && | 139 kMediaStreamRenderToAssociatedSink, &enable, NULL) && |
140 LowerCaseEqualsASCII(enable, "true")) { | 140 base::LowerCaseEqualsASCII(enable, "true")) { |
141 enable_automatic_output_device_selection = true; | 141 enable_automatic_output_device_selection = true; |
142 } | 142 } |
143 } | 143 } |
144 if (user_media_request.video()) { | 144 if (user_media_request.video()) { |
145 options.video_requested = true; | 145 options.video_requested = true; |
146 CopyStreamConstraints(user_media_request.videoConstraints(), | 146 CopyStreamConstraints(user_media_request.videoConstraints(), |
147 &options.mandatory_video, | 147 &options.mandatory_video, |
148 &options.optional_video); | 148 &options.optional_video); |
149 } | 149 } |
150 | 150 |
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 return; | 924 return; |
925 } | 925 } |
926 } | 926 } |
927 } | 927 } |
928 | 928 |
929 bool MediaStreamImpl::UserMediaRequestInfo::HasPendingSources() const { | 929 bool MediaStreamImpl::UserMediaRequestInfo::HasPendingSources() const { |
930 return !sources_waiting_for_callback_.empty(); | 930 return !sources_waiting_for_callback_.empty(); |
931 } | 931 } |
932 | 932 |
933 } // namespace content | 933 } // namespace content |
OLD | NEW |