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

Unified Diff: webrtc/examples/peerconnection/client/main_wnd.cc

Issue 2517173004: Move VideoFrame and related declarations to webrtc/api/video. (Closed)
Patch Set: Make rotation check clearer. Created 3 years, 11 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/main_wnd.h ('k') | webrtc/media/base/adaptedvideotracksource.cc » ('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 22a45b0445e6731aa19a545fb9188467c8c8245d..4830d29d156508695f030bc0df83992954abb64a 100644
--- a/webrtc/examples/peerconnection/client/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/main_wnd.cc
@@ -13,6 +13,7 @@
#include <math.h>
#include "libyuv/convert_argb.h"
+#include "webrtc/api/video/i420_buffer.h"
#include "webrtc/examples/peerconnection/client/defaults.h"
#include "webrtc/base/arraysize.h"
#include "webrtc/base/common.h"
@@ -606,8 +607,10 @@ void MainWnd::VideoRenderer::OnFrame(
AutoLock<VideoRenderer> lock(this);
rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer(
- webrtc::I420Buffer::Rotate(video_frame.video_frame_buffer(),
- video_frame.rotation()));
+ video_frame.video_frame_buffer());
+ if (video_frame.rotation() != webrtc::kVideoRotation_0) {
+ buffer = webrtc::I420Buffer::Rotate(*buffer, video_frame.rotation());
+ }
SetSize(buffer->width(), buffer->height());
« no previous file with comments | « webrtc/examples/peerconnection/client/main_wnd.h ('k') | webrtc/media/base/adaptedvideotracksource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698