Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: talk/media/base/capturemanager.cc

Issue 1594973006: New rtc::VideoSinkInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Workaround to not break chrome. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/media/base/capturemanager.h ('k') | talk/media/base/capturemanager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/base/capturemanager.cc
diff --git a/talk/media/base/capturemanager.cc b/talk/media/base/capturemanager.cc
index dab33fd2bc73d4996cbb93c8e5e0eaa30f48b461..78ca99d39c80635cdade7d92ed57d82b7f51a62e 100644
--- a/talk/media/base/capturemanager.cc
+++ b/talk/media/base/capturemanager.cc
@@ -30,7 +30,6 @@
#include <algorithm>
#include "talk/media/base/videocapturer.h"
-#include "talk/media/base/videorenderer.h"
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
@@ -287,32 +286,32 @@ bool CaptureManager::RestartVideoCapture(
return true;
}
-bool CaptureManager::AddVideoRenderer(VideoCapturer* video_capturer,
- VideoRenderer* video_renderer) {
+void CaptureManager::AddVideoSink(VideoCapturer* video_capturer,
+ rtc::VideoSinkInterface<VideoFrame>* sink) {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
- if (!video_capturer || !video_renderer) {
- return false;
+ // TODO(nisse): Do we really need to tolerate NULL inputs?
+ if (!video_capturer || !sink) {
+ return;
}
CaptureRenderAdapter* adapter = GetAdapter(video_capturer);
if (!adapter) {
- return false;
+ return;
}
- adapter->AddRenderer(video_renderer);
- return true;
+ adapter->AddSink(sink);
}
-bool CaptureManager::RemoveVideoRenderer(VideoCapturer* video_capturer,
- VideoRenderer* video_renderer) {
+void CaptureManager::RemoveVideoSink(
+ VideoCapturer* video_capturer,
+ rtc::VideoSinkInterface<VideoFrame>* sink) {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
- if (!video_capturer || !video_renderer) {
- return false;
+ if (!video_capturer || !sink) {
+ return;
}
CaptureRenderAdapter* adapter = GetAdapter(video_capturer);
if (!adapter) {
- return false;
+ return;
}
- adapter->RemoveRenderer(video_renderer);
- return true;
+ adapter->RemoveSink(sink);
}
bool CaptureManager::IsCapturerRegistered(VideoCapturer* video_capturer) const {
« no previous file with comments | « talk/media/base/capturemanager.h ('k') | talk/media/base/capturemanager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698