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

Unified Diff: webrtc/media/webrtc/webrtcvideocapturer.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/webrtc/webrtcvideocapturer.h ('k') | webrtc/media/webrtc/webrtcvideoengine2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/webrtc/webrtcvideocapturer.cc
diff --git a/webrtc/media/webrtc/webrtcvideocapturer.cc b/webrtc/media/webrtc/webrtcvideocapturer.cc
index 6d9a2914a0780ebdf122696276391f8f037f7b71..c5eb1adadc6af0925989da019c9252112316fdb5 100644
--- a/webrtc/media/webrtc/webrtcvideocapturer.cc
+++ b/webrtc/media/webrtc/webrtcvideocapturer.cc
@@ -14,6 +14,7 @@
#include <config.h>
#endif
+#ifdef HAVE_WEBRTC_VIDEO
#include "webrtc/base/arraysize.h"
#include "webrtc/base/bind.h"
#include "webrtc/base/checks.h"
@@ -202,6 +203,9 @@
SetId(device.id);
SetSupportedFormats(supported);
+ // Ensure these 2 have the same value.
+ SetApplyRotation(module_->GetApplyRotation());
+
return true;
}
@@ -239,7 +243,7 @@
}
return true;
}
-void WebRtcVideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) {
+bool WebRtcVideoCapturer::SetApplyRotation(bool enable) {
// Can't take lock here as this will cause deadlock with
// OnIncomingCapturedFrame. In fact, the whole method, including methods it
// calls, can't take lock.
@@ -249,14 +253,13 @@
webrtc::field_trial::FindFullName("WebRTC-CVO");
if (group_name == "Disabled") {
- return;
- }
-
- VideoCapturer::OnSinkWantsChanged(wants);
- bool result = module_->SetApplyRotation(wants.rotation_applied);
- RTC_CHECK(result);
-
- return;
+ return true;
+ }
+
+ if (!VideoCapturer::SetApplyRotation(enable)) {
+ return false;
+ }
+ return module_->SetApplyRotation(enable);
}
CaptureState WebRtcVideoCapturer::Start(const VideoFormat& capture_format) {
@@ -424,3 +427,5 @@
}
} // namespace cricket
+
+#endif // HAVE_WEBRTC_VIDEO
« no previous file with comments | « webrtc/media/webrtc/webrtcvideocapturer.h ('k') | webrtc/media/webrtc/webrtcvideoengine2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698