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

Unified Diff: webrtc/modules/video_coding/utility/quality_scaler.cc

Issue 1886113003: Add rotation to EncodedImage and make sure it is passed through encoders. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: IOS Created 4 years, 8 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/modules/video_coding/utility/quality_scaler.cc
diff --git a/webrtc/modules/video_coding/utility/quality_scaler.cc b/webrtc/modules/video_coding/utility/quality_scaler.cc
index c6e566973101e01f1ec868f8810e614d7a3480e7..34188d7e3fee847b54a24fd25117c1bb0197ba55 100644
--- a/webrtc/modules/video_coding/utility/quality_scaler.cc
+++ b/webrtc/modules/video_coding/utility/quality_scaler.cc
@@ -146,9 +146,15 @@ const VideoFrame& QualityScaler::GetScaledFrame(const VideoFrame& frame) {
if (scaler_.Scale(frame, &scaled_frame_) != 0)
return frame;
+ // TODO(perkj): Refactor the scaler to not own |scaled_frame|. VideoFrame are
+ // just thin wrappers so instead the scaler should return a
+ // rtc::scoped_refptr<VideoFrameBuffer> and a new VideoFrame be created with
+ // the meta data from |frame|. That way we would not have to set all these
+ // meta data.
scaled_frame_.set_ntp_time_ms(frame.ntp_time_ms());
scaled_frame_.set_timestamp(frame.timestamp());
scaled_frame_.set_render_time_ms(frame.render_time_ms());
+ scaled_frame_.set_rotation(frame.rotation());
return scaled_frame_;
}

Powered by Google App Engine
This is Rietveld 408576698