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 bool ChannelManager::AddVideoRenderer( | 503 void ChannelManager::AddVideoSink( |
504 VideoCapturer* capturer, VideoRenderer* renderer) { | 504 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { |
505 return initialized_ && worker_thread_->Invoke<bool>( | 505 if (initialized_) |
506 Bind(&CaptureManager::AddVideoRenderer, | 506 worker_thread_->Invoke<void>( |
507 capture_manager_.get(), capturer, renderer)); | 507 Bind(&CaptureManager::AddVideoSink, |
| 508 capture_manager_.get(), capturer, sink)); |
508 } | 509 } |
509 | 510 |
510 bool ChannelManager::RemoveVideoRenderer( | 511 void ChannelManager::RemoveVideoSink( |
511 VideoCapturer* capturer, VideoRenderer* renderer) { | 512 VideoCapturer* capturer, rtc::VideoSinkInterface<VideoFrame>* sink) { |
512 return initialized_ && worker_thread_->Invoke<bool>( | 513 if (initialized_) |
513 Bind(&CaptureManager::RemoveVideoRenderer, | 514 worker_thread_->Invoke<void>( |
514 capture_manager_.get(), capturer, renderer)); | 515 Bind(&CaptureManager::RemoveVideoSink, |
| 516 capture_manager_.get(), capturer, sink)); |
515 } | 517 } |
516 | 518 |
517 bool ChannelManager::IsScreencastRunning() const { | 519 bool ChannelManager::IsScreencastRunning() const { |
518 return initialized_ && worker_thread_->Invoke<bool>( | 520 return initialized_ && worker_thread_->Invoke<bool>( |
519 Bind(&ChannelManager::IsScreencastRunning_w, this)); | 521 Bind(&ChannelManager::IsScreencastRunning_w, this)); |
520 } | 522 } |
521 | 523 |
522 bool ChannelManager::IsScreencastRunning_w() const { | 524 bool ChannelManager::IsScreencastRunning_w() const { |
523 VideoChannels::const_iterator it = video_channels_.begin(); | 525 VideoChannels::const_iterator it = video_channels_.begin(); |
524 for ( ; it != video_channels_.end(); ++it) { | 526 for ( ; it != video_channels_.end(); ++it) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 return worker_thread_->Invoke<bool>( | 568 return worker_thread_->Invoke<bool>( |
567 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); | 569 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); |
568 } | 570 } |
569 | 571 |
570 void ChannelManager::StopRtcEventLog() { | 572 void ChannelManager::StopRtcEventLog() { |
571 worker_thread_->Invoke<void>( | 573 worker_thread_->Invoke<void>( |
572 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); | 574 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); |
573 } | 575 } |
574 | 576 |
575 } // namespace cricket | 577 } // namespace cricket |
OLD | NEW |