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

Unified Diff: webrtc/test/frame_generator_capturer.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: Fix merge mistake. 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
« no previous file with comments | « webrtc/test/frame_generator_capturer.h ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/frame_generator_capturer.cc
diff --git a/webrtc/test/frame_generator_capturer.cc b/webrtc/test/frame_generator_capturer.cc
index 35ce6168a2e99bffa79e2f7fd37596059d58a942..95ac624c42188e567f6b3fd863ad1b9bb54379db 100644
--- a/webrtc/test/frame_generator_capturer.cc
+++ b/webrtc/test/frame_generator_capturer.cc
@@ -80,6 +80,11 @@ FrameGeneratorCapturer::~FrameGeneratorCapturer() {
thread_.Stop();
}
+void FrameGeneratorCapturer::SetFakeRotation(VideoRotation rotation) {
+ rtc::CritScope cs(&lock_);
+ fake_rotation_ = rotation;
+}
+
bool FrameGeneratorCapturer::Init() {
// This check is added because frame_generator_ might be file based and should
// not crash because a file moved.
@@ -104,6 +109,7 @@ void FrameGeneratorCapturer::InsertFrame() {
if (sending_) {
VideoFrame* frame = frame_generator_->NextFrame();
frame->set_ntp_time_ms(clock_->CurrentNtpInMilliseconds());
+ frame->set_rotation(fake_rotation_);
if (first_frame_capture_time_ == -1) {
first_frame_capture_time_ = frame->ntp_time_ms();
}
« no previous file with comments | « webrtc/test/frame_generator_capturer.h ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698