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

Unified Diff: media/cast/test/linux_output_window.cc

Issue 184813009: Cast Streaming API end-to-end browser_test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix LoggingImplTest + REBASE Created 6 years, 9 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 | « media/cast/test/linux_output_window.h ('k') | media/cast/test/receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/linux_output_window.cc
diff --git a/media/cast/test/linux_output_window.cc b/media/cast/test/linux_output_window.cc
index 735e0dd687f2b636fa007dc64c66703a5fcbd925..389bb0f38eec9e6a883ca6bb1da50680af62a933 100644
--- a/media/cast/test/linux_output_window.cc
+++ b/media/cast/test/linux_output_window.cc
@@ -106,7 +106,6 @@ void LinuxOutputWindow::CreateWindow(int x_pos,
VLOG(1) << "XShmCreateImage failed";
NOTREACHED();
}
- render_buffer_ = reinterpret_cast<uint8_t*>(image_->data);
shminfo_.readOnly = false;
// Attach image to display.
@@ -119,14 +118,16 @@ void LinuxOutputWindow::CreateWindow(int x_pos,
void LinuxOutputWindow::RenderFrame(
const scoped_refptr<media::VideoFrame>& video_frame) {
+ CHECK_LE(video_frame->coded_size().width(), image_->width);
+ CHECK_LE(video_frame->coded_size().height(), image_->height);
libyuv::I420ToARGB(video_frame->data(VideoFrame::kYPlane),
video_frame->stride(VideoFrame::kYPlane),
video_frame->data(VideoFrame::kUPlane),
video_frame->stride(VideoFrame::kUPlane),
video_frame->data(VideoFrame::kVPlane),
video_frame->stride(VideoFrame::kVPlane),
- render_buffer_,
- video_frame->stride(VideoFrame::kYPlane) * 4,
+ reinterpret_cast<uint8_t*>(image_->data),
+ image_->bytes_per_line,
video_frame->coded_size().width(),
video_frame->coded_size().height());
@@ -149,4 +150,4 @@ void LinuxOutputWindow::RenderFrame(
} // namespace test
} // namespace cast
-} // namespace media
+} // namespace media
« no previous file with comments | « media/cast/test/linux_output_window.h ('k') | media/cast/test/receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698