| 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..b6307399d9a169522abba5c4125f86472ab497e7 100644
|
| --- a/webrtc/examples/peerconnection/client/linux/main_wnd.cc
|
| +++ b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
|
| @@ -14,6 +14,7 @@
|
| #include <gtk/gtk.h>
|
| #include <stddef.h>
|
|
|
| +#include "libyuv/convert_from.h"
|
| #include "webrtc/examples/peerconnection/client/defaults.h"
|
| #include "webrtc/base/common.h"
|
| #include "webrtc/base/logging.h"
|
| @@ -489,11 +490,17 @@ void GtkMainWnd::VideoRenderer::OnFrame(
|
| 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);
|
| + rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer(
|
| + frame->video_frame_buffer());
|
| + libyuv::ConvertFromI420(buffer->DataY(), buffer->StrideY(),
|
| + buffer->DataU(), buffer->StrideU(),
|
| + buffer->DataV(), buffer->StrideV(),
|
| + image_.get(), width_ * 4,
|
| + buffer->width(), buffer->height(),
|
| + cricket::FOURCC_ARGB);
|
| +
|
| // 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();
|
|
|