Index: talk/media/base/videocapturer.cc |
diff --git a/talk/media/base/videocapturer.cc b/talk/media/base/videocapturer.cc |
index d525a4188edd2ac4ab6e2ee7b6bf9b3b4d6dc954..3621c30afb26e46a3c91930c807b8f7aaf4e58fa 100644 |
--- a/talk/media/base/videocapturer.cc |
+++ b/talk/media/base/videocapturer.cc |
@@ -243,14 +243,12 @@ bool VideoCapturer::MuteToBlackThenPause(bool muted) { |
return Pause(false); |
} |
-// Note that the last caller decides whether rotation should be applied if there |
-// are multiple send streams using the same camera. |
-bool VideoCapturer::SetApplyRotation(bool enable) { |
- apply_rotation_ = enable; |
+void VideoCapturer::OnSinkCapabilitiesChanged( |
+ const rtc::VideoSinkCapabilities& capabilities) { |
+ apply_rotation_ = !capabilities.can_apply_rotation; |
pthatcher1
2016/02/03 15:38:35
I like this a lot.
perkj_webrtc
2016/02/08 14:32:00
Acknowledged.
|
if (frame_factory_) { |
frame_factory_->SetApplyRotation(apply_rotation_); |
} |
- return true; |
} |
void VideoCapturer::SetSupportedFormats( |
@@ -350,7 +348,7 @@ void VideoCapturer::OnFrameCaptured(VideoCapturer*, |
} |
} |
- if (SignalVideoFrame.is_empty()) { |
+ if (!HasSinks()) { |
pthatcher1
2016/02/03 15:38:35
We could make this more generic as something like
perkj_webrtc
2016/02/08 14:32:00
Done.
|
return; |
} |
@@ -533,8 +531,7 @@ void VideoCapturer::OnFrameCaptured(VideoCapturer*, |
// TODO(pthatcher): Use frame_factory_->CreateBlackFrame() instead. |
adapted_frame->SetToBlack(); |
} |
- SignalVideoFrame(this, adapted_frame.get()); |
- |
+ DeliverFrameToSinks(*adapted_frame.get()); |
UpdateStats(captured_frame); |
} |