Index: webrtc/media/base/videocapturer.cc |
diff --git a/webrtc/media/base/videocapturer.cc b/webrtc/media/base/videocapturer.cc |
index 36a5579580bb995680ed567ac65e6722ff37f4b2..df78ed469554c6a006bcee27083a9d530c3857fa 100644 |
--- a/webrtc/media/base/videocapturer.cc |
+++ b/webrtc/media/base/videocapturer.cc |
@@ -226,6 +226,16 @@ |
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; |
+ if (frame_factory_) { |
+ frame_factory_->SetApplyRotation(apply_rotation_); |
+ } |
+ return true; |
+} |
+ |
void VideoCapturer::SetSupportedFormats( |
const std::vector<VideoFormat>& formats) { |
supported_formats_ = formats; |
@@ -313,25 +323,6 @@ |
frame_time_data_.Reset(); |
} |
-void VideoCapturer::RemoveSink( |
- rtc::VideoSinkInterface<cricket::VideoFrame>* sink) { |
- broadcaster_.RemoveSink(sink); |
-} |
- |
-void VideoCapturer::AddOrUpdateSink( |
- rtc::VideoSinkInterface<cricket::VideoFrame>* sink, |
- const rtc::VideoSinkWants& wants) { |
- broadcaster_.AddOrUpdateSink(sink, wants); |
- OnSinkWantsChanged(broadcaster_.wants()); |
-} |
- |
-void VideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) { |
- apply_rotation_ = wants.rotation_applied; |
- if (frame_factory_) { |
- frame_factory_->SetApplyRotation(apply_rotation_); |
- } |
-} |
- |
void VideoCapturer::OnFrameCaptured(VideoCapturer*, |
const CapturedFrame* captured_frame) { |
if (muted_) { |
@@ -342,7 +333,7 @@ |
} |
} |
- if (!broadcaster_.frame_wanted()) { |
+ if (SignalVideoFrame.is_empty()) { |
return; |
} |
@@ -525,7 +516,8 @@ |
// TODO(pthatcher): Use frame_factory_->CreateBlackFrame() instead. |
adapted_frame->SetToBlack(); |
} |
- broadcaster_.OnFrame(*adapted_frame.get()); |
+ SignalVideoFrame(this, adapted_frame.get()); |
+ |
UpdateStats(captured_frame); |
} |