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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 if (!worker_thread()->Invoke<bool>( | 353 if (!worker_thread()->Invoke<bool>( |
354 rtc::Bind(&cricket::VideoCapturer::StartCapturing, | 354 rtc::Bind(&cricket::VideoCapturer::StartCapturing, |
355 video_capturer_.get(), format_))) { | 355 video_capturer_.get(), format_))) { |
356 SetState(kEnded); | 356 SetState(kEnded); |
357 return; | 357 return; |
358 } | 358 } |
359 started_ = true; | 359 started_ = true; |
360 // Initialize hasn't succeeded until a successful state change has occurred. | 360 // Initialize hasn't succeeded until a successful state change has occurred. |
361 } | 361 } |
362 | 362 |
| 363 bool VideoCapturerTrackSource::GetStats(Stats* stats) { |
| 364 return video_capturer_->GetInputSize(&stats->input_width, |
| 365 &stats->input_height); |
| 366 } |
| 367 |
363 void VideoCapturerTrackSource::Stop() { | 368 void VideoCapturerTrackSource::Stop() { |
364 if (!started_) { | 369 if (!started_) { |
365 return; | 370 return; |
366 } | 371 } |
367 started_ = false; | 372 started_ = false; |
368 worker_thread()->Invoke<void>( | 373 worker_thread()->Invoke<void>( |
369 rtc::Bind(&cricket::VideoCapturer::Stop, video_capturer_.get())); | 374 rtc::Bind(&cricket::VideoCapturer::Stop, video_capturer_.get())); |
370 } | 375 } |
371 | 376 |
372 void VideoCapturerTrackSource::Restart() { | 377 void VideoCapturerTrackSource::Restart() { |
(...skipping 19 matching lines...) Expand all Loading... |
392 this, capturer, capture_state)); | 397 this, capturer, capture_state)); |
393 return; | 398 return; |
394 } | 399 } |
395 | 400 |
396 if (capturer == video_capturer_.get()) { | 401 if (capturer == video_capturer_.get()) { |
397 SetState(GetReadyState(capture_state)); | 402 SetState(GetReadyState(capture_state)); |
398 } | 403 } |
399 } | 404 } |
400 | 405 |
401 } // namespace webrtc | 406 } // namespace webrtc |
OLD | NEW |