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

Unified Diff: webrtc/video/vie_encoder.h

Issue 2672793002: Change rtc::VideoSinkWants to have target and a max pixel count (Closed)
Patch Set: Address comments Created 3 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
Index: webrtc/video/vie_encoder.h
diff --git a/webrtc/video/vie_encoder.h b/webrtc/video/vie_encoder.h
index 0c564724d4b96e49d9bc9d3e9718a3d0d93efde1..6d22f07693e190ab1274afc95c32bf535f6145ef 100644
--- a/webrtc/video/vie_encoder.h
+++ b/webrtc/video/vie_encoder.h
@@ -218,10 +218,16 @@ class ViEEncoder : public rtc::VideoSinkInterface<VideoFrame>,
VideoSendStream::DegradationPreference degradation_preference_
ACCESS_ON(&encoder_queue_);
- // Pixel count last time the resolution was requested to be changed down.
- rtc::Optional<int> max_pixel_count_ ACCESS_ON(&encoder_queue_);
- // Pixel count last time the resolution was requested to be changed up.
- rtc::Optional<int> max_pixel_count_step_up_ ACCESS_ON(&encoder_queue_);
+ struct AdaptationRequest {
+ // The pixel count produced by the source at the time of the adaptation.
+ int input_pixel_count_;
+ // True if request was to adapt down, false otherwise.
+ bool adapt_down_;
kthelgason 2017/02/06 12:13:21 Can we make this an enum instead? IMO having expli
sprang_webrtc 2017/02/06 13:18:07 Done.
+ };
+ // Stores a snapshot of the last adaptation request triggered by an AdaptUp
+ // or AdaptDown signal.
+ rtc::Optional<AdaptationRequest> last_adaptation_request_
+ ACCESS_ON(&encoder_queue_);
rtc::RaceChecker incoming_frame_race_checker_
GUARDED_BY(incoming_frame_race_checker_);

Powered by Google App Engine
This is Rietveld 408576698