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

Unified Diff: remoting/protocol/webrtc_video_renderer_adapter.cc

Issue 2968663002: Update WebrtcVideoRendererAdapter to new buffer interface (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/webrtc_video_renderer_adapter.cc
diff --git a/remoting/protocol/webrtc_video_renderer_adapter.cc b/remoting/protocol/webrtc_video_renderer_adapter.cc
index 202ed9bb3ebb2ccc416d3aedf85158fcf7b66580..56e7701f5fda59f9201de553823747980f033d7c 100644
--- a/remoting/protocol/webrtc_video_renderer_adapter.cc
+++ b/remoting/protocol/webrtc_video_renderer_adapter.cc
@@ -40,11 +40,13 @@ std::unique_ptr<webrtc::DesktopFrame> ConvertYuvToRgb(
auto yuv_to_rgb_function = (pixel_format == FrameConsumer::FORMAT_BGRA)
? &libyuv::I420ToARGB
: &libyuv::I420ToABGR;
- yuv_to_rgb_function(yuv_frame->DataY(), yuv_frame->StrideY(),
- yuv_frame->DataU(), yuv_frame->StrideU(),
- yuv_frame->DataV(), yuv_frame->StrideV(),
+ rtc::scoped_refptr<const webrtc::I420BufferInterface> i420_frame =
+ yuv_frame->ToI420();
+ yuv_to_rgb_function(i420_frame->DataY(), i420_frame->StrideY(),
+ i420_frame->DataU(), i420_frame->StrideU(),
+ i420_frame->DataV(), i420_frame->StrideV(),
rgb_frame->data(), rgb_frame->stride(),
- yuv_frame->width(), yuv_frame->height());
+ i420_frame->width(), i420_frame->height());
rgb_frame->mutable_updated_region()->AddRect(
webrtc::DesktopRect::MakeSize(rgb_frame->size()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698