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

Unified Diff: webrtc/media/base/videocapturer.cc

Issue 1690893002: Revert of Make cricket::VideoCapturer implement VideoSourceInterface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
« no previous file with comments | « webrtc/media/base/videocapturer.h ('k') | webrtc/media/base/videocapturer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « webrtc/media/base/videocapturer.h ('k') | webrtc/media/base/videocapturer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698