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

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

Issue 2471783002: Revert of Delete all use of cricket::VideoFrame and cricket::WebRtcVideoFrame. (Closed)
Patch Set: Created 4 years, 1 month 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/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 8d7d11ac153727d1489ebfe43e2381ff20885975..eda66178265b72eb8bc23adebcd760b01bdf91d1 100644
--- a/webrtc/examples/peerconnection/client/linux/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
@@ -19,6 +19,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;
@@ -482,15 +483,18 @@
}
void GtkMainWnd::VideoRenderer::OnFrame(
- const webrtc::VideoFrame& video_frame) {
+ const cricket::VideoFrame& video_frame) {
gdk_threads_enter();
+ 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());
+
rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer(
- webrtc::I420Buffer::Rotate(video_frame.video_frame_buffer(),
- video_frame.rotation()));
-
- SetSize(buffer->width(), buffer->height());
-
+ frame.video_frame_buffer());
libyuv::I420ToRGBA(buffer->DataY(), buffer->StrideY(),
buffer->DataU(), buffer->StrideU(),
buffer->DataV(), buffer->StrideV(),
« no previous file with comments | « webrtc/examples/peerconnection/client/linux/main_wnd.h ('k') | webrtc/examples/peerconnection/client/main_wnd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698