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

Side by Side Diff: webrtc/api/videocapturertracksource.cc

Issue 2433293003: Revert of Add method cricket::VideoCapturer::NeedsDenoising, use in VideoCapturerTrackSource. (Closed)
Patch Set: Solved patch conflicts. Created 4 years, 2 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
« no previous file with comments | « no previous file | webrtc/api/videocapturertracksource_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 needs_denoising_ = video_capturer_->NeedsDenoising();
325
326 if (constraints) { 323 if (constraints) {
327 MediaConstraintsInterface::Constraints mandatory_constraints = 324 MediaConstraintsInterface::Constraints mandatory_constraints =
328 constraints->GetMandatory(); 325 constraints->GetMandatory();
329 MediaConstraintsInterface::Constraints optional_constraints; 326 MediaConstraintsInterface::Constraints optional_constraints;
330 optional_constraints = constraints->GetOptional(); 327 optional_constraints = constraints->GetOptional();
331 328
332 if (video_capturer_->IsScreencast()) { 329 if (video_capturer_->IsScreencast()) {
333 // Use the maxWidth and maxHeight allowed by constraints for screencast. 330 // Use the maxWidth and maxHeight allowed by constraints for screencast.
334 FromConstraintsForScreencast(mandatory_constraints, &(formats[0])); 331 FromConstraintsForScreencast(mandatory_constraints, &(formats[0]));
335 } 332 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 capture_state)); 387 capture_state));
391 return; 388 return;
392 } 389 }
393 390
394 if (capturer == video_capturer_.get()) { 391 if (capturer == video_capturer_.get()) {
395 SetState(GetReadyState(capture_state)); 392 SetState(GetReadyState(capture_state));
396 } 393 }
397 } 394 }
398 395
399 } // namespace webrtc 396 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/videocapturertracksource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698