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

Side by Side Diff: webrtc/video/video_capture_input_unittest.cc

Issue 1751903002: Replace scoped_ptr with unique_ptr in webrtc/video/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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/video/send_statistics_proxy_unittest.cc ('k') | webrtc/video/video_quality_test.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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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/video/video_capture_input.h" 10 #include "webrtc/video/video_capture_input.h"
11 11
12 #include <memory>
12 #include <vector> 13 #include <vector>
13 14
14 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
16 #include "webrtc/base/event.h" 17 #include "webrtc/base/event.h"
17 #include "webrtc/base/scoped_ptr.h"
18 #include "webrtc/system_wrappers/include/ref_count.h" 18 #include "webrtc/system_wrappers/include/ref_count.h"
19 #include "webrtc/system_wrappers/include/scoped_vector.h" 19 #include "webrtc/system_wrappers/include/scoped_vector.h"
20 #include "webrtc/test/fake_texture_frame.h" 20 #include "webrtc/test/fake_texture_frame.h"
21 #include "webrtc/video/send_statistics_proxy.h" 21 #include "webrtc/video/send_statistics_proxy.h"
22 22
23 using ::testing::_; 23 using ::testing::_;
24 using ::testing::Invoke; 24 using ::testing::Invoke;
25 using ::testing::NiceMock; 25 using ::testing::NiceMock;
26 using ::testing::Return; 26 using ::testing::Return;
27 using ::testing::WithArg; 27 using ::testing::WithArg;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 output_frames_.push_back(new VideoFrame(frame)); 75 output_frames_.push_back(new VideoFrame(frame));
76 output_frame_event_.Set(); 76 output_frame_event_.Set();
77 } 77 }
78 78
79 void WaitOutputFrame() { 79 void WaitOutputFrame() {
80 EXPECT_TRUE(output_frame_event_.Wait(FRAME_TIMEOUT_MS)); 80 EXPECT_TRUE(output_frame_event_.Wait(FRAME_TIMEOUT_MS));
81 } 81 }
82 82
83 SendStatisticsProxy stats_proxy_; 83 SendStatisticsProxy stats_proxy_;
84 84
85 rtc::scoped_ptr<MockVideoCaptureCallback> mock_frame_callback_; 85 std::unique_ptr<MockVideoCaptureCallback> mock_frame_callback_;
86 86
87 rtc::scoped_ptr<OveruseFrameDetector> overuse_detector_; 87 std::unique_ptr<OveruseFrameDetector> overuse_detector_;
88 88
89 // Used to send input capture frames to VideoCaptureInput. 89 // Used to send input capture frames to VideoCaptureInput.
90 rtc::scoped_ptr<internal::VideoCaptureInput> input_; 90 std::unique_ptr<internal::VideoCaptureInput> input_;
91 91
92 // Input capture frames of VideoCaptureInput. 92 // Input capture frames of VideoCaptureInput.
93 ScopedVector<VideoFrame> input_frames_; 93 ScopedVector<VideoFrame> input_frames_;
94 94
95 // Indicate an output frame has arrived. 95 // Indicate an output frame has arrived.
96 rtc::Event output_frame_event_; 96 rtc::Event output_frame_event_;
97 97
98 // Output delivered frames of VideoCaptureInput. 98 // Output delivered frames of VideoCaptureInput.
99 ScopedVector<VideoFrame> output_frames_; 99 ScopedVector<VideoFrame> output_frames_;
100 100
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 const int kSizeY = width * height * 2; 287 const int kSizeY = width * height * 2;
288 uint8_t buffer[kSizeY]; 288 uint8_t buffer[kSizeY];
289 memset(buffer, data, kSizeY); 289 memset(buffer, data, kSizeY);
290 frame->CreateFrame(buffer, buffer, buffer, width, height, width, width / 2, 290 frame->CreateFrame(buffer, buffer, buffer, width, height, width, width / 2,
291 width / 2, kVideoRotation_0); 291 width / 2, kVideoRotation_0);
292 frame->set_render_time_ms(data); 292 frame->set_render_time_ms(data);
293 return frame; 293 return frame;
294 } 294 }
295 295
296 } // namespace webrtc 296 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/send_statistics_proxy_unittest.cc ('k') | webrtc/video/video_quality_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698