Index: webrtc/media/base/videoengine_unittest.h |
diff --git a/webrtc/media/base/videoengine_unittest.h b/webrtc/media/base/videoengine_unittest.h |
index 0b190543e174d6df397b5f5b30d9072c908edac5..020336a1677afa735372735b485f272bb1ca5bf9 100644 |
--- a/webrtc/media/base/videoengine_unittest.h |
+++ b/webrtc/media/base/videoengine_unittest.h |
@@ -11,6 +11,7 @@ |
#ifndef WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ // NOLINT |
#define WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ |
+#include <memory> |
#include <string> |
#include <vector> |
@@ -338,7 +339,7 @@ class VideoMediaChannelTest : public testing::Test, |
bool CountRtcpFir(int start_index, int stop_index, int* fir_count) { |
int count = 0; |
for (int i = start_index; i < stop_index; ++i) { |
- rtc::scoped_ptr<const rtc::Buffer> p(GetRtcpPacket(i)); |
+ std::unique_ptr<const rtc::Buffer> p(GetRtcpPacket(i)); |
rtc::ByteBuffer buf(*p); |
size_t total_len = 0; |
// The packet may be a compound RTCP packet. |
@@ -403,7 +404,7 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_TRUE(SetSend(true)); |
EXPECT_TRUE(SendFrame()); |
EXPECT_TRUE_WAIT(NumRtpPackets() > 0, kTimeout); |
- rtc::scoped_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
+ std::unique_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
EXPECT_EQ(codec.id, GetPayloadType(p.get())); |
} |
// Tests that we can send and receive frames. |
@@ -414,7 +415,7 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_EQ(0, renderer_.num_rendered_frames()); |
EXPECT_TRUE(SendFrame()); |
EXPECT_FRAME_WAIT(1, codec.width, codec.height, kTimeout); |
- rtc::scoped_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
+ std::unique_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
EXPECT_EQ(codec.id, GetPayloadType(p.get())); |
} |
void SendReceiveManyAndGetStats(const cricket::VideoCodec& codec, |
@@ -429,7 +430,7 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_FRAME_WAIT(frame + i * fps, codec.width, codec.height, kTimeout); |
} |
} |
- rtc::scoped_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
+ std::unique_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
EXPECT_EQ(codec.id, GetPayloadType(p.get())); |
} |
@@ -557,7 +558,7 @@ class VideoMediaChannelTest : public testing::Test, |
// Add an additional capturer, and hook up a renderer to receive it. |
cricket::FakeVideoRenderer renderer2; |
- rtc::scoped_ptr<cricket::FakeVideoCapturer> capturer( |
+ std::unique_ptr<cricket::FakeVideoCapturer> capturer( |
CreateFakeVideoCapturer()); |
capturer->SetScreencast(true); |
const int kTestWidth = 160; |
@@ -623,7 +624,7 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_TRUE(SendFrame()); |
EXPECT_TRUE_WAIT(NumRtpPackets() > 0, kTimeout); |
uint32_t ssrc = 0; |
- rtc::scoped_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
+ std::unique_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
ParseRtpPacket(p.get(), NULL, NULL, NULL, NULL, &ssrc, NULL); |
EXPECT_EQ(kSsrc, ssrc); |
// Packets are being paced out, so these can mismatch between the first and |
@@ -646,7 +647,7 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_TRUE(WaitAndSendFrame(0)); |
EXPECT_TRUE_WAIT(NumRtpPackets() > 0, kTimeout); |
uint32_t ssrc = 0; |
- rtc::scoped_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
+ std::unique_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
ParseRtpPacket(p.get(), NULL, NULL, NULL, NULL, &ssrc, NULL); |
EXPECT_EQ(999u, ssrc); |
// Packets are being paced out, so these can mismatch between the first and |
@@ -696,7 +697,7 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_GT(NumRtpPackets(), 0); |
uint32_t ssrc = 0; |
size_t last_packet = NumRtpPackets() - 1; |
- rtc::scoped_ptr<const rtc::Buffer> |
+ std::unique_ptr<const rtc::Buffer> |
p(GetRtpPacket(static_cast<int>(last_packet))); |
ParseRtpPacket(p.get(), NULL, NULL, NULL, NULL, &ssrc, NULL); |
EXPECT_EQ(kSsrc, ssrc); |
@@ -746,7 +747,7 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_FRAME_ON_RENDERER_WAIT( |
renderer2, 1, DefaultCodec().width, DefaultCodec().height, kTimeout); |
- rtc::scoped_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
+ std::unique_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
EXPECT_EQ(DefaultCodec().id, GetPayloadType(p.get())); |
EXPECT_EQ(DefaultCodec().width, renderer1.width()); |
EXPECT_EQ(DefaultCodec().height, renderer1.height()); |
@@ -768,7 +769,7 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_EQ(0, renderer_.num_rendered_frames()); |
EXPECT_TRUE(SendFrame()); |
EXPECT_FRAME_WAIT(1, codec.width, codec.height, kTimeout); |
- rtc::scoped_ptr<cricket::FakeVideoCapturer> capturer( |
+ std::unique_ptr<cricket::FakeVideoCapturer> capturer( |
CreateFakeVideoCapturer()); |
capturer->SetScreencast(true); |
cricket::VideoFormat format(480, 360, |
@@ -865,7 +866,7 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_TRUE(channel_->SetSink(1, &renderer1)); |
EXPECT_TRUE(channel_->AddSendStream( |
cricket::StreamParams::CreateLegacy(1))); |
- rtc::scoped_ptr<cricket::FakeVideoCapturer> capturer1( |
+ std::unique_ptr<cricket::FakeVideoCapturer> capturer1( |
CreateFakeVideoCapturer()); |
capturer1->SetScreencast(true); |
EXPECT_EQ(cricket::CS_RUNNING, capturer1->Start(capture_format)); |
@@ -877,7 +878,7 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_TRUE(channel_->SetSink(2, &renderer2)); |
EXPECT_TRUE(channel_->AddSendStream( |
cricket::StreamParams::CreateLegacy(2))); |
- rtc::scoped_ptr<cricket::FakeVideoCapturer> capturer2( |
+ std::unique_ptr<cricket::FakeVideoCapturer> capturer2( |
CreateFakeVideoCapturer()); |
capturer2->SetScreencast(true); |
EXPECT_EQ(cricket::CS_RUNNING, capturer2->Start(capture_format)); |
@@ -933,7 +934,7 @@ class VideoMediaChannelTest : public testing::Test, |
// Registering an external capturer is currently the same as screen casting |
// (update the test when this changes). |
- rtc::scoped_ptr<cricket::FakeVideoCapturer> capturer( |
+ std::unique_ptr<cricket::FakeVideoCapturer> capturer( |
CreateFakeVideoCapturer()); |
capturer->SetScreencast(true); |
const std::vector<cricket::VideoFormat>* formats = |
@@ -1007,7 +1008,7 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_TRUE(WaitAndSendFrame(30)); // Should be rendered. |
frame_count += 2; |
EXPECT_FRAME_WAIT(frame_count, codec.width, codec.height, kTimeout); |
- rtc::scoped_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
+ std::unique_ptr<const rtc::Buffer> p(GetRtpPacket(0)); |
EXPECT_EQ(codec.id, GetPayloadType(p.get())); |
// The channel requires 15 fps. |
@@ -1175,11 +1176,11 @@ class VideoMediaChannelTest : public testing::Test, |
EXPECT_EQ(0u, channel_->GetDefaultSendChannelSsrc()); |
} |
- const rtc::scoped_ptr<webrtc::Call> call_; |
+ const std::unique_ptr<webrtc::Call> call_; |
VideoEngineOverride<E> engine_; |
- rtc::scoped_ptr<cricket::FakeVideoCapturer> video_capturer_; |
- rtc::scoped_ptr<cricket::FakeVideoCapturer> video_capturer_2_; |
- rtc::scoped_ptr<C> channel_; |
+ std::unique_ptr<cricket::FakeVideoCapturer> video_capturer_; |
+ std::unique_ptr<cricket::FakeVideoCapturer> video_capturer_2_; |
+ std::unique_ptr<C> channel_; |
cricket::FakeNetworkInterface network_interface_; |
cricket::FakeVideoRenderer renderer_; |
cricket::VideoMediaChannel::Error media_error_; |