Chromium Code Reviews| Index: talk/app/webrtc/rtpsender.cc |
| diff --git a/talk/app/webrtc/rtpsender.cc b/talk/app/webrtc/rtpsender.cc |
| index 3a78f4598a8d359a6c34b1a93071250a4a1a8114..425d159d5f8904e9d125a7fd595cd9391ae7476c 100644 |
| --- a/talk/app/webrtc/rtpsender.cc |
| +++ b/talk/app/webrtc/rtpsender.cc |
| @@ -144,10 +144,6 @@ VideoRtpSender::VideoRtpSender(VideoTrackInterface* track, |
| provider_(provider), |
| cached_track_enabled_(track->enabled()) { |
| track_->RegisterObserver(this); |
| - VideoSourceInterface* source = track_->GetSource(); |
| - if (source) { |
| - provider_->SetCaptureDevice(ssrc_, source->GetVideoCapturer()); |
| - } |
| Reconfigure(); |
| } |
| @@ -159,7 +155,7 @@ VideoRtpSender::~VideoRtpSender() { |
| void VideoRtpSender::OnChanged() { |
| if (cached_track_enabled_ != track_->enabled()) { |
| cached_track_enabled_ = track_->enabled(); |
| - Reconfigure(); |
| + SetVideoSend(); |
| } |
| } |
| @@ -196,8 +192,19 @@ void VideoRtpSender::Reconfigure() { |
| if (!provider_) { |
| return; |
| } |
| - const cricket::VideoOptions* options = nullptr; |
| VideoSourceInterface* source = track_->GetSource(); |
| + if (source) { |
| + provider_->SetCaptureDevice(ssrc_, source->GetVideoCapturer()); |
|
pthatcher1
2015/11/11 00:45:02
Is there any downside to calling this all the time
Taylor Brandstetter
2015/11/11 01:33:30
If you trace your way down to WebRtcVideoChannel2:
|
| + } |
| + SetVideoSend(); |
| +} |
| + |
| +void VideoRtpSender::SetVideoSend() { |
|
pthatcher1
2015/11/11 00:45:02
Actually, if this is separate, calling something l
Taylor Brandstetter
2015/11/11 01:33:30
Done.
|
| + if (!provider_) { |
| + return; |
| + } |
| + VideoSourceInterface* source = track_->GetSource(); |
| + const cricket::VideoOptions* options = nullptr; |
| if (track_->enabled() && source) { |
| options = source->options(); |
| } |