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}
This commit is contained in:
committed by
Commit Bot
parent
809198edff
commit
317a1f09ed
@ -68,7 +68,6 @@ rtc_source_set("video_test_common") {
|
||||
"../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_source_set("rtp_test_utils") {
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base/system:arch",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -263,7 +261,6 @@ if (rtc_include_tests) {
|
||||
"//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 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../system_wrappers",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/libyuv",
|
||||
]
|
||||
|
||||
@ -403,7 +399,6 @@ if (rtc_include_tests) {
|
||||
"//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_source_set("single_threaded_task_queue") {
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:deprecation",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -671,7 +665,6 @@ rtc_source_set("fake_video_codecs") {
|
||||
"../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 @@ rtc_source_set("test_common") {
|
||||
"../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 @@ rtc_source_set("copy_to_file_audio_capturer") {
|
||||
"../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 @@ rtc_source_set("copy_to_file_audio_capturer_unittest") {
|
||||
":fileutils",
|
||||
":test_support",
|
||||
"../modules/audio_device:audio_device_impl",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@ -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 @@ class AudioDecoderProxyFactory : public AudioDecoderFactory {
|
||||
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:
|
||||
|
||||
@ -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 @@ namespace test {
|
||||
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 @@ void CallTest::CreateFrameGeneratorCapturerWithDrift(Clock* clock,
|
||||
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 @@ void CallTest::CreateFrameGeneratorCapturer(int framerate,
|
||||
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 @@ test::PacketTransport* BaseTest::CreateSendTransport(
|
||||
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 @@ test::PacketTransport* BaseTest::CreateReceiveTransport(
|
||||
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 {
|
||||
|
||||
@ -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 @@ void FakeDecoder::SetDelayedDecoding(int decode_delay_ms) {
|
||||
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;
|
||||
|
||||
@ -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 @@ std::unique_ptr<RTPFragmentationHeader> FakeH264Encoder::EncodeHook(
|
||||
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 @@ int32_t MultithreadedFakeH264Encoder::Encode(
|
||||
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;
|
||||
}
|
||||
|
||||
@ -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 @@ namespace {
|
||||
|
||||
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"));
|
||||
|
||||
@ -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 @@ class SquareGenerator : public FrameGenerator {
|
||||
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 @@ class YuvFileGenerator : public FrameGenerator {
|
||||
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 @@ class SlideGenerator : public FrameGenerator {
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
@ -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 @@ std::unique_ptr<FrameGeneratorCapturer> FrameGeneratorCapturer::Create(
|
||||
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 @@ std::unique_ptr<FrameGeneratorCapturer> FrameGeneratorCapturer::Create(
|
||||
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 @@ std::unique_ptr<FrameGeneratorCapturer> FrameGeneratorCapturer::Create(
|
||||
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 @@ std::unique_ptr<FrameGeneratorCapturer> FrameGeneratorCapturer::Create(
|
||||
/*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);
|
||||
}
|
||||
|
||||
|
||||
@ -452,7 +452,6 @@ webrtc_fuzzer_test("mdns_parser_fuzzer") {
|
||||
deps = [
|
||||
"../../p2p:rtc_p2p",
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
seed_corpus = "corpora/mdns-corpus"
|
||||
}
|
||||
@ -529,7 +528,6 @@ webrtc_fuzzer_test("agc_fuzzer") {
|
||||
"../../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 @@ webrtc_fuzzer_test("rtp_frame_reference_finder_fuzzer") {
|
||||
"../../api:scoped_refptr",
|
||||
"../../modules/video_coding/",
|
||||
"../../system_wrappers",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -637,7 +634,6 @@ webrtc_fuzzer_test("vp8_replay_fuzzer") {
|
||||
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 @@ webrtc_fuzzer_test("vp9_replay_fuzzer") {
|
||||
deps = [
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"utils:rtp_replayer",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
seed_corpus = "corpora/rtpdump-corpus/vp9"
|
||||
}
|
||||
|
||||
@ -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 @@ void FuzzOneInput(const uint8_t* data, size_t size) {
|
||||
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
|
||||
|
||||
@ -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 @@ namespace webrtc {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@ -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 @@ void FuzzOneInput(const uint8_t* data, size_t size) {
|
||||
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));
|
||||
}
|
||||
|
||||
@ -37,6 +37,5 @@ rtc_source_set("rtp_replayer") {
|
||||
"../../../test:test_renderer",
|
||||
"../../../test:test_support",
|
||||
"../../../test:video_test_common",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -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 @@ namespace test {
|
||||
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 @@ void RtpReplayer::SetupVideoStreams(
|
||||
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) {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -27,7 +27,6 @@ rtc_source_set("log_writer") {
|
||||
"../../rtc_base:rtc_base_tests_utils",
|
||||
"../../rtc_base:stringutils",
|
||||
"../../test:fileutils",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
|
||||
@ -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 @@ FileLogWriterFactory::~FileLogWriterFactory() {}
|
||||
|
||||
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
|
||||
|
||||
@ -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 @@ class MemoryLogWriterFactory : public LogWriterFactoryInterface {
|
||||
: 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() {}
|
||||
MemoryLogStorage::~MemoryLogStorage() {}
|
||||
|
||||
std::unique_ptr<LogWriterFactoryInterface> MemoryLogStorage::CreateFactory() {
|
||||
return absl::make_unique<MemoryLogWriterFactory>(&logs_);
|
||||
return std::make_unique<MemoryLogWriterFactory>(&logs_);
|
||||
}
|
||||
|
||||
// namespace webrtc_impl
|
||||
|
||||
@ -77,7 +77,6 @@ rtc_source_set("network_emulation_unittest") {
|
||||
"../../rtc_base:logging",
|
||||
"../../rtc_base:rtc_event",
|
||||
"../../system_wrappers:system_wrappers",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -106,7 +105,6 @@ rtc_source_set("network_emulation_pc_unittest") {
|
||||
"../../rtc_base:gunit_helpers",
|
||||
"../../rtc_base:logging",
|
||||
"../../rtc_base:rtc_event",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@ -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 @@ EmulatedEndpoint::EmulatedEndpoint(uint64_t id,
|
||||
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 @@ EndpointsContainer::GetEnabledNetworks() const {
|
||||
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;
|
||||
|
||||
@ -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 @@ class ResourceOwningTask final : public QueuedTask {
|
||||
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 @@ NetworkEmulationManagerImpl::~NetworkEmulationManagerImpl() = default;
|
||||
|
||||
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 @@ EmulatedEndpoint* NetworkEmulationManagerImpl::CreateEndpoint(
|
||||
|
||||
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 @@ EmulatedRoute* NetworkEmulationManagerImpl::CreateRoute(
|
||||
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 @@ TrafficRoute* NetworkEmulationManagerImpl::CreateTrafficRoute(
|
||||
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 @@ NetworkEmulationManagerImpl::CreateRandomWalkCrossTraffic(
|
||||
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 @@ NetworkEmulationManagerImpl::CreatePulsedPeaksCrossTraffic(
|
||||
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 @@ void NetworkEmulationManagerImpl::StartFakeTcpCrossTraffic(
|
||||
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 @@ void NetworkEmulationManagerImpl::StartFakeTcpCrossTraffic(
|
||||
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.
|
||||
|
||||
@ -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 @@ rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
|
||||
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::scoped_refptr<PeerConnectionInterface> CreatePeerConnection(
|
||||
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 @@ TEST(NetworkEmulationManagerPCTest, Run) {
|
||||
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 @@ TEST(NetworkEmulationManagerPCTest, Run) {
|
||||
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 @@ TEST(NetworkEmulationManagerPCTest, Run) {
|
||||
});
|
||||
|
||||
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 =
|
||||
|
||||
@ -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 @@ class NetworkEmulationManagerThreeNodesRoutingTest : public ::testing::Test {
|
||||
EmulatedNetworkNode* CreateEmulatedNodeWithDefaultBuiltInConfig(
|
||||
NetworkEmulationManager* emulation) {
|
||||
return emulation->CreateEmulatedNode(
|
||||
absl::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
|
||||
std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@ -186,9 +185,9 @@ TEST(NetworkEmulationManagerTest, Run) {
|
||||
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 @@ TEST(NetworkEmulationManagerTest, ThroughputStats) {
|
||||
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 =
|
||||
|
||||
@ -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() const {
|
||||
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;
|
||||
|
||||
@ -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 @@ TrafficRoute::TrafficRoute(Clock* clock,
|
||||
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::TriggerPacketBurst(size_t num_packets, size_t packet_size) {
|
||||
|
||||
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);
|
||||
|
||||
@ -60,7 +60,6 @@ rtc_source_set("peer_connection_quality_test_params") {
|
||||
"../../../api/transport/media:media_transport_interface",
|
||||
"../../../api/video_codecs:video_codecs_api",
|
||||
"../../../rtc_base",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -153,7 +152,6 @@ rtc_source_set("quality_analyzing_video_decoder") {
|
||||
"../../../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 @@ rtc_source_set("quality_analyzing_video_encoder") {
|
||||
"../../../modules/video_coding:video_codec_interface",
|
||||
"../../../rtc_base:criticalsection",
|
||||
"../../../rtc_base:logging",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -302,7 +299,6 @@ if (rtc_include_tests) {
|
||||
"../../../system_wrappers:field_trial",
|
||||
"../../../test:fileutils",
|
||||
"../../../test:video_test_support",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -380,7 +376,6 @@ if (rtc_include_tests) {
|
||||
"../../../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_source_set("default_video_quality_analyzer") {
|
||||
"../../../rtc_base:rtc_event",
|
||||
"../../../rtc_base:rtc_numerics",
|
||||
"../../../system_wrappers",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -512,7 +506,7 @@ rtc_source_set("sdp_changer") {
|
||||
"../../../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",
|
||||
]
|
||||
|
||||
@ -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 @@ void DefaultVideoQualityAnalyzer::Start(std::string test_case_name,
|
||||
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);
|
||||
|
||||
@ -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 @@ QualityAnalyzingVideoDecoder::QualityAnalyzingVideoDecoder(
|
||||
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 @@ std::unique_ptr<VideoDecoder>
|
||||
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 @@ QualityAnalyzingVideoDecoderFactory::LegacyCreateVideoDecoder(
|
||||
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_);
|
||||
}
|
||||
|
||||
|
||||
@ -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 @@ QualityAnalyzingVideoEncoderFactory::QueryVideoEncoder(
|
||||
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_);
|
||||
|
||||
@ -115,7 +115,7 @@ VideoQualityAnalyzerInjectionHelper::VideoQualityAnalyzerInjectionHelper(
|
||||
: 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 @@ VideoQualityAnalyzerInjectionHelper::WrapVideoEncoderFactory(
|
||||
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 @@ VideoQualityAnalyzerInjectionHelper::WrapVideoEncoderFactory(
|
||||
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 @@ VideoQualityAnalyzerInjectionHelper::WrapFrameGenerator(
|
||||
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 @@ VideoQualityAnalyzerInjectionHelper::CreateVideoSink(
|
||||
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,
|
||||
|
||||
@ -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 @@ class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test {
|
||||
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 @@ class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test {
|
||||
|
||||
// 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 @@ class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test {
|
||||
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);
|
||||
|
||||
|
||||
@ -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 @@ PeerConnectionE2EQualityTest::PeerConnectionE2EQualityTest(
|
||||
// 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 @@ void PeerConnectionE2EQualityTest::AddPeer(
|
||||
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 @@ void PeerConnectionE2EQualityTest::Run(RunParams run_params) {
|
||||
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 @@ void PeerConnectionE2EQualityTest::Run(RunParams run_params) {
|
||||
|
||||
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 @@ void PeerConnectionE2EQualityTest::Run(RunParams run_params) {
|
||||
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 @@ void PeerConnectionE2EQualityTest::Run(RunParams run_params) {
|
||||
|
||||
// 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 @@ void PeerConnectionE2EQualityTest::SetupRequiredFieldTrials(
|
||||
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 @@ PeerConnectionE2EQualityTest::MaybeAddVideo(TestPeer* peer) {
|
||||
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 @@ test::VideoFrameWriter* PeerConnectionE2EQualityTest::MaybeCreateVideoWriter(
|
||||
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));
|
||||
|
||||
@ -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 @@ class PeerConfigurerImpl final
|
||||
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 {
|
||||
|
||||
@ -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 @@ struct InjectableComponents {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@ -273,7 +273,7 @@ LocalAndRemoteSdp SignalingInterceptor::PatchVp8Offer(
|
||||
|
||||
// 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 @@ LocalAndRemoteSdp SignalingInterceptor::PatchVp8Answer(
|
||||
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));
|
||||
|
||||
@ -61,7 +61,7 @@ void SetMandatoryEntities(InjectableComponents* components) {
|
||||
}
|
||||
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 @@ class TestPeerComponents {
|
||||
|
||||
// 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 @@ class TestPeerComponents {
|
||||
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
|
||||
|
||||
@ -43,7 +43,7 @@ if (rtc_include_tests) {
|
||||
"../../pc:rtc_pc_base",
|
||||
"..//network:emulated_network",
|
||||
"../scenario",
|
||||
"//third_party/abseil-cpp/absl/memory:memory",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 @@ PeerScenarioClient::PeerScenarioClient(NetworkEmulationManager* net,
|
||||
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 @@ PeerScenarioClient::PeerScenarioClient(NetworkEmulationManager* net,
|
||||
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_ =
|
||||
|
||||
@ -77,7 +77,7 @@ class ScenarioIceConnectionImpl : public ScenarioIceConnection,
|
||||
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(
|
||||
|
||||
@ -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 @@ class RtpHeaderParserImpl : public RtpHeaderParser {
|
||||
};
|
||||
|
||||
std::unique_ptr<RtpHeaderParser> RtpHeaderParser::CreateForTest() {
|
||||
return absl::make_unique<RtpHeaderParserImpl>();
|
||||
return std::make_unique<RtpHeaderParserImpl>();
|
||||
}
|
||||
|
||||
RtpHeaderParserImpl::RtpHeaderParserImpl() {}
|
||||
|
||||
@ -177,7 +177,6 @@ if (rtc_include_tests) {
|
||||
"../../test:test_support",
|
||||
"../logging:log_writer",
|
||||
"//testing/gmock",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
data = scenario_unittest_resources
|
||||
if (is_ios) {
|
||||
|
||||
@ -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 @@ std::unique_ptr<RtcEventLog> CreateEventLog(
|
||||
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 @@ NetworkControlUpdate LoggingNetworkControllerFactory::GetUpdate() const {
|
||||
|
||||
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 @@ CallClient::CallClient(
|
||||
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());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -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 @@ SimulationNode::SimulationNode(NetworkSimulationConfig config,
|
||||
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(
|
||||
|
||||
@ -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 @@ std::unique_ptr<FileLogWriterFactory> GetScenarioLogManager(
|
||||
|
||||
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
|
||||
|
||||
@ -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 @@ class Scenario {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@ -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 @@ SendVideoStream::SendVideoStream(CallClient* sender,
|
||||
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 @@ SendVideoStream::SendVideoStream(CallClient* sender,
|
||||
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 @@ SendVideoStream::SendVideoStream(CallClient* sender,
|
||||
}
|
||||
|
||||
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 @@ ReceiveVideoStream::ReceiveVideoStream(CallClient* receiver,
|
||||
: 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 @@ ReceiveVideoStream::ReceiveVideoStream(CallClient* receiver,
|
||||
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(
|
||||
|
||||
@ -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 @@ DEPRECATED_SingleThreadedTaskQueueForTesting::PostDelayedTask(
|
||||
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
|
||||
|
||||
@ -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 @@ TEST(DEPRECATED_SingleThreadedTaskQueueForTestingTest,
|
||||
|
||||
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, SendTask) {
|
||||
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);
|
||||
|
||||
@ -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 @@ class TestMainImpl : public TestMain {
|
||||
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 @@ class TestMainImpl : public TestMain {
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<TestMain> TestMain::Create() {
|
||||
return absl::make_unique<TestMainImpl>();
|
||||
return std::make_unique<TestMainImpl>();
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -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 @@ CopyToFileAudioCapturer::CopyToFileAudioCapturer(
|
||||
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 {
|
||||
|
||||
@ -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 @@ class CopyToFileAudioCapturerTest : public ::testing::Test {
|
||||
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); }
|
||||
|
||||
@ -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 @@ Y4mVideoFrameWriterImpl::Y4mVideoFrameWriterImpl(std::string output_file_name,
|
||||
: 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 @@ YuvVideoFrameWriterImpl::YuvVideoFrameWriterImpl(std::string output_file_name,
|
||||
: 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());
|
||||
}
|
||||
|
||||
@ -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 VideoFrameWriterTest : public ::testing::Test {
|
||||
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 Y4mVideoFrameWriterTest : public VideoFrameWriterTest {
|
||||
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 @@ TEST_F(Y4mVideoFrameWriterTest, WriteFrame) {
|
||||
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 @@ TEST_F(YuvVideoFrameWriterTest, WriteFrame) {
|
||||
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);
|
||||
|
||||
@ -33,7 +33,6 @@ if (rtc_include_tests) {
|
||||
"../../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 @@ if (rtc_include_tests) {
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"../../rtc_base:rtc_task_queue",
|
||||
"../../rtc_base/task_utils:repeating_task",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 @@ std::unique_ptr<ProcessThread> SimulatedTimeControllerImpl::CreateProcessThread(
|
||||
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;
|
||||
}
|
||||
|
||||
@ -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 @@ TEST(SimulatedTimeControllerTest, Example) {
|
||||
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);
|
||||
|
||||
@ -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 @@ class VideoDecoderProxyFactory final : public VideoDecoderFactory {
|
||||
|
||||
std::unique_ptr<VideoDecoder> CreateVideoDecoder(
|
||||
const SdpVideoFormat& format) override {
|
||||
return absl::make_unique<DecoderProxy>(decoder_);
|
||||
return std::make_unique<DecoderProxy>(decoder_);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@ -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 @@ class VideoEncoderProxyFactory final : public VideoEncoderFactory {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user