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

Unified Diff: webrtc/examples/peerconnection/client/linux/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/common_video/video_render_frames.h ('k') | webrtc/examples/peerconnection/client/main_wnd.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/peerconnection/client/linux/main_wnd.cc
diff --git a/webrtc/examples/peerconnection/client/linux/main_wnd.cc b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
index fa7ea4e8d07aa44dad9ea6e209e0fe8d4fb92010..529838226762d955c0812fe4bee21653e870420e 100644
--- a/webrtc/examples/peerconnection/client/linux/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
@@ -15,6 +15,7 @@
#include <stddef.h>
#include "libyuv/convert_from.h"
+#include "webrtc/api/video/i420_buffer.h"
#include "webrtc/examples/peerconnection/client/defaults.h"
#include "webrtc/base/common.h"
#include "webrtc/base/logging.h"
@@ -523,9 +524,10 @@ void GtkMainWnd::VideoRenderer::OnFrame(
gdk_threads_enter();
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());
libyuv::I420ToRGBA(buffer->DataY(), buffer->StrideY(),
« no previous file with comments | « webrtc/common_video/video_render_frames.h ('k') | webrtc/examples/peerconnection/client/main_wnd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698