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

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

Issue 1695263002: Move direct use of VideoCapturer::VideoAdapter to VideoSinkWants. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Tried to address pthatchers comments. 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/videobroadcaster.h ('k') | webrtc/media/base/videocapturer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/videobroadcaster.cc
diff --git a/webrtc/media/base/videobroadcaster.cc b/webrtc/media/base/videobroadcaster.cc
index e369ee07c632480404080415271572d593c87f06..6c442b1647ae5a4dc91915dc45ef5e3c187b7592 100644
--- a/webrtc/media/base/videobroadcaster.cc
+++ b/webrtc/media/base/videobroadcaster.cc
@@ -33,8 +33,22 @@ void VideoBroadcaster::AddOrUpdateSink(
// Rotation must be applied by the source if one sink wants it.
current_wants_.rotation_applied = false;
+ current_wants_.max_number_of_pixels = rtc::Optional<int>();
for (auto& sink_pair : sinks_) {
current_wants_.rotation_applied |= sink_pair.wants.rotation_applied;
+
+ if (!current_wants_.max_number_of_pixels) {
nisse-webrtc 2016/02/18 14:03:42 I liked using SIZE_T_MAX (or whatever it's called)
+ current_wants_.max_number_of_pixels =
+ sink_pair.wants.max_number_of_pixels;
+ continue;
+ }
+
+ if (sink_pair.wants.max_number_of_pixels &&
+ *current_wants_.max_number_of_pixels >
+ *sink_pair.wants.max_number_of_pixels) {
+ current_wants_.max_number_of_pixels =
+ sink_pair.wants.max_number_of_pixels;
+ }
}
}
« no previous file with comments | « webrtc/media/base/videobroadcaster.h ('k') | webrtc/media/base/videocapturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698