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

Unified Diff: webrtc/api/webrtcsession.cc

Issue 1766653002: Replace SetCapturer and SetCaptureDevice by SetSource. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Make SetSource tolerate unknown ssrc and source == NULL. Created 4 years, 10 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
Index: webrtc/api/webrtcsession.cc
diff --git a/webrtc/api/webrtcsession.cc b/webrtc/api/webrtcsession.cc
index 2c414a9761fca2d9d7e001e71f2a99076763615e..c5b48109d4af45268edae0d1ca234aaa2dcd775f 100644
--- a/webrtc/api/webrtcsession.cc
+++ b/webrtc/api/webrtcsession.cc
@@ -1249,8 +1249,9 @@ void WebRtcSession::SetRawAudioSink(uint32_t ssrc,
voice_channel_->SetRawAudioSink(ssrc, std::move(sink));
}
-bool WebRtcSession::SetCaptureDevice(uint32_t ssrc,
- cricket::VideoCapturer* camera) {
+bool WebRtcSession::SetSource(
+ uint32_t ssrc,
+ rtc::VideoSourceInterface<cricket::VideoFrame>* source) {
ASSERT(signaling_thread()->IsCurrent());
if (!video_channel_) {
@@ -1259,13 +1260,7 @@ bool WebRtcSession::SetCaptureDevice(uint32_t ssrc,
LOG(LS_WARNING) << "Video not used in this call.";
return false;
}
- if (!video_channel_->SetCapturer(ssrc, camera)) {
- // Allow that SetCapturer fail if |camera| is NULL but assert otherwise.
- // This in the normal case when the underlying media channel has already
- // been deleted.
- ASSERT(camera == NULL);
- return false;
- }
+ video_channel_->SetSource(ssrc, source);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698