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

Unified Diff: webrtc/examples/peerconnection/client/main_wnd.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/examples/peerconnection/client/main_wnd.cc
diff --git a/webrtc/examples/peerconnection/client/main_wnd.cc b/webrtc/examples/peerconnection/client/main_wnd.cc
index 91e66cd519fab6b72b8734fa6ca44aeb3d8f5d09..06f20dcbaa512b82f3805dd49b120fa15334d685 100644
--- a/webrtc/examples/peerconnection/client/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/main_wnd.cc
@@ -16,6 +16,7 @@
#include "webrtc/base/arraysize.h"
#include "webrtc/base/common.h"
#include "webrtc/base/logging.h"
+#include "webrtc/media/engine/webrtcvideoframe.h"
ATOM MainWnd::wnd_class_ = 0;
const wchar_t MainWnd::kClassName[] = L"WebRTC_MainWnd";
@@ -604,17 +605,20 @@ void MainWnd::VideoRenderer::OnFrame(
{
AutoLock<VideoRenderer> lock(this);
- const cricket::VideoFrame* frame =
- video_frame.GetCopyWithRotationApplied();
+ const cricket::WebRtcVideoFrame frame(
+ webrtc::VideoFrameBuffer::Rotate(video_frame.video_frame_buffer(),
+ video_frame.rotation()),
+ webrtc::kVideoRotation_0,
+ video_frame.timestamp_us());
- SetSize(frame->width(), frame->height());
+ SetSize(frame.width(), frame.height());
ASSERT(image_.get() != NULL);
- frame->ConvertToRgbBuffer(cricket::FOURCC_ARGB,
- image_.get(),
- bmi_.bmiHeader.biSizeImage,
- bmi_.bmiHeader.biWidth *
- bmi_.bmiHeader.biBitCount / 8);
+ frame.ConvertToRgbBuffer(cricket::FOURCC_ARGB,
+ image_.get(),
+ bmi_.bmiHeader.biSizeImage,
+ bmi_.bmiHeader.biWidth *
+ bmi_.bmiHeader.biBitCount / 8);
}
InvalidateRect(wnd_, NULL, TRUE);
}

Powered by Google App Engine
This is Rietveld 408576698