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

Side by Side Diff: remoting/host/capturer_fake.cc

Issue 4476003: Add VideoPacket struct for video packets. Refactor Decode interface to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 10 years, 1 month 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 | « remoting/host/capturer.cc ('k') | remoting/host/capturer_fake_ascii.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "remoting/host/capturer_fake.h" 5 #include "remoting/host/capturer_fake.h"
6 6
7 #include "gfx/rect.h" 7 #include "gfx/rect.h"
8 8
9 namespace remoting { 9 namespace remoting {
10 10
(...skipping 20 matching lines...) Expand all
31 box_speed_y_(kSpeed) { 31 box_speed_y_(kSpeed) {
32 ScreenConfigurationChanged(); 32 ScreenConfigurationChanged();
33 } 33 }
34 34
35 CapturerFake::~CapturerFake() { 35 CapturerFake::~CapturerFake() {
36 } 36 }
37 37
38 void CapturerFake::ScreenConfigurationChanged() { 38 void CapturerFake::ScreenConfigurationChanged() {
39 width_ = kWidth; 39 width_ = kWidth;
40 height_ = kHeight; 40 height_ = kHeight;
41 pixel_format_ = PIXEL_FORMAT_RGB32; 41 pixel_format_ = media::VideoFrame::RGB32;
42 bytes_per_row_ = width_ * kBytesPerPixel; 42 bytes_per_row_ = width_ * kBytesPerPixel;
43 43
44 // Create memory for the buffers. 44 // Create memory for the buffers.
45 int buffer_size = height_ * bytes_per_row_; 45 int buffer_size = height_ * bytes_per_row_;
46 for (int i = 0; i < kNumBuffers; i++) { 46 for (int i = 0; i < kNumBuffers; i++) {
47 buffers_[i].reset(new uint8[buffer_size]); 47 buffers_[i].reset(new uint8[buffer_size]);
48 } 48 }
49 } 49 }
50 50
51 void CapturerFake::CalculateInvalidRects() { 51 void CapturerFake::CalculateInvalidRects() {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 row[x * kBytesPerPixel] = r; 94 row[x * kBytesPerPixel] = r;
95 row[x * kBytesPerPixel+1] = g; 95 row[x * kBytesPerPixel+1] = g;
96 row[x * kBytesPerPixel+2] = b; 96 row[x * kBytesPerPixel+2] = b;
97 row[x * kBytesPerPixel+3] = 0xff; 97 row[x * kBytesPerPixel+3] = 0xff;
98 } 98 }
99 row += bytes_per_row_; 99 row += bytes_per_row_;
100 } 100 }
101 } 101 }
102 102
103 } // namespace remoting 103 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/capturer.cc ('k') | remoting/host/capturer_fake_ascii.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698