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

Unified Diff: webrtc/api/rtpsender.cc

Issue 1766653002: Replace SetCapturer and SetCaptureDevice by SetSource. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased, no longer any proxy object changes. Created 4 years, 8 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 | « webrtc/api/objc/RTCAVFoundationVideoSource.mm ('k') | webrtc/api/rtpsenderreceiver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/rtpsender.cc
diff --git a/webrtc/api/rtpsender.cc b/webrtc/api/rtpsender.cc
index 94cea6c2c99e47cb27df5043b95193a0552f7665..214b4a39ec3a69ea1a0ff4c9c809e2a0b1bd5aa4 100644
--- a/webrtc/api/rtpsender.cc
+++ b/webrtc/api/rtpsender.cc
@@ -276,18 +276,16 @@ bool VideoRtpSender::SetTrack(MediaStreamTrackInterface* track) {
// Update video provider.
if (can_send_track()) {
- VideoTrackSourceInterface* source = track_->GetSource();
// TODO(deadbeef): If SetTrack is called with a disabled track, and the
// previous track was enabled, this could cause a frame from the new track
- // to slip out. Really, what we need is for SetCaptureDevice and
- // SetVideoSend
+ // to slip out. Really, what we need is for SetSource and SetVideoSend
// to be combined into one atomic operation, all the way down to
// WebRtcVideoSendStream.
- provider_->SetCaptureDevice(ssrc_,
- source ? source->GetVideoCapturer() : nullptr);
+
+ provider_->SetSource(ssrc_, track_);
SetVideoSend();
} else if (prev_can_send_track) {
- provider_->SetCaptureDevice(ssrc_, nullptr);
+ provider_->SetSource(ssrc_, nullptr);
provider_->SetVideoSend(ssrc_, false, nullptr);
}
return true;
@@ -299,14 +297,12 @@ void VideoRtpSender::SetSsrc(uint32_t ssrc) {
}
// If we are already sending with a particular SSRC, stop sending.
if (can_send_track()) {
- provider_->SetCaptureDevice(ssrc_, nullptr);
+ provider_->SetSource(ssrc_, nullptr);
provider_->SetVideoSend(ssrc_, false, nullptr);
}
ssrc_ = ssrc;
if (can_send_track()) {
- VideoTrackSourceInterface* source = track_->GetSource();
- provider_->SetCaptureDevice(ssrc_,
- source ? source->GetVideoCapturer() : nullptr);
+ provider_->SetSource(ssrc_, track_);
SetVideoSend();
}
}
@@ -320,7 +316,7 @@ void VideoRtpSender::Stop() {
track_->UnregisterObserver(this);
}
if (can_send_track()) {
- provider_->SetCaptureDevice(ssrc_, nullptr);
+ provider_->SetSource(ssrc_, nullptr);
provider_->SetVideoSend(ssrc_, false, nullptr);
}
stopped_ = true;
« no previous file with comments | « webrtc/api/objc/RTCAVFoundationVideoSource.mm ('k') | webrtc/api/rtpsenderreceiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698