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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 return; | 352 return; |
353 } | 353 } |
354 | 354 |
355 cricket::VideoOptions options; | 355 cricket::VideoOptions options; |
356 if (!ExtractVideoOptions(constraints, &options)) { | 356 if (!ExtractVideoOptions(constraints, &options)) { |
357 LOG(LS_WARNING) << "Could not satisfy mandatory options."; | 357 LOG(LS_WARNING) << "Could not satisfy mandatory options."; |
358 SetState(kEnded); | 358 SetState(kEnded); |
359 return; | 359 return; |
360 } | 360 } |
361 options_.SetAll(options); | 361 options_.SetAll(options); |
| 362 options_.is_screencast = rtc::Optional<bool>(video_capturer_->IsScreencast()); |
362 | 363 |
363 format_ = GetBestCaptureFormat(formats); | 364 format_ = GetBestCaptureFormat(formats); |
364 // Start the camera with our best guess. | 365 // Start the camera with our best guess. |
365 // TODO(perkj): Should we try again with another format it it turns out that | 366 // TODO(perkj): Should we try again with another format it it turns out that |
366 // the camera doesn't produce frames with the correct format? Or will | 367 // the camera doesn't produce frames with the correct format? Or will |
367 // cricket::VideCapturer be able to re-scale / crop to the requested | 368 // cricket::VideCapturer be able to re-scale / crop to the requested |
368 // resolution? | 369 // resolution? |
369 if (!channel_manager_->StartVideoCapture(video_capturer_.get(), format_)) { | 370 if (!channel_manager_->StartVideoCapture(video_capturer_.get(), format_)) { |
370 SetState(kEnded); | 371 SetState(kEnded); |
371 return; | 372 return; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 void VideoSource::SetState(SourceState new_state) { | 413 void VideoSource::SetState(SourceState new_state) { |
413 // TODO(hbos): Temporarily disabled VERIFY due to webrtc:4776. | 414 // TODO(hbos): Temporarily disabled VERIFY due to webrtc:4776. |
414 // if (VERIFY(state_ != new_state)) { | 415 // if (VERIFY(state_ != new_state)) { |
415 if (state_ != new_state) { | 416 if (state_ != new_state) { |
416 state_ = new_state; | 417 state_ = new_state; |
417 FireOnChanged(); | 418 FireOnChanged(); |
418 } | 419 } |
419 } | 420 } |
420 | 421 |
421 } // namespace webrtc | 422 } // namespace webrtc |
OLD | NEW |