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

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

Issue 1695263002: Move direct use of VideoCapturer::VideoAdapter to VideoSinkWants. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased 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 f2933240f9ca6483d6b1f30292ea92807ff7757a..b9d865ef46adff30826ce6b24b438889fa3b747d 100644
--- a/webrtc/media/base/videocapturer.cc
+++ b/webrtc/media/base/videocapturer.cc
@@ -320,6 +320,7 @@ void VideoCapturer::GetStats(VariableInfo<int>* adapt_drops_stats,
void VideoCapturer::RemoveSink(
rtc::VideoSinkInterface<cricket::VideoFrame>* sink) {
broadcaster_.RemoveSink(sink);
+ OnSinkWantsChanged(broadcaster_.wants());
}
void VideoCapturer::AddOrUpdateSink(
@@ -334,6 +335,11 @@ void VideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) {
if (frame_factory_) {
frame_factory_->SetApplyRotation(apply_rotation_);
}
+
+ if (video_adapter()) {
+ video_adapter()->OnCpuResolutionRequest(wants.max_pixel_count,
+ wants.max_pixel_count_step_up);
+ }
}
void VideoCapturer::OnFrameCaptured(VideoCapturer*,
« 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