| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 #include "webrtc/test/frame_generator.h" | 10 #include "webrtc/test/frame_generator.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 class YuvFileGenerator : public FrameGenerator { | 122 class YuvFileGenerator : public FrameGenerator { |
| 123 public: | 123 public: |
| 124 YuvFileGenerator(std::vector<FILE*> files, | 124 YuvFileGenerator(std::vector<FILE*> files, |
| 125 size_t width, | 125 size_t width, |
| 126 size_t height, | 126 size_t height, |
| 127 int frame_repeat_count) | 127 int frame_repeat_count) |
| 128 : file_index_(0), | 128 : file_index_(0), |
| 129 files_(files), | 129 files_(files), |
| 130 width_(width), | 130 width_(width), |
| 131 height_(height), | 131 height_(height), |
| 132 frame_size_(CalcBufferSize(kI420, | 132 frame_size_(CalcBufferSize(VideoType::kI420, |
| 133 static_cast<int>(width_), | 133 static_cast<int>(width_), |
| 134 static_cast<int>(height_))), | 134 static_cast<int>(height_))), |
| 135 frame_buffer_(new uint8_t[frame_size_]), | 135 frame_buffer_(new uint8_t[frame_size_]), |
| 136 frame_display_count_(frame_repeat_count), | 136 frame_display_count_(frame_repeat_count), |
| 137 current_display_count_(0) { | 137 current_display_count_(0) { |
| 138 RTC_DCHECK_GT(width, 0); | 138 RTC_DCHECK_GT(width, 0); |
| 139 RTC_DCHECK_GT(height, 0); | 139 RTC_DCHECK_GT(height, 0); |
| 140 RTC_DCHECK_GT(frame_repeat_count, 0); | 140 RTC_DCHECK_GT(frame_repeat_count, 0); |
| 141 } | 141 } |
| 142 | 142 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 files.push_back(file); | 365 files.push_back(file); |
| 366 } | 366 } |
| 367 | 367 |
| 368 return std::unique_ptr<FrameGenerator>(new ScrollingImageFrameGenerator( | 368 return std::unique_ptr<FrameGenerator>(new ScrollingImageFrameGenerator( |
| 369 clock, files, source_width, source_height, target_width, target_height, | 369 clock, files, source_width, source_height, target_width, target_height, |
| 370 scroll_time_ms, pause_time_ms)); | 370 scroll_time_ms, pause_time_ms)); |
| 371 } | 371 } |
| 372 | 372 |
| 373 } // namespace test | 373 } // namespace test |
| 374 } // namespace webrtc | 374 } // namespace webrtc |
| OLD | NEW |