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

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

Issue 2287233002: Delete cricket::VideoFrame::ConvertToRgbBuffer. (Closed)
Patch Set: Rebase. 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/examples/peerconnection/client/linux/main_wnd.cc ('k') | webrtc/media/base/videoframe.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 ea2c366785529e2c2f909c078b435f3cc9c3c7fb..7fe5132fa01d5f81a233f94f4fbe785385142a41 100644
--- a/webrtc/examples/peerconnection/client/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/main_wnd.cc
@@ -12,6 +12,7 @@
#include <math.h>
+#include "libyuv/convert_argb.h"
#include "webrtc/examples/peerconnection/client/defaults.h"
#include "webrtc/base/arraysize.h"
#include "webrtc/base/common.h"
@@ -613,11 +614,15 @@ void MainWnd::VideoRenderer::OnFrame(
SetSize(frame.width(), frame.height());
ASSERT(image_.get() != NULL);
- frame.ConvertToRgbBuffer(cricket::FOURCC_ARGB,
- image_.get(),
- bmi_.bmiHeader.biSizeImage,
- bmi_.bmiHeader.biWidth *
- bmi_.bmiHeader.biBitCount / 8);
+ rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer(
+ frame.video_frame_buffer());
+ libyuv::I420ToARGB(buffer->DataY(), buffer->StrideY(),
+ buffer->DataU(), buffer->StrideU(),
+ buffer->DataV(), buffer->StrideV(),
+ image_.get(),
+ bmi_.bmiHeader.biWidth *
+ bmi_.bmiHeader.biBitCount / 8,
+ buffer->width(), buffer->height());
}
InvalidateRect(wnd_, NULL, TRUE);
}
« no previous file with comments | « webrtc/examples/peerconnection/client/linux/main_wnd.cc ('k') | webrtc/media/base/videoframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698