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

Unified Diff: webrtc/video/vie_encoder.cc

Issue 2853463004: Don't reinit encoder when rotation changes. (Closed)
Patch Set: Add trivial unit tests. Created 3 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
« no previous file with comments | « webrtc/video/vie_encoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_encoder.cc
diff --git a/webrtc/video/vie_encoder.cc b/webrtc/video/vie_encoder.cc
index 2287a7e3bb911b74d1889a3113b5c193a03d79b7..ed6d07cdacbed0908e3813c657320346a3748016 100644
--- a/webrtc/video/vie_encoder.cc
+++ b/webrtc/video/vie_encoder.cc
@@ -483,8 +483,8 @@ void ViEEncoder::ConfigureEncoderOnTaskQueue(VideoEncoderConfig config,
if (last_frame_info_) {
ReconfigureEncoder();
} else if (settings_.internal_source) {
- last_frame_info_ = rtc::Optional<VideoFrameInfo>(
- VideoFrameInfo(176, 144, kVideoRotation_0, false));
+ last_frame_info_ =
+ rtc::Optional<VideoFrameInfo>(VideoFrameInfo(176, 144, false));
ReconfigureEncoder();
}
}
@@ -653,16 +653,13 @@ void ViEEncoder::EncodeVideoFrame(const VideoFrame& video_frame,
if (!last_frame_info_ || video_frame.width() != last_frame_info_->width ||
video_frame.height() != last_frame_info_->height ||
- video_frame.rotation() != last_frame_info_->rotation ||
video_frame.is_texture() != last_frame_info_->is_texture) {
pending_encoder_reconfiguration_ = true;
- last_frame_info_ = rtc::Optional<VideoFrameInfo>(
- VideoFrameInfo(video_frame.width(), video_frame.height(),
- video_frame.rotation(), video_frame.is_texture()));
+ last_frame_info_ = rtc::Optional<VideoFrameInfo>(VideoFrameInfo(
+ video_frame.width(), video_frame.height(), video_frame.is_texture()));
LOG(LS_INFO) << "Video frame parameters changed: dimensions="
<< last_frame_info_->width << "x" << last_frame_info_->height
- << ", rotation=" << last_frame_info_->rotation
- << ", texture=" << last_frame_info_->is_texture;
+ << ", texture=" << last_frame_info_->is_texture << ".";
}
if (initial_rampup_ < kMaxInitialFramedrop &&
« no previous file with comments | « webrtc/video/vie_encoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698