| 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 | |
| 468 bool ChannelManager::StopVideoCapture( | 458 bool ChannelManager::StopVideoCapture( |
| 469 VideoCapturer* capturer, const VideoFormat& video_format) { | 459 VideoCapturer* capturer, const VideoFormat& video_format) { |
| 470 return initialized_ && worker_thread_->Invoke<bool>( | 460 return initialized_ && worker_thread_->Invoke<bool>( |
| 471 Bind(&CaptureManager::StopVideoCapture, | 461 Bind(&CaptureManager::StopVideoCapture, |
| 472 capture_manager_.get(), capturer, video_format)); | 462 capture_manager_.get(), capturer, video_format)); |
| 473 } | 463 } |
| 474 | 464 |
| 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 | |
| 485 void ChannelManager::AddVideoSink( | 465 void ChannelManager::AddVideoSink( |
| 486 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { | 466 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { |
| 487 if (initialized_) | 467 if (initialized_) |
| 488 worker_thread_->Invoke<void>( | 468 worker_thread_->Invoke<void>( |
| 489 Bind(&CaptureManager::AddVideoSink, | 469 Bind(&CaptureManager::AddVideoSink, |
| 490 capture_manager_.get(), capturer, sink)); | 470 capture_manager_.get(), capturer, sink)); |
| 491 } | 471 } |
| 492 | 472 |
| 493 void ChannelManager::RemoveVideoSink( | 473 void ChannelManager::RemoveVideoSink( |
| 494 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { | 474 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 return worker_thread_->Invoke<bool>( | 530 return worker_thread_->Invoke<bool>( |
| 551 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); | 531 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); |
| 552 } | 532 } |
| 553 | 533 |
| 554 void ChannelManager::StopRtcEventLog() { | 534 void ChannelManager::StopRtcEventLog() { |
| 555 worker_thread_->Invoke<void>( | 535 worker_thread_->Invoke<void>( |
| 556 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); | 536 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); |
| 557 } | 537 } |
| 558 | 538 |
| 559 } // namespace cricket | 539 } // namespace cricket |
| OLD | NEW |