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

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

Issue 2285693002: New static I420Buffer::Rotate method, to replace GetCopyWithRotationApplied. (Closed)
Patch Set: Change back to static method, now in I420Buffer. 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
« no previous file with comments | « webrtc/media/devices/carbonvideorenderer.cc ('k') | webrtc/media/devices/gtkvideorenderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/devices/gdivideorenderer.cc
diff --git a/webrtc/media/devices/gdivideorenderer.cc b/webrtc/media/devices/gdivideorenderer.cc
index bd67b68edd72a3b095e7c44c3ca1bc5a3f5e6f44..320b479a47a4537c67373b8a800a3c3bcc9dc53b 100644
--- a/webrtc/media/devices/gdivideorenderer.cc
+++ b/webrtc/media/devices/gdivideorenderer.cc
@@ -17,7 +17,7 @@
#include "webrtc/base/thread.h"
#include "webrtc/base/win32window.h"
#include "webrtc/media/base/videocommon.h"
-#include "webrtc/media/base/videoframe.h"
+#include "webrtc/media/engine/webrtcvideoframe.h"
namespace cricket {
@@ -135,10 +135,13 @@ void GdiVideoRenderer::VideoWindow::OnFrame(const VideoFrame& video_frame) {
return;
}
- const VideoFrame* frame = video_frame.GetCopyWithRotationApplied();
+ const cricket::WebRtcVideoFrame frame(
+ webrtc::I420Buffer::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);
+ if (SetSize(frame.width(), frame.height())) {
+ SendMessage(handle(), kRenderFrameMsg, reinterpret_cast<WPARAM>(&frame), 0);
}
}
« no previous file with comments | « webrtc/media/devices/carbonvideorenderer.cc ('k') | webrtc/media/devices/gtkvideorenderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698