Index: talk/media/base/capturemanager.cc |
diff --git a/talk/media/base/capturemanager.cc b/talk/media/base/capturemanager.cc |
index 78ca99d39c80635cdade7d92ed57d82b7f51a62e..dab33fd2bc73d4996cbb93c8e5e0eaa30f48b461 100644 |
--- a/talk/media/base/capturemanager.cc |
+++ b/talk/media/base/capturemanager.cc |
@@ -30,6 +30,7 @@ |
#include <algorithm> |
#include "talk/media/base/videocapturer.h" |
+#include "talk/media/base/videorenderer.h" |
#include "webrtc/base/checks.h" |
#include "webrtc/base/logging.h" |
@@ -286,32 +287,32 @@ |
return true; |
} |
-void CaptureManager::AddVideoSink(VideoCapturer* video_capturer, |
- rtc::VideoSinkInterface<VideoFrame>* sink) { |
- RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
- // TODO(nisse): Do we really need to tolerate NULL inputs? |
- if (!video_capturer || !sink) { |
- return; |
+bool CaptureManager::AddVideoRenderer(VideoCapturer* video_capturer, |
+ VideoRenderer* video_renderer) { |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
+ if (!video_capturer || !video_renderer) { |
+ return false; |
} |
CaptureRenderAdapter* adapter = GetAdapter(video_capturer); |
if (!adapter) { |
- return; |
- } |
- adapter->AddSink(sink); |
-} |
- |
-void CaptureManager::RemoveVideoSink( |
- VideoCapturer* video_capturer, |
- rtc::VideoSinkInterface<VideoFrame>* sink) { |
- RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
- if (!video_capturer || !sink) { |
- return; |
+ return false; |
+ } |
+ adapter->AddRenderer(video_renderer); |
+ return true; |
+} |
+ |
+bool CaptureManager::RemoveVideoRenderer(VideoCapturer* video_capturer, |
+ VideoRenderer* video_renderer) { |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
+ if (!video_capturer || !video_renderer) { |
+ return false; |
} |
CaptureRenderAdapter* adapter = GetAdapter(video_capturer); |
if (!adapter) { |
- return; |
- } |
- adapter->RemoveSink(sink); |
+ return false; |
+ } |
+ adapter->RemoveRenderer(video_renderer); |
+ return true; |
} |
bool CaptureManager::IsCapturerRegistered(VideoCapturer* video_capturer) const { |