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

Unified Diff: webrtc/examples/peerconnection/client/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
« no previous file with comments | « webrtc/examples/peerconnection/client/main_wnd.h ('k') | webrtc/media/base/adaptedvideotracksource.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 22a45b0445e6731aa19a545fb9188467c8c8245d..7fe5132fa01d5f81a233f94f4fbe785385142a41 100644
--- a/webrtc/examples/peerconnection/client/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/main_wnd.cc
@@ -17,6 +17,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";
@@ -600,18 +601,21 @@
}
void MainWnd::VideoRenderer::OnFrame(
- const webrtc::VideoFrame& video_frame) {
+ const cricket::VideoFrame& video_frame) {
{
AutoLock<VideoRenderer> lock(this);
+ 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());
+
+ ASSERT(image_.get() != NULL);
rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer(
- webrtc::I420Buffer::Rotate(video_frame.video_frame_buffer(),
- video_frame.rotation()));
-
- SetSize(buffer->width(), buffer->height());
-
- ASSERT(image_.get() != NULL);
+ frame.video_frame_buffer());
libyuv::I420ToARGB(buffer->DataY(), buffer->StrideY(),
buffer->DataU(), buffer->StrideU(),
buffer->DataV(), buffer->StrideV(),
« no previous file with comments | « webrtc/examples/peerconnection/client/main_wnd.h ('k') | webrtc/media/base/adaptedvideotracksource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698