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

Unified Diff: webrtc/examples/peerconnection/client/main_wnd.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/examples/peerconnection/client/linux/main_wnd.cc ('k') | webrtc/media/base/videoframe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ea2c366785529e2c2f909c078b435f3cc9c3c7fb 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,19 @@ void MainWnd::VideoRenderer::OnFrame(
{
AutoLock<VideoRenderer> lock(this);
- const cricket::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());
- 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);
}
« no previous file with comments | « webrtc/examples/peerconnection/client/linux/main_wnd.cc ('k') | webrtc/media/base/videoframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698