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

Unified Diff: webrtc/examples/peerconnection/client/linux/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/common_video/video_frame_buffer.cc ('k') | webrtc/examples/peerconnection/client/main_wnd.cc » ('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 e2ed0085e08fa220380606e09e83ea7b96db3ff4..95229c9e13febe2efcef6941deeb1e9d05647c9e 100644
--- a/webrtc/examples/peerconnection/client/linux/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
@@ -18,6 +18,7 @@
#include "webrtc/base/common.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/stringutils.h"
+#include "webrtc/media/engine/webrtcvideoframe.h"
using rtc::sprintfn;
@@ -484,16 +485,19 @@ void GtkMainWnd::VideoRenderer::OnFrame(
const cricket::VideoFrame& video_frame) {
gdk_threads_enter();
- 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());
int size = width_ * height_ * 4;
// TODO(henrike): Convert directly to RGBA
- frame->ConvertToRgbBuffer(cricket::FOURCC_ARGB,
- image_.get(),
- size,
- width_ * 4);
+ frame.ConvertToRgbBuffer(cricket::FOURCC_ARGB,
+ image_.get(),
+ size,
+ width_ * 4);
// Convert the B,G,R,A frame to R,G,B,A, which is accepted by GTK.
// The 'A' is just padding for GTK, so we can use it as temp.
uint8_t* pix = image_.get();
« no previous file with comments | « webrtc/common_video/video_frame_buffer.cc ('k') | webrtc/examples/peerconnection/client/main_wnd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698