| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 // all local video capturers, processors, and managers should move | 448 // all local video capturers, processors, and managers should move |
| 449 // to. | 449 // to. |
| 450 // TODO(pthatcher): Add more of the CaptureManager interface. | 450 // TODO(pthatcher): Add more of the CaptureManager interface. |
| 451 bool ChannelManager::StartVideoCapture( | 451 bool ChannelManager::StartVideoCapture( |
| 452 VideoCapturer* capturer, const VideoFormat& video_format) { | 452 VideoCapturer* capturer, const VideoFormat& video_format) { |
| 453 return initialized_ && worker_thread_->Invoke<bool>( | 453 return initialized_ && worker_thread_->Invoke<bool>( |
| 454 Bind(&CaptureManager::StartVideoCapture, | 454 Bind(&CaptureManager::StartVideoCapture, |
| 455 capture_manager_.get(), capturer, video_format)); | 455 capture_manager_.get(), capturer, video_format)); |
| 456 } | 456 } |
| 457 | 457 |
| 458 bool ChannelManager::MuteToBlackThenPause( |
| 459 VideoCapturer* video_capturer, bool muted) { |
| 460 if (!initialized_) { |
| 461 return false; |
| 462 } |
| 463 worker_thread_->Invoke<void>( |
| 464 Bind(&VideoCapturer::MuteToBlackThenPause, video_capturer, muted)); |
| 465 return true; |
| 466 } |
| 467 |
| 458 bool ChannelManager::StopVideoCapture( | 468 bool ChannelManager::StopVideoCapture( |
| 459 VideoCapturer* capturer, const VideoFormat& video_format) { | 469 VideoCapturer* capturer, const VideoFormat& video_format) { |
| 460 return initialized_ && worker_thread_->Invoke<bool>( | 470 return initialized_ && worker_thread_->Invoke<bool>( |
| 461 Bind(&CaptureManager::StopVideoCapture, | 471 Bind(&CaptureManager::StopVideoCapture, |
| 462 capture_manager_.get(), capturer, video_format)); | 472 capture_manager_.get(), capturer, video_format)); |
| 463 } | 473 } |
| 464 | 474 |
| 475 bool ChannelManager::RestartVideoCapture( |
| 476 VideoCapturer* video_capturer, |
| 477 const VideoFormat& previous_format, |
| 478 const VideoFormat& desired_format, |
| 479 CaptureManager::RestartOptions options) { |
| 480 return initialized_ && worker_thread_->Invoke<bool>( |
| 481 Bind(&CaptureManager::RestartVideoCapture, capture_manager_.get(), |
| 482 video_capturer, previous_format, desired_format, options)); |
| 483 } |
| 484 |
| 465 void ChannelManager::AddVideoSink( | 485 void ChannelManager::AddVideoSink( |
| 466 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { | 486 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { |
| 467 if (initialized_) | 487 if (initialized_) |
| 468 worker_thread_->Invoke<void>( | 488 worker_thread_->Invoke<void>( |
| 469 Bind(&CaptureManager::AddVideoSink, | 489 Bind(&CaptureManager::AddVideoSink, |
| 470 capture_manager_.get(), capturer, sink)); | 490 capture_manager_.get(), capturer, sink)); |
| 471 } | 491 } |
| 472 | 492 |
| 473 void ChannelManager::RemoveVideoSink( | 493 void ChannelManager::RemoveVideoSink( |
| 474 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { | 494 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 return worker_thread_->Invoke<bool>( | 550 return worker_thread_->Invoke<bool>( |
| 531 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); | 551 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); |
| 532 } | 552 } |
| 533 | 553 |
| 534 void ChannelManager::StopRtcEventLog() { | 554 void ChannelManager::StopRtcEventLog() { |
| 535 worker_thread_->Invoke<void>( | 555 worker_thread_->Invoke<void>( |
| 536 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); | 556 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); |
| 537 } | 557 } |
| 538 | 558 |
| 539 } // namespace cricket | 559 } // namespace cricket |
| OLD | NEW |