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

Unified Diff: webrtc/media/devices/gdivideorenderer.cc

Issue 2285693002: New static I420Buffer::Rotate method, to replace GetCopyWithRotationApplied. (Closed)
Patch Set: Address magjed's comments. And add missing include. Created 4 years, 4 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/media/devices/gdivideorenderer.cc
diff --git a/webrtc/media/devices/gdivideorenderer.cc b/webrtc/media/devices/gdivideorenderer.cc
index bd67b68edd72a3b095e7c44c3ca1bc5a3f5e6f44..77bc5ebef1ce6b432da5d897db4afd2fb2b1faf3 100644
--- a/webrtc/media/devices/gdivideorenderer.cc
+++ b/webrtc/media/devices/gdivideorenderer.cc
@@ -135,10 +135,14 @@ void GdiVideoRenderer::VideoWindow::OnFrame(const VideoFrame& video_frame) {
return;
}
- const VideoFrame* frame = video_frame.GetCopyWithRotationApplied();
-
- if (SetSize(frame->width(), frame->height())) {
- SendMessage(handle(), kRenderFrameMsg, reinterpret_cast<WPARAM>(frame), 0);
+ const cricket::WebRtcVideoFrame frame(
+ webrtc::VideoFrameBuffer::Rotate(video_frame.video_frame_buffer(),
+ video_frame.rotation()),
+ webrtc::kVideoRotation_0,
+ video_frame.timestamp_us());
+
+ if (SetSize(frame.width(), frame.height())) {
+ SendMessage(handle(), kRenderFrameMsg, reinterpret_cast<WPARAM>(&frame), 0);
}
}

Powered by Google App Engine
This is Rietveld 408576698