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

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

Issue 1655793003: Make cricket::VideoCapturer implement VideoSourceInterface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed Android Created 4 years, 11 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698