Chromium Code Reviews| OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 
| 3 * | 3 * | 
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license | 
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source | 
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found | 
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may | 
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. | 
| 9 */ | 9 */ | 
| 10 | 10 | 
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 formats.push_back(cricket::VideoFormat(kDefaultFormat)); | 313 formats.push_back(cricket::VideoFormat(kDefaultFormat)); | 
| 314 } else { | 314 } else { | 
| 315 // The VideoCapturer implementation doesn't support capability | 315 // The VideoCapturer implementation doesn't support capability | 
| 316 // enumeration. We need to guess what the camera supports. | 316 // enumeration. We need to guess what the camera supports. | 
| 317 for (uint32_t i = 0; i < arraysize(kVideoFormats); ++i) { | 317 for (uint32_t i = 0; i < arraysize(kVideoFormats); ++i) { | 
| 318 formats.push_back(cricket::VideoFormat(kVideoFormats[i])); | 318 formats.push_back(cricket::VideoFormat(kVideoFormats[i])); | 
| 319 } | 319 } | 
| 320 } | 320 } | 
| 321 } | 321 } | 
| 322 | 322 | 
| 323 // Get default from the capturer, overridden by constraints, if any. | |
| 324 // Note that Chrome no longer uses the webrtc constraints interface. | |
| 
 
perkj_webrtc
2016/09/14 13:08:27
Please remove the comment about chrome.
 
nisse-webrtc
2016/09/14 13:20:23
Done. There are other comments in the code explain
 
 | |
| 325 needs_denoising_ = video_capturer_->NeedsDenoising(); | |
| 326 | |
| 323 if (constraints) { | 327 if (constraints) { | 
| 324 MediaConstraintsInterface::Constraints mandatory_constraints = | 328 MediaConstraintsInterface::Constraints mandatory_constraints = | 
| 325 constraints->GetMandatory(); | 329 constraints->GetMandatory(); | 
| 326 MediaConstraintsInterface::Constraints optional_constraints; | 330 MediaConstraintsInterface::Constraints optional_constraints; | 
| 327 optional_constraints = constraints->GetOptional(); | 331 optional_constraints = constraints->GetOptional(); | 
| 328 | 332 | 
| 329 if (video_capturer_->IsScreencast()) { | 333 if (video_capturer_->IsScreencast()) { | 
| 330 // Use the maxWidth and maxHeight allowed by constraints for screencast. | 334 // Use the maxWidth and maxHeight allowed by constraints for screencast. | 
| 331 FromConstraintsForScreencast(mandatory_constraints, &(formats[0])); | 335 FromConstraintsForScreencast(mandatory_constraints, &(formats[0])); | 
| 332 } | 336 } | 
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 capture_state)); | 391 capture_state)); | 
| 388 return; | 392 return; | 
| 389 } | 393 } | 
| 390 | 394 | 
| 391 if (capturer == video_capturer_.get()) { | 395 if (capturer == video_capturer_.get()) { | 
| 392 SetState(GetReadyState(capture_state)); | 396 SetState(GetReadyState(capture_state)); | 
| 393 } | 397 } | 
| 394 } | 398 } | 
| 395 | 399 | 
| 396 } // namespace webrtc | 400 } // namespace webrtc | 
| OLD | NEW |