Index: webrtc/test/frame_generator_unittest.cc |
diff --git a/webrtc/test/frame_generator_unittest.cc b/webrtc/test/frame_generator_unittest.cc |
index 6376e2c221c9a6c38e7d9c33a1971a7851de1cf7..10acd461652bfd9984989e167493e78656e20323 100644 |
--- a/webrtc/test/frame_generator_unittest.cc |
+++ b/webrtc/test/frame_generator_unittest.cc |
@@ -9,10 +9,11 @@ |
*/ |
#include <stdio.h> |
+ |
+#include <memory> |
#include <string> |
#include "testing/gtest/include/gtest/gtest.h" |
-#include "webrtc/base/scoped_ptr.h" |
#include "webrtc/test/frame_generator.h" |
#include "webrtc/test/testsupport/fileutils.h" |
@@ -46,7 +47,7 @@ class FrameGeneratorTest : public ::testing::Test { |
protected: |
void WriteYuvFile(FILE* file, uint8_t y, uint8_t u, uint8_t v) { |
assert(file); |
- rtc::scoped_ptr<uint8_t[]> plane_buffer(new uint8_t[y_size]); |
+ std::unique_ptr<uint8_t[]> plane_buffer(new uint8_t[y_size]); |
memset(plane_buffer.get(), y, y_size); |
fwrite(plane_buffer.get(), 1, y_size, file); |
memset(plane_buffer.get(), u, uv_size); |
@@ -88,7 +89,7 @@ class FrameGeneratorTest : public ::testing::Test { |
}; |
TEST_F(FrameGeneratorTest, SingleFrameFile) { |
- rtc::scoped_ptr<FrameGenerator> generator(FrameGenerator::CreateFromYuvFile( |
+ std::unique_ptr<FrameGenerator> generator(FrameGenerator::CreateFromYuvFile( |
std::vector<std::string>(1, one_frame_filename_), kFrameWidth, |
kFrameHeight, 1)); |
CheckFrameAndMutate(generator->NextFrame(), 255, 255, 255); |
@@ -96,7 +97,7 @@ TEST_F(FrameGeneratorTest, SingleFrameFile) { |
} |
TEST_F(FrameGeneratorTest, TwoFrameFile) { |
- rtc::scoped_ptr<FrameGenerator> generator(FrameGenerator::CreateFromYuvFile( |
+ std::unique_ptr<FrameGenerator> generator(FrameGenerator::CreateFromYuvFile( |
std::vector<std::string>(1, two_frame_filename_), kFrameWidth, |
kFrameHeight, 1)); |
CheckFrameAndMutate(generator->NextFrame(), 0, 0, 0); |
@@ -109,7 +110,7 @@ TEST_F(FrameGeneratorTest, MultipleFrameFiles) { |
files.push_back(two_frame_filename_); |
files.push_back(one_frame_filename_); |
- rtc::scoped_ptr<FrameGenerator> generator( |
+ std::unique_ptr<FrameGenerator> generator( |
FrameGenerator::CreateFromYuvFile(files, kFrameWidth, kFrameHeight, 1)); |
CheckFrameAndMutate(generator->NextFrame(), 0, 0, 0); |
CheckFrameAndMutate(generator->NextFrame(), 127, 127, 127); |
@@ -119,7 +120,7 @@ TEST_F(FrameGeneratorTest, MultipleFrameFiles) { |
TEST_F(FrameGeneratorTest, TwoFrameFileWithRepeat) { |
const int kRepeatCount = 3; |
- rtc::scoped_ptr<FrameGenerator> generator(FrameGenerator::CreateFromYuvFile( |
+ std::unique_ptr<FrameGenerator> generator(FrameGenerator::CreateFromYuvFile( |
std::vector<std::string>(1, two_frame_filename_), kFrameWidth, |
kFrameHeight, kRepeatCount)); |
for (int i = 0; i < kRepeatCount; ++i) |
@@ -134,7 +135,7 @@ TEST_F(FrameGeneratorTest, MultipleFrameFilesWithRepeat) { |
std::vector<std::string> files; |
files.push_back(two_frame_filename_); |
files.push_back(one_frame_filename_); |
- rtc::scoped_ptr<FrameGenerator> generator(FrameGenerator::CreateFromYuvFile( |
+ std::unique_ptr<FrameGenerator> generator(FrameGenerator::CreateFromYuvFile( |
files, kFrameWidth, kFrameHeight, kRepeatCount)); |
for (int i = 0; i < kRepeatCount; ++i) |
CheckFrameAndMutate(generator->NextFrame(), 0, 0, 0); |