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

Side by Side Diff: media/cast/test/linux_output_window.cc

Issue 147993010: Cast: end2end bug fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + nits Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/test/end2end_unittest.cc ('k') | media/cast/test/utility/video_utility.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/test/linux_output_window.h" 5 #include "media/cast/test/linux_output_window.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/base/video_frame.h" 8 #include "media/base/video_frame.h"
9 #include "third_party/libyuv/include/libyuv/convert.h" 9 #include "third_party/libyuv/include/libyuv/convert.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 void LinuxOutputWindow::RenderFrame( 120 void LinuxOutputWindow::RenderFrame(
121 const scoped_refptr<media::VideoFrame>& video_frame) { 121 const scoped_refptr<media::VideoFrame>& video_frame) {
122 libyuv::I420ToARGB(video_frame->data(VideoFrame::kYPlane), 122 libyuv::I420ToARGB(video_frame->data(VideoFrame::kYPlane),
123 video_frame->stride(VideoFrame::kYPlane), 123 video_frame->stride(VideoFrame::kYPlane),
124 video_frame->data(VideoFrame::kUPlane), 124 video_frame->data(VideoFrame::kUPlane),
125 video_frame->stride(VideoFrame::kUPlane), 125 video_frame->stride(VideoFrame::kUPlane),
126 video_frame->data(VideoFrame::kVPlane), 126 video_frame->data(VideoFrame::kVPlane),
127 video_frame->stride(VideoFrame::kVPlane), 127 video_frame->stride(VideoFrame::kVPlane),
128 render_buffer_, 128 render_buffer_,
129 video_frame->coded_size().width() * 4, // Stride. 129 video_frame->stride(VideoFrame::kYPlane) * 4,
130 video_frame->coded_size().width(), 130 video_frame->coded_size().width(),
131 video_frame->coded_size().height()); 131 video_frame->coded_size().height());
132 132
133 // Place image in window. 133 // Place image in window.
134 XShmPutImage(display_, 134 XShmPutImage(display_,
135 window_, 135 window_,
136 gc_, 136 gc_,
137 image_, 137 image_,
138 0, 138 0,
139 0, 139 0,
140 0, 140 0,
141 0, 141 0,
142 video_frame->coded_size().width(), 142 video_frame->coded_size().width(),
143 video_frame->coded_size().height(), 143 video_frame->coded_size().height(),
144 true); 144 true);
145 145
146 // Very important for the image to update properly! 146 // Very important for the image to update properly!
147 XSync(display_, false); 147 XSync(display_, false);
148 } 148 }
149 149
150 } // namespace test 150 } // namespace test
151 } // namespace cast 151 } // namespace cast
152 } // namespace media 152 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/test/end2end_unittest.cc ('k') | media/cast/test/utility/video_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698