Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.
This CL has been created with the following steps:
git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt
diff --new-line-format="" --unchanged-line-format="" \
/tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
/tmp/only_make_unique.txt /tmp/memory.txt | \
xargs grep -l "absl/memory" > /tmp/add-memory.txt
git grep -l "\babsl::make_unique\b" | \
xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"
git checkout PRESUBMIT.py abseil-in-webrtc.md
cat /tmp/add-memory.txt | \
xargs sed -i \
's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>
cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
xargs sed -i '/#include "absl\/memory\/memory.h"/d'
git ls-files | grep BUILD.gn | \
xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'
python tools_webrtc/gn_check_autofix.py \
-m tryserver.webrtc -b linux_rel
# Repead the gn_check_autofix step for other platforms
git ls-files | grep BUILD.gn | \
xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format
Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
diff --git a/test/BUILD.gn b/test/BUILD.gn
index 7f2fff9..6cf95c6 100644
--- a/test/BUILD.gn
+++ b/test/BUILD.gn
@@ -68,7 +68,6 @@
"../rtc_base:rtc_task_queue",
"../rtc_base/task_utils:repeating_task",
"../system_wrappers",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
}
@@ -143,7 +142,6 @@
"../rtc_base:checks",
"../rtc_base:rtc_base_approved",
"../rtc_base/system:arch",
- "//third_party/abseil-cpp/absl/memory",
]
}
@@ -263,7 +261,6 @@
"//testing/gtest",
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/flags:parse",
- "//third_party/abseil-cpp/absl/memory",
# TODO(bugs.webrtc.org/9792): This is needed for downstream projects on
# Android, where it's replaced by an internal version of fileutils that
@@ -314,7 +311,6 @@
"../rtc_base:checks",
"../rtc_base:rtc_base_approved",
"../system_wrappers",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/libyuv",
]
@@ -403,7 +399,6 @@
"//testing/gmock",
"//testing/gtest",
"//third_party/abseil-cpp/absl/flags:flag",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
]
sources = [
@@ -629,7 +624,6 @@
"../rtc_base:checks",
"../rtc_base:deprecation",
"../rtc_base:rtc_base_approved",
- "//third_party/abseil-cpp/absl/memory",
]
}
@@ -671,7 +665,6 @@
"../rtc_base:rtc_task_queue",
"../rtc_base/synchronization:sequence_checker",
"../system_wrappers",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
}
@@ -789,7 +782,6 @@
"../system_wrappers:field_trial",
"../video",
"//testing/gtest",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
if (!is_android && !build_with_chromium) {
@@ -919,7 +911,6 @@
"../common_audio",
"../modules/audio_device:audio_device_impl",
"../rtc_base:rtc_base_approved",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
}
@@ -934,7 +925,6 @@
":fileutils",
":test_support",
"../modules/audio_device:audio_device_impl",
- "//third_party/abseil-cpp/absl/memory",
]
}
diff --git a/test/audio_decoder_proxy_factory.h b/test/audio_decoder_proxy_factory.h
index fa5795b..821e6c6 100644
--- a/test/audio_decoder_proxy_factory.h
+++ b/test/audio_decoder_proxy_factory.h
@@ -15,7 +15,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "api/audio_codecs/audio_decoder.h"
#include "api/audio_codecs/audio_decoder_factory.h"
@@ -43,7 +42,7 @@
std::unique_ptr<AudioDecoder> MakeAudioDecoder(
const SdpAudioFormat& /* format */,
absl::optional<AudioCodecPairId> /* codec_pair_id */) override {
- return absl::make_unique<DecoderProxy>(decoder_);
+ return std::make_unique<DecoderProxy>(decoder_);
}
private:
diff --git a/test/call_test.cc b/test/call_test.cc
index 20c8892..557c842 100644
--- a/test/call_test.cc
+++ b/test/call_test.cc
@@ -11,8 +11,8 @@
#include "test/call_test.h"
#include <algorithm>
+#include <memory>
-#include "absl/memory/memory.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/task_queue/default_task_queue_factory.h"
@@ -32,22 +32,22 @@
CallTest::CallTest()
: clock_(Clock::GetRealTimeClock()),
task_queue_factory_(CreateDefaultTaskQueueFactory()),
- send_event_log_(absl::make_unique<RtcEventLogNull>()),
- recv_event_log_(absl::make_unique<RtcEventLogNull>()),
+ send_event_log_(std::make_unique<RtcEventLogNull>()),
+ recv_event_log_(std::make_unique<RtcEventLogNull>()),
audio_send_config_(/*send_transport=*/nullptr, MediaTransportConfig()),
audio_send_stream_(nullptr),
frame_generator_capturer_(nullptr),
fake_encoder_factory_([this]() {
std::unique_ptr<FakeEncoder> fake_encoder;
if (video_encoder_configs_[0].codec_type == kVideoCodecVP8) {
- fake_encoder = absl::make_unique<FakeVP8Encoder>(clock_);
+ fake_encoder = std::make_unique<FakeVP8Encoder>(clock_);
} else {
- fake_encoder = absl::make_unique<FakeEncoder>(clock_);
+ fake_encoder = std::make_unique<FakeEncoder>(clock_);
}
fake_encoder->SetMaxBitrate(fake_encoder_max_bitrate_);
return fake_encoder;
}),
- fake_decoder_factory_([]() { return absl::make_unique<FakeDecoder>(); }),
+ fake_decoder_factory_([]() { return std::make_unique<FakeDecoder>(); }),
bitrate_allocator_factory_(CreateBuiltinVideoBitrateAllocatorFactory()),
num_video_streams_(1),
num_audio_streams_(0),
@@ -483,7 +483,7 @@
int height) {
video_sources_.clear();
auto frame_generator_capturer =
- absl::make_unique<test::FrameGeneratorCapturer>(
+ std::make_unique<test::FrameGeneratorCapturer>(
clock,
test::FrameGenerator::CreateSquareGenerator(
width, height, absl::nullopt, absl::nullopt),
@@ -499,7 +499,7 @@
int height) {
video_sources_.clear();
auto frame_generator_capturer =
- absl::make_unique<test::FrameGeneratorCapturer>(
+ std::make_unique<test::FrameGeneratorCapturer>(
clock_,
test::FrameGenerator::CreateSquareGenerator(
width, height, absl::nullopt, absl::nullopt),
@@ -782,9 +782,9 @@
return new PacketTransport(
task_queue, sender_call, this, test::PacketTransport::kSender,
CallTest::payload_type_map_,
- absl::make_unique<FakeNetworkPipe>(
+ std::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(),
- absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig())));
+ std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig())));
}
test::PacketTransport* BaseTest::CreateReceiveTransport(
@@ -792,9 +792,9 @@
return new PacketTransport(
task_queue, nullptr, this, test::PacketTransport::kReceiver,
CallTest::payload_type_map_,
- absl::make_unique<FakeNetworkPipe>(
+ std::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(),
- absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig())));
+ std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig())));
}
size_t BaseTest::GetNumVideoStreams() const {
diff --git a/test/fake_decoder.cc b/test/fake_decoder.cc
index c5ba231..e80c31c 100644
--- a/test/fake_decoder.cc
+++ b/test/fake_decoder.cc
@@ -12,7 +12,8 @@
#include <string.h>
-#include "absl/memory/memory.h"
+#include <memory>
+
#include "api/scoped_refptr.h"
#include "api/video/i420_buffer.h"
#include "api/video/video_frame.h"
@@ -81,7 +82,7 @@
RTC_CHECK(task_queue_factory_);
if (!task_queue_) {
task_queue_ =
- absl::make_unique<rtc::TaskQueue>(task_queue_factory_->CreateTaskQueue(
+ std::make_unique<rtc::TaskQueue>(task_queue_factory_->CreateTaskQueue(
"fake_decoder", TaskQueueFactory::Priority::NORMAL));
}
decode_delay_ms_ = decode_delay_ms;
diff --git a/test/fake_encoder.cc b/test/fake_encoder.cc
index a1e9742..8ee1e99 100644
--- a/test/fake_encoder.cc
+++ b/test/fake_encoder.cc
@@ -17,7 +17,6 @@
#include <memory>
#include <string>
-#include "absl/memory/memory.h"
#include "api/task_queue/queued_task.h"
#include "api/video/video_content_type.h"
#include "modules/video_coding/codecs/h264/include/h264_globals.h"
@@ -287,7 +286,7 @@
current_idr_counter = idr_counter_;
++idr_counter_;
}
- auto fragmentation = absl::make_unique<RTPFragmentationHeader>();
+ auto fragmentation = std::make_unique<RTPFragmentationHeader>();
if (current_idr_counter % kIdrFrequency == 0 &&
encoded_image->size() > kSpsSize + kPpsSize + 1) {
@@ -412,8 +411,7 @@
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
}
- queue->PostTask(
- absl::make_unique<EncodeTask>(this, input_image, frame_types));
+ queue->PostTask(std::make_unique<EncodeTask>(this, input_image, frame_types));
return WEBRTC_VIDEO_CODEC_OK;
}
diff --git a/test/fake_vp8_encoder_unittest.cc b/test/fake_vp8_encoder_unittest.cc
index 796ccda6..454f946 100644
--- a/test/fake_vp8_encoder_unittest.cc
+++ b/test/fake_vp8_encoder_unittest.cc
@@ -13,7 +13,6 @@
#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "api/test/create_simulcast_test_fixture.h"
#include "api/test/simulcast_test_fixture.h"
#include "api/test/video/function_video_decoder_factory.h"
@@ -28,12 +27,12 @@
std::unique_ptr<SimulcastTestFixture> CreateSpecificSimulcastTestFixture() {
std::unique_ptr<VideoEncoderFactory> encoder_factory =
- absl::make_unique<FunctionVideoEncoderFactory>([]() {
- return absl::make_unique<FakeVP8Encoder>(Clock::GetRealTimeClock());
+ std::make_unique<FunctionVideoEncoderFactory>([]() {
+ return std::make_unique<FakeVP8Encoder>(Clock::GetRealTimeClock());
});
std::unique_ptr<VideoDecoderFactory> decoder_factory =
- absl::make_unique<FunctionVideoDecoderFactory>(
- []() { return absl::make_unique<FakeVp8Decoder>(); });
+ std::make_unique<FunctionVideoDecoderFactory>(
+ []() { return std::make_unique<FakeVp8Decoder>(); });
return CreateSimulcastTestFixture(std::move(encoder_factory),
std::move(decoder_factory),
SdpVideoFormat("VP8"));
diff --git a/test/frame_generator.cc b/test/frame_generator.cc
index 276069e..281102d 100644
--- a/test/frame_generator.cc
+++ b/test/frame_generator.cc
@@ -15,7 +15,6 @@
#include <cstdio>
#include <memory>
-#include "absl/memory/memory.h"
#include "api/scoped_refptr.h"
#include "api/video/i010_buffer.h"
#include "api/video/i420_buffer.h"
@@ -103,12 +102,12 @@
buffer = I010Buffer::Copy(*buffer->ToI420());
}
- frame_ = absl::make_unique<VideoFrame>(
- VideoFrame::Builder()
- .set_video_frame_buffer(buffer)
- .set_rotation(webrtc::kVideoRotation_0)
- .set_timestamp_us(0)
- .build());
+ frame_ =
+ std::make_unique<VideoFrame>(VideoFrame::Builder()
+ .set_video_frame_buffer(buffer)
+ .set_rotation(webrtc::kVideoRotation_0)
+ .set_timestamp_us(0)
+ .build());
return frame_.get();
}
@@ -219,7 +218,7 @@
if (++current_display_count_ >= frame_display_count_)
current_display_count_ = 0;
- temp_frame_ = absl::make_unique<VideoFrame>(
+ temp_frame_ = std::make_unique<VideoFrame>(
VideoFrame::Builder()
.set_video_frame_buffer(last_read_buffer_)
.set_rotation(webrtc::kVideoRotation_0)
@@ -288,12 +287,12 @@
if (++current_display_count_ >= frame_display_count_)
current_display_count_ = 0;
- frame_ = absl::make_unique<VideoFrame>(
- VideoFrame::Builder()
- .set_video_frame_buffer(buffer_)
- .set_rotation(webrtc::kVideoRotation_0)
- .set_timestamp_us(0)
- .build());
+ frame_ =
+ std::make_unique<VideoFrame>(VideoFrame::Builder()
+ .set_video_frame_buffer(buffer_)
+ .set_rotation(webrtc::kVideoRotation_0)
+ .set_timestamp_us(0)
+ .build());
return frame_.get();
}
diff --git a/test/frame_generator_capturer.cc b/test/frame_generator_capturer.cc
index ebf9ebb..9eda4df 100644
--- a/test/frame_generator_capturer.cc
+++ b/test/frame_generator_capturer.cc
@@ -13,10 +13,10 @@
#include <algorithm>
#include <cmath>
#include <limits>
+#include <memory>
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "rtc_base/checks.h"
#include "rtc_base/critical_section.h"
#include "rtc_base/logging.h"
@@ -69,7 +69,7 @@
Clock* clock,
TaskQueueFactory& task_queue_factory,
FrameGeneratorCapturerConfig::SquaresVideo config) {
- return absl::make_unique<FrameGeneratorCapturer>(
+ return std::make_unique<FrameGeneratorCapturer>(
clock,
FrameGenerator::CreateSquareGenerator(
config.width, config.height, config.pixel_format, config.num_squares),
@@ -79,7 +79,7 @@
Clock* clock,
TaskQueueFactory& task_queue_factory,
FrameGeneratorCapturerConfig::SquareSlides config) {
- return absl::make_unique<FrameGeneratorCapturer>(
+ return std::make_unique<FrameGeneratorCapturer>(
clock,
FrameGenerator::CreateSlideGenerator(
config.width, config.height,
@@ -92,7 +92,7 @@
TaskQueueFactory& task_queue_factory,
FrameGeneratorCapturerConfig::VideoFile config) {
RTC_CHECK(config.width && config.height);
- return absl::make_unique<FrameGeneratorCapturer>(
+ return std::make_unique<FrameGeneratorCapturer>(
clock,
FrameGenerator::CreateFromYuvFile({TransformFilePath(config.name)},
config.width, config.height,
@@ -126,7 +126,7 @@
/*frame_repeat_count*/ config.change_interval.seconds<double>() *
config.framerate);
}
- return absl::make_unique<FrameGeneratorCapturer>(
+ return std::make_unique<FrameGeneratorCapturer>(
clock, std::move(slides_generator), config.framerate, task_queue_factory);
}
diff --git a/test/fuzzers/BUILD.gn b/test/fuzzers/BUILD.gn
index 0a81bf3..7d32c97 100644
--- a/test/fuzzers/BUILD.gn
+++ b/test/fuzzers/BUILD.gn
@@ -452,7 +452,6 @@
deps = [
"../../p2p:rtc_p2p",
"../../rtc_base:rtc_base_approved",
- "//third_party/abseil-cpp/absl/memory",
]
seed_corpus = "corpora/mdns-corpus"
}
@@ -529,7 +528,6 @@
"../../modules/audio_processing:audio_buffer",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:safe_minmax",
- "//third_party/abseil-cpp/absl/memory",
]
seed_corpus = "corpora/agc-corpus"
@@ -555,7 +553,6 @@
"../../api:scoped_refptr",
"../../modules/video_coding/",
"../../system_wrappers",
- "//third_party/abseil-cpp/absl/memory",
]
}
@@ -637,7 +634,6 @@
deps = [
"../../rtc_base:rtc_base_approved",
"utils:rtp_replayer",
- "//third_party/abseil-cpp/absl/memory",
]
seed_corpus = "corpora/rtpdump-corpus/vp8"
}
@@ -649,7 +645,6 @@
deps = [
"../../rtc_base:rtc_base_approved",
"utils:rtp_replayer",
- "//third_party/abseil-cpp/absl/memory",
]
seed_corpus = "corpora/rtpdump-corpus/vp9"
}
diff --git a/test/fuzzers/agc_fuzzer.cc b/test/fuzzers/agc_fuzzer.cc
index a330c7b..a40a213 100644
--- a/test/fuzzers/agc_fuzzer.cc
+++ b/test/fuzzers/agc_fuzzer.cc
@@ -8,7 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "absl/memory/memory.h"
+#include <memory>
+
#include "modules/audio_processing/audio_buffer.h"
#include "modules/audio_processing/gain_control_impl.h"
#include "modules/audio_processing/include/audio_processing.h"
@@ -113,7 +114,7 @@
return;
}
test::FuzzDataHelper fuzz_data(rtc::ArrayView<const uint8_t>(data, size));
- auto gci = absl::make_unique<GainControlImpl>();
+ auto gci = std::make_unique<GainControlImpl>();
FuzzGainController(&fuzz_data, gci.get());
}
} // namespace webrtc
diff --git a/test/fuzzers/mdns_parser_fuzzer.cc b/test/fuzzers/mdns_parser_fuzzer.cc
index 294f683..4517423 100644
--- a/test/fuzzers/mdns_parser_fuzzer.cc
+++ b/test/fuzzers/mdns_parser_fuzzer.cc
@@ -11,7 +11,8 @@
#include <stddef.h>
#include <stdint.h>
-#include "absl/memory/memory.h"
+#include <memory>
+
#include "p2p/base/mdns_message.h"
#include "rtc_base/message_buffer_reader.h"
@@ -19,7 +20,7 @@
void FuzzOneInput(const uint8_t* data, size_t size) {
MessageBufferReader buf(reinterpret_cast<const char*>(data), size);
- auto mdns_msg = absl::make_unique<MdnsMessage>();
+ auto mdns_msg = std::make_unique<MdnsMessage>();
mdns_msg->Read(&buf);
}
diff --git a/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc b/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc
index e54b90d..f2482fe 100644
--- a/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc
+++ b/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc
@@ -8,7 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "absl/memory/memory.h"
+#include <memory>
+
#include "api/rtp_packet_infos.h"
#include "modules/video_coding/frame_object.h"
#include "modules/video_coding/packet_buffer.h"
@@ -129,7 +130,7 @@
first_packet->video_header.is_first_packet_in_frame = true;
last_packet->video_header.is_last_packet_in_frame = true;
- auto frame = absl::make_unique<video_coding::RtpFrameObject>(
+ auto frame = std::make_unique<video_coding::RtpFrameObject>(
pb, first_seq_num, last_seq_num, 0, 0, 0, 0, RtpPacketInfos());
reference_finder.ManageFrame(std::move(frame));
}
diff --git a/test/fuzzers/utils/BUILD.gn b/test/fuzzers/utils/BUILD.gn
index 007c750..e821e2f 100644
--- a/test/fuzzers/utils/BUILD.gn
+++ b/test/fuzzers/utils/BUILD.gn
@@ -37,6 +37,5 @@
"../../../test:test_renderer",
"../../../test:test_support",
"../../../test:video_test_common",
- "//third_party/abseil-cpp/absl/memory",
]
}
diff --git a/test/fuzzers/utils/rtp_replayer.cc b/test/fuzzers/utils/rtp_replayer.cc
index 0656f4c..4a9712a 100644
--- a/test/fuzzers/utils/rtp_replayer.cc
+++ b/test/fuzzers/utils/rtp_replayer.cc
@@ -11,10 +11,10 @@
#include "test/fuzzers/utils/rtp_replayer.h"
#include <algorithm>
+#include <memory>
#include <string>
#include <utility>
-#include "absl/memory/memory.h"
#include "api/task_queue/default_task_queue_factory.h"
#include "rtc_base/strings/json.h"
#include "system_wrappers/include/clock.h"
@@ -31,7 +31,7 @@
void RtpReplayer::Replay(const std::string& replay_config_filepath,
const uint8_t* rtp_dump_data,
size_t rtp_dump_size) {
- auto stream_state = absl::make_unique<StreamState>();
+ auto stream_state = std::make_unique<StreamState>();
std::vector<VideoReceiveStream::Config> receive_stream_configs =
ReadConfigFromFile(replay_config_filepath, &(stream_state->transport));
return Replay(std::move(stream_state), std::move(receive_stream_configs),
@@ -96,7 +96,7 @@
std::vector<VideoReceiveStream::Config>* receive_stream_configs,
StreamState* stream_state,
Call* call) {
- stream_state->decoder_factory = absl::make_unique<InternalDecoderFactory>();
+ stream_state->decoder_factory = std::make_unique<InternalDecoderFactory>();
for (auto& receive_config : *receive_stream_configs) {
// Attach the decoder for the corresponding payload type in the config.
for (auto& decoder : receive_config.decoders) {
diff --git a/test/fuzzers/vp8_replay_fuzzer.cc b/test/fuzzers/vp8_replay_fuzzer.cc
index 2ba5cfe..5b62d8b 100644
--- a/test/fuzzers/vp8_replay_fuzzer.cc
+++ b/test/fuzzers/vp8_replay_fuzzer.cc
@@ -11,13 +11,14 @@
#include <stddef.h>
#include <stdint.h>
-#include "absl/memory/memory.h"
+#include <memory>
+
#include "test/fuzzers/utils/rtp_replayer.h"
namespace webrtc {
void FuzzOneInput(const uint8_t* data, size_t size) {
- auto stream_state = absl::make_unique<test::RtpReplayer::StreamState>();
+ auto stream_state = std::make_unique<test::RtpReplayer::StreamState>();
VideoReceiveStream::Config vp8_config(&(stream_state->transport));
VideoReceiveStream::Decoder vp8_decoder;
diff --git a/test/fuzzers/vp9_replay_fuzzer.cc b/test/fuzzers/vp9_replay_fuzzer.cc
index 8e046f1..e36c788 100644
--- a/test/fuzzers/vp9_replay_fuzzer.cc
+++ b/test/fuzzers/vp9_replay_fuzzer.cc
@@ -11,13 +11,14 @@
#include <stddef.h>
#include <stdint.h>
-#include "absl/memory/memory.h"
+#include <memory>
+
#include "test/fuzzers/utils/rtp_replayer.h"
namespace webrtc {
void FuzzOneInput(const uint8_t* data, size_t size) {
- auto stream_state = absl::make_unique<test::RtpReplayer::StreamState>();
+ auto stream_state = std::make_unique<test::RtpReplayer::StreamState>();
VideoReceiveStream::Config vp9_config(&(stream_state->transport));
VideoReceiveStream::Decoder vp9_decoder;
diff --git a/test/logging/BUILD.gn b/test/logging/BUILD.gn
index f588925..ee00d1c 100644
--- a/test/logging/BUILD.gn
+++ b/test/logging/BUILD.gn
@@ -27,7 +27,6 @@
"../../rtc_base:rtc_base_tests_utils",
"../../rtc_base:stringutils",
"../../test:fileutils",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
}
diff --git a/test/logging/file_log_writer.cc b/test/logging/file_log_writer.cc
index ced81fe..150f173 100644
--- a/test/logging/file_log_writer.cc
+++ b/test/logging/file_log_writer.cc
@@ -9,7 +9,8 @@
*/
#include "test/logging/file_log_writer.h"
-#include "absl/memory/memory.h"
+#include <memory>
+
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "test/testsupport/file_utils.h"
@@ -57,6 +58,6 @@
std::unique_ptr<RtcEventLogOutput> FileLogWriterFactory::Create(
std::string filename) {
- return absl::make_unique<webrtc_impl::FileLogWriter>(base_path_ + filename);
+ return std::make_unique<webrtc_impl::FileLogWriter>(base_path_ + filename);
}
} // namespace webrtc
diff --git a/test/logging/memory_log_writer.cc b/test/logging/memory_log_writer.cc
index 92945ed..ee9befe 100644
--- a/test/logging/memory_log_writer.cc
+++ b/test/logging/memory_log_writer.cc
@@ -9,9 +9,11 @@
*/
#include "test/logging/memory_log_writer.h"
-#include "absl/memory/memory.h"
+#include <memory>
+
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
+
namespace webrtc {
namespace {
class MemoryLogWriter final : public RtcEventLogOutput {
@@ -45,7 +47,7 @@
: target_(target) {}
~MemoryLogWriterFactory() final {}
std::unique_ptr<RtcEventLogOutput> Create(std::string filename) override {
- return absl::make_unique<MemoryLogWriter>(target_, filename);
+ return std::make_unique<MemoryLogWriter>(target_, filename);
}
private:
@@ -59,7 +61,7 @@
MemoryLogStorage::~MemoryLogStorage() {}
std::unique_ptr<LogWriterFactoryInterface> MemoryLogStorage::CreateFactory() {
- return absl::make_unique<MemoryLogWriterFactory>(&logs_);
+ return std::make_unique<MemoryLogWriterFactory>(&logs_);
}
// namespace webrtc_impl
diff --git a/test/network/BUILD.gn b/test/network/BUILD.gn
index 2470c00..ea6c386 100644
--- a/test/network/BUILD.gn
+++ b/test/network/BUILD.gn
@@ -77,7 +77,6 @@
"../../rtc_base:logging",
"../../rtc_base:rtc_event",
"../../system_wrappers:system_wrappers",
- "//third_party/abseil-cpp/absl/memory",
]
}
@@ -106,7 +105,6 @@
"../../rtc_base:gunit_helpers",
"../../rtc_base:logging",
"../../rtc_base:rtc_event",
- "//third_party/abseil-cpp/absl/memory",
]
}
diff --git a/test/network/network_emulation.cc b/test/network/network_emulation.cc
index 7d3ed44..2d4a057 100644
--- a/test/network/network_emulation.cc
+++ b/test/network/network_emulation.cc
@@ -14,7 +14,6 @@
#include <limits>
#include <memory>
-#include "absl/memory/memory.h"
#include "api/units/data_size.h"
#include "rtc_base/bind.h"
#include "rtc_base/logging.h"
@@ -190,7 +189,7 @@
prefix_length = kIPv6NetworkPrefixLength;
}
rtc::IPAddress prefix = TruncateIP(ip, prefix_length);
- network_ = absl::make_unique<rtc::Network>(
+ network_ = std::make_unique<rtc::Network>(
ip.ToString(), "Endpoint id=" + std::to_string(id_), prefix,
prefix_length, rtc::AdapterType::ADAPTER_TYPE_UNKNOWN);
network_->AddIP(ip);
@@ -371,7 +370,7 @@
for (auto* endpoint : endpoints_) {
if (endpoint->Enabled()) {
networks.emplace_back(
- absl::make_unique<rtc::Network>(endpoint->network()));
+ std::make_unique<rtc::Network>(endpoint->network()));
}
}
return networks;
diff --git a/test/network/network_emulation_manager.cc b/test/network/network_emulation_manager.cc
index e036679..febcd61 100644
--- a/test/network/network_emulation_manager.cc
+++ b/test/network/network_emulation_manager.cc
@@ -13,7 +13,6 @@
#include <algorithm>
#include <memory>
-#include "absl/memory/memory.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
#include "call/simulated_network.h"
@@ -48,7 +47,7 @@
template <typename T, typename Closure>
std::unique_ptr<QueuedTask> CreateResourceOwningTask(T resource,
Closure&& closure) {
- return absl::make_unique<ResourceOwningTask<T, Closure>>(
+ return std::make_unique<ResourceOwningTask<T, Closure>>(
std::forward<T>(resource), std::forward<Closure>(closure));
}
} // namespace
@@ -72,12 +71,12 @@
EmulatedNetworkNode* NetworkEmulationManagerImpl::CreateEmulatedNode(
BuiltInNetworkBehaviorConfig config) {
- return CreateEmulatedNode(absl::make_unique<SimulatedNetwork>(config));
+ return CreateEmulatedNode(std::make_unique<SimulatedNetwork>(config));
}
EmulatedNetworkNode* NetworkEmulationManagerImpl::CreateEmulatedNode(
std::unique_ptr<NetworkBehaviorInterface> network_behavior) {
- auto node = absl::make_unique<EmulatedNetworkNode>(
+ auto node = std::make_unique<EmulatedNetworkNode>(
clock_, &task_queue_, std::move(network_behavior));
EmulatedNetworkNode* out = node.get();
task_queue_.PostTask(CreateResourceOwningTask(
@@ -110,7 +109,7 @@
bool res = used_ip_addresses_.insert(*ip).second;
RTC_CHECK(res) << "IP=" << ip->ToString() << " already in use";
- auto node = absl::make_unique<EmulatedEndpoint>(
+ auto node = std::make_unique<EmulatedEndpoint>(
next_node_id_++, *ip, config.start_as_enabled, &task_queue_, clock_);
EmulatedEndpoint* out = node.get();
endpoints_.push_back(std::move(node));
@@ -148,7 +147,7 @@
cur_node->router()->SetReceiver(to->GetPeerLocalAddress(), to);
std::unique_ptr<EmulatedRoute> route =
- absl::make_unique<EmulatedRoute>(from, std::move(via_nodes), to);
+ std::make_unique<EmulatedRoute>(from, std::move(via_nodes), to);
EmulatedRoute* out = route.get();
routes_.push_back(std::move(route));
return out;
@@ -190,7 +189,7 @@
cur_node->router()->SetReceiver(endpoint->GetPeerLocalAddress(), endpoint);
std::unique_ptr<TrafficRoute> traffic_route =
- absl::make_unique<TrafficRoute>(clock_, via_nodes[0], endpoint);
+ std::make_unique<TrafficRoute>(clock_, via_nodes[0], endpoint);
TrafficRoute* out = traffic_route.get();
traffic_routes_.push_back(std::move(traffic_route));
return out;
@@ -201,7 +200,7 @@
TrafficRoute* traffic_route,
RandomWalkConfig config) {
auto traffic =
- absl::make_unique<RandomWalkCrossTraffic>(config, traffic_route);
+ std::make_unique<RandomWalkCrossTraffic>(config, traffic_route);
RandomWalkCrossTraffic* out = traffic.get();
task_queue_.PostTask(CreateResourceOwningTask(
@@ -223,7 +222,7 @@
TrafficRoute* traffic_route,
PulsedPeaksConfig config) {
auto traffic =
- absl::make_unique<PulsedPeaksCrossTraffic>(config, traffic_route);
+ std::make_unique<PulsedPeaksCrossTraffic>(config, traffic_route);
PulsedPeaksCrossTraffic* out = traffic.get();
task_queue_.PostTask(CreateResourceOwningTask(
std::move(traffic),
@@ -245,7 +244,7 @@
FakeTcpConfig config) {
task_queue_.PostTask([=]() {
auto traffic =
- absl::make_unique<FakeTcpCrossTraffic>(config, send_route, ret_route);
+ std::make_unique<FakeTcpCrossTraffic>(config, send_route, ret_route);
auto* traffic_ptr = traffic.get();
tcp_cross_traffics_.push_back(std::move(traffic));
TimeDelta process_interval = config.process_interval;
@@ -260,8 +259,8 @@
EmulatedNetworkManagerInterface*
NetworkEmulationManagerImpl::CreateEmulatedNetworkManagerInterface(
const std::vector<EmulatedEndpoint*>& endpoints) {
- auto endpoints_container = absl::make_unique<EndpointsContainer>(endpoints);
- auto network_manager = absl::make_unique<EmulatedNetworkManager>(
+ auto endpoints_container = std::make_unique<EndpointsContainer>(endpoints);
+ auto network_manager = std::make_unique<EmulatedNetworkManager>(
clock_, &task_queue_, endpoints_container.get());
for (auto* endpoint : endpoints) {
// Associate endpoint with network manager.
diff --git a/test/network/network_emulation_pc_unittest.cc b/test/network/network_emulation_pc_unittest.cc
index 6c83a99..c158226 100644
--- a/test/network/network_emulation_pc_unittest.cc
+++ b/test/network/network_emulation_pc_unittest.cc
@@ -11,7 +11,6 @@
#include <cstdint>
#include <memory>
-#include "absl/memory/memory.h"
#include "api/call/call_factory_interface.h"
#include "api/peer_connection_interface.h"
#include "api/rtc_event_log/rtc_event_log_factory.h"
@@ -57,7 +56,7 @@
pcf_deps.task_queue_factory = CreateDefaultTaskQueueFactory();
pcf_deps.call_factory = CreateCallFactory();
pcf_deps.event_log_factory =
- absl::make_unique<RtcEventLogFactory>(pcf_deps.task_queue_factory.get());
+ std::make_unique<RtcEventLogFactory>(pcf_deps.task_queue_factory.get());
pcf_deps.network_thread = network_thread;
pcf_deps.signaling_thread = signaling_thread;
cricket::MediaEngineDependencies media_deps;
@@ -79,7 +78,7 @@
rtc::NetworkManager* network_manager) {
PeerConnectionDependencies pc_deps(observer);
auto port_allocator =
- absl::make_unique<cricket::BasicPortAllocator>(network_manager);
+ std::make_unique<cricket::BasicPortAllocator>(network_manager);
// This test does not support TCP
int flags = cricket::PORTALLOCATOR_DISABLE_TCP;
@@ -103,9 +102,9 @@
NetworkEmulationManagerImpl emulation;
EmulatedNetworkNode* alice_node = emulation.CreateEmulatedNode(
- absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
+ std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
EmulatedNetworkNode* bob_node = emulation.CreateEmulatedNode(
- absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
+ std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
EmulatedEndpoint* alice_endpoint =
emulation.CreateEndpoint(EmulatedEndpointConfig());
EmulatedEndpoint* bob_endpoint =
@@ -122,12 +121,12 @@
rtc::scoped_refptr<PeerConnectionFactoryInterface> alice_pcf;
rtc::scoped_refptr<PeerConnectionInterface> alice_pc;
std::unique_ptr<MockPeerConnectionObserver> alice_observer =
- absl::make_unique<MockPeerConnectionObserver>();
+ std::make_unique<MockPeerConnectionObserver>();
rtc::scoped_refptr<PeerConnectionFactoryInterface> bob_pcf;
rtc::scoped_refptr<PeerConnectionInterface> bob_pc;
std::unique_ptr<MockPeerConnectionObserver> bob_observer =
- absl::make_unique<MockPeerConnectionObserver>();
+ std::make_unique<MockPeerConnectionObserver>();
signaling_thread->Invoke<void>(RTC_FROM_HERE, [&]() {
alice_pcf = CreatePeerConnectionFactory(signaling_thread.get(),
@@ -142,11 +141,11 @@
});
std::unique_ptr<PeerConnectionWrapper> alice =
- absl::make_unique<PeerConnectionWrapper>(alice_pcf, alice_pc,
- std::move(alice_observer));
+ std::make_unique<PeerConnectionWrapper>(alice_pcf, alice_pc,
+ std::move(alice_observer));
std::unique_ptr<PeerConnectionWrapper> bob =
- absl::make_unique<PeerConnectionWrapper>(bob_pcf, bob_pc,
- std::move(bob_observer));
+ std::make_unique<PeerConnectionWrapper>(bob_pcf, bob_pc,
+ std::move(bob_observer));
signaling_thread->Invoke<void>(RTC_FROM_HERE, [&]() {
rtc::scoped_refptr<webrtc::AudioSourceInterface> source =
diff --git a/test/network/network_emulation_unittest.cc b/test/network/network_emulation_unittest.cc
index e38867f..b119442 100644
--- a/test/network/network_emulation_unittest.cc
+++ b/test/network/network_emulation_unittest.cc
@@ -14,7 +14,6 @@
#include <memory>
#include <set>
-#include "absl/memory/memory.h"
#include "api/test/simulated_network.h"
#include "api/units/time_delta.h"
#include "call/simulated_network.h"
@@ -149,7 +148,7 @@
EmulatedNetworkNode* CreateEmulatedNodeWithDefaultBuiltInConfig(
NetworkEmulationManager* emulation) {
return emulation->CreateEmulatedNode(
- absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
+ std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
}
} // namespace
@@ -186,9 +185,9 @@
NetworkEmulationManagerImpl network_manager;
EmulatedNetworkNode* alice_node = network_manager.CreateEmulatedNode(
- absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
+ std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
EmulatedNetworkNode* bob_node = network_manager.CreateEmulatedNode(
- absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
+ std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
EmulatedEndpoint* alice_endpoint =
network_manager.CreateEndpoint(EmulatedEndpointConfig());
EmulatedEndpoint* bob_endpoint =
@@ -263,9 +262,9 @@
NetworkEmulationManagerImpl network_manager;
EmulatedNetworkNode* alice_node = network_manager.CreateEmulatedNode(
- absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
+ std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
EmulatedNetworkNode* bob_node = network_manager.CreateEmulatedNode(
- absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
+ std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
EmulatedEndpoint* alice_endpoint =
network_manager.CreateEndpoint(EmulatedEndpointConfig());
EmulatedEndpoint* bob_endpoint =
diff --git a/test/network/simulated_network_node.cc b/test/network/simulated_network_node.cc
index e4c5d90..d85f2e6 100644
--- a/test/network/simulated_network_node.cc
+++ b/test/network/simulated_network_node.cc
@@ -9,10 +9,9 @@
*/
#include "test/network/simulated_network_node.h"
+#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
-
namespace webrtc {
namespace test {
@@ -59,7 +58,7 @@
SimulatedNetworkNode SimulatedNetworkNode::Builder::Build(
NetworkEmulationManager* net) const {
SimulatedNetworkNode res;
- auto behavior = absl::make_unique<SimulatedNetwork>(config_);
+ auto behavior = std::make_unique<SimulatedNetwork>(config_);
res.simulation = behavior.get();
res.node = net->CreateEmulatedNode(std::move(behavior));
return res;
diff --git a/test/network/traffic_route.cc b/test/network/traffic_route.cc
index b658c9e..2baf5a4 100644
--- a/test/network/traffic_route.cc
+++ b/test/network/traffic_route.cc
@@ -11,9 +11,9 @@
#include "test/network/traffic_route.h"
#include <algorithm>
+#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "absl/types/optional.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_minmax.h"
@@ -57,7 +57,7 @@
EmulatedNetworkReceiverInterface* receiver,
EmulatedEndpoint* endpoint)
: clock_(clock), receiver_(receiver), endpoint_(endpoint) {
- null_receiver_ = absl::make_unique<NullReceiver>();
+ null_receiver_ = std::make_unique<NullReceiver>();
absl::optional<uint16_t> port =
endpoint_->BindReceiver(0, null_receiver_.get());
RTC_DCHECK(port);
@@ -73,7 +73,7 @@
void TrafficRoute::NetworkDelayedAction(size_t packet_size,
std::function<void()> action) {
- auto action_receiver = absl::make_unique<ActionReceiver>(action, endpoint_);
+ auto action_receiver = std::make_unique<ActionReceiver>(action, endpoint_);
absl::optional<uint16_t> port =
endpoint_->BindReceiver(0, action_receiver.get());
RTC_DCHECK(port);
diff --git a/test/pc/e2e/BUILD.gn b/test/pc/e2e/BUILD.gn
index 497fbe2..ef5ba43 100644
--- a/test/pc/e2e/BUILD.gn
+++ b/test/pc/e2e/BUILD.gn
@@ -60,7 +60,6 @@
"../../../api/transport/media:media_transport_interface",
"../../../api/video_codecs:video_codecs_api",
"../../../rtc_base",
- "//third_party/abseil-cpp/absl/memory",
]
}
@@ -153,7 +152,6 @@
"../../../modules/video_coding:video_codec_interface",
"../../../rtc_base:criticalsection",
"../../../rtc_base:logging",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
}
@@ -176,7 +174,6 @@
"../../../modules/video_coding:video_codec_interface",
"../../../rtc_base:criticalsection",
"../../../rtc_base:logging",
- "//third_party/abseil-cpp/absl/memory",
]
}
@@ -302,7 +299,6 @@
"../../../system_wrappers:field_trial",
"../../../test:fileutils",
"../../../test:video_test_support",
- "//third_party/abseil-cpp/absl/memory",
]
}
@@ -380,7 +376,6 @@
"../../../rtc_base:rtc_event",
"../../../test:fileutils",
"../../../test:test_support",
- "//third_party/abseil-cpp/absl/memory",
]
data = peer_connection_e2e_smoke_test_resources
if (is_ios) {
@@ -478,7 +473,6 @@
"../../../rtc_base:rtc_event",
"../../../rtc_base:rtc_numerics",
"../../../system_wrappers",
- "//third_party/abseil-cpp/absl/memory",
]
}
@@ -512,7 +506,7 @@
"../../../pc:peerconnection",
"../../../pc:rtc_pc_base",
"../../../rtc_base:stringutils",
- "//third_party/abseil-cpp/absl/memory:memory",
+ "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings:strings",
"//third_party/abseil-cpp/absl/types:optional",
]
diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc
index 60fd1fc..9e984af 100644
--- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc
+++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc
@@ -11,9 +11,9 @@
#include "test/pc/e2e/analyzer/video/default_video_quality_analyzer.h"
#include <algorithm>
+#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "api/units/time_delta.h"
#include "common_video/libyuv/include/webrtc_libyuv.h"
#include "rtc_base/logging.h"
@@ -75,7 +75,7 @@
int max_threads_count) {
test_label_ = std::move(test_case_name);
for (int i = 0; i < max_threads_count; i++) {
- auto thread = absl::make_unique<rtc::PlatformThread>(
+ auto thread = std::make_unique<rtc::PlatformThread>(
&DefaultVideoQualityAnalyzer::ProcessComparisonsThread, this,
("DefaultVideoQualityAnalyzerWorker-" + std::to_string(i)).data(),
rtc::ThreadPriority::kNormalPriority);
diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc
index a250910..b304beb 100644
--- a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc
+++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc
@@ -12,9 +12,9 @@
#include <cstdint>
#include <cstring>
+#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "absl/types/optional.h"
#include "api/video/i420_buffer.h"
#include "modules/video_coding/include/video_error_codes.h"
@@ -35,7 +35,7 @@
delegate_(std::move(delegate)),
extractor_(extractor),
analyzer_(analyzer) {
- analyzing_callback_ = absl::make_unique<DecoderCallback>(this);
+ analyzing_callback_ = std::make_unique<DecoderCallback>(this);
}
QualityAnalyzingVideoDecoder::~QualityAnalyzingVideoDecoder() = default;
@@ -242,7 +242,7 @@
QualityAnalyzingVideoDecoderFactory::CreateVideoDecoder(
const SdpVideoFormat& format) {
std::unique_ptr<VideoDecoder> decoder = delegate_->CreateVideoDecoder(format);
- return absl::make_unique<QualityAnalyzingVideoDecoder>(
+ return std::make_unique<QualityAnalyzingVideoDecoder>(
id_generator_->GetNextId(), std::move(decoder), extractor_, analyzer_);
}
@@ -252,7 +252,7 @@
const std::string& receive_stream_id) {
std::unique_ptr<VideoDecoder> decoder =
delegate_->LegacyCreateVideoDecoder(format, receive_stream_id);
- return absl::make_unique<QualityAnalyzingVideoDecoder>(
+ return std::make_unique<QualityAnalyzingVideoDecoder>(
id_generator_->GetNextId(), std::move(decoder), extractor_, analyzer_);
}
diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc
index 633d6b1..af95790 100644
--- a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc
+++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc
@@ -11,9 +11,9 @@
#include "test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h"
#include <cmath>
+#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "api/video/video_codec_type.h"
#include "api/video_codecs/video_encoder.h"
#include "modules/video_coding/include/video_error_codes.h"
@@ -354,7 +354,7 @@
std::unique_ptr<VideoEncoder>
QualityAnalyzingVideoEncoderFactory::CreateVideoEncoder(
const SdpVideoFormat& format) {
- return absl::make_unique<QualityAnalyzingVideoEncoder>(
+ return std::make_unique<QualityAnalyzingVideoEncoder>(
id_generator_->GetNextId(), delegate_->CreateVideoEncoder(format),
bitrate_multiplier_, stream_required_spatial_index_, injector_,
analyzer_);
diff --git a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc
index bc276ba..b7d87b8 100644
--- a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc
+++ b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc
@@ -115,7 +115,7 @@
: analyzer_(std::move(analyzer)),
injector_(injector),
extractor_(extractor),
- encoding_entities_id_generator_(absl::make_unique<IntIdGenerator>(1)) {
+ encoding_entities_id_generator_(std::make_unique<IntIdGenerator>(1)) {
RTC_DCHECK(injector_);
RTC_DCHECK(extractor_);
}
@@ -128,7 +128,7 @@
double bitrate_multiplier,
std::map<std::string, absl::optional<int>> stream_required_spatial_index)
const {
- return absl::make_unique<QualityAnalyzingVideoEncoderFactory>(
+ return std::make_unique<QualityAnalyzingVideoEncoderFactory>(
std::move(delegate), bitrate_multiplier,
std::move(stream_required_spatial_index),
encoding_entities_id_generator_.get(), injector_, analyzer_.get());
@@ -137,7 +137,7 @@
std::unique_ptr<VideoDecoderFactory>
VideoQualityAnalyzerInjectionHelper::WrapVideoDecoderFactory(
std::unique_ptr<VideoDecoderFactory> delegate) const {
- return absl::make_unique<QualityAnalyzingVideoDecoderFactory>(
+ return std::make_unique<QualityAnalyzingVideoDecoderFactory>(
std::move(delegate), encoding_entities_id_generator_.get(), extractor_,
analyzer_.get());
}
@@ -149,14 +149,14 @@
test::VideoFrameWriter* writer) const {
std::vector<std::unique_ptr<rtc::VideoSinkInterface<VideoFrame>>> sinks;
if (writer) {
- sinks.push_back(absl::make_unique<VideoWriter>(writer));
+ sinks.push_back(std::make_unique<VideoWriter>(writer));
}
if (config.show_on_screen) {
sinks.push_back(absl::WrapUnique(
test::VideoRenderer::Create((*config.stream_label + "-capture").c_str(),
config.width, config.height)));
}
- return absl::make_unique<AnalyzingFrameGenerator>(
+ return std::make_unique<AnalyzingFrameGenerator>(
std::move(*config.stream_label), std::move(delegate), analyzer_.get(),
std::move(sinks));
}
@@ -167,15 +167,15 @@
test::VideoFrameWriter* writer) const {
std::vector<std::unique_ptr<rtc::VideoSinkInterface<VideoFrame>>> sinks;
if (writer) {
- sinks.push_back(absl::make_unique<VideoWriter>(writer));
+ sinks.push_back(std::make_unique<VideoWriter>(writer));
}
if (config.show_on_screen) {
sinks.push_back(absl::WrapUnique(
test::VideoRenderer::Create((*config.stream_label + "-render").c_str(),
config.width, config.height)));
}
- return absl::make_unique<AnalyzingVideoSink>(analyzer_.get(),
- std::move(sinks));
+ return std::make_unique<AnalyzingVideoSink>(analyzer_.get(),
+ std::move(sinks));
}
void VideoQualityAnalyzerInjectionHelper::Start(std::string test_case_name,
diff --git a/test/pc/e2e/peer_connection_e2e_smoke_test.cc b/test/pc/e2e/peer_connection_e2e_smoke_test.cc
index 7263c41..8765b2d 100644
--- a/test/pc/e2e/peer_connection_e2e_smoke_test.cc
+++ b/test/pc/e2e/peer_connection_e2e_smoke_test.cc
@@ -11,7 +11,6 @@
#include <cstdint>
#include <memory>
-#include "absl/memory/memory.h"
#include "api/test/create_network_emulation_manager.h"
#include "api/test/create_peerconnection_quality_test_fixture.h"
#include "api/test/network_emulation_manager.h"
@@ -50,15 +49,14 @@
CreateNetworkEmulationManager();
auto alice_network_behavior =
- absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig());
+ std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig());
SimulatedNetwork* alice_network_behavior_ptr = alice_network_behavior.get();
EmulatedNetworkNode* alice_node =
network_emulation_manager->CreateEmulatedNode(
std::move(alice_network_behavior));
EmulatedNetworkNode* bob_node =
network_emulation_manager->CreateEmulatedNode(
- absl::make_unique<SimulatedNetwork>(
- BuiltInNetworkBehaviorConfig()));
+ std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
auto* alice_endpoint =
network_emulation_manager->CreateEndpoint(EmulatedEndpointConfig());
EmulatedEndpoint* bob_endpoint =
@@ -70,7 +68,7 @@
// Create analyzers.
std::unique_ptr<VideoQualityAnalyzerInterface> video_quality_analyzer =
- absl::make_unique<DefaultVideoQualityAnalyzer>();
+ std::make_unique<DefaultVideoQualityAnalyzer>();
// This is only done for the sake of smoke testing. In general there should
// be no need to explicitly pull data from analyzers after the run.
auto* video_analyzer_ptr =
@@ -100,8 +98,8 @@
fixture->AddPeer(bob_network->network_thread(),
bob_network->network_manager(), bob_configurer);
fixture->AddQualityMetricsReporter(
- absl::make_unique<NetworkQualityMetricsReporter>(alice_network,
- bob_network));
+ std::make_unique<NetworkQualityMetricsReporter>(alice_network,
+ bob_network));
fixture->Run(run_params);
diff --git a/test/pc/e2e/peer_connection_quality_test.cc b/test/pc/e2e/peer_connection_quality_test.cc
index cf1f095..a631237 100644
--- a/test/pc/e2e/peer_connection_quality_test.cc
+++ b/test/pc/e2e/peer_connection_quality_test.cc
@@ -10,10 +10,10 @@
#include "test/pc/e2e/peer_connection_quality_test.h"
#include <algorithm>
+#include <memory>
#include <set>
#include <utility>
-#include "absl/memory/memory.h"
#include "api/jsep.h"
#include "api/media_stream_interface.h"
#include "api/peer_connection_interface.h"
@@ -119,17 +119,17 @@
// even if there are no video streams, because it will be installed into video
// encoder/decoder factories.
if (video_quality_analyzer == nullptr) {
- video_quality_analyzer = absl::make_unique<DefaultVideoQualityAnalyzer>();
+ video_quality_analyzer = std::make_unique<DefaultVideoQualityAnalyzer>();
}
encoded_image_id_controller_ =
- absl::make_unique<SingleProcessEncodedImageDataInjector>();
+ std::make_unique<SingleProcessEncodedImageDataInjector>();
video_quality_analyzer_injection_helper_ =
- absl::make_unique<VideoQualityAnalyzerInjectionHelper>(
+ std::make_unique<VideoQualityAnalyzerInjectionHelper>(
std::move(video_quality_analyzer), encoded_image_id_controller_.get(),
encoded_image_id_controller_.get());
if (audio_quality_analyzer == nullptr) {
- audio_quality_analyzer = absl::make_unique<DefaultAudioQualityAnalyzer>();
+ audio_quality_analyzer = std::make_unique<DefaultAudioQualityAnalyzer>();
}
audio_quality_analyzer_.swap(audio_quality_analyzer);
}
@@ -217,7 +217,7 @@
rtc::NetworkManager* network_manager,
rtc::FunctionView<void(PeerConfigurer*)> configurer) {
peer_configurations_.push_back(
- absl::make_unique<PeerConfigurerImpl>(network_thread, network_manager));
+ std::make_unique<PeerConfigurerImpl>(network_thread, network_manager));
configurer(peer_configurations_.back().get());
}
@@ -252,7 +252,7 @@
signaling_thread->Start();
// Create a |task_queue_|.
- task_queue_ = absl::make_unique<TaskQueueForTest>("pc_e2e_quality_test");
+ task_queue_ = std::make_unique<TaskQueueForTest>("pc_e2e_quality_test");
// Create call participants: Alice and Bob.
// Audio streams are intercepted in AudioDeviceModule, so if it is required to
@@ -268,7 +268,7 @@
alice_ = TestPeer::CreateTestPeer(
std::move(alice_components), std::move(alice_params),
- absl::make_unique<FixturePeerConnectionObserver>(
+ std::make_unique<FixturePeerConnectionObserver>(
[this, bob_video_configs](
rtc::scoped_refptr<RtpTransceiverInterface> transceiver) {
OnTrackCallback(transceiver, bob_video_configs);
@@ -279,7 +279,7 @@
run_params.echo_emulation_config, task_queue_.get());
bob_ = TestPeer::CreateTestPeer(
std::move(bob_components), std::move(bob_params),
- absl::make_unique<FixturePeerConnectionObserver>(
+ std::make_unique<FixturePeerConnectionObserver>(
[this, alice_video_configs](
rtc::scoped_refptr<RtpTransceiverInterface> transceiver) {
OnTrackCallback(transceiver, alice_video_configs);
@@ -310,13 +310,13 @@
// Start RTCEventLog recording if requested.
if (alice_->params()->rtc_event_log_path) {
- auto alice_rtc_event_log = absl::make_unique<webrtc::RtcEventLogOutputFile>(
+ auto alice_rtc_event_log = std::make_unique<webrtc::RtcEventLogOutputFile>(
alice_->params()->rtc_event_log_path.value());
alice_->pc()->StartRtcEventLog(std::move(alice_rtc_event_log),
webrtc::RtcEventLog::kImmediateOutput);
}
if (bob_->params()->rtc_event_log_path) {
- auto bob_rtc_event_log = absl::make_unique<webrtc::RtcEventLogOutputFile>(
+ auto bob_rtc_event_log = std::make_unique<webrtc::RtcEventLogOutputFile>(
bob_->params()->rtc_event_log_path.value());
bob_->pc()->StartRtcEventLog(std::move(bob_rtc_event_log),
webrtc::RtcEventLog::kImmediateOutput);
@@ -559,7 +559,7 @@
field_trials += kFlexFecEnabledFieldTrials;
}
if (!field_trials.empty()) {
- override_field_trials_ = absl::make_unique<test::ScopedFieldTrials>(
+ override_field_trials_ = std::make_unique<test::ScopedFieldTrials>(
field_trial::GetFieldTrialString() + field_trials);
}
}
@@ -684,7 +684,7 @@
video_config, std::move(frame_generator), writer);
// Setup FrameGenerator into peer connection.
- auto capturer = absl::make_unique<test::FrameGeneratorCapturer>(
+ auto capturer = std::make_unique<test::FrameGeneratorCapturer>(
clock_, std::move(frame_generator), video_config.fps,
*task_queue_factory_);
capturer->Init();
@@ -974,7 +974,7 @@
return nullptr;
}
// TODO(titovartem) create only one file writer for simulcast video track.
- auto video_writer = absl::make_unique<test::Y4mVideoFrameWriterImpl>(
+ auto video_writer = std::make_unique<test::Y4mVideoFrameWriterImpl>(
file_name.value(), config.width, config.height, config.fps);
test::VideoFrameWriter* out = video_writer.get();
video_writers_.push_back(std::move(video_writer));
diff --git a/test/pc/e2e/peer_connection_quality_test.h b/test/pc/e2e/peer_connection_quality_test.h
index 04cde84..43a2f94 100644
--- a/test/pc/e2e/peer_connection_quality_test.h
+++ b/test/pc/e2e/peer_connection_quality_test.h
@@ -15,7 +15,6 @@
#include <string>
#include <vector>
-#include "absl/memory/memory.h"
#include "api/task_queue/task_queue_factory.h"
#include "api/test/audio_quality_analyzer_interface.h"
#include "api/test/peerconnection_quality_test_fixture.h"
@@ -44,9 +43,9 @@
public:
PeerConfigurerImpl(rtc::Thread* network_thread,
rtc::NetworkManager* network_manager)
- : components_(absl::make_unique<InjectableComponents>(network_thread,
- network_manager)),
- params_(absl::make_unique<Params>()) {}
+ : components_(std::make_unique<InjectableComponents>(network_thread,
+ network_manager)),
+ params_(std::make_unique<Params>()) {}
PeerConfigurer* SetTaskQueueFactory(
std::unique_ptr<TaskQueueFactory> task_queue_factory) override {
diff --git a/test/pc/e2e/peer_connection_quality_test_params.h b/test/pc/e2e/peer_connection_quality_test_params.h
index cb6add8..765f5a8 100644
--- a/test/pc/e2e/peer_connection_quality_test_params.h
+++ b/test/pc/e2e/peer_connection_quality_test_params.h
@@ -14,7 +14,6 @@
#include <string>
#include <vector>
-#include "absl/memory/memory.h"
#include "api/async_resolver_factory.h"
#include "api/call/call_factory_interface.h"
#include "api/fec_controller.h"
@@ -83,9 +82,9 @@
explicit InjectableComponents(rtc::Thread* network_thread,
rtc::NetworkManager* network_manager)
: network_thread(network_thread),
- pcf_dependencies(absl::make_unique<PeerConnectionFactoryComponents>()),
+ pcf_dependencies(std::make_unique<PeerConnectionFactoryComponents>()),
pc_dependencies(
- absl::make_unique<PeerConnectionComponents>(network_manager)) {
+ std::make_unique<PeerConnectionComponents>(network_manager)) {
RTC_CHECK(network_thread);
}
diff --git a/test/pc/e2e/sdp/sdp_changer.cc b/test/pc/e2e/sdp/sdp_changer.cc
index 335147d..3fa2e9f 100644
--- a/test/pc/e2e/sdp/sdp_changer.cc
+++ b/test/pc/e2e/sdp/sdp_changer.cc
@@ -273,7 +273,7 @@
// Create patched offer.
auto patched_offer =
- absl::make_unique<JsepSessionDescription>(SdpType::kOffer);
+ std::make_unique<JsepSessionDescription>(SdpType::kOffer);
patched_offer->Initialize(std::move(desc), offer->session_id(),
offer->session_version());
return LocalAndRemoteSdp(std::move(offer), std::move(patched_offer));
@@ -466,7 +466,7 @@
desc->set_transport_infos(transport_infos);
auto patched_answer =
- absl::make_unique<JsepSessionDescription>(SdpType::kAnswer);
+ std::make_unique<JsepSessionDescription>(SdpType::kAnswer);
patched_answer->Initialize(std::move(desc), answer->session_id(),
answer->session_version());
return LocalAndRemoteSdp(std::move(answer), std::move(patched_answer));
diff --git a/test/pc/e2e/test_peer.cc b/test/pc/e2e/test_peer.cc
index 6cc1168..ad7b58b 100644
--- a/test/pc/e2e/test_peer.cc
+++ b/test/pc/e2e/test_peer.cc
@@ -61,7 +61,7 @@
}
if (components->pcf_dependencies->event_log_factory == nullptr) {
components->pcf_dependencies->event_log_factory =
- absl::make_unique<RtcEventLogFactory>(
+ std::make_unique<RtcEventLogFactory>(
components->pcf_dependencies->task_queue_factory.get());
}
}
@@ -191,16 +191,16 @@
// Setup echo emulation if required.
if (echo_emulation_config_) {
- capturer = absl::make_unique<EchoEmulatingCapturer>(
+ capturer = std::make_unique<EchoEmulatingCapturer>(
std::move(capturer), *echo_emulation_config_);
- renderer = absl::make_unique<EchoEmulatingRenderer>(
+ renderer = std::make_unique<EchoEmulatingRenderer>(
std::move(renderer),
static_cast<EchoEmulatingCapturer*>(capturer.get()));
}
// Setup input stream dumping if required.
if (audio_config_opt_ && audio_config_opt_->input_dump_file_name) {
- capturer = absl::make_unique<test::CopyToFileAudioCapturer>(
+ capturer = std::make_unique<test::CopyToFileAudioCapturer>(
std::move(capturer), audio_config_opt_->input_dump_file_name.value());
}
@@ -279,7 +279,7 @@
std::unique_ptr<PeerConnectionComponents> pc_dependencies) {
PeerConnectionDependencies pc_deps(observer_);
- auto port_allocator = absl::make_unique<cricket::BasicPortAllocator>(
+ auto port_allocator = std::make_unique<cricket::BasicPortAllocator>(
pc_dependencies->network_manager);
// This test does not support TCP
diff --git a/test/peer_scenario/BUILD.gn b/test/peer_scenario/BUILD.gn
index 32c5892..e35a244 100644
--- a/test/peer_scenario/BUILD.gn
+++ b/test/peer_scenario/BUILD.gn
@@ -43,7 +43,7 @@
"../../pc:rtc_pc_base",
"..//network:emulated_network",
"../scenario",
- "//third_party/abseil-cpp/absl/memory:memory",
+ "//third_party/abseil-cpp/absl/memory",
]
}
}
diff --git a/test/peer_scenario/peer_scenario_client.cc b/test/peer_scenario/peer_scenario_client.cc
index 64a7d51..f94d871 100644
--- a/test/peer_scenario/peer_scenario_client.cc
+++ b/test/peer_scenario/peer_scenario_client.cc
@@ -10,9 +10,9 @@
#include "test/peer_scenario/peer_scenario_client.h"
#include <limits>
+#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/rtc_event_log/rtc_event_log_factory.h"
@@ -160,7 +160,7 @@
pcf_deps.task_queue_factory = CreateDefaultTaskQueueFactory();
task_queue_factory_ = pcf_deps.task_queue_factory.get();
pcf_deps.event_log_factory =
- absl::make_unique<RtcEventLogFactory>(task_queue_factory_);
+ std::make_unique<RtcEventLogFactory>(task_queue_factory_);
cricket::MediaEngineDependencies media_deps;
media_deps.task_queue_factory = task_queue_factory_;
@@ -187,8 +187,8 @@
pc_factory_ = CreateModularPeerConnectionFactory(std::move(pcf_deps));
PeerConnectionDependencies pc_deps(observer_.get());
- pc_deps.allocator = absl::make_unique<cricket::BasicPortAllocator>(
- manager->network_manager());
+ pc_deps.allocator =
+ std::make_unique<cricket::BasicPortAllocator>(manager->network_manager());
pc_deps.allocator->set_flags(pc_deps.allocator->flags() |
cricket::PORTALLOCATOR_DISABLE_TCP);
peer_connection_ =
diff --git a/test/peer_scenario/scenario_connection.cc b/test/peer_scenario/scenario_connection.cc
index 6394ac8..6f51799 100644
--- a/test/peer_scenario/scenario_connection.cc
+++ b/test/peer_scenario/scenario_connection.cc
@@ -77,7 +77,7 @@
std::unique_ptr<ScenarioIceConnection> ScenarioIceConnection::Create(
webrtc::test::NetworkEmulationManagerImpl* net,
IceConnectionObserver* observer) {
- return absl::make_unique<ScenarioIceConnectionImpl>(net, observer);
+ return std::make_unique<ScenarioIceConnectionImpl>(net, observer);
}
ScenarioIceConnectionImpl::ScenarioIceConnectionImpl(
diff --git a/test/rtp_header_parser.cc b/test/rtp_header_parser.cc
index 1a4ba42..713e64d 100644
--- a/test/rtp_header_parser.cc
+++ b/test/rtp_header_parser.cc
@@ -11,7 +11,6 @@
#include <memory>
-#include "absl/memory/memory.h"
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
#include "modules/rtp_rtcp/source/rtp_utility.h"
#include "rtc_base/critical_section.h"
@@ -41,7 +40,7 @@
};
std::unique_ptr<RtpHeaderParser> RtpHeaderParser::CreateForTest() {
- return absl::make_unique<RtpHeaderParserImpl>();
+ return std::make_unique<RtpHeaderParserImpl>();
}
RtpHeaderParserImpl::RtpHeaderParserImpl() {}
diff --git a/test/scenario/BUILD.gn b/test/scenario/BUILD.gn
index dce7775..af1059d 100644
--- a/test/scenario/BUILD.gn
+++ b/test/scenario/BUILD.gn
@@ -177,7 +177,6 @@
"../../test:test_support",
"../logging:log_writer",
"//testing/gmock",
- "//third_party/abseil-cpp/absl/memory",
]
data = scenario_unittest_resources
if (is_ios) {
diff --git a/test/scenario/call_client.cc b/test/scenario/call_client.cc
index 1654afc..3d907f3 100644
--- a/test/scenario/call_client.cc
+++ b/test/scenario/call_client.cc
@@ -11,7 +11,7 @@
#include <utility>
-#include "absl/memory/memory.h"
+#include <memory>
#include "api/rtc_event_log/rtc_event_log.h"
#include "api/rtc_event_log/rtc_event_log_factory.h"
#include "modules/audio_mixer/audio_mixer_impl.h"
@@ -74,7 +74,7 @@
TaskQueueFactory* task_queue_factory,
LogWriterFactoryInterface* log_writer_factory) {
if (!log_writer_factory) {
- return absl::make_unique<RtcEventLogNull>();
+ return std::make_unique<RtcEventLogNull>();
}
auto event_log = RtcEventLogFactory(task_queue_factory)
.CreateRtcEventLog(RtcEventLog::EncodingType::NewFormat);
@@ -185,8 +185,8 @@
std::unique_ptr<NetworkControllerInterface>
LoggingNetworkControllerFactory::Create(NetworkControllerConfig config) {
- auto controller = absl::make_unique<NetworkControleUpdateCache>(
- cc_factory_->Create(config));
+ auto controller =
+ std::make_unique<NetworkControleUpdateCache>(cc_factory_->Create(config));
last_controller_ = controller.get();
return controller;
}
@@ -214,7 +214,7 @@
call_.reset(CreateCall(time_controller_, event_log_.get(), config,
&network_controller_factory_,
fake_audio_setup_.audio_state));
- transport_ = absl::make_unique<NetworkNodeTransport>(clock_, call_.get());
+ transport_ = std::make_unique<NetworkNodeTransport>(clock_, call_.get());
});
}
diff --git a/test/scenario/network_node.cc b/test/scenario/network_node.cc
index 650e26d..b936fcb 100644
--- a/test/scenario/network_node.cc
+++ b/test/scenario/network_node.cc
@@ -12,7 +12,7 @@
#include <algorithm>
#include <vector>
-#include "absl/memory/memory.h"
+#include <memory>
#include "rtc_base/numerics/safe_minmax.h"
namespace webrtc {
@@ -41,7 +41,7 @@
std::unique_ptr<SimulatedNetwork> SimulationNode::CreateBehavior(
NetworkSimulationConfig config) {
SimulatedNetwork::Config sim_config = CreateSimulationConfig(config);
- return absl::make_unique<SimulatedNetwork>(sim_config);
+ return std::make_unique<SimulatedNetwork>(sim_config);
}
void SimulationNode::UpdateConfig(
diff --git a/test/scenario/scenario.cc b/test/scenario/scenario.cc
index e4551db..605d0e2 100644
--- a/test/scenario/scenario.cc
+++ b/test/scenario/scenario.cc
@@ -10,10 +10,10 @@
#include "test/scenario/scenario.h"
#include <algorithm>
+#include <memory>
#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
-#include "absl/memory/memory.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "rtc_base/socket_address.h"
@@ -43,16 +43,15 @@
auto base_filename = output_root + file_name + ".";
RTC_LOG(LS_INFO) << "Saving scenario logs to: " << base_filename;
- return absl::make_unique<FileLogWriterFactory>(base_filename);
+ return std::make_unique<FileLogWriterFactory>(base_filename);
}
return nullptr;
}
std::unique_ptr<TimeController> CreateTimeController(bool real_time) {
if (real_time) {
- return absl::make_unique<RealTimeController>();
+ return std::make_unique<RealTimeController>();
} else {
- return absl::make_unique<GlobalSimulatedTimeController>(
- kSimulatedStartTime);
+ return std::make_unique<GlobalSimulatedTimeController>(kSimulatedStartTime);
}
}
} // namespace
diff --git a/test/scenario/scenario.h b/test/scenario/scenario.h
index fc4fced..33cf029 100644
--- a/test/scenario/scenario.h
+++ b/test/scenario/scenario.h
@@ -14,7 +14,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/fake_clock.h"
#include "rtc_base/task_queue.h"
@@ -148,7 +147,7 @@
std::string name) {
if (!log_writer_factory_ || name.empty())
return nullptr;
- return absl::make_unique<LogWriterFactoryAddPrefix>(
+ return std::make_unique<LogWriterFactoryAddPrefix>(
log_writer_factory_.get(), name);
}
diff --git a/test/scenario/video_stream.cc b/test/scenario/video_stream.cc
index a466162..b086a33 100644
--- a/test/scenario/video_stream.cc
+++ b/test/scenario/video_stream.cc
@@ -10,9 +10,9 @@
#include "test/scenario/video_stream.h"
#include <algorithm>
+#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "api/test/video/function_video_encoder_factory.h"
#include "api/video/builtin_video_bitrate_allocator_factory.h"
#include "media/base/media_constants.h"
@@ -350,7 +350,7 @@
Transport* send_transport,
VideoFrameMatcher* matcher)
: sender_(sender), config_(config) {
- video_capturer_ = absl::make_unique<FrameGeneratorCapturer>(
+ video_capturer_ = std::make_unique<FrameGeneratorCapturer>(
sender_->clock_, CreateFrameGenerator(sender_->clock_, config.source),
config.source.framerate,
*sender->time_controller_->GetTaskQueueFactory());
@@ -361,14 +361,13 @@
switch (config.encoder.implementation) {
case Encoder::Implementation::kFake:
encoder_factory_ =
- absl::make_unique<FunctionVideoEncoderFactory>([this]() {
+ std::make_unique<FunctionVideoEncoderFactory>([this]() {
rtc::CritScope cs(&crit_);
std::unique_ptr<FakeEncoder> encoder;
if (config_.encoder.codec == Codec::kVideoCodecVP8) {
- encoder =
- absl::make_unique<test::FakeVP8Encoder>(sender_->clock_);
+ encoder = std::make_unique<test::FakeVP8Encoder>(sender_->clock_);
} else if (config_.encoder.codec == Codec::kVideoCodecGeneric) {
- encoder = absl::make_unique<test::FakeEncoder>(sender_->clock_);
+ encoder = std::make_unique<test::FakeEncoder>(sender_->clock_);
} else {
RTC_NOTREACHED();
}
@@ -412,7 +411,7 @@
}
if (matcher->Active()) {
- frame_tap_ = absl::make_unique<ForwardingCapturedFrameTap>(
+ frame_tap_ = std::make_unique<ForwardingCapturedFrameTap>(
sender_->clock_, matcher, video_capturer_.get());
send_stream_->SetSource(frame_tap_.get(),
config.encoder.degradation_preference);
@@ -513,10 +512,10 @@
: receiver_(receiver), config_(config) {
if (config.encoder.codec ==
VideoStreamConfig::Encoder::Codec::kVideoCodecGeneric) {
- decoder_factory_ = absl::make_unique<FunctionVideoDecoderFactory>(
- []() { return absl::make_unique<FakeDecoder>(); });
+ decoder_factory_ = std::make_unique<FunctionVideoDecoderFactory>(
+ []() { return std::make_unique<FakeDecoder>(); });
} else {
- decoder_factory_ = absl::make_unique<InternalDecoderFactory>();
+ decoder_factory_ = std::make_unique<InternalDecoderFactory>();
}
VideoReceiveStream::Decoder decoder =
@@ -530,7 +529,7 @@
rtc::VideoSinkInterface<VideoFrame>* renderer = &fake_renderer_;
if (matcher->Active()) {
render_taps_.emplace_back(
- absl::make_unique<DecodedFrameTap>(receiver_->clock_, matcher, i));
+ std::make_unique<DecodedFrameTap>(receiver_->clock_, matcher, i));
renderer = render_taps_.back().get();
}
auto recv_config = CreateVideoReceiveStreamConfig(
diff --git a/test/single_threaded_task_queue.cc b/test/single_threaded_task_queue.cc
index ed4feef..24b9038 100644
--- a/test/single_threaded_task_queue.cc
+++ b/test/single_threaded_task_queue.cc
@@ -10,9 +10,9 @@
#include "test/single_threaded_task_queue.h"
+#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/time_utils.h"
@@ -66,8 +66,7 @@
break;
}
}
- tasks_.insert(it,
- absl::make_unique<QueuedTask>(id, earliest_exec_time, task));
+ tasks_.insert(it, std::make_unique<QueuedTask>(id, earliest_exec_time, task));
// This class is optimized for simplicty, not for performance. This will wake
// the thread up even if the next task in the queue is only scheduled for
diff --git a/test/single_threaded_task_queue_unittest.cc b/test/single_threaded_task_queue_unittest.cc
index 81eb470..b945bc0 100644
--- a/test/single_threaded_task_queue_unittest.cc
+++ b/test/single_threaded_task_queue_unittest.cc
@@ -14,7 +14,6 @@
#include <memory>
#include <vector>
-#include "absl/memory/memory.h"
#include "rtc_base/event.h"
#include "test/gtest.h"
@@ -61,7 +60,7 @@
std::vector<std::unique_ptr<rtc::Event>> done_events;
for (size_t i = 0; i < kCount; i++) {
- done_events.emplace_back(absl::make_unique<rtc::Event>());
+ done_events.emplace_back(std::make_unique<rtc::Event>());
}
// To avoid the tasks which comprise the actual test from running before they
@@ -334,7 +333,7 @@
TEST(DEPRECATED_SingleThreadedTaskQueueForTestingTest,
DestructTaskQueueWhileTasksPending) {
auto task_queue =
- absl::make_unique<DEPRECATED_SingleThreadedTaskQueueForTesting>(
+ std::make_unique<DEPRECATED_SingleThreadedTaskQueueForTesting>(
"task_queue");
std::atomic<size_t> counter(0);
diff --git a/test/test_main_lib.cc b/test/test_main_lib.cc
index c9b45c6..bb41e65 100644
--- a/test/test_main_lib.cc
+++ b/test/test_main_lib.cc
@@ -11,11 +11,11 @@
#include "test/test_main_lib.h"
#include <fstream>
+#include <memory>
#include <string>
#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
-#include "absl/memory/memory.h"
#include "rtc_base/checks.h"
#include "rtc_base/event_tracer.h"
#include "rtc_base/logging.h"
@@ -138,7 +138,7 @@
webrtc::metrics::Enable();
#if defined(WEBRTC_WIN)
- winsock_init_ = absl::make_unique<rtc::WinsockInitializer>();
+ winsock_init_ = std::make_unique<rtc::WinsockInitializer>();
#endif
// Initialize SSL which are used by several tests.
@@ -214,7 +214,7 @@
} // namespace
std::unique_ptr<TestMain> TestMain::Create() {
- return absl::make_unique<TestMainImpl>();
+ return std::make_unique<TestMainImpl>();
}
} // namespace webrtc
diff --git a/test/testsupport/copy_to_file_audio_capturer.cc b/test/testsupport/copy_to_file_audio_capturer.cc
index 3c19da4..6de8e7f 100644
--- a/test/testsupport/copy_to_file_audio_capturer.cc
+++ b/test/testsupport/copy_to_file_audio_capturer.cc
@@ -10,10 +10,9 @@
#include "test/testsupport/copy_to_file_audio_capturer.h"
+#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
-
namespace webrtc {
namespace test {
@@ -21,9 +20,9 @@
std::unique_ptr<TestAudioDeviceModule::Capturer> delegate,
std::string stream_dump_file_name)
: delegate_(std::move(delegate)),
- wav_writer_(absl::make_unique<WavWriter>(std::move(stream_dump_file_name),
- delegate_->SamplingFrequency(),
- delegate_->NumChannels())) {}
+ wav_writer_(std::make_unique<WavWriter>(std::move(stream_dump_file_name),
+ delegate_->SamplingFrequency(),
+ delegate_->NumChannels())) {}
CopyToFileAudioCapturer::~CopyToFileAudioCapturer() = default;
int CopyToFileAudioCapturer::SamplingFrequency() const {
diff --git a/test/testsupport/copy_to_file_audio_capturer_unittest.cc b/test/testsupport/copy_to_file_audio_capturer_unittest.cc
index 6a4e194..b82091a 100644
--- a/test/testsupport/copy_to_file_audio_capturer_unittest.cc
+++ b/test/testsupport/copy_to_file_audio_capturer_unittest.cc
@@ -13,7 +13,6 @@
#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "modules/audio_device/include/test_audio_device.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
@@ -28,8 +27,8 @@
webrtc::test::OutputPath(), "copy_to_file_audio_capturer_unittest");
std::unique_ptr<TestAudioDeviceModule::Capturer> delegate =
TestAudioDeviceModule::CreatePulsedNoiseCapturer(32000, 48000);
- capturer_ = absl::make_unique<CopyToFileAudioCapturer>(std::move(delegate),
- temp_filename_);
+ capturer_ = std::make_unique<CopyToFileAudioCapturer>(std::move(delegate),
+ temp_filename_);
}
void TearDown() override { ASSERT_EQ(remove(temp_filename_.c_str()), 0); }
diff --git a/test/testsupport/video_frame_writer.cc b/test/testsupport/video_frame_writer.cc
index 311f74a..c36ebde 100644
--- a/test/testsupport/video_frame_writer.cc
+++ b/test/testsupport/video_frame_writer.cc
@@ -13,9 +13,9 @@
#include <cmath>
#include <cstdlib>
#include <limits>
+#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "api/scoped_refptr.h"
#include "api/video/i420_buffer.h"
#include "common_video/libyuv/include/webrtc_libyuv.h"
@@ -63,10 +63,10 @@
: width_(width),
height_(height),
frame_writer_(
- absl::make_unique<Y4mFrameWriterImpl>(std::move(output_file_name),
- width_,
- height_,
- fps)) {
+ std::make_unique<Y4mFrameWriterImpl>(std::move(output_file_name),
+ width_,
+ height_,
+ fps)) {
// Init underlying frame writer and ensure that it is operational.
RTC_CHECK(frame_writer_->Init());
}
@@ -90,9 +90,9 @@
: width_(width),
height_(height),
frame_writer_(
- absl::make_unique<YuvFrameWriterImpl>(std::move(output_file_name),
- width_,
- height_)) {
+ std::make_unique<YuvFrameWriterImpl>(std::move(output_file_name),
+ width_,
+ height_)) {
// Init underlying frame writer and ensure that it is operational.
RTC_CHECK(frame_writer_->Init());
}
diff --git a/test/testsupport/video_frame_writer_unittest.cc b/test/testsupport/video_frame_writer_unittest.cc
index c712a6e..ea1afaa 100644
--- a/test/testsupport/video_frame_writer_unittest.cc
+++ b/test/testsupport/video_frame_writer_unittest.cc
@@ -17,7 +17,6 @@
#include <memory>
#include <string>
-#include "absl/memory/memory.h"
#include "absl/strings/string_view.h"
#include "api/video/i420_buffer.h"
#include "test/gtest.h"
@@ -110,7 +109,7 @@
class Y4mVideoFrameWriterTest : public VideoFrameWriterTest {
protected:
std::unique_ptr<VideoFrameWriter> CreateFrameWriter() override {
- return absl::make_unique<Y4mVideoFrameWriterImpl>(
+ return std::make_unique<Y4mVideoFrameWriterImpl>(
temp_filename_, kFrameWidth, kFrameHeight, kFrameRate);
}
};
@@ -118,8 +117,8 @@
class YuvVideoFrameWriterTest : public VideoFrameWriterTest {
protected:
std::unique_ptr<VideoFrameWriter> CreateFrameWriter() override {
- return absl::make_unique<YuvVideoFrameWriterImpl>(
- temp_filename_, kFrameWidth, kFrameHeight);
+ return std::make_unique<YuvVideoFrameWriterImpl>(temp_filename_,
+ kFrameWidth, kFrameHeight);
}
};
@@ -140,8 +139,8 @@
GetFileSize(temp_filename_));
std::unique_ptr<FrameReader> frame_reader =
- absl::make_unique<Y4mFrameReaderImpl>(temp_filename_, kFrameWidth,
- kFrameHeight);
+ std::make_unique<Y4mFrameReaderImpl>(temp_filename_, kFrameWidth,
+ kFrameHeight);
ASSERT_TRUE(frame_reader->Init());
AssertI420BuffersEq(frame_reader->ReadFrame(), expected_buffer);
AssertI420BuffersEq(frame_reader->ReadFrame(), expected_buffer);
@@ -165,8 +164,8 @@
EXPECT_EQ(2 * kFrameLength, GetFileSize(temp_filename_));
std::unique_ptr<FrameReader> frame_reader =
- absl::make_unique<YuvFrameReaderImpl>(temp_filename_, kFrameWidth,
- kFrameHeight);
+ std::make_unique<YuvFrameReaderImpl>(temp_filename_, kFrameWidth,
+ kFrameHeight);
ASSERT_TRUE(frame_reader->Init());
AssertI420BuffersEq(frame_reader->ReadFrame(), expected_buffer);
AssertI420BuffersEq(frame_reader->ReadFrame(), expected_buffer);
diff --git a/test/time_controller/BUILD.gn b/test/time_controller/BUILD.gn
index 252dca9..aa12477 100644
--- a/test/time_controller/BUILD.gn
+++ b/test/time_controller/BUILD.gn
@@ -33,7 +33,6 @@
"../../rtc_base/synchronization:yield_policy",
"../../rtc_base/task_utils:to_queued_task",
"../../system_wrappers",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
]
}
@@ -48,7 +47,6 @@
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_task_queue",
"../../rtc_base/task_utils:repeating_task",
- "//third_party/abseil-cpp/absl/memory",
]
}
}
diff --git a/test/time_controller/simulated_time_controller.cc b/test/time_controller/simulated_time_controller.cc
index 5e163cb..05f86b4 100644
--- a/test/time_controller/simulated_time_controller.cc
+++ b/test/time_controller/simulated_time_controller.cc
@@ -13,11 +13,11 @@
#include <deque>
#include <list>
#include <map>
+#include <memory>
#include <string>
#include <thread>
#include <vector>
-#include "absl/memory/memory.h"
#include "absl/strings/string_view.h"
namespace webrtc {
@@ -307,7 +307,7 @@
const char* thread_name) {
rtc::CritScope lock(&lock_);
auto process_thread =
- absl::make_unique<SimulatedSequenceRunner>(this, thread_name);
+ std::make_unique<SimulatedSequenceRunner>(this, thread_name);
runners_.push_back(process_thread.get());
return process_thread;
}
diff --git a/test/time_controller/simulated_time_controller_unittest.cc b/test/time_controller/simulated_time_controller_unittest.cc
index 15155c1..7ff4288 100644
--- a/test/time_controller/simulated_time_controller_unittest.cc
+++ b/test/time_controller/simulated_time_controller_unittest.cc
@@ -13,7 +13,6 @@
#include <atomic>
#include <memory>
-#include "absl/memory/memory.h"
#include "rtc_base/task_queue.h"
#include "rtc_base/task_utils/repeating_task.h"
#include "test/gmock.h"
@@ -104,7 +103,7 @@
rtc::TaskQueue task_queue(
time_simulation.GetTaskQueueFactory()->CreateTaskQueue(
"TestQueue", TaskQueueFactory::Priority::NORMAL));
- auto object = absl::make_unique<ObjectOnTaskQueue>();
+ auto object = std::make_unique<ObjectOnTaskQueue>();
// Create and start the periodic task.
RepeatingTaskHandle handle;
object->StartPeriodicTask(&handle, &task_queue);
diff --git a/test/video_decoder_proxy_factory.h b/test/video_decoder_proxy_factory.h
index b58c399..7e0fcdb 100644
--- a/test/video_decoder_proxy_factory.h
+++ b/test/video_decoder_proxy_factory.h
@@ -14,7 +14,6 @@
#include <memory>
#include <vector>
-#include "absl/memory/memory.h"
#include "api/video_codecs/video_decoder.h"
#include "api/video_codecs/video_decoder_factory.h"
@@ -37,7 +36,7 @@
std::unique_ptr<VideoDecoder> CreateVideoDecoder(
const SdpVideoFormat& format) override {
- return absl::make_unique<DecoderProxy>(decoder_);
+ return std::make_unique<DecoderProxy>(decoder_);
}
private:
diff --git a/test/video_encoder_proxy_factory.h b/test/video_encoder_proxy_factory.h
index ac19e52..d560911 100644
--- a/test/video_encoder_proxy_factory.h
+++ b/test/video_encoder_proxy_factory.h
@@ -14,7 +14,6 @@
#include <memory>
#include <vector>
-#include "absl/memory/memory.h"
#include "api/video_codecs/video_encoder.h"
#include "api/video_codecs/video_encoder_factory.h"
@@ -54,7 +53,7 @@
max_num_simultaneous_encoder_instances_ =
std::max(max_num_simultaneous_encoder_instances_,
num_simultaneous_encoder_instances_);
- return absl::make_unique<EncoderProxy>(encoder_, this);
+ return std::make_unique<EncoderProxy>(encoder_, this);
}
void SetIsHardwareAccelerated(bool is_hardware_accelerated) {