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

Unified Diff: webrtc/video/video_send_stream_tests.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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/video_receive_stream.h ('k') | webrtc/video/vie_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream_tests.cc
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index e8f1101606ec6673192656df90809f0683bb0800..4243ee69de42b8e9c9afd1efc79d5985e18e2b69 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <algorithm> // max
+#include <memory>
#include <vector>
#include "testing/gtest/include/gtest/gtest.h"
@@ -18,7 +19,6 @@
#include "webrtc/base/event.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/platform_thread.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/call.h"
#include "webrtc/call/transport_adapter.h"
#include "webrtc/frame_callback.h"
@@ -304,7 +304,7 @@ class FakeReceiveStatistics : public NullReceiveStatistics {
RtcpStatistics stats_;
};
- rtc::scoped_ptr<LossyStatistician> lossy_stats_;
+ std::unique_ptr<LossyStatistician> lossy_stats_;
StatisticianMap stats_map_;
};
@@ -442,8 +442,8 @@ class FecObserver : public test::EndToEndTest {
EXPECT_TRUE(Wait()) << "Timed out waiting for FEC and media packets.";
}
- rtc::scoped_ptr<internal::TransportAdapter> transport_adapter_;
- rtc::scoped_ptr<VideoEncoder> encoder_;
+ std::unique_ptr<internal::TransportAdapter> transport_adapter_;
+ std::unique_ptr<VideoEncoder> encoder_;
const std::string payload_name_;
const bool use_nack_;
const bool expect_red_;
@@ -562,7 +562,7 @@ void VideoSendStreamTest::TestNackRetransmission(
EXPECT_TRUE(Wait()) << "Timed out while waiting for NACK retransmission.";
}
- rtc::scoped_ptr<internal::TransportAdapter> transport_adapter_;
+ std::unique_ptr<internal::TransportAdapter> transport_adapter_;
int send_count_;
uint32_t retransmit_ssrc_;
uint8_t retransmit_payload_type_;
@@ -758,7 +758,7 @@ void VideoSendStreamTest::TestPacketFragmentationSize(VideoFormat format,
EXPECT_TRUE(Wait()) << "Timed out while observing incoming RTP packets.";
}
- rtc::scoped_ptr<internal::TransportAdapter> transport_adapter_;
+ std::unique_ptr<internal::TransportAdapter> transport_adapter_;
test::ConfigurableFrameSizeEncoder encoder_;
const size_t max_packet_size_;
@@ -937,7 +937,7 @@ TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) {
EXPECT_EQ(0, rtcp_sender.SendRTCP(feedback_state, kRtcpRr));
}
- rtc::scoped_ptr<internal::TransportAdapter> transport_adapter_;
+ std::unique_ptr<internal::TransportAdapter> transport_adapter_;
Clock* const clock_;
VideoSendStream* stream_;
@@ -1015,7 +1015,7 @@ TEST_F(VideoSendStreamTest, NoPaddingWhenVideoIsMuted) {
}
Clock* const clock_;
- rtc::scoped_ptr<internal::TransportAdapter> transport_adapter_;
+ std::unique_ptr<internal::TransportAdapter> transport_adapter_;
rtc::CriticalSection crit_;
int64_t last_packet_time_ms_ GUARDED_BY(crit_);
test::FrameGeneratorCapturer* capturer_ GUARDED_BY(crit_);
@@ -1103,8 +1103,8 @@ TEST_F(VideoSendStreamTest, MinTransmitBitrateRespectsRemb) {
<< "Timeout while waiting for low bitrate stats after REMB.";
}
- rtc::scoped_ptr<RtpRtcp> rtp_rtcp_;
- rtc::scoped_ptr<internal::TransportAdapter> feedback_transport_;
+ std::unique_ptr<RtpRtcp> rtp_rtcp_;
+ std::unique_ptr<internal::TransportAdapter> feedback_transport_;
VideoSendStream* stream_;
bool bitrate_capped_;
} test;
@@ -1292,7 +1292,7 @@ void ExpectEqualFramesVector(const std::vector<VideoFrame>& frames1,
VideoFrame CreateVideoFrame(int width, int height, uint8_t data) {
const int kSizeY = width * height * 2;
- rtc::scoped_ptr<uint8_t[]> buffer(new uint8_t[kSizeY]);
+ std::unique_ptr<uint8_t[]> buffer(new uint8_t[kSizeY]);
memset(buffer.get(), data, kSizeY);
VideoFrame frame;
frame.CreateFrame(buffer.get(), buffer.get(), buffer.get(), width, height,
@@ -2168,7 +2168,7 @@ class Vp9HeaderObserver : public test::SendTest {
VerifyTl0Idx(vp9);
}
- rtc::scoped_ptr<VP9Encoder> vp9_encoder_;
+ std::unique_ptr<VP9Encoder> vp9_encoder_;
VideoCodecVP9 vp9_settings_;
webrtc::VideoEncoderConfig encoder_config_;
RTPHeader last_header_;
« no previous file with comments | « webrtc/video/video_receive_stream.h ('k') | webrtc/video/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698