Chromium Code Reviews| Index: webrtc/modules/video_capture/test/video_capture_unittest.cc |
| diff --git a/webrtc/modules/video_capture/test/video_capture_unittest.cc b/webrtc/modules/video_capture/test/video_capture_unittest.cc |
| index 45d2d2f2412894a03b016b720db70bd6274fcf75..6205e73fb7404ae58694c53de0fea1fe65c549ba 100644 |
| --- a/webrtc/modules/video_capture/test/video_capture_unittest.cc |
| +++ b/webrtc/modules/video_capture/test/video_capture_unittest.cc |
| @@ -11,10 +11,10 @@ |
| #include <stdio.h> |
| #include <map> |
| +#include <memory> |
| #include <sstream> |
| #include "testing/gtest/include/gtest/gtest.h" |
| -#include "webrtc/base/scoped_ptr.h" |
| #include "webrtc/base/scoped_ref_ptr.h" |
| #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
| #include "webrtc/modules/utility/include/process_thread.h" |
| @@ -25,7 +25,7 @@ |
| #include "webrtc/system_wrappers/include/tick_util.h" |
| #include "webrtc/video_frame.h" |
| -using rtc::scoped_ptr; |
| +using std::unique_ptr; |
|
stefan-webrtc
2016/02/25 14:57:33
I guess you can remove this if you're anyway writi
kwiberg-webrtc
2016/02/27 13:14:47
Done.
|
| using webrtc::CriticalSectionWrapper; |
| using webrtc::CriticalSectionScoped; |
| using webrtc::SleepMs; |
| @@ -183,7 +183,7 @@ class TestVideoCaptureCallback : public VideoCaptureDataCallback { |
| } |
| private: |
| - scoped_ptr<CriticalSectionWrapper> capture_cs_; |
| + std::unique_ptr<CriticalSectionWrapper> capture_cs_; |
| VideoCaptureCapability capability_; |
| int capture_delay_; |
| int64_t last_render_time_ms_; |
| @@ -223,7 +223,7 @@ class TestVideoCaptureFeedBack : public VideoCaptureFeedBack { |
| } |
| private: |
| - scoped_ptr<CriticalSectionWrapper> capture_cs_; |
| + std::unique_ptr<CriticalSectionWrapper> capture_cs_; |
| unsigned int frame_rate_; |
| VideoCaptureAlarm alarm_; |
| }; |
| @@ -270,7 +270,7 @@ class VideoCaptureTest : public testing::Test { |
| EXPECT_EQ(capability.height, resulting_capability.height); |
| } |
| - scoped_ptr<VideoCaptureModule::DeviceInfo> device_info_; |
| + std::unique_ptr<VideoCaptureModule::DeviceInfo> device_info_; |
| unsigned int number_of_devices_; |
| }; |
| @@ -440,7 +440,8 @@ class VideoCaptureExternalTest : public testing::Test { |
| public: |
| void SetUp() { |
| capture_module_ = VideoCaptureFactory::Create(0, capture_input_interface_); |
| - process_module_ = webrtc::ProcessThread::Create("ProcessThread"); |
| + process_module_ = |
| + rtc::ScopedToUnique(webrtc::ProcessThread::Create("ProcessThread")); |
| process_module_->Start(); |
| process_module_->RegisterModule(capture_module_); |
| @@ -472,7 +473,7 @@ class VideoCaptureExternalTest : public testing::Test { |
| webrtc::VideoCaptureExternal* capture_input_interface_; |
| rtc::scoped_refptr<VideoCaptureModule> capture_module_; |
| - rtc::scoped_ptr<webrtc::ProcessThread> process_module_; |
| + std::unique_ptr<webrtc::ProcessThread> process_module_; |
| webrtc::VideoFrame test_frame_; |
| TestVideoCaptureCallback capture_callback_; |
| TestVideoCaptureFeedBack capture_feedback_; |
| @@ -483,7 +484,7 @@ TEST_F(VideoCaptureExternalTest, TestExternalCapture) { |
| size_t length = webrtc::CalcBufferSize(webrtc::kI420, |
| test_frame_.width(), |
| test_frame_.height()); |
| - scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]); |
| + std::unique_ptr<uint8_t[]> test_buffer(new uint8_t[length]); |
| webrtc::ExtractBuffer(test_frame_, length, test_buffer.get()); |
| EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), |
| length, capture_callback_.capability(), 0)); |
| @@ -505,7 +506,7 @@ TEST_F(VideoCaptureExternalTest, MAYBE_FrameRate) { |
| size_t length = webrtc::CalcBufferSize(webrtc::kI420, |
| test_frame_.width(), |
| test_frame_.height()); |
| - scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]); |
| + std::unique_ptr<uint8_t[]> test_buffer(new uint8_t[length]); |
| webrtc::ExtractBuffer(test_frame_, length, test_buffer.get()); |
| EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), |
| length, capture_callback_.capability(), 0)); |
| @@ -521,7 +522,7 @@ TEST_F(VideoCaptureExternalTest, MAYBE_FrameRate) { |
| size_t length = webrtc::CalcBufferSize(webrtc::kI420, |
| test_frame_.width(), |
| test_frame_.height()); |
| - scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]); |
| + std::unique_ptr<uint8_t[]> test_buffer(new uint8_t[length]); |
| webrtc::ExtractBuffer(test_frame_, length, test_buffer.get()); |
| EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), |
| length, capture_callback_.capability(), 0)); |
| @@ -539,7 +540,7 @@ TEST_F(VideoCaptureExternalTest, Rotation) { |
| size_t length = webrtc::CalcBufferSize(webrtc::kI420, |
| test_frame_.width(), |
| test_frame_.height()); |
| - scoped_ptr<uint8_t[]> test_buffer(new uint8_t[length]); |
| + std::unique_ptr<uint8_t[]> test_buffer(new uint8_t[length]); |
| webrtc::ExtractBuffer(test_frame_, length, test_buffer.get()); |
| EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), |
| length, capture_callback_.capability(), 0)); |