| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 bool ChannelManager::RestartVideoCapture( | 493 bool ChannelManager::RestartVideoCapture( |
| 494 VideoCapturer* video_capturer, | 494 VideoCapturer* video_capturer, |
| 495 const VideoFormat& previous_format, | 495 const VideoFormat& previous_format, |
| 496 const VideoFormat& desired_format, | 496 const VideoFormat& desired_format, |
| 497 CaptureManager::RestartOptions options) { | 497 CaptureManager::RestartOptions options) { |
| 498 return initialized_ && worker_thread_->Invoke<bool>( | 498 return initialized_ && worker_thread_->Invoke<bool>( |
| 499 Bind(&CaptureManager::RestartVideoCapture, capture_manager_.get(), | 499 Bind(&CaptureManager::RestartVideoCapture, capture_manager_.get(), |
| 500 video_capturer, previous_format, desired_format, options)); | 500 video_capturer, previous_format, desired_format, options)); |
| 501 } | 501 } |
| 502 | 502 |
| 503 void ChannelManager::AddVideoSink( | 503 bool ChannelManager::AddVideoRenderer( |
| 504 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { | 504 VideoCapturer* capturer, VideoRenderer* renderer) { |
| 505 if (initialized_) | 505 return initialized_ && worker_thread_->Invoke<bool>( |
| 506 worker_thread_->Invoke<void>( | 506 Bind(&CaptureManager::AddVideoRenderer, |
| 507 Bind(&CaptureManager::AddVideoSink, | 507 capture_manager_.get(), capturer, renderer)); |
| 508 capture_manager_.get(), capturer, sink)); | |
| 509 } | 508 } |
| 510 | 509 |
| 511 void ChannelManager::RemoveVideoSink( | 510 bool ChannelManager::RemoveVideoRenderer( |
| 512 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { | 511 VideoCapturer* capturer, VideoRenderer* renderer) { |
| 513 if (initialized_) | 512 return initialized_ && worker_thread_->Invoke<bool>( |
| 514 worker_thread_->Invoke<void>( | 513 Bind(&CaptureManager::RemoveVideoRenderer, |
| 515 Bind(&CaptureManager::RemoveVideoSink, | 514 capture_manager_.get(), capturer, renderer)); |
| 516 capture_manager_.get(), capturer, sink)); | |
| 517 } | 515 } |
| 518 | 516 |
| 519 bool ChannelManager::IsScreencastRunning() const { | 517 bool ChannelManager::IsScreencastRunning() const { |
| 520 return initialized_ && worker_thread_->Invoke<bool>( | 518 return initialized_ && worker_thread_->Invoke<bool>( |
| 521 Bind(&ChannelManager::IsScreencastRunning_w, this)); | 519 Bind(&ChannelManager::IsScreencastRunning_w, this)); |
| 522 } | 520 } |
| 523 | 521 |
| 524 bool ChannelManager::IsScreencastRunning_w() const { | 522 bool ChannelManager::IsScreencastRunning_w() const { |
| 525 VideoChannels::const_iterator it = video_channels_.begin(); | 523 VideoChannels::const_iterator it = video_channels_.begin(); |
| 526 for ( ; it != video_channels_.end(); ++it) { | 524 for ( ; it != video_channels_.end(); ++it) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 return worker_thread_->Invoke<bool>( | 566 return worker_thread_->Invoke<bool>( |
| 569 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); | 567 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); |
| 570 } | 568 } |
| 571 | 569 |
| 572 void ChannelManager::StopRtcEventLog() { | 570 void ChannelManager::StopRtcEventLog() { |
| 573 worker_thread_->Invoke<void>( | 571 worker_thread_->Invoke<void>( |
| 574 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); | 572 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); |
| 575 } | 573 } |
| 576 | 574 |
| 577 } // namespace cricket | 575 } // namespace cricket |
| OLD | NEW |