OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_constraints_util_video_content.h" | 5 #include "content/renderer/media/media_stream_constraints_util_video_content.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 } else { | 245 } else { |
246 DCHECK(candidates.device_id_set.IsEmpty()); | 246 DCHECK(candidates.device_id_set.IsEmpty()); |
247 return VideoContentCaptureSourceSelectionResult( | 247 return VideoContentCaptureSourceSelectionResult( |
248 constraint_set.deviceId.name()); | 248 constraint_set.deviceId.name()); |
249 } | 249 } |
250 } | 250 } |
251 | 251 |
252 } // namespace | 252 } // namespace |
253 | 253 |
254 VideoContentCaptureSourceSelectionResult:: | 254 VideoContentCaptureSourceSelectionResult:: |
| 255 VideoContentCaptureSourceSelectionResult() |
| 256 : VideoContentCaptureSourceSelectionResult("") {} |
| 257 |
| 258 VideoContentCaptureSourceSelectionResult:: |
255 VideoContentCaptureSourceSelectionResult(const char* failed_constraint_name) | 259 VideoContentCaptureSourceSelectionResult(const char* failed_constraint_name) |
256 : failed_constraint_name_(failed_constraint_name) {} | 260 : failed_constraint_name_(failed_constraint_name) {} |
257 | 261 |
258 VideoContentCaptureSourceSelectionResult:: | 262 VideoContentCaptureSourceSelectionResult:: |
259 VideoContentCaptureSourceSelectionResult( | 263 VideoContentCaptureSourceSelectionResult( |
260 std::string device_id, | 264 std::string device_id, |
261 const rtc::Optional<bool>& noise_reduction, | 265 const rtc::Optional<bool>& noise_reduction, |
262 media::VideoCaptureParams capture_params) | 266 media::VideoCaptureParams capture_params) |
263 : failed_constraint_name_(nullptr), | 267 : failed_constraint_name_(nullptr), |
264 device_id_(std::move(device_id)), | 268 device_id_(std::move(device_id)), |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 candidates.Intersection(advanced_candidates); | 326 candidates.Intersection(advanced_candidates); |
323 if (!intersection.IsEmpty()) | 327 if (!intersection.IsEmpty()) |
324 candidates = std::move(intersection); | 328 candidates = std::move(intersection); |
325 } | 329 } |
326 | 330 |
327 DCHECK(!candidates.IsEmpty()); | 331 DCHECK(!candidates.IsEmpty()); |
328 return SelectResultFromCandidates(candidates, constraints.basic()); | 332 return SelectResultFromCandidates(candidates, constraints.basic()); |
329 } | 333 } |
330 | 334 |
331 } // namespace content | 335 } // namespace content |
OLD | NEW |