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

Side by Side Diff: webrtc/test/frame_generator.cc

Issue 1937693002: Replace scoped_ptr with unique_ptr everywhere (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@unique5
Patch Set: Created 4 years, 7 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
« no previous file with comments | « webrtc/test/fake_network_pipe_unittest.cc ('k') | webrtc/test/frame_generator_capturer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 11
12 #include <math.h> 12 #include <math.h>
13 #include <stdio.h> 13 #include <stdio.h>
14 #include <string.h> 14 #include <string.h>
15 15
16 #include <memory>
17
16 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
17 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
18 #include "webrtc/system_wrappers/include/clock.h" 20 #include "webrtc/system_wrappers/include/clock.h"
19 21
20 namespace webrtc { 22 namespace webrtc {
21 namespace test { 23 namespace test {
22 namespace { 24 namespace {
23 25
24 class ChromaGenerator : public FrameGenerator { 26 class ChromaGenerator : public FrameGenerator {
25 public: 27 public:
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 static_cast<int>(height_), 0, kVideoRotation_0, 116 static_cast<int>(height_), 0, kVideoRotation_0,
115 &last_read_frame_); 117 &last_read_frame_);
116 } 118 }
117 119
118 private: 120 private:
119 size_t file_index_; 121 size_t file_index_;
120 const std::vector<FILE*> files_; 122 const std::vector<FILE*> files_;
121 const size_t width_; 123 const size_t width_;
122 const size_t height_; 124 const size_t height_;
123 const size_t frame_size_; 125 const size_t frame_size_;
124 const rtc::scoped_ptr<uint8_t[]> frame_buffer_; 126 const std::unique_ptr<uint8_t[]> frame_buffer_;
125 const int frame_display_count_; 127 const int frame_display_count_;
126 int current_display_count_; 128 int current_display_count_;
127 VideoFrame last_read_frame_; 129 VideoFrame last_read_frame_;
128 VideoFrame temp_frame_copy_; 130 VideoFrame temp_frame_copy_;
129 }; 131 };
130 132
131 class ScrollingImageFrameGenerator : public FrameGenerator { 133 class ScrollingImageFrameGenerator : public FrameGenerator {
132 public: 134 public:
133 ScrollingImageFrameGenerator(Clock* clock, 135 ScrollingImageFrameGenerator(Clock* clock,
134 const std::vector<FILE*>& files, 136 const std::vector<FILE*>& files,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 files.push_back(file); 274 files.push_back(file);
273 } 275 }
274 276
275 return new ScrollingImageFrameGenerator( 277 return new ScrollingImageFrameGenerator(
276 clock, files, source_width, source_height, target_width, target_height, 278 clock, files, source_width, source_height, target_width, target_height,
277 scroll_time_ms, pause_time_ms); 279 scroll_time_ms, pause_time_ms);
278 } 280 }
279 281
280 } // namespace test 282 } // namespace test
281 } // namespace webrtc 283 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/fake_network_pipe_unittest.cc ('k') | webrtc/test/frame_generator_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698