OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/video_frame_capturer_fake.h" | 5 #include "remoting/capturer/video_frame_capturer_fake.h" |
6 | 6 |
7 #include "base/time.h" | 7 #include "base/time.h" |
8 #include "remoting/base/capture_data.h" | 8 #include "remoting/capturer/capture_data.h" |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
11 | 11 |
12 // VideoFrameCapturerFake generates a white picture of size kWidth x kHeight | 12 // VideoFrameCapturerFake generates a white picture of size kWidth x kHeight |
13 // with a rectangle of size kBoxWidth x kBoxHeight. The rectangle moves kSpeed | 13 // with a rectangle of size kBoxWidth x kBoxHeight. The rectangle moves kSpeed |
14 // pixels per frame along both axes, and bounces off the sides of the screen. | 14 // pixels per frame along both axes, and bounces off the sides of the screen. |
15 static const int kWidth = 800; | 15 static const int kWidth = 800; |
16 static const int kHeight = 600; | 16 static const int kHeight = 600; |
17 static const int kBoxWidth = 140; | 17 static const int kBoxWidth = 140; |
18 static const int kBoxHeight = 140; | 18 static const int kBoxHeight = 140; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 pixel_format_ = media::VideoFrame::RGB32; | 124 pixel_format_ = media::VideoFrame::RGB32; |
125 | 125 |
126 // Create memory for the buffers. | 126 // Create memory for the buffers. |
127 int buffer_size = size_.height() * bytes_per_row_; | 127 int buffer_size = size_.height() * bytes_per_row_; |
128 for (int i = 0; i < kNumBuffers; i++) { | 128 for (int i = 0; i < kNumBuffers; i++) { |
129 buffers_[i].reset(new uint8[buffer_size]); | 129 buffers_[i].reset(new uint8[buffer_size]); |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 } // namespace remoting | 133 } // namespace remoting |
OLD | NEW |