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

Unified Diff: webrtc/video/vie_encoder.h

Issue 2672793002: Change rtc::VideoSinkWants to have target and a max pixel count (Closed)
Patch Set: Fixed incorrect behavior in VideoAdapter, updated test 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..4b6fdee14f1c35597b945d5f4998b8a7e3dd5e13 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_;
+ // Indicates if request was to adapt up or down.
+ enum class Mode { kAdaptUp, kAdaptDown } mode_;
+ };
+ // 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