Index: webrtc/media/base/videobroadcaster.cc |
diff --git a/webrtc/media/base/videobroadcaster.cc b/webrtc/media/base/videobroadcaster.cc |
index e369ee07c632480404080415271572d593c87f06..12ba22685ca15bb633515d637f828ee915efb369 100644 |
--- a/webrtc/media/base/videobroadcaster.cc |
+++ b/webrtc/media/base/videobroadcaster.cc |
@@ -33,8 +33,15 @@ 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 = std::numeric_limits<int>::max(); |
pthatcher1
2016/02/17 23:05:56
Would it make more sense to use an Optional<int>?
perkj_webrtc
2016/02/18 13:22:46
In the interface yes.. but maybe the implementatio
|
for (auto& sink_pair : sinks_) { |
current_wants_.rotation_applied |= sink_pair.wants.rotation_applied; |
+ |
+ if (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; |
+ } |
pthatcher1
2016/02/17 23:05:56
We should document that a local preview sink/rende
perkj_webrtc
2016/02/18 13:22:46
This is not intended to change the current behavio
|
} |
} |
@@ -63,6 +70,8 @@ VideoSinkWants VideoBroadcaster::wants() const { |
void VideoBroadcaster::OnFrame(const cricket::VideoFrame& frame) { |
RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
+ width_ = frame.GetWidth(); |
+ height_ = frame.GetHeight(); |
for (auto& sink_pair : sinks_) { |
sink_pair.sink->OnFrame(frame); |
} |