diff --git a/api/BUILD.gn b/api/BUILD.gn index cc092eff01..f6885f2df1 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -59,7 +59,6 @@ if (!build_with_chromium) { "audio_codecs:audio_codecs_api", "task_queue:default_task_queue_factory", "video_codecs:video_codecs_api", - "//third_party/abseil-cpp/absl/memory", ] } } @@ -372,7 +371,6 @@ rtc_source_set("test_dependency_factory") { ":video_quality_test_fixture_api", "../rtc_base:checks", "../rtc_base:thread_checker", - "//third_party/abseil-cpp/absl/memory", ] } @@ -390,7 +388,6 @@ if (rtc_include_tests) { ":scoped_refptr", ":video_quality_test_fixture_api", "../video:video_quality_test", - "//third_party/abseil-cpp/absl/memory", ] } @@ -404,7 +401,6 @@ if (rtc_include_tests) { deps = [ ":network_emulation_manager_api", "../test/network:emulated_network", - "//third_party/abseil-cpp/absl/memory", ] } @@ -421,7 +417,6 @@ if (rtc_include_tests) { ":peer_connection_quality_test_fixture_api", ":video_quality_analyzer_api", "../test/pc/e2e:peerconnection_quality_test", - "//third_party/abseil-cpp/absl/memory", ] } } @@ -581,7 +576,6 @@ rtc_source_set("ice_transport_factory") { "../rtc_base", "../rtc_base/system:rtc_export", "rtc_event_log:rtc_event_log", - "//third_party/abseil-cpp/absl/memory", ] } @@ -633,7 +627,6 @@ if (rtc_include_tests) { "../rtc_base:checks", "//third_party/abseil-cpp/absl/flags:flag", "//third_party/abseil-cpp/absl/flags:parse", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", ] } @@ -659,7 +652,6 @@ if (rtc_include_tests) { "../modules/video_coding:simulcast_test_fixture_impl", "../rtc_base:rtc_base_approved", "video_codecs:video_codecs_api", - "//third_party/abseil-cpp/absl/memory", ] } @@ -693,7 +685,6 @@ if (rtc_include_tests) { "../modules/video_coding:videocodec_test_impl", "../rtc_base:rtc_base_approved", "video_codecs:video_codecs_api", - "//third_party/abseil-cpp/absl/memory", ] } @@ -901,7 +892,6 @@ if (rtc_include_tests) { "transport:datagram_transport_interface", "transport/media:media_transport_interface", "//third_party/abseil-cpp/absl/algorithm:container", - "//third_party/abseil-cpp/absl/memory", ] } @@ -919,7 +909,6 @@ if (rtc_include_tests) { "transport:datagram_transport_interface", "transport/media:media_transport_interface", "//third_party/abseil-cpp/absl/algorithm:container", - "//third_party/abseil-cpp/absl/memory", ] } @@ -954,7 +943,6 @@ if (rtc_include_tests) { "task_queue:task_queue_default_factory_unittests", "units:units_unittests", "video:video_unittests", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/api/audio/BUILD.gn b/api/audio/BUILD.gn index deff5b7f55..ffc47a97d3 100644 --- a/api/audio/BUILD.gn +++ b/api/audio/BUILD.gn @@ -80,7 +80,6 @@ rtc_source_set("aec3_factory") { "../../modules/audio_processing/aec3", "../../rtc_base:rtc_base_approved", "../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/api/audio/echo_canceller3_factory.cc b/api/audio/echo_canceller3_factory.cc index bb795c9670..cff75dea5a 100644 --- a/api/audio/echo_canceller3_factory.cc +++ b/api/audio/echo_canceller3_factory.cc @@ -11,7 +11,6 @@ #include -#include "absl/memory/memory.h" #include "modules/audio_processing/aec3/echo_canceller3.h" namespace webrtc { @@ -22,9 +21,9 @@ EchoCanceller3Factory::EchoCanceller3Factory(const EchoCanceller3Config& config) : config_(config) {} std::unique_ptr EchoCanceller3Factory::Create(int sample_rate_hz) { - return absl::make_unique(config_, sample_rate_hz, - /*num_render_channels=*/1, - /*num_capture_channels=*/1); + return std::make_unique(config_, sample_rate_hz, + /*num_render_channels=*/1, + /*num_capture_channels=*/1); } } // namespace webrtc diff --git a/api/audio_codecs/L16/BUILD.gn b/api/audio_codecs/L16/BUILD.gn index 34ec2e4208..dff62a03a6 100644 --- a/api/audio_codecs/L16/BUILD.gn +++ b/api/audio_codecs/L16/BUILD.gn @@ -25,7 +25,6 @@ rtc_static_library("audio_encoder_L16") { "../../../rtc_base:rtc_base_approved", "../../../rtc_base:safe_minmax", "../../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -43,7 +42,6 @@ rtc_static_library("audio_decoder_L16") { "../../../modules/audio_coding:pcm16b", "../../../rtc_base:rtc_base_approved", "../../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] diff --git a/api/audio_codecs/L16/audio_decoder_L16.cc b/api/audio_codecs/L16/audio_decoder_L16.cc index be0c6b56b2..57c9e76889 100644 --- a/api/audio_codecs/L16/audio_decoder_L16.cc +++ b/api/audio_codecs/L16/audio_decoder_L16.cc @@ -10,7 +10,8 @@ #include "api/audio_codecs/L16/audio_decoder_L16.h" -#include "absl/memory/memory.h" +#include + #include "absl/strings/match.h" #include "modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h" #include "modules/audio_coding/codecs/pcm16b/pcm16b_common.h" @@ -36,7 +37,7 @@ void AudioDecoderL16::AppendSupportedDecoders( std::unique_ptr AudioDecoderL16::MakeAudioDecoder( const Config& config, absl::optional /*codec_pair_id*/) { - return config.IsOk() ? absl::make_unique( + return config.IsOk() ? std::make_unique( config.sample_rate_hz, config.num_channels) : nullptr; } diff --git a/api/audio_codecs/L16/audio_encoder_L16.cc b/api/audio_codecs/L16/audio_encoder_L16.cc index 1bb552bc5c..507c8d7d26 100644 --- a/api/audio_codecs/L16/audio_encoder_L16.cc +++ b/api/audio_codecs/L16/audio_encoder_L16.cc @@ -10,7 +10,8 @@ #include "api/audio_codecs/L16/audio_encoder_L16.h" -#include "absl/memory/memory.h" +#include + #include "absl/strings/match.h" #include "modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h" #include "modules/audio_coding/codecs/pcm16b/pcm16b_common.h" @@ -63,7 +64,7 @@ std::unique_ptr AudioEncoderL16::MakeAudioEncoder( c.num_channels = config.num_channels; c.frame_size_ms = config.frame_size_ms; c.payload_type = payload_type; - return absl::make_unique(c); + return std::make_unique(c); } } // namespace webrtc diff --git a/api/audio_codecs/g711/BUILD.gn b/api/audio_codecs/g711/BUILD.gn index 3b8f23c1bc..ebcc249591 100644 --- a/api/audio_codecs/g711/BUILD.gn +++ b/api/audio_codecs/g711/BUILD.gn @@ -25,7 +25,6 @@ rtc_static_library("audio_encoder_g711") { "../../../rtc_base:rtc_base_approved", "../../../rtc_base:safe_minmax", "../../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -43,7 +42,6 @@ rtc_static_library("audio_decoder_g711") { "../../../modules/audio_coding:g711", "../../../rtc_base:rtc_base_approved", "../../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] diff --git a/api/audio_codecs/g711/audio_decoder_g711.cc b/api/audio_codecs/g711/audio_decoder_g711.cc index 91599c416a..57e3741bef 100644 --- a/api/audio_codecs/g711/audio_decoder_g711.cc +++ b/api/audio_codecs/g711/audio_decoder_g711.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "modules/audio_coding/codecs/g711/audio_decoder_pcm.h" #include "rtc_base/numerics/safe_conversions.h" @@ -49,9 +48,9 @@ std::unique_ptr AudioDecoderG711::MakeAudioDecoder( RTC_DCHECK(config.IsOk()); switch (config.type) { case Config::Type::kPcmU: - return absl::make_unique(config.num_channels); + return std::make_unique(config.num_channels); case Config::Type::kPcmA: - return absl::make_unique(config.num_channels); + return std::make_unique(config.num_channels); default: return nullptr; } diff --git a/api/audio_codecs/g711/audio_encoder_g711.cc b/api/audio_codecs/g711/audio_encoder_g711.cc index f40cd6e65f..ab95ad45d5 100644 --- a/api/audio_codecs/g711/audio_encoder_g711.cc +++ b/api/audio_codecs/g711/audio_encoder_g711.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "modules/audio_coding/codecs/g711/audio_encoder_pcm.h" #include "rtc_base/numerics/safe_conversions.h" @@ -70,14 +69,14 @@ std::unique_ptr AudioEncoderG711::MakeAudioEncoder( impl_config.num_channels = config.num_channels; impl_config.frame_size_ms = config.frame_size_ms; impl_config.payload_type = payload_type; - return absl::make_unique(impl_config); + return std::make_unique(impl_config); } case Config::Type::kPcmA: { AudioEncoderPcmA::Config impl_config; impl_config.num_channels = config.num_channels; impl_config.frame_size_ms = config.frame_size_ms; impl_config.payload_type = payload_type; - return absl::make_unique(impl_config); + return std::make_unique(impl_config); } default: { return nullptr; diff --git a/api/audio_codecs/g722/BUILD.gn b/api/audio_codecs/g722/BUILD.gn index e4321d2993..ccb4801fdf 100644 --- a/api/audio_codecs/g722/BUILD.gn +++ b/api/audio_codecs/g722/BUILD.gn @@ -33,7 +33,6 @@ rtc_static_library("audio_encoder_g722") { "../../../rtc_base:rtc_base_approved", "../../../rtc_base:safe_minmax", "../../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -51,7 +50,6 @@ rtc_static_library("audio_decoder_g722") { "../../../modules/audio_coding:g722", "../../../rtc_base:rtc_base_approved", "../../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] diff --git a/api/audio_codecs/g722/audio_decoder_g722.cc b/api/audio_codecs/g722/audio_decoder_g722.cc index 2cc16c37d9..29b6d5da0a 100644 --- a/api/audio_codecs/g722/audio_decoder_g722.cc +++ b/api/audio_codecs/g722/audio_decoder_g722.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "modules/audio_coding/codecs/g722/audio_decoder_g722.h" #include "rtc_base/numerics/safe_conversions.h" @@ -40,9 +39,9 @@ std::unique_ptr AudioDecoderG722::MakeAudioDecoder( absl::optional /*codec_pair_id*/) { switch (config.num_channels) { case 1: - return absl::make_unique(); + return std::make_unique(); case 2: - return absl::make_unique(); + return std::make_unique(); default: return nullptr; } diff --git a/api/audio_codecs/g722/audio_encoder_g722.cc b/api/audio_codecs/g722/audio_encoder_g722.cc index 6374ae802f..12c1746eb7 100644 --- a/api/audio_codecs/g722/audio_encoder_g722.cc +++ b/api/audio_codecs/g722/audio_encoder_g722.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "modules/audio_coding/codecs/g722/audio_encoder_g722.h" #include "rtc_base/numerics/safe_conversions.h" @@ -62,7 +61,7 @@ std::unique_ptr AudioEncoderG722::MakeAudioEncoder( int payload_type, absl::optional /*codec_pair_id*/) { RTC_DCHECK(config.IsOk()); - return absl::make_unique(config, payload_type); + return std::make_unique(config, payload_type); } } // namespace webrtc diff --git a/api/audio_codecs/ilbc/BUILD.gn b/api/audio_codecs/ilbc/BUILD.gn index d766fa4a97..559ae2b73c 100644 --- a/api/audio_codecs/ilbc/BUILD.gn +++ b/api/audio_codecs/ilbc/BUILD.gn @@ -32,7 +32,6 @@ rtc_static_library("audio_encoder_ilbc") { "../../../modules/audio_coding:ilbc", "../../../rtc_base:rtc_base_approved", "../../../rtc_base:safe_minmax", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -49,7 +48,6 @@ rtc_static_library("audio_decoder_ilbc") { "..:audio_codecs_api", "../../../modules/audio_coding:ilbc", "../../../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] diff --git a/api/audio_codecs/ilbc/audio_decoder_ilbc.cc b/api/audio_codecs/ilbc/audio_decoder_ilbc.cc index 4a00f8dbf0..d0aae9044e 100644 --- a/api/audio_codecs/ilbc/audio_decoder_ilbc.cc +++ b/api/audio_codecs/ilbc/audio_decoder_ilbc.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h" @@ -35,7 +34,7 @@ void AudioDecoderIlbc::AppendSupportedDecoders( std::unique_ptr AudioDecoderIlbc::MakeAudioDecoder( Config config, absl::optional /*codec_pair_id*/) { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/api/audio_codecs/ilbc/audio_encoder_ilbc.cc b/api/audio_codecs/ilbc/audio_encoder_ilbc.cc index 896ed238cc..bd653b7979 100644 --- a/api/audio_codecs/ilbc/audio_encoder_ilbc.cc +++ b/api/audio_codecs/ilbc/audio_encoder_ilbc.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h" #include "rtc_base/numerics/safe_conversions.h" @@ -76,7 +75,7 @@ std::unique_ptr AudioEncoderIlbc::MakeAudioEncoder( int payload_type, absl::optional /*codec_pair_id*/) { RTC_DCHECK(config.IsOk()); - return absl::make_unique(config, payload_type); + return std::make_unique(config, payload_type); } } // namespace webrtc diff --git a/api/audio_codecs/isac/BUILD.gn b/api/audio_codecs/isac/BUILD.gn index c7d6e43271..d558d20076 100644 --- a/api/audio_codecs/isac/BUILD.gn +++ b/api/audio_codecs/isac/BUILD.gn @@ -79,7 +79,6 @@ rtc_static_library("audio_encoder_isac_fix") { "..:audio_codecs_api", "../../../modules/audio_coding:isac_fix", "../../../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -96,7 +95,6 @@ rtc_static_library("audio_decoder_isac_fix") { "..:audio_codecs_api", "../../../modules/audio_coding:isac_fix", "../../../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -114,7 +112,6 @@ rtc_static_library("audio_encoder_isac_float") { "../../../modules/audio_coding:isac", "../../../rtc_base:rtc_base_approved", "../../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -132,7 +129,6 @@ rtc_static_library("audio_decoder_isac_float") { "../../../modules/audio_coding:isac", "../../../rtc_base:rtc_base_approved", "../../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] diff --git a/api/audio_codecs/isac/audio_decoder_isac_fix.cc b/api/audio_codecs/isac/audio_decoder_isac_fix.cc index 0e2d6bc350..21d0da37d1 100644 --- a/api/audio_codecs/isac/audio_decoder_isac_fix.cc +++ b/api/audio_codecs/isac/audio_decoder_isac_fix.cc @@ -10,7 +10,8 @@ #include "api/audio_codecs/isac/audio_decoder_isac_fix.h" -#include "absl/memory/memory.h" +#include + #include "absl/strings/match.h" #include "modules/audio_coding/codecs/isac/fix/include/audio_decoder_isacfix.h" @@ -34,7 +35,7 @@ std::unique_ptr AudioDecoderIsacFix::MakeAudioDecoder( absl::optional /*codec_pair_id*/) { AudioDecoderIsacFixImpl::Config c; c.sample_rate_hz = 16000; - return absl::make_unique(c); + return std::make_unique(c); } } // namespace webrtc diff --git a/api/audio_codecs/isac/audio_decoder_isac_float.cc b/api/audio_codecs/isac/audio_decoder_isac_float.cc index ec774ebe22..4efc2ea9a3 100644 --- a/api/audio_codecs/isac/audio_decoder_isac_float.cc +++ b/api/audio_codecs/isac/audio_decoder_isac_float.cc @@ -10,7 +10,8 @@ #include "api/audio_codecs/isac/audio_decoder_isac_float.h" -#include "absl/memory/memory.h" +#include + #include "absl/strings/match.h" #include "modules/audio_coding/codecs/isac/main/include/audio_decoder_isac.h" @@ -41,7 +42,7 @@ std::unique_ptr AudioDecoderIsacFloat::MakeAudioDecoder( RTC_DCHECK(config.IsOk()); AudioDecoderIsacFloatImpl::Config c; c.sample_rate_hz = config.sample_rate_hz; - return absl::make_unique(c); + return std::make_unique(c); } } // namespace webrtc diff --git a/api/audio_codecs/isac/audio_encoder_isac_fix.cc b/api/audio_codecs/isac/audio_encoder_isac_fix.cc index a10d1ee61a..7bcb78ef5a 100644 --- a/api/audio_codecs/isac/audio_encoder_isac_fix.cc +++ b/api/audio_codecs/isac/audio_encoder_isac_fix.cc @@ -10,7 +10,8 @@ #include "api/audio_codecs/isac/audio_encoder_isac_fix.h" -#include "absl/memory/memory.h" +#include + #include "absl/strings/match.h" #include "modules/audio_coding/codecs/isac/fix/include/audio_encoder_isacfix.h" #include "rtc_base/string_to_number.h" @@ -56,7 +57,7 @@ std::unique_ptr AudioEncoderIsacFix::MakeAudioEncoder( AudioEncoderIsacFixImpl::Config c; c.frame_size_ms = config.frame_size_ms; c.payload_type = payload_type; - return absl::make_unique(c); + return std::make_unique(c); } } // namespace webrtc diff --git a/api/audio_codecs/isac/audio_encoder_isac_float.cc b/api/audio_codecs/isac/audio_encoder_isac_float.cc index 37982b1f15..6f684c881b 100644 --- a/api/audio_codecs/isac/audio_encoder_isac_float.cc +++ b/api/audio_codecs/isac/audio_encoder_isac_float.cc @@ -10,7 +10,8 @@ #include "api/audio_codecs/isac/audio_encoder_isac_float.h" -#include "absl/memory/memory.h" +#include + #include "absl/strings/match.h" #include "modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h" #include "rtc_base/string_to_number.h" @@ -70,7 +71,7 @@ std::unique_ptr AudioEncoderIsacFloat::MakeAudioEncoder( c.sample_rate_hz = config.sample_rate_hz; c.frame_size_ms = config.frame_size_ms; c.bit_rate = config.bit_rate; - return absl::make_unique(c); + return std::make_unique(c); } } // namespace webrtc diff --git a/api/audio_codecs/opus/BUILD.gn b/api/audio_codecs/opus/BUILD.gn index 01a48848af..35c3cbf9b4 100644 --- a/api/audio_codecs/opus/BUILD.gn +++ b/api/audio_codecs/opus/BUILD.gn @@ -72,7 +72,6 @@ rtc_static_library("audio_decoder_opus") { "../../../modules/audio_coding:webrtc_opus", "../../../rtc_base:rtc_base_approved", "../../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] diff --git a/api/audio_codecs/opus/audio_decoder_opus.cc b/api/audio_codecs/opus/audio_decoder_opus.cc index 82bb1b2e2c..6b4e0d3797 100644 --- a/api/audio_codecs/opus/audio_decoder_opus.cc +++ b/api/audio_codecs/opus/audio_decoder_opus.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "modules/audio_coding/codecs/opus/audio_decoder_opus.h" @@ -73,8 +72,8 @@ std::unique_ptr AudioDecoderOpus::MakeAudioDecoder( Config config, absl::optional /*codec_pair_id*/) { RTC_DCHECK(config.IsOk()); - return absl::make_unique(config.num_channels, - config.sample_rate_hz); + return std::make_unique(config.num_channels, + config.sample_rate_hz); } } // namespace webrtc diff --git a/api/audio_codecs/test/BUILD.gn b/api/audio_codecs/test/BUILD.gn index cc7a4d9cd0..61234f5539 100644 --- a/api/audio_codecs/test/BUILD.gn +++ b/api/audio_codecs/test/BUILD.gn @@ -38,7 +38,6 @@ if (rtc_include_tests) { "../isac:audio_encoder_isac_float", "../opus:audio_decoder_opus", "../opus:audio_encoder_opus", - "//third_party/abseil-cpp/absl/memory", ] } } diff --git a/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc b/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc index fc7cc7f7be..0e2e8c229f 100644 --- a/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc +++ b/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc @@ -10,7 +10,8 @@ #include "api/audio_codecs/audio_decoder_factory_template.h" -#include "absl/memory/memory.h" +#include + #include "api/audio_codecs/L16/audio_decoder_L16.h" #include "api/audio_codecs/g711/audio_decoder_g711.h" #include "api/audio_codecs/g722/audio_decoder_g722.h" @@ -65,7 +66,7 @@ struct AudioDecoderFakeApi { static std::unique_ptr MakeAudioDecoder( const Config&, absl::optional /*codec_pair_id*/ = absl::nullopt) { - auto dec = absl::make_unique>(); + auto dec = std::make_unique>(); EXPECT_CALL(*dec, SampleRateHz()) .WillOnce(::testing::Return(Params::CodecInfo().sample_rate_hz)); EXPECT_CALL(*dec, Die()); diff --git a/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc b/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc index b1a5a51408..95ea85576d 100644 --- a/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc +++ b/api/audio_codecs/test/audio_encoder_factory_template_unittest.cc @@ -10,7 +10,8 @@ #include "api/audio_codecs/audio_encoder_factory_template.h" -#include "absl/memory/memory.h" +#include + #include "api/audio_codecs/L16/audio_encoder_L16.h" #include "api/audio_codecs/g711/audio_encoder_g711.h" #include "api/audio_codecs/g722/audio_encoder_g722.h" @@ -66,7 +67,7 @@ struct AudioEncoderFakeApi { const Config&, int payload_type, absl::optional /*codec_pair_id*/ = absl::nullopt) { - auto enc = absl::make_unique>(); + auto enc = std::make_unique>(); EXPECT_CALL(*enc, SampleRateHz()) .WillOnce(::testing::Return(Params::CodecInfo().sample_rate_hz)); return std::move(enc); diff --git a/api/create_peerconnection_factory.cc b/api/create_peerconnection_factory.cc index ff08ec8fe8..6223150079 100644 --- a/api/create_peerconnection_factory.cc +++ b/api/create_peerconnection_factory.cc @@ -10,9 +10,9 @@ #include "api/create_peerconnection_factory.h" +#include #include -#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" @@ -43,7 +43,7 @@ rtc::scoped_refptr CreatePeerConnectionFactory( dependencies.signaling_thread = signaling_thread; dependencies.task_queue_factory = CreateDefaultTaskQueueFactory(); dependencies.call_factory = CreateCallFactory(); - dependencies.event_log_factory = absl::make_unique( + dependencies.event_log_factory = std::make_unique( dependencies.task_queue_factory.get()); cricket::MediaEngineDependencies media_dependencies; diff --git a/api/ice_transport_factory.cc b/api/ice_transport_factory.cc index 1fb917d6a0..c32d7d2e11 100644 --- a/api/ice_transport_factory.cc +++ b/api/ice_transport_factory.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "p2p/base/ice_transport_internal.h" #include "p2p/base/p2p_transport_channel.h" #include "p2p/base/port_allocator.h" @@ -59,7 +58,7 @@ rtc::scoped_refptr CreateIceTransport( rtc::scoped_refptr CreateIceTransport( IceTransportInit init) { return new rtc::RefCountedObject( - absl::make_unique( + std::make_unique( "", 0, init.port_allocator(), init.async_resolver_factory(), init.event_log())); } diff --git a/api/rtc_event_log/BUILD.gn b/api/rtc_event_log/BUILD.gn index c04ca6492b..e420190d95 100644 --- a/api/rtc_event_log/BUILD.gn +++ b/api/rtc_event_log/BUILD.gn @@ -37,7 +37,6 @@ rtc_source_set("rtc_event_log_factory") { ":rtc_event_log", "../../rtc_base:checks", "../task_queue", - "//third_party/abseil-cpp/absl/memory", ] if (rtc_enable_protobuf) { diff --git a/api/rtc_event_log/rtc_event_log_factory.cc b/api/rtc_event_log/rtc_event_log_factory.cc index da03e93dd5..f88997b849 100644 --- a/api/rtc_event_log/rtc_event_log_factory.cc +++ b/api/rtc_event_log/rtc_event_log_factory.cc @@ -10,9 +10,9 @@ #include "api/rtc_event_log/rtc_event_log_factory.h" +#include #include -#include "absl/memory/memory.h" #include "rtc_base/checks.h" #ifdef ENABLE_RTC_EVENT_LOG @@ -29,9 +29,9 @@ RtcEventLogFactory::RtcEventLogFactory(TaskQueueFactory* task_queue_factory) std::unique_ptr RtcEventLogFactory::CreateRtcEventLog( RtcEventLog::EncodingType encoding_type) { #ifdef ENABLE_RTC_EVENT_LOG - return absl::make_unique(encoding_type, task_queue_factory_); + return std::make_unique(encoding_type, task_queue_factory_); #else - return absl::make_unique(); + return std::make_unique(); #endif } diff --git a/api/rtc_event_log_output_file_unittest.cc b/api/rtc_event_log_output_file_unittest.cc index bffda0c864..071909b2c5 100644 --- a/api/rtc_event_log_output_file_unittest.cc +++ b/api/rtc_event_log_output_file_unittest.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "rtc_base/checks.h" #include "test/gtest.h" #include "test/testsupport/file_utils.h" @@ -52,14 +51,13 @@ class RtcEventLogOutputFileTest : public ::testing::Test { }; TEST_F(RtcEventLogOutputFileTest, NonDefectiveOutputsStartOutActive) { - auto output_file = - absl::make_unique(output_file_name_); + auto output_file = std::make_unique(output_file_name_); EXPECT_TRUE(output_file->IsActive()); } TEST_F(RtcEventLogOutputFileTest, DefectiveOutputsStartOutInactive) { const std::string illegal_filename = "/////////"; - auto output_file = absl::make_unique(illegal_filename); + auto output_file = std::make_unique(illegal_filename); EXPECT_FALSE(output_file->IsActive()); } @@ -67,8 +65,7 @@ TEST_F(RtcEventLogOutputFileTest, DefectiveOutputsStartOutInactive) { TEST_F(RtcEventLogOutputFileTest, UnlimitedOutputFile) { const std::string output_str = "one two three"; - auto output_file = - absl::make_unique(output_file_name_); + auto output_file = std::make_unique(output_file_name_); output_file->Write(output_str); output_file.reset(); // Closing the file flushes the buffer to disk. @@ -79,7 +76,7 @@ TEST_F(RtcEventLogOutputFileTest, UnlimitedOutputFile) { TEST_F(RtcEventLogOutputFileTest, LimitedOutputFileCappedToCapacity) { // Fit two bytes, then the third should be rejected. auto output_file = - absl::make_unique(output_file_name_, 2); + std::make_unique(output_file_name_, 2); output_file->Write("1"); output_file->Write("2"); @@ -99,7 +96,7 @@ TEST_F(RtcEventLogOutputFileTest, DoNotWritePartialLines) { // Set a file size limit just shy of fitting the entire second line. const size_t size_limit = output_str_1.length() + output_str_2.length() - 1; auto output_file = - absl::make_unique(output_file_name_, size_limit); + std::make_unique(output_file_name_, size_limit); output_file->Write(output_str_1); output_file->Write(output_str_2); @@ -110,20 +107,20 @@ TEST_F(RtcEventLogOutputFileTest, DoNotWritePartialLines) { TEST_F(RtcEventLogOutputFileTest, UnsuccessfulWriteReturnsFalse) { auto output_file = - absl::make_unique(output_file_name_, 2); + std::make_unique(output_file_name_, 2); EXPECT_FALSE(output_file->Write("abc")); } TEST_F(RtcEventLogOutputFileTest, SuccessfulWriteReturnsTrue) { auto output_file = - absl::make_unique(output_file_name_, 3); + std::make_unique(output_file_name_, 3); EXPECT_TRUE(output_file->Write("abc")); } // Even if capacity is reached, a successful write leaves the output active. TEST_F(RtcEventLogOutputFileTest, FileStillActiveAfterSuccessfulWrite) { auto output_file = - absl::make_unique(output_file_name_, 3); + std::make_unique(output_file_name_, 3); ASSERT_TRUE(output_file->Write("abc")); EXPECT_TRUE(output_file->IsActive()); } @@ -132,13 +129,13 @@ TEST_F(RtcEventLogOutputFileTest, FileStillActiveAfterSuccessfulWrite) { // not yet been reached. TEST_F(RtcEventLogOutputFileTest, FileInactiveAfterUnsuccessfulWrite) { auto output_file = - absl::make_unique(output_file_name_, 2); + std::make_unique(output_file_name_, 2); ASSERT_FALSE(output_file->Write("abc")); EXPECT_FALSE(output_file->IsActive()); } TEST_F(RtcEventLogOutputFileTest, AllowReasonableFileSizeLimits) { - auto output_file = absl::make_unique( + auto output_file = std::make_unique( output_file_name_, RtcEventLogOutputFile::kMaxReasonableFileSize); EXPECT_TRUE(output_file->IsActive()); } @@ -158,8 +155,8 @@ TEST_F(RtcEventLogOutputFileTest, DisallowUnreasonableFileSizeLimits) { auto create_output_file = [&] { const size_t unreasonable_size = RtcEventLogOutputFile::kMaxReasonableFileSize + 1; - output_file = absl::make_unique(output_file_name_, - unreasonable_size); + output_file = std::make_unique(output_file_name_, + unreasonable_size); }; EXPECT_DEATH(create_output_file(), ""); } diff --git a/api/task_queue/task_queue_test.cc b/api/task_queue/task_queue_test.cc index 31cf31e030..a8a799f11b 100644 --- a/api/task_queue/task_queue_test.cc +++ b/api/task_queue/task_queue_test.cc @@ -182,7 +182,7 @@ TEST_P(TaskQueueTest, PostAndReuse) { }; auto task = - absl::make_unique(&call_count, reply_queue.get(), &event); + std::make_unique(&call_count, reply_queue.get(), &event); post_queue->PostTask(std::move(task)); EXPECT_TRUE(event.Wait(1000)); } diff --git a/api/test/create_network_emulation_manager.cc b/api/test/create_network_emulation_manager.cc index 7a9cb04686..72efec2ad2 100644 --- a/api/test/create_network_emulation_manager.cc +++ b/api/test/create_network_emulation_manager.cc @@ -11,13 +11,14 @@ #include "api/test/create_network_emulation_manager.h" -#include "absl/memory/memory.h" +#include + #include "test/network/network_emulation_manager.h" namespace webrtc { std::unique_ptr CreateNetworkEmulationManager() { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/api/test/create_peerconnection_quality_test_fixture.cc b/api/test/create_peerconnection_quality_test_fixture.cc index 9be543985c..1e027bf31a 100644 --- a/api/test/create_peerconnection_quality_test_fixture.cc +++ b/api/test/create_peerconnection_quality_test_fixture.cc @@ -10,9 +10,9 @@ #include "api/test/create_peerconnection_quality_test_fixture.h" +#include #include -#include "absl/memory/memory.h" #include "test/pc/e2e/peer_connection_quality_test.h" namespace webrtc { @@ -23,7 +23,7 @@ CreatePeerConnectionE2EQualityTestFixture( std::string test_case_name, std::unique_ptr audio_quality_analyzer, std::unique_ptr video_quality_analyzer) { - return absl::make_unique( + return std::make_unique( std::move(test_case_name), std::move(audio_quality_analyzer), std::move(video_quality_analyzer)); } diff --git a/api/test/create_simulcast_test_fixture.cc b/api/test/create_simulcast_test_fixture.cc index 897746d00d..024145dff0 100644 --- a/api/test/create_simulcast_test_fixture.cc +++ b/api/test/create_simulcast_test_fixture.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/test/simulcast_test_fixture.h" #include "modules/video_coding/utility/simulcast_test_fixture_impl.h" @@ -24,7 +23,7 @@ std::unique_ptr CreateSimulcastTestFixture( std::unique_ptr encoder_factory, std::unique_ptr decoder_factory, SdpVideoFormat video_format) { - return absl::make_unique( + return std::make_unique( std::move(encoder_factory), std::move(decoder_factory), video_format); } diff --git a/api/test/create_video_quality_test_fixture.cc b/api/test/create_video_quality_test_fixture.cc index ee634355da..1fa7d243cc 100644 --- a/api/test/create_video_quality_test_fixture.cc +++ b/api/test/create_video_quality_test_fixture.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "video/video_quality_test.h" namespace webrtc { @@ -21,21 +20,21 @@ namespace webrtc { std::unique_ptr CreateVideoQualityTestFixture() { // By default, we don't override the FEC module, so pass an empty factory. - return absl::make_unique(nullptr); + return std::make_unique(nullptr); } std::unique_ptr CreateVideoQualityTestFixture( std::unique_ptr fec_controller_factory) { - auto components = absl::make_unique< - VideoQualityTestFixtureInterface::InjectionComponents>(); + auto components = + std::make_unique(); components->fec_controller_factory = std::move(fec_controller_factory); - return absl::make_unique(std::move(components)); + return std::make_unique(std::move(components)); } std::unique_ptr CreateVideoQualityTestFixture( std::unique_ptr components) { - return absl::make_unique(std::move(components)); + return std::make_unique(std::move(components)); } } // namespace webrtc diff --git a/api/test/create_videocodec_test_fixture.cc b/api/test/create_videocodec_test_fixture.cc index df8ad8b35f..1f618e5db8 100644 --- a/api/test/create_videocodec_test_fixture.cc +++ b/api/test/create_videocodec_test_fixture.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/test/videocodec_test_fixture.h" #include "modules/video_coding/codecs/test/videocodec_test_fixture_impl.h" @@ -24,14 +23,14 @@ using Config = VideoCodecTestFixture::Config; std::unique_ptr CreateVideoCodecTestFixture( const Config& config) { - return absl::make_unique(config); + return std::make_unique(config); } std::unique_ptr CreateVideoCodecTestFixture( const Config& config, std::unique_ptr decoder_factory, std::unique_ptr encoder_factory) { - return absl::make_unique( + return std::make_unique( config, std::move(decoder_factory), std::move(encoder_factory)); } diff --git a/api/test/fake_media_transport.h b/api/test/fake_media_transport.h index 3bd4eba0fd..593135df0c 100644 --- a/api/test/fake_media_transport.h +++ b/api/test/fake_media_transport.h @@ -17,7 +17,6 @@ #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/test/fake_datagram_transport.h" #include "api/transport/media/media_transport_interface.h" @@ -165,7 +164,7 @@ class FakeMediaTransportFactory : public MediaTransportFactory { rtc::Thread* network_thread, const MediaTransportSettings& settings) override { std::unique_ptr media_transport = - absl::make_unique(settings, transport_offer_); + std::make_unique(settings, transport_offer_); media_transport->Connect(packet_transport); return std::move(media_transport); } @@ -174,7 +173,7 @@ class FakeMediaTransportFactory : public MediaTransportFactory { rtc::Thread* network_thread, const MediaTransportSettings& settings) override { std::unique_ptr media_transport = - absl::make_unique( + std::make_unique( settings, transport_offer_, settings.remote_transport_parameters); return std::move(media_transport); } diff --git a/api/test/loopback_media_transport.cc b/api/test/loopback_media_transport.cc index 8c7f240ee4..cadcff0e71 100644 --- a/api/test/loopback_media_transport.cc +++ b/api/test/loopback_media_transport.cc @@ -10,8 +10,9 @@ #include "api/test/loopback_media_transport.h" +#include + #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "rtc_base/time_utils.h" namespace webrtc { @@ -182,7 +183,7 @@ WrapperMediaTransportFactory::CreateMediaTransport( return wrapped_factory_->CreateMediaTransport(packet_transport, network_thread, settings); } - return {absl::make_unique(wrapped_media_transport_)}; + return {std::make_unique(wrapped_media_transport_)}; } RTCErrorOr> @@ -194,7 +195,7 @@ WrapperMediaTransportFactory::CreateDatagramTransport( return wrapped_factory_->CreateDatagramTransport(network_thread, settings); } return { - absl::make_unique(wrapped_datagram_transport_)}; + std::make_unique(wrapped_datagram_transport_)}; } std::string WrapperMediaTransportFactory::GetTransportName() const { @@ -216,7 +217,7 @@ WrapperMediaTransportFactory::CreateMediaTransport( if (wrapped_factory_) { return wrapped_factory_->CreateMediaTransport(network_thread, settings); } - return {absl::make_unique(wrapped_media_transport_)}; + return {std::make_unique(wrapped_media_transport_)}; } MediaTransportPair::MediaTransportPair(rtc::Thread* thread) diff --git a/api/test/loopback_media_transport.h b/api/test/loopback_media_transport.h index e00cc23b6e..1087d9a857 100644 --- a/api/test/loopback_media_transport.h +++ b/api/test/loopback_media_transport.h @@ -16,7 +16,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/transport/datagram_transport_interface.h" #include "api/transport/media/media_transport_interface.h" #include "rtc_base/async_invoker.h" @@ -98,11 +97,11 @@ class MediaTransportPair { } std::unique_ptr first_factory() { - return absl::make_unique(&first_factory_); + return std::make_unique(&first_factory_); } std::unique_ptr second_factory() { - return absl::make_unique(&second_factory_); + return std::make_unique(&second_factory_); } void SetState(MediaTransportState state) { diff --git a/api/test/neteq_simulator_factory.cc b/api/test/neteq_simulator_factory.cc index 65dc3a8dc4..112d55a2cf 100644 --- a/api/test/neteq_simulator_factory.cc +++ b/api/test/neteq_simulator_factory.cc @@ -10,12 +10,12 @@ #include "api/test/neteq_simulator_factory.h" +#include #include #include #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include "absl/memory/memory.h" #include "modules/audio_coding/neteq/tools/neteq_test_factory.h" #include "rtc_base/checks.h" @@ -33,7 +33,7 @@ namespace webrtc { namespace test { NetEqSimulatorFactory::NetEqSimulatorFactory() - : factory_(absl::make_unique()) {} + : factory_(std::make_unique()) {} NetEqSimulatorFactory::~NetEqSimulatorFactory() = default; diff --git a/api/test/test_dependency_factory.cc b/api/test/test_dependency_factory.cc index 4294b1b7a2..e72f55aab5 100644 --- a/api/test/test_dependency_factory.cc +++ b/api/test/test_dependency_factory.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "rtc_base/checks.h" #include "rtc_base/thread_checker.h" @@ -32,7 +31,7 @@ std::unique_ptr TestDependencyFactory::instance_ = const TestDependencyFactory& TestDependencyFactory::GetInstance() { RTC_DCHECK(GetThreadChecker()->IsCurrent()); if (instance_ == nullptr) { - instance_ = absl::make_unique(); + instance_ = std::make_unique(); } return *instance_; } diff --git a/api/test/video/BUILD.gn b/api/test/video/BUILD.gn index 9b63a4acb3..a4a0d7b887 100644 --- a/api/test/video/BUILD.gn +++ b/api/test/video/BUILD.gn @@ -19,6 +19,5 @@ rtc_source_set("function_video_factory") { deps = [ "../../../rtc_base:checks", "../../video_codecs:video_codecs_api", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/api/transport/BUILD.gn b/api/transport/BUILD.gn index c4d6338884..12bcf099c1 100644 --- a/api/transport/BUILD.gn +++ b/api/transport/BUILD.gn @@ -99,7 +99,6 @@ rtc_static_library("goog_cc") { "..:network_state_predictor_api", "../../modules/congestion_controller/goog_cc", "../../rtc_base:deprecation", - "//third_party/abseil-cpp/absl/memory", ] } @@ -125,7 +124,6 @@ if (rtc_include_tests) { ":network_control", ":test_feedback_generator_interface", "../../test/network:feedback_generator", - "//third_party/abseil-cpp/absl/memory", ] } } diff --git a/api/transport/goog_cc_factory.cc b/api/transport/goog_cc_factory.cc index 2187da36c2..ccadb8bc22 100644 --- a/api/transport/goog_cc_factory.cc +++ b/api/transport/goog_cc_factory.cc @@ -10,9 +10,9 @@ #include "api/transport/goog_cc_factory.h" +#include #include -#include "absl/memory/memory.h" #include "modules/congestion_controller/goog_cc/goog_cc_network_control.h" namespace webrtc { @@ -47,8 +47,8 @@ GoogCcNetworkControllerFactory::Create(NetworkControllerConfig config) { factory_config_.network_state_predictor_factory ->CreateNetworkStatePredictor(); } - return absl::make_unique(config, - std::move(goog_cc_config)); + return std::make_unique(config, + std::move(goog_cc_config)); } TimeDelta GoogCcNetworkControllerFactory::GetProcessInterval() const { diff --git a/api/transport/test/create_feedback_generator.cc b/api/transport/test/create_feedback_generator.cc index 01e0fae456..7c83823ce4 100644 --- a/api/transport/test/create_feedback_generator.cc +++ b/api/transport/test/create_feedback_generator.cc @@ -9,14 +9,15 @@ */ #include "api/transport/test/create_feedback_generator.h" -#include "absl/memory/memory.h" +#include + #include "test/network/feedback_generator.h" namespace webrtc { std::unique_ptr CreateFeedbackGenerator( FeedbackGenerator::Config confg) { - return absl::make_unique(confg); + return std::make_unique(confg); } } // namespace webrtc diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn index d988cb664e..af2b897ea1 100644 --- a/api/video/BUILD.gn +++ b/api/video/BUILD.gn @@ -209,7 +209,6 @@ rtc_source_set("video_stream_decoder_create") { "../../video:video_stream_decoder_impl", "../task_queue", "../video_codecs:video_codecs_api", - "//third_party/abseil-cpp/absl/memory", ] } @@ -251,7 +250,6 @@ rtc_source_set("video_stream_encoder_create") { "../../video:video_stream_encoder_impl", "../task_queue", "../video_codecs:video_codecs_api", - "//third_party/abseil-cpp/absl/memory", ] } @@ -273,7 +271,6 @@ rtc_static_library("builtin_video_bitrate_allocator_factory") { "../../modules/video_coding:webrtc_vp9_helpers", "../../rtc_base/system:fallthrough", "../video_codecs:video_codecs_api", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/api/video/builtin_video_bitrate_allocator_factory.cc b/api/video/builtin_video_bitrate_allocator_factory.cc index 8991367339..b2c15a1ef1 100644 --- a/api/video/builtin_video_bitrate_allocator_factory.cc +++ b/api/video/builtin_video_bitrate_allocator_factory.cc @@ -10,7 +10,8 @@ #include "api/video/builtin_video_bitrate_allocator_factory.h" -#include "absl/memory/memory.h" +#include + #include "api/video/video_bitrate_allocator.h" #include "api/video_codecs/video_codec.h" #include "modules/video_coding/codecs/vp9/svc_rate_allocator.h" @@ -51,7 +52,7 @@ class BuiltinVideoBitrateAllocatorFactory std::unique_ptr CreateBuiltinVideoBitrateAllocatorFactory() { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/api/video/video_stream_decoder_create.cc b/api/video/video_stream_decoder_create.cc index d17d739a9b..8d70556b4d 100644 --- a/api/video/video_stream_decoder_create.cc +++ b/api/video/video_stream_decoder_create.cc @@ -10,7 +10,8 @@ #include "api/video/video_stream_decoder_create.h" -#include "absl/memory/memory.h" +#include + #include "video/video_stream_decoder_impl.h" namespace webrtc { @@ -20,9 +21,9 @@ std::unique_ptr CreateVideoStreamDecoder( VideoDecoderFactory* decoder_factory, TaskQueueFactory* task_queue_factory, std::map> decoder_settings) { - return absl::make_unique(callbacks, decoder_factory, - task_queue_factory, - std::move(decoder_settings)); + return std::make_unique(callbacks, decoder_factory, + task_queue_factory, + std::move(decoder_settings)); } } // namespace webrtc diff --git a/api/video/video_stream_encoder_create.cc b/api/video/video_stream_encoder_create.cc index c75f20dc36..ac2f6b9819 100644 --- a/api/video/video_stream_encoder_create.cc +++ b/api/video/video_stream_encoder_create.cc @@ -10,7 +10,8 @@ #include "api/video/video_stream_encoder_create.h" -#include "absl/memory/memory.h" +#include + #include "video/overuse_frame_detector.h" #include "video/video_stream_encoder.h" @@ -22,9 +23,9 @@ std::unique_ptr CreateVideoStreamEncoder( uint32_t number_of_cores, VideoStreamEncoderObserver* encoder_stats_observer, const VideoStreamEncoderSettings& settings) { - return absl::make_unique( + return std::make_unique( clock, number_of_cores, encoder_stats_observer, settings, - absl::make_unique(encoder_stats_observer), + std::make_unique(encoder_stats_observer), task_queue_factory); } diff --git a/api/video_codecs/BUILD.gn b/api/video_codecs/BUILD.gn index 894d23f430..795a5bb82b 100644 --- a/api/video_codecs/BUILD.gn +++ b/api/video_codecs/BUILD.gn @@ -82,7 +82,6 @@ rtc_static_library("builtin_video_decoder_factory") { "../../api:scoped_refptr", "../../media:rtc_internal_video_codecs", "../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", ] } @@ -105,7 +104,6 @@ rtc_static_library("builtin_video_encoder_factory") { "../../media:rtc_media_base", "../../rtc_base:checks", "../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", ] } @@ -124,7 +122,6 @@ rtc_static_library("vp8_temporal_layers_factory") { "../../modules/video_coding:video_coding_utility", "../../modules/video_coding:webrtc_vp8_temporal_layers", "../../rtc_base:checks", - "//third_party/abseil-cpp/absl/memory", ] } @@ -153,7 +150,6 @@ rtc_static_library("rtc_software_fallback_wrappers") { "../video:video_bitrate_allocation", "../video:video_frame", "../video:video_rtp_headers", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/api/video_codecs/builtin_video_decoder_factory.cc b/api/video_codecs/builtin_video_decoder_factory.cc index e71e069365..f831905189 100644 --- a/api/video_codecs/builtin_video_decoder_factory.cc +++ b/api/video_codecs/builtin_video_decoder_factory.cc @@ -10,13 +10,14 @@ #include "api/video_codecs/builtin_video_decoder_factory.h" -#include "absl/memory/memory.h" +#include + #include "media/engine/internal_decoder_factory.h" namespace webrtc { std::unique_ptr CreateBuiltinVideoDecoderFactory() { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/api/video_codecs/builtin_video_encoder_factory.cc b/api/video_codecs/builtin_video_encoder_factory.cc index 60c67fd6bc..6888daae48 100644 --- a/api/video_codecs/builtin_video_encoder_factory.cc +++ b/api/video_codecs/builtin_video_encoder_factory.cc @@ -10,9 +10,9 @@ #include "api/video_codecs/builtin_video_encoder_factory.h" +#include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "api/video_codecs/sdp_video_format.h" #include "api/video_codecs/video_encoder.h" @@ -61,7 +61,7 @@ class BuiltinVideoEncoderFactory : public VideoEncoderFactory { std::unique_ptr internal_encoder; if (IsFormatSupported(internal_encoder_factory_->GetSupportedFormats(), format)) { - internal_encoder = absl::make_unique( + internal_encoder = std::make_unique( internal_encoder_factory_.get(), format); } @@ -79,7 +79,7 @@ class BuiltinVideoEncoderFactory : public VideoEncoderFactory { } // namespace std::unique_ptr CreateBuiltinVideoEncoderFactory() { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/api/video_codecs/test/BUILD.gn b/api/video_codecs/test/BUILD.gn index 5e8a0330be..d57cbbb12b 100644 --- a/api/video_codecs/test/BUILD.gn +++ b/api/video_codecs/test/BUILD.gn @@ -38,7 +38,6 @@ if (rtc_include_tests) { "../../video:video_frame_i420", "../../video:video_rtp_headers", "//testing/gtest", - "//third_party/abseil-cpp/absl/memory", ] } } diff --git a/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc b/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc index 7b7d60789d..a26c0c366f 100644 --- a/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc +++ b/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc @@ -17,7 +17,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/fec_controller_override.h" #include "api/scoped_refptr.h" @@ -193,11 +192,11 @@ void VideoEncoderSoftwareFallbackWrapperTest::EncodeFrame(int expected_ret) { std::vector types(1, VideoFrameType::kVideoFrameKey); frame_ = - absl::make_unique(VideoFrame::Builder() - .set_video_frame_buffer(buffer) - .set_rotation(webrtc::kVideoRotation_0) - .set_timestamp_us(0) - .build()); + std::make_unique(VideoFrame::Builder() + .set_video_frame_buffer(buffer) + .set_rotation(webrtc::kVideoRotation_0) + .set_timestamp_us(0) + .build()); EXPECT_EQ(expected_ret, fallback_wrapper_->Encode(*frame_, &types)); } diff --git a/api/video_codecs/video_decoder_software_fallback_wrapper.cc b/api/video_codecs/video_decoder_software_fallback_wrapper.cc index 329fdfbc34..53b2413e50 100644 --- a/api/video_codecs/video_decoder_software_fallback_wrapper.cc +++ b/api/video_codecs/video_decoder_software_fallback_wrapper.cc @@ -12,10 +12,10 @@ #include +#include #include #include -#include "absl/memory/memory.h" #include "api/video/encoded_image.h" #include "api/video_codecs/video_codec.h" #include "modules/video_coding/include/video_error_codes.h" @@ -225,7 +225,7 @@ VideoDecoder& VideoDecoderSoftwareFallbackWrapper::active_decoder() const { std::unique_ptr CreateVideoDecoderSoftwareFallbackWrapper( std::unique_ptr sw_fallback_decoder, std::unique_ptr hw_decoder) { - return absl::make_unique( + return std::make_unique( std::move(sw_fallback_decoder), std::move(hw_decoder)); } diff --git a/api/video_codecs/video_encoder_software_fallback_wrapper.cc b/api/video_codecs/video_encoder_software_fallback_wrapper.cc index 4d7e6f0ac1..fe3274128e 100644 --- a/api/video_codecs/video_encoder_software_fallback_wrapper.cc +++ b/api/video_codecs/video_encoder_software_fallback_wrapper.cc @@ -13,11 +13,11 @@ #include #include +#include #include #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/fec_controller_override.h" #include "api/video/video_bitrate_allocation.h" @@ -395,7 +395,7 @@ void VideoEncoderSoftwareFallbackWrapper::ValidateSettingsForForcedFallback() { std::unique_ptr CreateVideoEncoderSoftwareFallbackWrapper( std::unique_ptr sw_fallback_encoder, std::unique_ptr hw_encoder) { - return absl::make_unique( + return std::make_unique( std::move(sw_fallback_encoder), std::move(hw_encoder)); } diff --git a/api/video_codecs/vp8_temporal_layers_factory.cc b/api/video_codecs/vp8_temporal_layers_factory.cc index 0bd2c3d256..1de925dbff 100644 --- a/api/video_codecs/vp8_temporal_layers_factory.cc +++ b/api/video_codecs/vp8_temporal_layers_factory.cc @@ -11,10 +11,10 @@ #include "api/video_codecs/vp8_temporal_layers_factory.h" #include +#include #include #include -#include "absl/memory/memory.h" #include "api/fec_controller_override.h" #include "modules/video_coding/codecs/vp8/default_temporal_layers.h" #include "modules/video_coding/codecs/vp8/screenshare_layers.h" @@ -39,20 +39,20 @@ std::unique_ptr Vp8TemporalLayersFactory::Create( // Legacy screenshare layers supports max 2 layers. num_temporal_layers = std::max(2, num_temporal_layers); controllers.push_back( - absl::make_unique(num_temporal_layers)); + std::make_unique(num_temporal_layers)); } else { controllers.push_back( - absl::make_unique(num_temporal_layers)); + std::make_unique(num_temporal_layers)); } } - return absl::make_unique(std::move(controllers), - fec_controller_override); + return std::make_unique(std::move(controllers), + fec_controller_override); } std::unique_ptr Vp8TemporalLayersFactory::Clone() const { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/audio/BUILD.gn b/audio/BUILD.gn index bf8e253a24..a4bc14d1b9 100644 --- a/audio/BUILD.gn +++ b/audio/BUILD.gn @@ -108,7 +108,6 @@ if (rtc_include_tests) { "../system_wrappers", "../test:test_common", "../test:test_support", - "//third_party/abseil-cpp/absl/memory", ] } @@ -174,7 +173,6 @@ if (rtc_include_tests) { "../test:test_support", "utility:utility_tests", "//testing/gtest", - "//third_party/abseil-cpp/absl/memory", ] } @@ -206,7 +204,6 @@ if (rtc_include_tests) { "../test/pc/e2e:network_quality_metrics_reporter", "//testing/gtest", "//third_party/abseil-cpp/absl/flags:flag", - "//third_party/abseil-cpp/absl/memory", ] if (is_android) { deps += [ "//testing/android/native_test:native_test_native_code" ] @@ -281,7 +278,6 @@ if (rtc_include_tests) { "../test:test_main", "../test:test_support", "//testing/gtest", - "//third_party/abseil-cpp/absl/memory", ] data = [ diff --git a/audio/audio_send_stream.cc b/audio/audio_send_stream.cc index cd137d9c89..c6fe7785f6 100644 --- a/audio/audio_send_stream.cc +++ b/audio/audio_send_stream.cc @@ -10,11 +10,11 @@ #include "audio/audio_send_stream.h" +#include #include #include #include -#include "absl/memory/memory.h" #include "api/audio_codecs/audio_encoder.h" #include "api/audio_codecs/audio_encoder_factory.h" #include "api/audio_codecs/audio_format.h" @@ -69,14 +69,14 @@ void UpdateEventLogStreamConfig(RtcEventLog* event_log, return; } - auto rtclog_config = absl::make_unique(); + auto rtclog_config = std::make_unique(); rtclog_config->local_ssrc = config.rtp.ssrc; rtclog_config->rtp_extensions = config.rtp.extensions; if (config.send_codec_spec) { rtclog_config->codecs.emplace_back(config.send_codec_spec->format.name, config.send_codec_spec->payload_type, 0); } - event_log->Log(absl::make_unique( + event_log->Log(std::make_unique( std::move(rtclog_config))); } diff --git a/audio/audio_send_stream_unittest.cc b/audio/audio_send_stream_unittest.cc index 31fd7ba68a..3bb16c7f1d 100644 --- a/audio/audio_send_stream_unittest.cc +++ b/audio/audio_send_stream_unittest.cc @@ -10,12 +10,12 @@ #include "audio/audio_send_stream.h" +#include #include #include #include #include -#include "absl/memory/memory.h" #include "api/task_queue/default_task_queue_factory.h" #include "api/test/mock_frame_encryptor.h" #include "audio/audio_state.h" @@ -331,7 +331,7 @@ std::unique_ptr CreateAudioFrame1kHzSineWave(int16_t audio_level, size_t num_channels) { size_t samples_per_channel = sample_rate_hz / (1000 / duration_ms); std::vector audio_data(samples_per_channel * num_channels, 0); - std::unique_ptr audio_frame = absl::make_unique(); + std::unique_ptr audio_frame = std::make_unique(); audio_frame->UpdateFrame(0 /* RTP timestamp */, &audio_data[0], samples_per_channel, sample_rate_hz, AudioFrame::SpeechType::kNormalSpeech, diff --git a/audio/audio_state.cc b/audio/audio_state.cc index 52c4504fb7..03cf730799 100644 --- a/audio/audio_state.cc +++ b/audio/audio_state.cc @@ -11,10 +11,10 @@ #include "audio/audio_state.h" #include +#include #include #include -#include "absl/memory/memory.h" #include "audio/audio_receive_stream.h" #include "modules/audio_device/include/audio_device.h" #include "rtc_base/checks.h" @@ -130,8 +130,7 @@ void AudioState::SetPlayout(bool enabled) { } } else { config_.audio_device_module->StopPlayout(); - null_audio_poller_ = - absl::make_unique(&audio_transport_); + null_audio_poller_ = std::make_unique(&audio_transport_); } } } diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc index 603a52f791..5bb568e4cf 100644 --- a/audio/channel_receive.cc +++ b/audio/channel_receive.cc @@ -17,7 +17,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/crypto/frame_decryptor_interface.h" #include "api/rtc_event_log/rtc_event_log.h" #include "audio/audio_level.h" @@ -339,7 +338,7 @@ AudioMixer::Source::AudioFrameInfo ChannelReceive::GetAudioFrameWithInfo( RTC_DCHECK_RUNS_SERIALIZED(&audio_thread_race_checker_); audio_frame->sample_rate_hz_ = sample_rate_hz; - event_log_->Log(absl::make_unique(remote_ssrc_)); + event_log_->Log(std::make_unique(remote_ssrc_)); // Get 10ms raw PCM data from the ACM (mixer limits output frequency) bool muted; @@ -949,7 +948,7 @@ std::unique_ptr CreateChannelReceive( absl::optional codec_pair_id, rtc::scoped_refptr frame_decryptor, const webrtc::CryptoOptions& crypto_options) { - return absl::make_unique( + return std::make_unique( clock, module_process_thread, audio_device_module, media_transport_config, rtcp_send_transport, rtc_event_log, local_ssrc, remote_ssrc, jitter_buffer_max_packets, jitter_buffer_fast_playout, diff --git a/audio/channel_send.cc b/audio/channel_send.cc index 982d932e54..f38df24350 100644 --- a/audio/channel_send.cc +++ b/audio/channel_send.cc @@ -17,7 +17,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/array_view.h" #include "api/call/transport.h" #include "api/crypto/frame_encryptor_interface.h" @@ -662,7 +661,7 @@ ChannelSend::ChannelSend(Clock* clock, _rtpRtcpModule = RtpRtcp::Create(configuration); _rtpRtcpModule->SetSendingMediaStatus(false); - rtp_sender_audio_ = absl::make_unique( + rtp_sender_audio_ = std::make_unique( configuration.clock, _rtpRtcpModule->RtpSender()); // We want to invoke the 'TargetRateObserver' and |OnOverheadChanged| @@ -1204,7 +1203,7 @@ std::unique_ptr CreateChannelSend( bool extmap_allow_mixed, int rtcp_report_interval_ms, uint32_t ssrc) { - return absl::make_unique( + return std::make_unique( clock, task_queue_factory, module_process_thread, media_transport_config, overhead_observer, rtp_transport, rtcp_rtt_stats, rtc_event_log, frame_encryptor, crypto_options, extmap_allow_mixed, diff --git a/audio/test/audio_bwe_integration_test.cc b/audio/test/audio_bwe_integration_test.cc index e0ec17b474..ac8eb338ef 100644 --- a/audio/test/audio_bwe_integration_test.cc +++ b/audio/test/audio_bwe_integration_test.cc @@ -10,7 +10,8 @@ #include "audio/test/audio_bwe_integration_test.h" -#include "absl/memory/memory.h" +#include + #include "api/task_queue/queued_task.h" #include "api/task_queue/task_queue_base.h" #include "call/fake_network_pipe.h" @@ -63,9 +64,9 @@ test::PacketTransport* AudioBweTest::CreateSendTransport( return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, test::CallTest::payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(GetNetworkPipeConfig()))); + std::make_unique(GetNetworkPipeConfig()))); } test::PacketTransport* AudioBweTest::CreateReceiveTransport( @@ -73,9 +74,9 @@ test::PacketTransport* AudioBweTest::CreateReceiveTransport( return new test::PacketTransport( task_queue, nullptr, this, test::PacketTransport::kReceiver, test::CallTest::payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(GetNetworkPipeConfig()))); + std::make_unique(GetNetworkPipeConfig()))); } void AudioBweTest::PerformTest() { @@ -143,8 +144,8 @@ class NoBandwidthDropAfterDtx : public AudioBweTest { } void PerformTest() override { - stats_poller_.PostDelayedTask( - absl::make_unique(sender_call_), 100); + stats_poller_.PostDelayedTask(std::make_unique(sender_call_), + 100); sender_call_->OnAudioTransportOverheadChanged(0); AudioBweTest::PerformTest(); } diff --git a/audio/test/audio_end_to_end_test.cc b/audio/test/audio_end_to_end_test.cc index 8eb155ce7d..40d1226546 100644 --- a/audio/test/audio_end_to_end_test.cc +++ b/audio/test/audio_end_to_end_test.cc @@ -11,8 +11,8 @@ #include "audio/test/audio_end_to_end_test.h" #include +#include -#include "absl/memory/memory.h" #include "call/fake_network_pipe.h" #include "call/simulated_network.h" #include "system_wrappers/include/sleep.h" @@ -68,9 +68,9 @@ test::PacketTransport* AudioEndToEndTest::CreateSendTransport( return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, test::CallTest::payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(GetNetworkPipeConfig()))); + std::make_unique(GetNetworkPipeConfig()))); } test::PacketTransport* AudioEndToEndTest::CreateReceiveTransport( @@ -78,9 +78,9 @@ test::PacketTransport* AudioEndToEndTest::CreateReceiveTransport( return new test::PacketTransport( task_queue, nullptr, this, test::PacketTransport::kReceiver, test::CallTest::payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(GetNetworkPipeConfig()))); + std::make_unique(GetNetworkPipeConfig()))); } void AudioEndToEndTest::ModifyAudioConfigs( diff --git a/audio/test/media_transport_test.cc b/audio/test/media_transport_test.cc index aacee1e88f..9646039753 100644 --- a/audio/test/media_transport_test.cc +++ b/audio/test/media_transport_test.cc @@ -8,7 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "api/audio_codecs/audio_decoder_factory_template.h" #include "api/audio_codecs/audio_encoder_factory_template.h" #include "api/audio_codecs/opus/audio_decoder_opus.h" @@ -85,8 +86,8 @@ TEST(AudioWithMediaTransport, DeliversAudio) { task_queue_factory.get(), TestAudioDeviceModule::CreatePulsedNoiseCapturer( /* max_amplitude= */ 10000, kSamplingFrequency, kNumChannels), - absl::make_unique(kSamplingFrequency, kNumChannels, - kWantedSamples)); + std::make_unique(kSamplingFrequency, kNumChannels, + kWantedSamples)); AudioState::Config audio_config; audio_config.audio_mixer = AudioMixerImpl::Create(); diff --git a/audio/test/pc_low_bandwidth_audio_test.cc b/audio/test/pc_low_bandwidth_audio_test.cc index 6f0238469d..e372fabc72 100644 --- a/audio/test/pc_low_bandwidth_audio_test.cc +++ b/audio/test/pc_low_bandwidth_audio_test.cc @@ -8,8 +8,9 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include + #include "absl/flags/flag.h" -#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" @@ -81,7 +82,7 @@ CreateTestFixture(const std::string& test_case_name, fixture->AddPeer(network_links.second->network_thread(), network_links.second->network_manager(), bob_configurer); fixture->AddQualityMetricsReporter( - absl::make_unique( + std::make_unique( network_links.first, network_links.second)); return fixture; } diff --git a/call/BUILD.gn b/call/BUILD.gn index 6c2141b1c6..8769efce90 100644 --- a/call/BUILD.gn +++ b/call/BUILD.gn @@ -117,7 +117,6 @@ rtc_source_set("rtp_receiver") { "../modules/rtp_rtcp:rtp_rtcp_format", "../rtc_base:checks", "../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -170,7 +169,6 @@ rtc_source_set("rtp_sender") { "../system_wrappers:field_trial", "//third_party/abseil-cpp/absl/algorithm:container", "//third_party/abseil-cpp/absl/container:inlined_vector", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:variant", ] @@ -269,7 +267,6 @@ rtc_static_library("call") { "../system_wrappers:field_trial", "../system_wrappers:metrics", "../video", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -317,7 +314,6 @@ rtc_source_set("simulated_network") { "../rtc_base:checks", "../rtc_base:rtc_base_approved", "../rtc_base/synchronization:sequence_checker", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -349,7 +345,6 @@ rtc_source_set("fake_network") { "../rtc_base:rtc_base_approved", "../rtc_base/synchronization:sequence_checker", "../system_wrappers", - "//third_party/abseil-cpp/absl/memory", ] } @@ -475,7 +470,6 @@ if (rtc_include_tests) { "../video", "//testing/gtest", "//third_party/abseil-cpp/absl/flags:flag", - "//third_party/abseil-cpp/absl/memory", ] } @@ -537,7 +531,6 @@ if (rtc_include_tests) { "../test:test_support", "//testing/gtest", "//third_party/abseil-cpp/absl/algorithm:container", - "//third_party/abseil-cpp/absl/memory", ] } } diff --git a/call/bitrate_estimator_tests.cc b/call/bitrate_estimator_tests.cc index 803e1f98be..8fa3a572e9 100644 --- a/call/bitrate_estimator_tests.cc +++ b/call/bitrate_estimator_tests.cc @@ -12,7 +12,6 @@ #include #include -#include "absl/memory/memory.h" #include "call/call.h" #include "call/fake_network_pipe.h" #include "call/simulated_network.h" @@ -108,15 +107,15 @@ class BitrateEstimatorTest : public test::CallTest { send_transport_.reset(new test::DirectTransport( &task_queue_, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( + std::make_unique( + Clock::GetRealTimeClock(), std::make_unique( BuiltInNetworkBehaviorConfig())), sender_call_.get(), payload_type_map_)); send_transport_->SetReceiver(receiver_call_->Receiver()); receive_transport_.reset(new test::DirectTransport( &task_queue_, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( + std::make_unique( + Clock::GetRealTimeClock(), std::make_unique( BuiltInNetworkBehaviorConfig())), receiver_call_.get(), payload_type_map_)); receive_transport_->SetReceiver(sender_call_->Receiver()); @@ -171,14 +170,14 @@ class BitrateEstimatorTest : public test::CallTest { send_stream_(nullptr), frame_generator_capturer_(), decoder_factory_( - []() { return absl::make_unique(); }) { + []() { return std::make_unique(); }) { test_->GetVideoSendConfig()->rtp.ssrcs[0]++; send_stream_ = test_->sender_call_->CreateVideoSendStream( test_->GetVideoSendConfig()->Copy(), test_->GetVideoEncoderConfig()->Copy()); RTC_DCHECK_EQ(1, test_->GetVideoEncoderConfig()->number_of_streams); frame_generator_capturer_ = - absl::make_unique( + std::make_unique( test->clock_, test::FrameGenerator::CreateSquareGenerator( kDefaultWidth, kDefaultHeight, absl::nullopt, absl::nullopt), diff --git a/call/call.cc b/call/call.cc index 3964171560..940c1a3964 100644 --- a/call/call.cc +++ b/call/call.cc @@ -19,7 +19,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/rtc_event_log/rtc_event_log.h" #include "api/transport/network_control.h" @@ -112,7 +111,7 @@ const int* FindKeyByValue(const std::map& m, int v) { std::unique_ptr CreateRtcLogStreamConfig( const VideoReceiveStream::Config& config) { - auto rtclog_config = absl::make_unique(); + auto rtclog_config = std::make_unique(); rtclog_config->remote_ssrc = config.rtp.remote_ssrc; rtclog_config->local_ssrc = config.rtp.local_ssrc; rtclog_config->rtx_ssrc = config.rtp.rtx_ssrc; @@ -131,7 +130,7 @@ std::unique_ptr CreateRtcLogStreamConfig( std::unique_ptr CreateRtcLogStreamConfig( const VideoSendStream::Config& config, size_t ssrc_index) { - auto rtclog_config = absl::make_unique(); + auto rtclog_config = std::make_unique(); rtclog_config->local_ssrc = config.rtp.ssrcs[ssrc_index]; if (ssrc_index < config.rtp.rtx.ssrcs.size()) { rtclog_config->rtx_ssrc = config.rtp.rtx.ssrcs[ssrc_index]; @@ -147,7 +146,7 @@ std::unique_ptr CreateRtcLogStreamConfig( std::unique_ptr CreateRtcLogStreamConfig( const AudioReceiveStream::Config& config) { - auto rtclog_config = absl::make_unique(); + auto rtclog_config = std::make_unique(); rtclog_config->remote_ssrc = config.rtp.remote_ssrc; rtclog_config->local_ssrc = config.rtp.local_ssrc; rtclog_config->rtp_extensions = config.rtp.extensions; @@ -416,7 +415,7 @@ Call* Call::Create(const Call::Config& config, RTC_DCHECK(config.task_queue_factory); return new internal::Call( clock, config, - absl::make_unique( + std::make_unique( clock, config.event_log, config.network_state_predictor_factory, config.network_controller_factory, config.bitrate_config, std::move(pacer_thread), config.task_queue_factory), @@ -684,7 +683,7 @@ webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream( TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream"); RTC_DCHECK_RUN_ON(&configuration_sequence_checker_); RegisterRateObserver(); - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( CreateRtcLogStreamConfig(config))); AudioReceiveStream* receive_stream = new AudioReceiveStream( clock_, &audio_receiver_controller_, transport_send_ptr_->packet_router(), @@ -748,7 +747,7 @@ webrtc::VideoSendStream* Call::CreateVideoSendStream( video_send_delay_stats_->AddSsrcs(config); for (size_t ssrc_index = 0; ssrc_index < config.rtp.ssrcs.size(); ++ssrc_index) { - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( CreateRtcLogStreamConfig(config, ssrc_index))); } @@ -786,7 +785,7 @@ webrtc::VideoSendStream* Call::CreateVideoSendStream( std::unique_ptr fec_controller = config_.fec_controller_factory ? config_.fec_controller_factory->CreateFecController() - : absl::make_unique(clock_); + : std::make_unique(clock_); return CreateVideoSendStream(std::move(config), std::move(encoder_config), std::move(fec_controller)); } @@ -862,7 +861,7 @@ webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream( } receive_stream->SignalNetworkState(video_network_state_); UpdateAggregateNetworkState(); - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( CreateRtcLogStreamConfig(config))); return receive_stream; } @@ -1222,7 +1221,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtcp(MediaType media_type, } if (rtcp_delivered) { - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( rtc::MakeArrayView(packet, length))); } @@ -1284,7 +1283,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type, received_bytes_per_second_counter_.Add(length); received_audio_bytes_per_second_counter_.Add(length); event_log_->Log( - absl::make_unique(parsed_packet)); + std::make_unique(parsed_packet)); const int64_t arrival_time_ms = parsed_packet.arrival_time_ms(); if (!first_received_rtp_audio_ms_) { first_received_rtp_audio_ms_.emplace(arrival_time_ms); @@ -1298,7 +1297,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type, received_bytes_per_second_counter_.Add(length); received_video_bytes_per_second_counter_.Add(length); event_log_->Log( - absl::make_unique(parsed_packet)); + std::make_unique(parsed_packet)); const int64_t arrival_time_ms = parsed_packet.arrival_time_ms(); if (!first_received_rtp_video_ms_) { first_received_rtp_video_ms_.emplace(arrival_time_ms); diff --git a/call/call_perf_tests.cc b/call/call_perf_tests.cc index 1a9b5e59f9..5bdc6c13fa 100644 --- a/call/call_perf_tests.cc +++ b/call/call_perf_tests.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/rtc_event_log/rtc_event_log.h" #include "api/test/simulated_network.h" @@ -217,28 +216,28 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec, return pair.second == MediaType::VIDEO; }); - audio_send_transport = absl::make_unique( + audio_send_transport = std::make_unique( &task_queue_, sender_call_.get(), &observer, test::PacketTransport::kSender, audio_pt_map, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(audio_net_config))); + std::make_unique(audio_net_config))); audio_send_transport->SetReceiver(receiver_call_->Receiver()); - video_send_transport = absl::make_unique( + video_send_transport = std::make_unique( &task_queue_, sender_call_.get(), &observer, test::PacketTransport::kSender, video_pt_map, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( - BuiltInNetworkBehaviorConfig()))); + std::make_unique(Clock::GetRealTimeClock(), + std::make_unique( + BuiltInNetworkBehaviorConfig()))); video_send_transport->SetReceiver(receiver_call_->Receiver()); - receive_transport = absl::make_unique( + receive_transport = std::make_unique( &task_queue_, receiver_call_.get(), &observer, test::PacketTransport::kReceiver, payload_type_map_, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( - BuiltInNetworkBehaviorConfig()))); + std::make_unique(Clock::GetRealTimeClock(), + std::make_unique( + BuiltInNetworkBehaviorConfig()))); receive_transport->SetReceiver(sender_call_->Receiver()); CreateSendConfig(1, 0, 0, video_send_transport.get()); @@ -283,7 +282,7 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec, } EXPECT_EQ(1u, video_receive_streams_.size()); observer.set_receive_stream(video_receive_streams_[0]); - drifting_clock = absl::make_unique(clock_, video_ntp_speed); + drifting_clock = std::make_unique(clock_, video_ntp_speed); CreateFrameGeneratorCapturerWithDrift(drifting_clock.get(), video_rtp_speed, kDefaultFramerate, kDefaultWidth, kDefaultHeight); @@ -383,9 +382,9 @@ void CallPerfTest::TestCaptureNtpTime( return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(net_config_))); + std::make_unique(net_config_))); } test::PacketTransport* CreateReceiveTransport( @@ -394,9 +393,9 @@ void CallPerfTest::TestCaptureNtpTime( return new test::PacketTransport( task_queue, nullptr, this, test::PacketTransport::kReceiver, payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(net_config_))); + std::make_unique(net_config_))); } void OnFrame(const VideoFrame& video_frame) override { @@ -890,26 +889,26 @@ void CallPerfTest::TestMinAudioVideoBitrate(int test_bitrate_from, test::DEPRECATED_SingleThreadedTaskQueueForTesting* task_queue, Call* sender_call) override { auto network = - absl::make_unique(GetFakeNetworkPipeConfig()); + std::make_unique(GetFakeNetworkPipeConfig()); send_simulated_network_ = network.get(); return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, test::CallTest::payload_type_map_, - absl::make_unique(Clock::GetRealTimeClock(), - std::move(network))); + std::make_unique(Clock::GetRealTimeClock(), + std::move(network))); } test::PacketTransport* CreateReceiveTransport( test::DEPRECATED_SingleThreadedTaskQueueForTesting* task_queue) override { auto network = - absl::make_unique(GetFakeNetworkPipeConfig()); + std::make_unique(GetFakeNetworkPipeConfig()); receive_simulated_network_ = network.get(); return new test::PacketTransport( task_queue, nullptr, this, test::PacketTransport::kReceiver, test::CallTest::payload_type_map_, - absl::make_unique(Clock::GetRealTimeClock(), - std::move(network))); + std::make_unique(Clock::GetRealTimeClock(), + std::move(network))); } void PerformTest() override { diff --git a/call/degraded_call.cc b/call/degraded_call.cc index 5de50fd337..9c8d2be508 100644 --- a/call/degraded_call.cc +++ b/call/degraded_call.cc @@ -10,9 +10,9 @@ #include "call/degraded_call.h" +#include #include -#include "absl/memory/memory.h" #include "rtc_base/location.h" namespace webrtc { @@ -137,16 +137,16 @@ DegradedCall::DegradedCall( send_simulated_network_(nullptr), receive_config_(receive_config) { if (receive_config_) { - auto network = absl::make_unique(*receive_config_); + auto network = std::make_unique(*receive_config_); receive_simulated_network_ = network.get(); receive_pipe_ = - absl::make_unique(clock_, std::move(network)); + std::make_unique(clock_, std::move(network)); receive_pipe_->SetReceiver(call_->Receiver()); } if (send_config_) { - auto network = absl::make_unique(*send_config_); + auto network = std::make_unique(*send_config_); send_simulated_network_ = network.get(); - send_pipe_ = absl::make_unique( + send_pipe_ = std::make_unique( task_queue_factory_, clock_, std::move(network)); } } @@ -156,7 +156,7 @@ DegradedCall::~DegradedCall() = default; AudioSendStream* DegradedCall::CreateAudioSendStream( const AudioSendStream::Config& config) { if (send_config_) { - auto transport_adapter = absl::make_unique( + auto transport_adapter = std::make_unique( send_pipe_.get(), call_.get(), clock_, config.send_transport); AudioSendStream::Config degrade_config = config; degrade_config.send_transport = transport_adapter.get(); @@ -190,7 +190,7 @@ VideoSendStream* DegradedCall::CreateVideoSendStream( VideoEncoderConfig encoder_config) { std::unique_ptr transport_adapter; if (send_config_) { - transport_adapter = absl::make_unique( + transport_adapter = std::make_unique( send_pipe_.get(), call_.get(), clock_, config.send_transport); config.send_transport = transport_adapter.get(); } @@ -208,7 +208,7 @@ VideoSendStream* DegradedCall::CreateVideoSendStream( std::unique_ptr fec_controller) { std::unique_ptr transport_adapter; if (send_config_) { - transport_adapter = absl::make_unique( + transport_adapter = std::make_unique( send_pipe_.get(), call_.get(), clock_, config.send_transport); config.send_transport = transport_adapter.get(); } diff --git a/call/fake_network_pipe_unittest.cc b/call/fake_network_pipe_unittest.cc index da84470cf6..9c4a3bf755 100644 --- a/call/fake_network_pipe_unittest.cc +++ b/call/fake_network_pipe_unittest.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "call/simulated_network.h" #include "system_wrappers/include/clock.h" #include "test/gmock.h" @@ -74,7 +73,7 @@ TEST_F(FakeNetworkPipeTest, CapacityTest) { config.queue_length_packets = 20; config.link_capacity_kbps = 80; MockReceiver receiver; - auto simulated_network = absl::make_unique(config); + auto simulated_network = std::make_unique(config); std::unique_ptr pipe(new FakeNetworkPipe( &fake_clock_, std::move(simulated_network), &receiver)); @@ -115,7 +114,7 @@ TEST_F(FakeNetworkPipeTest, ExtraDelayTest) { config.queue_delay_ms = 100; config.link_capacity_kbps = 80; MockReceiver receiver; - auto simulated_network = absl::make_unique(config); + auto simulated_network = std::make_unique(config); std::unique_ptr pipe(new FakeNetworkPipe( &fake_clock_, std::move(simulated_network), &receiver)); @@ -150,7 +149,7 @@ TEST_F(FakeNetworkPipeTest, QueueLengthTest) { config.queue_length_packets = 2; config.link_capacity_kbps = 80; MockReceiver receiver; - auto simulated_network = absl::make_unique(config); + auto simulated_network = std::make_unique(config); std::unique_ptr pipe(new FakeNetworkPipe( &fake_clock_, std::move(simulated_network), &receiver)); @@ -175,7 +174,7 @@ TEST_F(FakeNetworkPipeTest, StatisticsTest) { config.queue_delay_ms = 20; config.link_capacity_kbps = 80; MockReceiver receiver; - auto simulated_network = absl::make_unique(config); + auto simulated_network = std::make_unique(config); std::unique_ptr pipe(new FakeNetworkPipe( &fake_clock_, std::move(simulated_network), &receiver)); @@ -370,7 +369,7 @@ TEST_F(FakeNetworkPipeTest, BurstLoss) { config.loss_percent = kLossPercent; config.avg_burst_loss_length = kAvgBurstLength; ReorderTestReceiver receiver; - auto simulated_network = absl::make_unique(config); + auto simulated_network = std::make_unique(config); std::unique_ptr pipe(new FakeNetworkPipe( &fake_clock_, std::move(simulated_network), &receiver)); @@ -403,7 +402,7 @@ TEST_F(FakeNetworkPipeTest, SetReceiver) { BuiltInNetworkBehaviorConfig config; config.link_capacity_kbps = 800; MockReceiver receiver; - auto simulated_network = absl::make_unique(config); + auto simulated_network = std::make_unique(config); std::unique_ptr pipe(new FakeNetworkPipe( &fake_clock_, std::move(simulated_network), &receiver)); diff --git a/call/flexfec_receive_stream_unittest.cc b/call/flexfec_receive_stream_unittest.cc index 45f4589870..5e8ee47433 100644 --- a/call/flexfec_receive_stream_unittest.cc +++ b/call/flexfec_receive_stream_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/array_view.h" #include "api/call/transport.h" #include "api/rtp_headers.h" @@ -89,7 +88,7 @@ class FlexfecReceiveStreamTest : public ::testing::Test { FlexfecReceiveStreamTest() : config_(CreateDefaultConfig(&rtcp_send_transport_)) { EXPECT_CALL(process_thread_, RegisterModule(_, _)).Times(1); - receive_stream_ = absl::make_unique( + receive_stream_ = std::make_unique( Clock::GetRealTimeClock(), &rtp_stream_receiver_controller_, config_, &recovered_packet_receiver_, &rtt_stats_, &process_thread_); } diff --git a/call/rampup_tests.cc b/call/rampup_tests.cc index b3f206325a..841f4d6189 100644 --- a/call/rampup_tests.cc +++ b/call/rampup_tests.cc @@ -13,7 +13,6 @@ #include #include "absl/flags/flag.h" -#include "absl/memory/memory.h" #include "api/rtc_event_log/rtc_event_log_factory.h" #include "api/rtc_event_log_output_file.h" #include "api/task_queue/default_task_queue_factory.h" @@ -120,13 +119,13 @@ void RampUpTester::OnVideoStreamsCreated( test::PacketTransport* RampUpTester::CreateSendTransport( test::DEPRECATED_SingleThreadedTaskQueueForTesting* task_queue, Call* sender_call) { - auto network = absl::make_unique(forward_transport_config_); + auto network = std::make_unique(forward_transport_config_); send_simulated_network_ = network.get(); send_transport_ = new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, test::CallTest::payload_type_map_, - absl::make_unique(Clock::GetRealTimeClock(), - std::move(network))); + std::make_unique(Clock::GetRealTimeClock(), + std::move(network))); return send_transport_; } @@ -641,11 +640,11 @@ class RampUpTest : public test::CallTest { RtcEventLog::EncodingType::Legacy); bool event_log_started = send_event_log_->StartLogging( - absl::make_unique( + std::make_unique( dump_name + ".send.rtc.dat", RtcEventLog::kUnlimitedOutput), RtcEventLog::kImmediateOutput) && recv_event_log_->StartLogging( - absl::make_unique( + std::make_unique( dump_name + ".recv.rtc.dat", RtcEventLog::kUnlimitedOutput), RtcEventLog::kImmediateOutput); RTC_DCHECK(event_log_started); diff --git a/call/receive_time_calculator.cc b/call/receive_time_calculator.cc index 200d5944a3..0675de0aa7 100644 --- a/call/receive_time_calculator.cc +++ b/call/receive_time_calculator.cc @@ -10,10 +10,10 @@ #include "call/receive_time_calculator.h" +#include #include #include -#include "absl/memory/memory.h" #include "rtc_base/experiments/field_trial_parser.h" #include "rtc_base/numerics/safe_minmax.h" #include "system_wrappers/include/field_trial.h" @@ -47,7 +47,7 @@ std::unique_ptr ReceiveTimeCalculator::CreateFromFieldTrial() { if (!IsEnabled(kBweReceiveTimeCorrection)) return nullptr; - return absl::make_unique(); + return std::make_unique(); } int64_t ReceiveTimeCalculator::ReconcileReceiveTimes(int64_t packet_time_us, diff --git a/call/rtp_demuxer_unittest.cc b/call/rtp_demuxer_unittest.cc index 0a08c8698d..86b458a0cc 100644 --- a/call/rtp_demuxer_unittest.cc +++ b/call/rtp_demuxer_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "call/ssrc_binding_observer.h" #include "call/test/mock_rtp_packet_sink_interface.h" #include "modules/rtp_rtcp/include/rtp_header_extension_map.h" @@ -134,7 +133,7 @@ class RtpDemuxerTest : public ::testing::Test { std::unique_ptr CreatePacket( uint32_t ssrc, RtpPacketReceived::ExtensionManager* extension_manager) { - auto packet = absl::make_unique(extension_manager); + auto packet = std::make_unique(extension_manager); packet->SetSsrc(ssrc); packet->SetSequenceNumber(next_sequence_number_++); return packet; diff --git a/call/rtp_stream_receiver_controller.cc b/call/rtp_stream_receiver_controller.cc index 3fae021188..0fc8b26936 100644 --- a/call/rtp_stream_receiver_controller.cc +++ b/call/rtp_stream_receiver_controller.cc @@ -10,7 +10,8 @@ #include "call/rtp_stream_receiver_controller.h" -#include "absl/memory/memory.h" +#include + #include "rtc_base/logging.h" namespace webrtc { @@ -46,7 +47,7 @@ RtpStreamReceiverController::~RtpStreamReceiverController() = default; std::unique_ptr RtpStreamReceiverController::CreateReceiver(uint32_t ssrc, RtpPacketSinkInterface* sink) { - return absl::make_unique(this, ssrc, sink); + return std::make_unique(this, ssrc, sink); } bool RtpStreamReceiverController::OnRtpPacket(const RtpPacketReceived& packet) { diff --git a/call/rtp_transport_controller_send.cc b/call/rtp_transport_controller_send.cc index 82b345c67a..41954b98ea 100644 --- a/call/rtp_transport_controller_send.cc +++ b/call/rtp_transport_controller_send.cc @@ -9,10 +9,10 @@ */ #include "call/rtp_transport_controller_send.h" +#include #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/transport/goog_cc_factory.h" #include "api/transport/network_types.h" @@ -72,7 +72,7 @@ RtpTransportControllerSend::RtpTransportControllerSend( observer_(nullptr), controller_factory_override_(controller_factory), controller_factory_fallback_( - absl::make_unique(predictor_factory)), + std::make_unique(predictor_factory)), process_interval_(controller_factory_fallback_->GetProcessInterval()), last_report_block_time_(Timestamp::ms(clock_->TimeInMilliseconds())), reset_feedback_on_route_change_( @@ -112,7 +112,7 @@ RtpVideoSenderInterface* RtpTransportControllerSend::CreateRtpVideoSender( RtcEventLog* event_log, std::unique_ptr fec_controller, const RtpSenderFrameEncryptionConfig& frame_encryption_config) { - video_rtp_senders_.push_back(absl::make_unique( + video_rtp_senders_.push_back(std::make_unique( clock_, suspended_ssrcs, states, rtp_config, rtcp_report_interval_ms, send_transport, observers, // TODO(holmer): Remove this circular dependency by injecting @@ -265,7 +265,7 @@ void RtpTransportControllerSend::OnNetworkRouteChanged( transport_overhead_bytes_per_packet_ = network_route.packet_overhead; if (event_log_) { - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( network_route.connected, network_route.packet_overhead)); } NetworkRouteChange msg; @@ -490,7 +490,7 @@ void RtpTransportControllerSend::MaybeCreateControllers() { if (!network_available_ || !observer_) return; - control_handler_ = absl::make_unique(); + control_handler_ = std::make_unique(); initial_config_.constraints.at_time = Timestamp::ms(clock_->TimeInMilliseconds()); diff --git a/call/rtp_video_sender.cc b/call/rtp_video_sender.cc index 420c442845..a88cc2cd1b 100644 --- a/call/rtp_video_sender.cc +++ b/call/rtp_video_sender.cc @@ -16,7 +16,6 @@ #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/array_view.h" #include "api/transport/field_trial_based_config.h" #include "call/rtp_transport_controller_send_interface.h" @@ -118,7 +117,7 @@ std::vector CreateRtpStreamSenders( *configuration.local_media_ssrc) != flexfec_protected_ssrcs.end(); configuration.flexfec_sender = enable_flexfec ? flexfec_sender : nullptr; - auto playout_delay_oracle = absl::make_unique(); + auto playout_delay_oracle = std::make_unique(); configuration.ack_observer = playout_delay_oracle.get(); if (rtp_config.rtx.ssrcs.size() > i) { @@ -130,7 +129,7 @@ std::vector CreateRtpStreamSenders( rtp_rtcp->SetSendingMediaStatus(false); rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); - auto sender_video = absl::make_unique( + auto sender_video = std::make_unique( configuration.clock, rtp_rtcp->RtpSender(), configuration.flexfec_sender, playout_delay_oracle.get(), frame_encryptor, crypto_options.sframe.require_frame_encryption, @@ -192,7 +191,7 @@ std::unique_ptr MaybeCreateFlexfecSender( } RTC_DCHECK_EQ(1U, rtp.flexfec.protected_media_ssrcs.size()); - return absl::make_unique( + return std::make_unique( rtp.flexfec.payload_type, rtp.flexfec.ssrc, rtp.flexfec.protected_media_ssrcs[0], rtp.mid, rtp.extensions, RTPSender::FecExtensionSizes(), rtp_state, clock); diff --git a/call/rtp_video_sender_unittest.cc b/call/rtp_video_sender_unittest.cc index 1fb24abd42..17ee9c6c68 100644 --- a/call/rtp_video_sender_unittest.cc +++ b/call/rtp_video_sender_unittest.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/task_queue/default_task_queue_factory.h" #include "call/rtp_transport_controller_send.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" @@ -137,7 +136,7 @@ class RtpVideoSenderTestFixture { VideoEncoderConfig::ContentType::kRealtimeVideo), retransmission_rate_limiter_(&clock_, kRetransmitWindowSizeMs) { std::map suspended_ssrcs; - router_ = absl::make_unique( + router_ = std::make_unique( &clock_, suspended_ssrcs, suspended_payload_states, config_.rtp, config_.rtcp_report_interval_ms, &transport_, CreateObservers(&call_stats_, &encoder_feedback_, &stats_proxy_, @@ -145,7 +144,7 @@ class RtpVideoSenderTestFixture { frame_count_observer, &stats_proxy_, &stats_proxy_, &send_delay_stats_), &transport_controller_, &event_log_, &retransmission_rate_limiter_, - absl::make_unique(&clock_), nullptr, + std::make_unique(&clock_), nullptr, CryptoOptions{}); } RtpVideoSenderTestFixture( diff --git a/common_audio/BUILD.gn b/common_audio/BUILD.gn index d8d44943b7..849ecad3e7 100644 --- a/common_audio/BUILD.gn +++ b/common_audio/BUILD.gn @@ -59,7 +59,6 @@ rtc_static_library("common_audio") { "../system_wrappers:cpu_features_api", "third_party/fft4g", "//third_party/abseil-cpp/absl/container:inlined_vector", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] diff --git a/common_audio/resampler/push_resampler.cc b/common_audio/resampler/push_resampler.cc index 9b89867e5a..17b876b6b2 100644 --- a/common_audio/resampler/push_resampler.cc +++ b/common_audio/resampler/push_resampler.cc @@ -13,8 +13,9 @@ #include #include +#include + #include "absl/container/inlined_vector.h" -#include "absl/memory/memory.h" #include "common_audio/include/audio_util.h" #include "common_audio/resampler/push_sinc_resampler.h" #include "rtc_base/checks.h" @@ -93,7 +94,7 @@ int PushResampler::InitializeIfNeeded(int src_sample_rate_hz, for (size_t i = 0; i < num_channels; ++i) { channel_resamplers_.push_back(ChannelResampler()); auto channel_resampler = channel_resamplers_.rbegin(); - channel_resampler->resampler = absl::make_unique( + channel_resampler->resampler = std::make_unique( src_size_10ms_mono, dst_size_10ms_mono); channel_resampler->source.resize(src_size_10ms_mono); channel_resampler->destination.resize(dst_size_10ms_mono); diff --git a/common_video/BUILD.gn b/common_video/BUILD.gn index c0cd959948..c2c0bc223f 100644 --- a/common_video/BUILD.gn +++ b/common_video/BUILD.gn @@ -113,7 +113,6 @@ if (rtc_include_tests) { "../test:test_support", "../test:video_test_common", "//testing/gtest", - "//third_party/abseil-cpp/absl/memory", "//third_party/libyuv", ] diff --git a/common_video/libyuv/libyuv_unittest.cc b/common_video/libyuv/libyuv_unittest.cc index 68c45019c3..2a7992865a 100644 --- a/common_video/libyuv/libyuv_unittest.cc +++ b/common_video/libyuv/libyuv_unittest.cc @@ -15,7 +15,6 @@ #include -#include "absl/memory/memory.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame.h" #include "common_video/libyuv/include/webrtc_libyuv.h" @@ -69,11 +68,11 @@ void TestLibYuv::SetUp() { test::ReadI420Buffer(width_, height_, source_file_)); orig_frame_ = - absl::make_unique(VideoFrame::Builder() - .set_video_frame_buffer(buffer) - .set_rotation(webrtc::kVideoRotation_0) - .set_timestamp_us(0) - .build()); + std::make_unique(VideoFrame::Builder() + .set_video_frame_buffer(buffer) + .set_rotation(webrtc::kVideoRotation_0) + .set_timestamp_us(0) + .build()); } void TestLibYuv::TearDown() { diff --git a/examples/BUILD.gn b/examples/BUILD.gn index 0d54d303c2..f9c4b99b21 100644 --- a/examples/BUILD.gn +++ b/examples/BUILD.gn @@ -483,7 +483,6 @@ if (is_ios || (is_mac && target_cpu != "x86")) { "../sdk:ui_objc", "../sdk:videocapture_objc", "../sdk:videotoolbox_objc", - "//third_party/abseil-cpp/absl/memory", ] if (current_cpu == "arm64") { diff --git a/examples/androidnativeapi/BUILD.gn b/examples/androidnativeapi/BUILD.gn index 1d452ee24d..dad08400ff 100644 --- a/examples/androidnativeapi/BUILD.gn +++ b/examples/androidnativeapi/BUILD.gn @@ -62,7 +62,6 @@ if (is_android) { "//sdk/android:native_api_base", "//sdk/android:native_api_jni", "//sdk/android:native_api_video", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/examples/androidnativeapi/jni/android_call_client.cc b/examples/androidnativeapi/jni/android_call_client.cc index 7bd6d3b21f..03968335d9 100644 --- a/examples/androidnativeapi/jni/android_call_client.cc +++ b/examples/androidnativeapi/jni/android_call_client.cc @@ -12,7 +12,8 @@ #include -#include "absl/memory/memory.h" +#include + #include "api/peer_connection_interface.h" #include "api/rtc_event_log/rtc_event_log_factory.h" #include "api/task_queue/default_task_queue_factory.h" @@ -75,7 +76,7 @@ class SetLocalSessionDescriptionObserver } // namespace AndroidCallClient::AndroidCallClient() - : call_started_(false), pc_observer_(absl::make_unique(this)) { + : call_started_(false), pc_observer_(std::make_unique(this)) { thread_checker_.Detach(); CreatePeerConnectionFactory(); } @@ -155,15 +156,15 @@ void AndroidCallClient::CreatePeerConnectionFactory() { pcf_deps.signaling_thread = signaling_thread_.get(); pcf_deps.task_queue_factory = webrtc::CreateDefaultTaskQueueFactory(); pcf_deps.call_factory = webrtc::CreateCallFactory(); - pcf_deps.event_log_factory = absl::make_unique( + pcf_deps.event_log_factory = std::make_unique( pcf_deps.task_queue_factory.get()); cricket::MediaEngineDependencies media_deps; media_deps.task_queue_factory = pcf_deps.task_queue_factory.get(); media_deps.video_encoder_factory = - absl::make_unique(); + std::make_unique(); media_deps.video_decoder_factory = - absl::make_unique(); + std::make_unique(); webrtc::SetMediaEngineDefaults(&media_deps); pcf_deps.media_engine = cricket::CreateMediaEngine(std::move(media_deps)); RTC_LOG(LS_INFO) << "Media engine created: " << pcf_deps.media_engine.get(); diff --git a/examples/objcnativeapi/objc/objc_call_client.mm b/examples/objcnativeapi/objc/objc_call_client.mm index 3d07cd022b..4be30bbb01 100644 --- a/examples/objcnativeapi/objc/objc_call_client.mm +++ b/examples/objcnativeapi/objc/objc_call_client.mm @@ -10,6 +10,7 @@ #include "examples/objcnativeapi/objc/objc_call_client.h" +#include #include #import "sdk/objc/base/RTCVideoRenderer.h" @@ -17,7 +18,6 @@ #import "sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.h" #import "sdk/objc/helpers/RTCCameraPreviewView.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 "api/peer_connection_interface.h" @@ -59,7 +59,7 @@ class SetLocalSessionDescriptionObserver : public webrtc::SetSessionDescriptionO } // namespace ObjCCallClient::ObjCCallClient() - : call_started_(false), pc_observer_(absl::make_unique(this)) { + : call_started_(false), pc_observer_(std::make_unique(this)) { thread_checker_.Detach(); CreatePeerConnectionFactory(); } @@ -131,7 +131,7 @@ void ObjCCallClient::CreatePeerConnectionFactory() { RTC_LOG(LS_INFO) << "Media engine created: " << dependencies.media_engine.get(); dependencies.call_factory = webrtc::CreateCallFactory(); dependencies.event_log_factory = - absl::make_unique(dependencies.task_queue_factory.get()); + std::make_unique(dependencies.task_queue_factory.get()); pcf_ = webrtc::CreateModularPeerConnectionFactory(std::move(dependencies)); RTC_LOG(LS_INFO) << "PeerConnectionFactory created: " << pcf_; } diff --git a/examples/unityplugin/simple_peer_connection.cc b/examples/unityplugin/simple_peer_connection.cc index ed89489e8e..8a719ba32e 100644 --- a/examples/unityplugin/simple_peer_connection.cc +++ b/examples/unityplugin/simple_peer_connection.cc @@ -133,10 +133,10 @@ bool SimplePeerConnection::InitializePeerConnection(const char** turn_urls, webrtc::CreateBuiltinAudioDecoderFactory(), std::unique_ptr( new webrtc::MultiplexEncoderFactory( - absl::make_unique())), + std::make_unique())), std::unique_ptr( new webrtc::MultiplexDecoderFactory( - absl::make_unique())), + std::make_unique())), nullptr, nullptr); } if (!g_peer_connection_factory.get()) { diff --git a/logging/BUILD.gn b/logging/BUILD.gn index 0f254a52d6..190b411b62 100644 --- a/logging/BUILD.gn +++ b/logging/BUILD.gn @@ -250,7 +250,6 @@ if (rtc_enable_protobuf) { "../rtc_base:rtc_task_queue", "../rtc_base:safe_minmax", "../rtc_base/synchronization:sequence_checker", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/logging/rtc_event_log/encoder/delta_encoding.cc b/logging/rtc_event_log/encoder/delta_encoding.cc index ca2589f11a..022fb9c163 100644 --- a/logging/rtc_event_log/encoder/delta_encoding.cc +++ b/logging/rtc_event_log/encoder/delta_encoding.cc @@ -447,7 +447,7 @@ FixedLengthDeltaEncoder::FixedLengthDeltaEncoder( : params_(params), base_(base), values_(values) { RTC_DCHECK(!values_.empty()); writer_ = - absl::make_unique(OutputLengthBytes(existent_values_count)); + std::make_unique(OutputLengthBytes(existent_values_count)); } std::string FixedLengthDeltaEncoder::Encode() { @@ -723,7 +723,7 @@ std::unique_ptr FixedLengthDeltaDecoder::Create( return nullptr; } - auto reader = absl::make_unique( + auto reader = std::make_unique( reinterpret_cast(&input[0]), input.length()); // Encoding type diff --git a/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc b/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc index 6bccf57093..0bea93dcd0 100644 --- a/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc +++ b/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc @@ -10,10 +10,10 @@ #include #include +#include #include #include -#include "absl/memory/memory.h" #include "logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.h" #include "logging/rtc_event_log/encoder/rtc_event_log_encoder_new_format.h" #include "logging/rtc_event_log/events/rtc_event_alr_state.h" @@ -55,9 +55,9 @@ class RtcEventLogEncoderTest verifier_(new_encoding_ ? RtcEventLog::EncodingType::NewFormat : RtcEventLog::EncodingType::Legacy) { if (new_encoding_) - encoder_ = absl::make_unique(); + encoder_ = std::make_unique(); else - encoder_ = absl::make_unique(); + encoder_ = std::make_unique(); } ~RtcEventLogEncoderTest() override = default; @@ -244,11 +244,11 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationBitrate) { event_count_); for (size_t i = 0; i < event_count_; ++i) { if (i == 0 || !force_repeated_fields_) { - auto runtime_config = absl::make_unique(); + auto runtime_config = std::make_unique(); const int bitrate_bps = rtc::checked_cast( prng_.Rand(0, std::numeric_limits::max())); runtime_config->bitrate_bps = bitrate_bps; - events[i] = absl::make_unique( + events[i] = std::make_unique( std::move(runtime_config)); } else { events[i] = events[0]->Copy(); @@ -262,10 +262,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationFrameLength) { event_count_); for (size_t i = 0; i < event_count_; ++i) { if (i == 0 || !force_repeated_fields_) { - auto runtime_config = absl::make_unique(); + auto runtime_config = std::make_unique(); const int frame_length_ms = prng_.Rand(1, 1000); runtime_config->frame_length_ms = frame_length_ms; - events[i] = absl::make_unique( + events[i] = std::make_unique( std::move(runtime_config)); } else { events[i] = events[0]->Copy(); @@ -281,9 +281,9 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationPacketLoss) { if (i == 0 || !force_repeated_fields_) { // To simplify the test, we just check powers of two. const float plr = std::pow(0.5f, prng_.Rand(1, 8)); - auto runtime_config = absl::make_unique(); + auto runtime_config = std::make_unique(); runtime_config->uplink_packet_loss_fraction = plr; - events[i] = absl::make_unique( + events[i] = std::make_unique( std::move(runtime_config)); } else { events[i] = events[0]->Copy(); @@ -297,9 +297,9 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationFec) { event_count_); for (size_t i = 0; i < event_count_; ++i) { if (i == 0 || !force_repeated_fields_) { - auto runtime_config = absl::make_unique(); + auto runtime_config = std::make_unique(); runtime_config->enable_fec = prng_.Rand(); - events[i] = absl::make_unique( + events[i] = std::make_unique( std::move(runtime_config)); } else { events[i] = events[0]->Copy(); @@ -313,9 +313,9 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationDtx) { event_count_); for (size_t i = 0; i < event_count_; ++i) { if (i == 0 || !force_repeated_fields_) { - auto runtime_config = absl::make_unique(); + auto runtime_config = std::make_unique(); runtime_config->enable_dtx = prng_.Rand(); - events[i] = absl::make_unique( + events[i] = std::make_unique( std::move(runtime_config)); } else { events[i] = events[0]->Copy(); @@ -329,9 +329,9 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationChannels) { event_count_); for (size_t i = 0; i < event_count_; ++i) { if (i == 0 || !force_repeated_fields_) { - auto runtime_config = absl::make_unique(); + auto runtime_config = std::make_unique(); runtime_config->num_channels = prng_.Rand(1, 2); - events[i] = absl::make_unique( + events[i] = std::make_unique( std::move(runtime_config)); } else { events[i] = events[0]->Copy(); @@ -345,7 +345,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationAll) { event_count_); for (size_t i = 0; i < event_count_; ++i) { if (i == 0 || !force_repeated_fields_) { - auto runtime_config = absl::make_unique(); + auto runtime_config = std::make_unique(); runtime_config->bitrate_bps = rtc::checked_cast( prng_.Rand(0, std::numeric_limits::max())); runtime_config->frame_length_ms = prng_.Rand(1, 1000); @@ -354,7 +354,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationAll) { runtime_config->enable_fec = prng_.Rand(); runtime_config->enable_dtx = prng_.Rand(); runtime_config->num_channels = prng_.Rand(1, 2); - events[i] = absl::make_unique( + events[i] = std::make_unique( std::move(runtime_config)); } else { events[i] = events[0]->Copy(); @@ -773,10 +773,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpReceiverReport) { rtc::Buffer buffer = events[i].Build(); if (direction == kIncomingPacket) { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } else { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); } @@ -812,10 +812,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpSenderReport) { rtc::Buffer buffer = events[i].Build(); if (direction == kIncomingPacket) { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } else { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); } @@ -851,10 +851,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpExtendedReports) { rtc::Buffer buffer = events[i].Build(); if (direction == kIncomingPacket) { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } else { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); } @@ -890,10 +890,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpFir) { rtc::Buffer buffer = events[i].Build(); if (direction == kIncomingPacket) { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } else { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); } @@ -928,10 +928,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpPli) { rtc::Buffer buffer = events[i].Build(); if (direction == kIncomingPacket) { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } else { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); } @@ -966,10 +966,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpNack) { rtc::Buffer buffer = events[i].Build(); if (direction == kIncomingPacket) { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } else { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); } @@ -1004,10 +1004,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpRemb) { rtc::Buffer buffer = events[i].Build(); if (direction == kIncomingPacket) { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } else { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); } @@ -1043,10 +1043,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpTransportFeedback) { rtc::Buffer buffer = events[i].Build(); if (direction == kIncomingPacket) { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } else { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); } @@ -1084,10 +1084,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpLossNotification) { rtc::Buffer buffer = events[i].Build(); if (direction == kIncomingPacket) { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } else { history_.push_back( - absl::make_unique(buffer)); + std::make_unique(buffer)); } fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); } diff --git a/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.cc b/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.cc index 571b9a93d3..73783167a9 100644 --- a/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.cc +++ b/logging/rtc_event_log/events/rtc_event_audio_network_adaptation.cc @@ -27,7 +27,7 @@ RtcEventAudioNetworkAdaptation::RtcEventAudioNetworkAdaptation( RtcEventAudioNetworkAdaptation::RtcEventAudioNetworkAdaptation( const RtcEventAudioNetworkAdaptation& other) : RtcEvent(other.timestamp_us_), - config_(absl::make_unique(*other.config_)) {} + config_(std::make_unique(*other.config_)) {} RtcEventAudioNetworkAdaptation::~RtcEventAudioNetworkAdaptation() = default; diff --git a/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.cc b/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.cc index fdef393d54..5cdfb473bb 100644 --- a/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.cc +++ b/logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.cc @@ -27,7 +27,7 @@ RtcEventAudioReceiveStreamConfig::RtcEventAudioReceiveStreamConfig( RtcEventAudioReceiveStreamConfig::RtcEventAudioReceiveStreamConfig( const RtcEventAudioReceiveStreamConfig& other) : RtcEvent(other.timestamp_us_), - config_(absl::make_unique(*other.config_)) {} + config_(std::make_unique(*other.config_)) {} RtcEventAudioReceiveStreamConfig::~RtcEventAudioReceiveStreamConfig() = default; diff --git a/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.cc b/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.cc index f1a85bff69..f4403afddf 100644 --- a/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.cc +++ b/logging/rtc_event_log/events/rtc_event_audio_send_stream_config.cc @@ -27,7 +27,7 @@ RtcEventAudioSendStreamConfig::RtcEventAudioSendStreamConfig( RtcEventAudioSendStreamConfig::RtcEventAudioSendStreamConfig( const RtcEventAudioSendStreamConfig& other) : RtcEvent(other.timestamp_us_), - config_(absl::make_unique(*other.config_)) {} + config_(std::make_unique(*other.config_)) {} RtcEventAudioSendStreamConfig::~RtcEventAudioSendStreamConfig() = default; diff --git a/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.cc b/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.cc index 5dec97bf83..8942f8a642 100644 --- a/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.cc +++ b/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.cc @@ -26,7 +26,7 @@ RtcEventVideoReceiveStreamConfig::RtcEventVideoReceiveStreamConfig( RtcEventVideoReceiveStreamConfig::RtcEventVideoReceiveStreamConfig( const RtcEventVideoReceiveStreamConfig& other) : RtcEvent(other.timestamp_us_), - config_(absl::make_unique(*other.config_)) {} + config_(std::make_unique(*other.config_)) {} RtcEventVideoReceiveStreamConfig::~RtcEventVideoReceiveStreamConfig() = default; diff --git a/logging/rtc_event_log/events/rtc_event_video_send_stream_config.cc b/logging/rtc_event_log/events/rtc_event_video_send_stream_config.cc index dc4b167438..2c33466ab2 100644 --- a/logging/rtc_event_log/events/rtc_event_video_send_stream_config.cc +++ b/logging/rtc_event_log/events/rtc_event_video_send_stream_config.cc @@ -23,7 +23,7 @@ RtcEventVideoSendStreamConfig::RtcEventVideoSendStreamConfig( RtcEventVideoSendStreamConfig::RtcEventVideoSendStreamConfig( const RtcEventVideoSendStreamConfig& other) : RtcEvent(other.timestamp_us_), - config_(absl::make_unique(*other.config_)) {} + config_(std::make_unique(*other.config_)) {} RtcEventVideoSendStreamConfig::~RtcEventVideoSendStreamConfig() = default; diff --git a/logging/rtc_event_log/ice_logger.cc b/logging/rtc_event_log/ice_logger.cc index 59076ce58a..390deda953 100644 --- a/logging/rtc_event_log/ice_logger.cc +++ b/logging/rtc_event_log/ice_logger.cc @@ -10,7 +10,8 @@ #include "logging/rtc_event_log/ice_logger.h" -#include "absl/memory/memory.h" +#include + #include "api/rtc_event_log/rtc_event_log.h" namespace webrtc { @@ -26,7 +27,7 @@ void IceEventLog::LogCandidatePairConfig( return; } candidate_pair_desc_by_id_[candidate_pair_id] = candidate_pair_desc; - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( type, candidate_pair_id, candidate_pair_desc)); } @@ -36,13 +37,13 @@ void IceEventLog::LogCandidatePairEvent(IceCandidatePairEventType type, if (event_log_ == nullptr) { return; } - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( type, candidate_pair_id, transaction_id)); } void IceEventLog::DumpCandidatePairDescriptionToMemoryAsConfigEvents() const { for (const auto& desc_id_pair : candidate_pair_desc_by_id_) { - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( IceCandidatePairConfigType::kUpdated, desc_id_pair.first, desc_id_pair.second)); } diff --git a/logging/rtc_event_log/rtc_event_log_impl.cc b/logging/rtc_event_log/rtc_event_log_impl.cc index 9c71ff70f6..f020a7ea94 100644 --- a/logging/rtc_event_log/rtc_event_log_impl.cc +++ b/logging/rtc_event_log/rtc_event_log_impl.cc @@ -12,10 +12,10 @@ #include #include +#include #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/task_queue/queued_task.h" #include "api/task_queue/task_queue_base.h" @@ -61,10 +61,10 @@ std::unique_ptr CreateEncoder( switch (type) { case RtcEventLog::EncodingType::Legacy: RTC_LOG(LS_INFO) << "Creating legacy encoder for RTC event log."; - return absl::make_unique(); + return std::make_unique(); case RtcEventLog::EncodingType::NewFormat: RTC_LOG(LS_INFO) << "Creating new format encoder for RTC event log."; - return absl::make_unique(); + return std::make_unique(); default: RTC_LOG(LS_ERROR) << "Unknown RtcEventLog encoder type (" << int(type) << ")"; @@ -82,7 +82,7 @@ RtcEventLogImpl::RtcEventLogImpl(RtcEventLog::EncodingType encoding_type, output_scheduled_(false), logging_state_started_(false), task_queue_( - absl::make_unique(task_queue_factory->CreateTaskQueue( + std::make_unique(task_queue_factory->CreateTaskQueue( "rtc_event_log", TaskQueueFactory::Priority::NORMAL))) {} @@ -128,9 +128,8 @@ bool RtcEventLogImpl::StartLogging(std::unique_ptr output, RTC_DCHECK_RUN_ON(&logging_state_checker_); logging_state_started_ = true; - task_queue_->PostTask( - absl::make_unique>( - std::move(output), start)); + task_queue_->PostTask(std::make_unique>( + std::move(output), start)); return true; } @@ -176,7 +175,7 @@ void RtcEventLogImpl::Log(std::unique_ptr event) { ScheduleOutput(); }; - task_queue_->PostTask(absl::make_unique>( + task_queue_->PostTask(std::make_unique>( std::move(event), event_handler)); } diff --git a/logging/rtc_event_log/rtc_event_log_unittest.cc b/logging/rtc_event_log/rtc_event_log_unittest.cc index e44d818101..eb5aa97090 100644 --- a/logging/rtc_event_log/rtc_event_log_unittest.cc +++ b/logging/rtc_event_log/rtc_event_log_unittest.cc @@ -17,7 +17,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/rtc_event_log/rtc_event_log.h" #include "api/rtc_event_log/rtc_event_log_factory.h" #include "api/rtc_event_log_output_file.h" @@ -331,7 +330,7 @@ void RtcEventLogSession::WriteLog(EventCounts count, if (remaining_events == remaining_events_at_start) { clock_.AdvanceTime(TimeDelta::ms(prng_.Rand(20))); event_log->StartLogging( - absl::make_unique(temp_filename_, 10000000), + std::make_unique(temp_filename_, 10000000), output_period_ms_); start_time_us_ = rtc::TimeMicros(); utc_start_time_us_ = rtc::TimeUTCMicros(); @@ -843,7 +842,7 @@ TEST_P(RtcEventLogCircularBufferTest, KeepsMostRecentEvents) { const std::string temp_filename = test::OutputPath() + test_name; std::unique_ptr fake_clock = - absl::make_unique(); + std::make_unique(); fake_clock->SetTime(Timestamp::seconds(kStartTimeSeconds)); auto task_queue_factory = CreateDefaultTaskQueueFactory(); @@ -860,14 +859,14 @@ TEST_P(RtcEventLogCircularBufferTest, KeepsMostRecentEvents) { // simplicity. // We base the various values on the index. We use this for some basic // consistency checks when we read back. - log_dumper->Log(absl::make_unique( + log_dumper->Log(std::make_unique( i, kStartBitrate + i * 1000)); fake_clock->AdvanceTime(TimeDelta::ms(10)); } int64_t start_time_us = rtc::TimeMicros(); int64_t utc_start_time_us = rtc::TimeUTCMicros(); log_dumper->StartLogging( - absl::make_unique(temp_filename, 10000000), + std::make_unique(temp_filename, 10000000), RtcEventLog::kImmediateOutput); fake_clock->AdvanceTime(TimeDelta::ms(10)); int64_t stop_time_us = rtc::TimeMicros(); @@ -901,7 +900,7 @@ TEST_P(RtcEventLogCircularBufferTest, KeepsMostRecentEvents) { // recreate the clock. However we must ensure that the old fake_clock is // destroyed before the new one is created, so we have to reset() first. fake_clock.reset(); - fake_clock = absl::make_unique(); + fake_clock = std::make_unique(); fake_clock->SetTime(Timestamp::us(first_timestamp_us)); for (size_t i = 1; i < probe_success_events.size(); i++) { fake_clock->AdvanceTime(TimeDelta::ms(10)); diff --git a/logging/rtc_event_log/rtc_event_log_unittest_helper.cc b/logging/rtc_event_log/rtc_event_log_unittest_helper.cc index 830230536d..56b1f6570d 100644 --- a/logging/rtc_event_log/rtc_event_log_unittest_helper.cc +++ b/logging/rtc_event_log/rtc_event_log_unittest_helper.cc @@ -21,7 +21,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/array_view.h" #include "api/rtp_headers.h" @@ -90,18 +89,18 @@ absl::optional GetExtensionId(const std::vector& extensions, } // namespace std::unique_ptr EventGenerator::NewAlrState() { - return absl::make_unique(prng_.Rand()); + return std::make_unique(prng_.Rand()); } std::unique_ptr EventGenerator::NewAudioPlayout( uint32_t ssrc) { - return absl::make_unique(ssrc); + return std::make_unique(ssrc); } std::unique_ptr EventGenerator::NewAudioNetworkAdaptation() { std::unique_ptr config = - absl::make_unique(); + std::make_unique(); config->bitrate_bps = prng_.Rand(0, 3000000); config->enable_fec = prng_.Rand(); @@ -110,7 +109,7 @@ EventGenerator::NewAudioNetworkAdaptation() { config->num_channels = prng_.Rand(1, 2); config->uplink_packet_loss_fraction = prng_.Rand(); - return absl::make_unique(std::move(config)); + return std::make_unique(std::move(config)); } std::unique_ptr @@ -119,7 +118,7 @@ EventGenerator::NewBweUpdateDelayBased() { int32_t bitrate_bps = prng_.Rand(0, kMaxBweBps); BandwidthUsage state = static_cast( prng_.Rand(static_cast(BandwidthUsage::kLast) - 1)); - return absl::make_unique(bitrate_bps, state); + return std::make_unique(bitrate_bps, state); } std::unique_ptr @@ -130,7 +129,7 @@ EventGenerator::NewBweUpdateLossBased() { uint8_t fraction_lost = prng_.Rand(); int32_t total_packets = prng_.Rand(1, kMaxPackets); - return absl::make_unique( + return std::make_unique( bitrate_bps, fraction_lost, total_packets); } @@ -139,13 +138,13 @@ EventGenerator::NewDtlsTransportState() { DtlsTransportState state = static_cast( prng_.Rand(static_cast(DtlsTransportState::kNumValues) - 1)); - return absl::make_unique(state); + return std::make_unique(state); } std::unique_ptr EventGenerator::NewDtlsWritableState() { bool writable = prng_.Rand(); - return absl::make_unique(writable); + return std::make_unique(writable); } std::unique_ptr @@ -157,8 +156,8 @@ EventGenerator::NewProbeClusterCreated() { int min_probes = prng_.Rand(5, 50); int min_bytes = prng_.Rand(500, 50000); - return absl::make_unique(id, bitrate_bps, - min_probes, min_bytes); + return std::make_unique(id, bitrate_bps, + min_probes, min_bytes); } std::unique_ptr @@ -168,7 +167,7 @@ EventGenerator::NewProbeResultFailure() { ProbeFailureReason reason = static_cast( prng_.Rand(static_cast(ProbeFailureReason::kLast) - 1)); - return absl::make_unique(id, reason); + return std::make_unique(id, reason); } std::unique_ptr @@ -178,7 +177,7 @@ EventGenerator::NewProbeResultSuccess() { int id = prng_.Rand(1, kMaxNumProbes); int bitrate_bps = prng_.Rand(0, kMaxBweBps); - return absl::make_unique(id, bitrate_bps); + return std::make_unique(id, bitrate_bps); } std::unique_ptr @@ -215,7 +214,7 @@ EventGenerator::NewIceCandidatePairConfig() { static_cast(prng_.Rand( static_cast(IceCandidatePairConfigType::kNumValues) - 1)); uint32_t pair_id = prng_.Rand(); - return absl::make_unique(type, pair_id, desc); + return std::make_unique(type, pair_id, desc); } std::unique_ptr @@ -226,8 +225,8 @@ EventGenerator::NewIceCandidatePair() { uint32_t pair_id = prng_.Rand(); uint32_t transaction_id = prng_.Rand(); - return absl::make_unique(type, pair_id, - transaction_id); + return std::make_unique(type, pair_id, + transaction_id); } rtcp::ReportBlock EventGenerator::NewReportBlock() { @@ -352,8 +351,8 @@ rtcp::LossNotification EventGenerator::NewLossNotification() { } std::unique_ptr EventGenerator::NewRouteChange() { - return absl::make_unique(prng_.Rand(), - prng_.Rand(0, 128)); + return std::make_unique(prng_.Rand(), + prng_.Rand(0, 128)); } std::unique_ptr @@ -375,47 +374,47 @@ EventGenerator::NewRtcpPacketIncoming() { case SupportedRtcpTypes::kSenderReport: { rtcp::SenderReport sender_report = NewSenderReport(); rtc::Buffer buffer = sender_report.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kReceiverReport: { rtcp::ReceiverReport receiver_report = NewReceiverReport(); rtc::Buffer buffer = receiver_report.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kExtendedReports: { rtcp::ExtendedReports extended_report = NewExtendedReports(); rtc::Buffer buffer = extended_report.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kFir: { rtcp::Fir fir = NewFir(); rtc::Buffer buffer = fir.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kPli: { rtcp::Pli pli = NewPli(); rtc::Buffer buffer = pli.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kNack: { rtcp::Nack nack = NewNack(); rtc::Buffer buffer = nack.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kRemb: { rtcp::Remb remb = NewRemb(); rtc::Buffer buffer = remb.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kTransportFeedback: { rtcp::TransportFeedback transport_feedback = NewTransportFeedback(); rtc::Buffer buffer = transport_feedback.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } default: RTC_NOTREACHED(); rtc::Buffer buffer; - return absl::make_unique(buffer); + return std::make_unique(buffer); } } @@ -438,59 +437,59 @@ EventGenerator::NewRtcpPacketOutgoing() { case SupportedRtcpTypes::kSenderReport: { rtcp::SenderReport sender_report = NewSenderReport(); rtc::Buffer buffer = sender_report.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kReceiverReport: { rtcp::ReceiverReport receiver_report = NewReceiverReport(); rtc::Buffer buffer = receiver_report.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kExtendedReports: { rtcp::ExtendedReports extended_report = NewExtendedReports(); rtc::Buffer buffer = extended_report.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kFir: { rtcp::Fir fir = NewFir(); rtc::Buffer buffer = fir.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kPli: { rtcp::Pli pli = NewPli(); rtc::Buffer buffer = pli.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kNack: { rtcp::Nack nack = NewNack(); rtc::Buffer buffer = nack.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kRemb: { rtcp::Remb remb = NewRemb(); rtc::Buffer buffer = remb.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } case SupportedRtcpTypes::kTransportFeedback: { rtcp::TransportFeedback transport_feedback = NewTransportFeedback(); rtc::Buffer buffer = transport_feedback.Build(); - return absl::make_unique(buffer); + return std::make_unique(buffer); } default: RTC_NOTREACHED(); rtc::Buffer buffer; - return absl::make_unique(buffer); + return std::make_unique(buffer); } } std::unique_ptr EventGenerator::NewGenericPacketSent() { - return absl::make_unique( + return std::make_unique( sent_packet_number_++, prng_.Rand(40, 50), prng_.Rand(0, 150), prng_.Rand(0, 1000)); } std::unique_ptr EventGenerator::NewGenericPacketReceived() { - return absl::make_unique( + return std::make_unique( received_packet_number_++, prng_.Rand(40, 250)); } std::unique_ptr @@ -586,7 +585,7 @@ std::unique_ptr EventGenerator::NewRtpPacketIncoming( RandomizeRtpPacket(payload_size, padding_size, ssrc, extension_map, &rtp_packet, all_configured_exts); - return absl::make_unique(rtp_packet); + return std::make_unique(rtp_packet); } std::unique_ptr EventGenerator::NewRtpPacketOutgoing( @@ -617,8 +616,8 @@ std::unique_ptr EventGenerator::NewRtpPacketOutgoing( &rtp_packet, all_configured_exts); int probe_cluster_id = prng_.Rand(0, 100000); - return absl::make_unique(rtp_packet, - probe_cluster_id); + return std::make_unique(rtp_packet, + probe_cluster_id); } RtpHeaderExtensionMap EventGenerator::NewRtpHeaderExtensionMap( @@ -652,7 +651,7 @@ std::unique_ptr EventGenerator::NewAudioReceiveStreamConfig( uint32_t ssrc, const RtpHeaderExtensionMap& extensions) { - auto config = absl::make_unique(); + auto config = std::make_unique(); // Add SSRCs for the stream. config->remote_ssrc = ssrc; config->local_ssrc = prng_.Rand(); @@ -664,14 +663,14 @@ EventGenerator::NewAudioReceiveStreamConfig( } } - return absl::make_unique(std::move(config)); + return std::make_unique(std::move(config)); } std::unique_ptr EventGenerator::NewAudioSendStreamConfig( uint32_t ssrc, const RtpHeaderExtensionMap& extensions) { - auto config = absl::make_unique(); + auto config = std::make_unique(); // Add SSRC to the stream. config->local_ssrc = ssrc; // Add header extensions. @@ -681,14 +680,14 @@ EventGenerator::NewAudioSendStreamConfig( config->rtp_extensions.emplace_back(kExtensions[i].name, id); } } - return absl::make_unique(std::move(config)); + return std::make_unique(std::move(config)); } std::unique_ptr EventGenerator::NewVideoReceiveStreamConfig( uint32_t ssrc, const RtpHeaderExtensionMap& extensions) { - auto config = absl::make_unique(); + auto config = std::make_unique(); // Add SSRCs for the stream. config->remote_ssrc = ssrc; @@ -707,14 +706,14 @@ EventGenerator::NewVideoReceiveStreamConfig( config->rtp_extensions.emplace_back(kExtensions[i].name, id); } } - return absl::make_unique(std::move(config)); + return std::make_unique(std::move(config)); } std::unique_ptr EventGenerator::NewVideoSendStreamConfig( uint32_t ssrc, const RtpHeaderExtensionMap& extensions) { - auto config = absl::make_unique(); + auto config = std::make_unique(); config->codecs.emplace_back(prng_.Rand() ? "VP8" : "H264", prng_.Rand(127), prng_.Rand(127)); @@ -727,7 +726,7 @@ EventGenerator::NewVideoSendStreamConfig( config->rtp_extensions.emplace_back(kExtensions[i].name, id); } } - return absl::make_unique(std::move(config)); + return std::make_unique(std::move(config)); } void EventVerifier::VerifyLoggedAlrStateEvent( diff --git a/logging/rtc_event_log/rtc_event_processor.h b/logging/rtc_event_log/rtc_event_processor.h index 9441681cdc..abb73701db 100644 --- a/logging/rtc_event_log/rtc_event_processor.h +++ b/logging/rtc_event_log/rtc_event_processor.h @@ -18,7 +18,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/function_view.h" #include "rtc_base/checks.h" @@ -109,7 +108,7 @@ class RtcEventProcessor { if (iterable.begin() == iterable.end()) return; event_lists_.push_back( - absl::make_unique>( iterable.begin(), iterable.end(), handler, insertion_order_index_++)); diff --git a/media/BUILD.gn b/media/BUILD.gn index 8de518ddf4..1a25a84b22 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -234,7 +234,6 @@ rtc_static_library("rtc_internal_video_codecs") { "../rtc_base:rtc_base_approved", "../rtc_base/system:rtc_export", "../test:fake_video_codecs", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", ] sources = [ @@ -308,7 +307,6 @@ rtc_static_library("rtc_audio_video") { "../system_wrappers:field_trial", "../system_wrappers:metrics", "//third_party/abseil-cpp/absl/algorithm:container", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -461,7 +459,6 @@ if (rtc_include_tests) { "../test:test_support", "//testing/gtest", "//third_party/abseil-cpp/absl/algorithm:container", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", ] sources = [ diff --git a/media/base/fake_media_engine.cc b/media/base/fake_media_engine.cc index ed1c756fb4..86f6fd9371 100644 --- a/media/base/fake_media_engine.cc +++ b/media/base/fake_media_engine.cc @@ -10,10 +10,10 @@ #include "media/base/fake_media_engine.h" +#include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "rtc_base/checks.h" @@ -228,7 +228,7 @@ bool FakeVoiceMediaChannel::SetLocalSource(uint32_t ssrc, AudioSource* source) { RTC_CHECK(it->second->source() == source); } else { local_sinks_.insert(std::make_pair( - ssrc, absl::make_unique(source))); + ssrc, std::make_unique(source))); } } else { if (it != local_sinks_.end()) { @@ -595,8 +595,8 @@ bool FakeVideoEngine::SetCapture(bool capture) { } FakeMediaEngine::FakeMediaEngine() - : CompositeMediaEngine(absl::make_unique(), - absl::make_unique()), + : CompositeMediaEngine(std::make_unique(), + std::make_unique()), voice_(static_cast(&voice())), video_(static_cast(&video())) {} FakeMediaEngine::~FakeMediaEngine() {} diff --git a/media/base/video_adapter_unittest.cc b/media/base/video_adapter_unittest.cc index 1f17c88610..2bfe8037a3 100644 --- a/media/base/video_adapter_unittest.cc +++ b/media/base/video_adapter_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/video/video_frame.h" #include "media/base/fake_frame_source.h" #include "rtc_base/time_utils.h" @@ -31,12 +30,12 @@ class VideoAdapterTest : public ::testing::Test, public ::testing::WithParamInterface { public: VideoAdapterTest() - : frame_source_(absl::make_unique( + : frame_source_(std::make_unique( kWidth, kHeight, VideoFormat::FpsToInterval(kDefaultFps) / rtc::kNumNanosecsPerMicrosec)), - adapter_wrapper_(absl::make_unique(&adapter_)), + adapter_wrapper_(std::make_unique(&adapter_)), use_new_format_request_(GetParam()) {} protected: diff --git a/media/engine/fake_video_codec_factory.cc b/media/engine/fake_video_codec_factory.cc index d7b644612d..ba7513be24 100644 --- a/media/engine/fake_video_codec_factory.cc +++ b/media/engine/fake_video_codec_factory.cc @@ -10,7 +10,8 @@ #include "media/engine/fake_video_codec_factory.h" -#include "absl/memory/memory.h" +#include + #include "api/video_codecs/sdp_video_format.h" #include "api/video_codecs/video_decoder.h" #include "api/video_codecs/video_encoder.h" @@ -34,7 +35,7 @@ FakeVideoEncoderFactory::FakeVideoEncoderFactory() = default; // static std::unique_ptr FakeVideoEncoderFactory::CreateVideoEncoder() { - return absl::make_unique(Clock::GetRealTimeClock()); + return std::make_unique(Clock::GetRealTimeClock()); } std::vector FakeVideoEncoderFactory::GetSupportedFormats() @@ -50,14 +51,14 @@ VideoEncoderFactory::CodecInfo FakeVideoEncoderFactory::QueryVideoEncoder( std::unique_ptr FakeVideoEncoderFactory::CreateVideoEncoder( const SdpVideoFormat& format) { - return absl::make_unique(Clock::GetRealTimeClock()); + return std::make_unique(Clock::GetRealTimeClock()); } FakeVideoDecoderFactory::FakeVideoDecoderFactory() = default; // static std::unique_ptr FakeVideoDecoderFactory::CreateVideoDecoder() { - return absl::make_unique(); + return std::make_unique(); } std::vector FakeVideoDecoderFactory::GetSupportedFormats() @@ -68,7 +69,7 @@ std::vector FakeVideoDecoderFactory::GetSupportedFormats() std::unique_ptr FakeVideoDecoderFactory::CreateVideoDecoder( const SdpVideoFormat& format) { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/media/engine/fake_webrtc_video_engine.cc b/media/engine/fake_webrtc_video_engine.cc index 3a04c7f5bc..0ee2bcc54f 100644 --- a/media/engine/fake_webrtc_video_engine.cc +++ b/media/engine/fake_webrtc_video_engine.cc @@ -11,8 +11,8 @@ #include "media/engine/fake_webrtc_video_engine.h" #include +#include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "media/base/codec.h" #include "media/base/media_constants.h" @@ -98,7 +98,7 @@ FakeWebRtcVideoDecoderFactory::CreateVideoDecoder( if (IsFormatSupported(supported_codec_formats_, format)) { num_created_decoders_++; std::unique_ptr decoder = - absl::make_unique(this); + std::make_unique(this); decoders_.push_back(decoder.get()); return decoder; } @@ -225,12 +225,11 @@ FakeWebRtcVideoEncoderFactory::CreateVideoEncoder( // encoders. Enter vp8_factory_mode so that we now create these encoders // instead of more adapters. vp8_factory_mode_ = true; - encoder = - absl::make_unique(this, format); + encoder = std::make_unique(this, format); } else { num_created_encoders_++; created_video_encoder_event_.Set(); - encoder = absl::make_unique(this); + encoder = std::make_unique(this); encoders_.push_back(static_cast(encoder.get())); } } diff --git a/media/engine/null_webrtc_video_engine_unittest.cc b/media/engine/null_webrtc_video_engine_unittest.cc index 0d1833f999..584cafe0a6 100644 --- a/media/engine/null_webrtc_video_engine_unittest.cc +++ b/media/engine/null_webrtc_video_engine_unittest.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/task_queue/default_task_queue_factory.h" #include "api/task_queue/task_queue_factory.h" #include "media/engine/webrtc_voice_engine.h" @@ -31,14 +30,14 @@ TEST(NullWebRtcVideoEngineTest, CheckInterface) { std::unique_ptr task_queue_factory = webrtc::CreateDefaultTaskQueueFactory(); ::testing::NiceMock adm; - auto audio_engine = absl::make_unique( + auto audio_engine = std::make_unique( task_queue_factory.get(), &adm, webrtc::MockAudioEncoderFactory::CreateUnusedFactory(), webrtc::MockAudioDecoderFactory::CreateUnusedFactory(), nullptr, webrtc::AudioProcessingBuilder().Create()); CompositeMediaEngine engine(std::move(audio_engine), - absl::make_unique()); + std::make_unique()); EXPECT_TRUE(engine.Init()); } diff --git a/media/engine/simulcast_encoder_adapter_unittest.cc b/media/engine/simulcast_encoder_adapter_unittest.cc index f6d57e8684..60fc814f03 100644 --- a/media/engine/simulcast_encoder_adapter_unittest.cc +++ b/media/engine/simulcast_encoder_adapter_unittest.cc @@ -14,7 +14,6 @@ #include #include -#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" @@ -51,14 +50,14 @@ const VideoEncoder::Settings kSettings(kCapabilities, 1, 1200); std::unique_ptr CreateSpecificSimulcastTestFixture( VideoEncoderFactory* internal_encoder_factory) { std::unique_ptr encoder_factory = - absl::make_unique( + std::make_unique( [internal_encoder_factory]() { - return absl::make_unique( + return std::make_unique( internal_encoder_factory, SdpVideoFormat(cricket::kVp8CodecName)); }); std::unique_ptr decoder_factory = - absl::make_unique( + std::make_unique( []() { return VP8Decoder::Create(); }); return CreateSimulcastTestFixture(std::move(encoder_factory), std::move(decoder_factory), diff --git a/media/engine/webrtc_media_engine.cc b/media/engine/webrtc_media_engine.cc index 3b3875989f..4f274d4d20 100644 --- a/media/engine/webrtc_media_engine.cc +++ b/media/engine/webrtc_media_engine.cc @@ -10,10 +10,10 @@ #include "media/engine/webrtc_media_engine.h" +#include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "media/engine/webrtc_voice_engine.h" #include "system_wrappers/include/field_trial.h" @@ -27,21 +27,21 @@ namespace cricket { std::unique_ptr CreateMediaEngine( MediaEngineDependencies dependencies) { - auto audio_engine = absl::make_unique( + auto audio_engine = std::make_unique( dependencies.task_queue_factory, std::move(dependencies.adm), std::move(dependencies.audio_encoder_factory), std::move(dependencies.audio_decoder_factory), std::move(dependencies.audio_mixer), std::move(dependencies.audio_processing)); #ifdef HAVE_WEBRTC_VIDEO - auto video_engine = absl::make_unique( + auto video_engine = std::make_unique( std::move(dependencies.video_encoder_factory), std::move(dependencies.video_decoder_factory)); #else - auto video_engine = absl::make_unique(); + auto video_engine = std::make_unique(); #endif - return absl::make_unique(std::move(audio_engine), - std::move(video_engine)); + return std::make_unique(std::move(audio_engine), + std::move(video_engine)); } namespace { diff --git a/media/engine/webrtc_video_engine_unittest.cc b/media/engine/webrtc_video_engine_unittest.cc index aac6631473..98a0d9dd57 100644 --- a/media/engine/webrtc_video_engine_unittest.cc +++ b/media/engine/webrtc_video_engine_unittest.cc @@ -231,7 +231,7 @@ class WebRtcVideoEngineTest : public ::testing::Test { : override_field_trials_( field_trials.empty() ? nullptr - : absl::make_unique( + : std::make_unique( field_trials)), task_queue_factory_(webrtc::CreateDefaultTaskQueueFactory()), call_(webrtc::Call::Create([&] { @@ -891,7 +891,7 @@ TEST_F(WebRtcVideoEngineTest, TEST_F(WebRtcVideoEngineTest, SimulcastEnabledForH264BehindFieldTrial) { RTC_DCHECK(!override_field_trials_); - override_field_trials_ = absl::make_unique( + override_field_trials_ = std::make_unique( "WebRTC-H264Simulcast/Enabled/"); encoder_factory_->AddSupportedVideoCodecType("H264"); @@ -937,7 +937,7 @@ TEST_F(WebRtcVideoEngineTest, // FlexFEC is active with field trial. RTC_DCHECK(!override_field_trials_); - override_field_trials_ = absl::make_unique( + override_field_trials_ = std::make_unique( "WebRTC-FlexFEC-03-Advertised/Enabled/"); EXPECT_THAT(engine_.codecs(), Contains(flexfec)); } @@ -1083,7 +1083,7 @@ TEST(WebRtcVideoEngineNewVideoCodecFactoryTest, Vp8) { new webrtc::MockVideoDecoderFactory(); std::unique_ptr rate_allocator_factory = - absl::make_unique(); + std::make_unique(); EXPECT_CALL(*rate_allocator_factory, CreateVideoBitrateAllocatorProxy(Field( &webrtc::VideoCodec::codecType, webrtc::kVideoCodecVP8))) @@ -1205,7 +1205,7 @@ TEST(WebRtcVideoEngineNewVideoCodecFactoryTest, NullDecoder) { new webrtc::MockVideoDecoderFactory(); std::unique_ptr rate_allocator_factory = - absl::make_unique(); + std::make_unique(); WebRtcVideoEngine engine( (std::unique_ptr(encoder_factory)), (std::unique_ptr(decoder_factory))); @@ -1334,8 +1334,8 @@ class WebRtcVideoChannelBaseTest : public ::testing::Test { parameters.codecs = engine_.codecs(); channel_->SetRecvParameters(parameters); EXPECT_TRUE(channel_->AddSendStream(DefaultSendStreamParams())); - frame_forwarder_ = absl::make_unique(); - frame_source_ = absl::make_unique( + frame_forwarder_ = std::make_unique(); + frame_source_ = std::make_unique( 640, 480, rtc::kNumMicrosecsPerSec / kFramerate); EXPECT_TRUE(channel_->SetVideoSend(kSsrc, nullptr, frame_forwarder_.get())); } @@ -1364,7 +1364,7 @@ class WebRtcVideoChannelBaseTest : public ::testing::Test { // We dont add recv for the second stream. // Setup the receive and renderer for second stream after send. - frame_forwarder_2_ = absl::make_unique(); + frame_forwarder_2_ = std::make_unique(); EXPECT_TRUE( channel_->SetVideoSend(kSsrc + 2, nullptr, frame_forwarder_2_.get())); } @@ -1372,7 +1372,7 @@ class WebRtcVideoChannelBaseTest : public ::testing::Test { bool SetDefaultCodec() { return SetOneCodec(DefaultCodec()); } bool SetOneCodec(const cricket::VideoCodec& codec) { - frame_source_ = absl::make_unique( + frame_source_ = std::make_unique( kVideoWidth, kVideoHeight, rtc::kNumMicrosecsPerSec / kFramerate); bool sending = channel_->sending(); @@ -2875,7 +2875,7 @@ TEST_F(WebRtcVideoChannelTest, LossNotificationIsDisabledByDefault) { TEST_F(WebRtcVideoChannelTest, LossNotificationIsEnabledByFieldTrial) { RTC_DCHECK(!override_field_trials_); - override_field_trials_ = absl::make_unique( + override_field_trials_ = std::make_unique( "WebRTC-RtcpLossNotification/Enabled/"); SetUp(); TestLossNotificationState(true); @@ -2883,7 +2883,7 @@ TEST_F(WebRtcVideoChannelTest, LossNotificationIsEnabledByFieldTrial) { TEST_F(WebRtcVideoChannelTest, LossNotificationCanBeEnabledAndDisabled) { RTC_DCHECK(!override_field_trials_); - override_field_trials_ = absl::make_unique( + override_field_trials_ = std::make_unique( "WebRTC-RtcpLossNotification/Enabled/"); SetUp(); @@ -3494,7 +3494,7 @@ TEST_F(WebRtcVideoChannelTest, VerifyMinBitrate) { TEST_F(WebRtcVideoChannelTest, VerifyMinBitrateWithForcedFallbackFieldTrial) { RTC_DCHECK(!override_field_trials_); - override_field_trials_ = absl::make_unique( + override_field_trials_ = std::make_unique( "WebRTC-VP8-Forced-Fallback-Encoder-v2/Enabled-1,2,34567/"); std::vector streams = AddSendStream()->GetVideoStreams(); ASSERT_EQ(1u, streams.size()); @@ -3504,7 +3504,7 @@ TEST_F(WebRtcVideoChannelTest, VerifyMinBitrateWithForcedFallbackFieldTrial) { TEST_F(WebRtcVideoChannelTest, BalancedDegradationPreferenceNotSupportedWithoutFieldtrial) { RTC_DCHECK(!override_field_trials_); - override_field_trials_ = absl::make_unique( + override_field_trials_ = std::make_unique( "WebRTC-Video-BalancedDegradation/Disabled/"); const bool kResolutionScalingEnabled = true; const bool kFpsScalingEnabled = false; @@ -3514,7 +3514,7 @@ TEST_F(WebRtcVideoChannelTest, TEST_F(WebRtcVideoChannelTest, BalancedDegradationPreferenceSupportedBehindFieldtrial) { RTC_DCHECK(!override_field_trials_); - override_field_trials_ = absl::make_unique( + override_field_trials_ = std::make_unique( "WebRTC-Video-BalancedDegradation/Enabled/"); const bool kResolutionScalingEnabled = true; const bool kFpsScalingEnabled = true; @@ -7489,7 +7489,7 @@ class WebRtcVideoChannelSimulcastTest : public ::testing::Test { encoder_factory_(new cricket::FakeWebRtcVideoEncoderFactory), decoder_factory_(new cricket::FakeWebRtcVideoDecoderFactory), mock_rate_allocator_factory_( - absl::make_unique()), + std::make_unique()), engine_(std::unique_ptr( encoder_factory_), std::unique_ptr( diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn index cb577100e5..8c5fb00760 100644 --- a/modules/audio_coding/BUILD.gn +++ b/modules/audio_coding/BUILD.gn @@ -103,7 +103,6 @@ rtc_static_library("audio_encoder_cng") { "../../api/audio_codecs:audio_codecs_api", "../../common_audio", "../../rtc_base:checks", - "//third_party/abseil-cpp/absl/memory", ] } @@ -764,7 +763,6 @@ rtc_static_library("webrtc_opus") { "../../rtc_base:rtc_numerics", "../../rtc_base:safe_minmax", "../../system_wrappers:field_trial", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -916,7 +914,6 @@ rtc_static_library("audio_network_adaptor") { "../../rtc_base/system:file_wrapper", "../../system_wrappers", "../../system_wrappers:field_trial", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] @@ -1024,7 +1021,6 @@ rtc_static_library("neteq") { "../../system_wrappers", "../../system_wrappers:field_trial", "../../system_wrappers:metrics", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -1098,7 +1094,6 @@ rtc_source_set("neteq_test_tools") { "../../test:rtp_test_utils", "../rtp_rtcp", "../rtp_rtcp:rtp_rtcp_format", - "//third_party/abseil-cpp/absl/memory:memory", "//third_party/abseil-cpp/absl/types:optional", ] @@ -1181,7 +1176,6 @@ if (rtc_enable_protobuf) { "../../rtc_base:rtc_base_approved", "../rtp_rtcp", "../rtp_rtcp:rtp_rtcp_format", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] public_deps = [ @@ -1324,7 +1318,6 @@ if (rtc_include_tests) { "../../system_wrappers", "../../test:fileutils", "../../test:test_support", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -1475,7 +1468,6 @@ if (rtc_include_tests) { "../../rtc_base:rtc_base_approved", "../../test:audio_codec_mocks", "../../test:test_support", - "//third_party/abseil-cpp/absl/memory", ] } @@ -1599,9 +1591,9 @@ if (rtc_include_tests) { testonly = true deps = audio_coding_deps + [ + "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/flags:flag", "//third_party/abseil-cpp/absl/flags:parse", - "//third_party/abseil-cpp/absl/memory", ":audio_coding", ":audio_encoder_cng", ":neteq_input_audio_tools", diff --git a/modules/audio_coding/acm2/audio_coding_module_unittest.cc b/modules/audio_coding/acm2/audio_coding_module_unittest.cc index 6b75c351d5..5b6808534d 100644 --- a/modules/audio_coding/acm2/audio_coding_module_unittest.cc +++ b/modules/audio_coding/acm2/audio_coding_module_unittest.cc @@ -17,7 +17,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/audio_codecs/audio_encoder.h" #include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h" @@ -1663,7 +1662,7 @@ TEST_F(AcmSenderBitExactnessOldApi, External_Pcmu_20ms) { config.num_channels = 1; config.payload_type = 0; AudioEncoderPcmU encoder(config); - auto mock_encoder = absl::make_unique(); + auto mock_encoder = std::make_unique(); // Set expectations on the mock encoder and also delegate the calls to the // real encoder. EXPECT_CALL(*mock_encoder, SampleRateHz()) diff --git a/modules/audio_coding/audio_network_adaptor/event_log_writer.cc b/modules/audio_coding/audio_network_adaptor/event_log_writer.cc index d6893cd0e3..0a79484a16 100644 --- a/modules/audio_coding/audio_network_adaptor/event_log_writer.cc +++ b/modules/audio_coding/audio_network_adaptor/event_log_writer.cc @@ -14,9 +14,9 @@ #include #include +#include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/rtc_event_log/rtc_event.h" #include "api/rtc_event_log/rtc_event_log.h" @@ -69,9 +69,9 @@ void EventLogWriter::MaybeLogEncoderConfig( } void EventLogWriter::LogEncoderConfig(const AudioEncoderRuntimeConfig& config) { - auto config_copy = absl::make_unique(config); - event_log_->Log(absl::make_unique( - std::move(config_copy))); + auto config_copy = std::make_unique(config); + event_log_->Log( + std::make_unique(std::move(config_copy))); last_logged_config_ = config; } diff --git a/modules/audio_coding/codecs/cng/audio_encoder_cng.cc b/modules/audio_coding/codecs/cng/audio_encoder_cng.cc index 9a2926143d..a4e0ffb2fd 100644 --- a/modules/audio_coding/codecs/cng/audio_encoder_cng.cc +++ b/modules/audio_coding/codecs/cng/audio_encoder_cng.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "modules/audio_coding/codecs/cng/webrtc_cng.h" #include "rtc_base/checks.h" @@ -317,7 +316,7 @@ bool AudioEncoderCngConfig::IsOk() const { std::unique_ptr CreateComfortNoiseEncoder( AudioEncoderCngConfig&& config) { - return absl::make_unique(std::move(config)); + return std::make_unique(std::move(config)); } } // namespace webrtc diff --git a/modules/audio_coding/codecs/opus/audio_encoder_multi_channel_opus_impl.cc b/modules/audio_coding/codecs/opus/audio_encoder_multi_channel_opus_impl.cc index 84a62a10b3..0614a0b48d 100644 --- a/modules/audio_coding/codecs/opus/audio_encoder_multi_channel_opus_impl.cc +++ b/modules/audio_coding/codecs/opus/audio_encoder_multi_channel_opus_impl.cc @@ -24,7 +24,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "modules/audio_coding/codecs/opus/audio_coder_opus_common.h" #include "rtc_base/arraysize.h" @@ -134,8 +133,8 @@ AudioEncoderMultiChannelOpusImpl::MakeAudioEncoder( if (!config.IsOk()) { return nullptr; } - return absl::make_unique(config, - payload_type); + return std::make_unique(config, + payload_type); } AudioEncoderMultiChannelOpusImpl::AudioEncoderMultiChannelOpusImpl( diff --git a/modules/audio_coding/codecs/opus/audio_encoder_opus.cc b/modules/audio_coding/codecs/opus/audio_encoder_opus.cc index f901d3ca11..70081d7e19 100644 --- a/modules/audio_coding/codecs/opus/audio_encoder_opus.cc +++ b/modules/audio_coding/codecs/opus/audio_encoder_opus.cc @@ -12,10 +12,10 @@ #include #include +#include #include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h" #include "modules/audio_coding/audio_network_adaptor/controller_manager.h" @@ -244,15 +244,13 @@ GetNewPacketLossRateOptimizer() { if (sscanf(field_trial_string.c_str(), "Enabled-%d-%d-%f", &min_rate, &max_rate, &slope) == 3 && IsValidPacketLossRate(min_rate) && IsValidPacketLossRate(max_rate)) { - return absl::make_unique< - AudioEncoderOpusImpl::NewPacketLossRateOptimizer>( + return std::make_unique( ToFraction(min_rate), ToFraction(max_rate), slope); } RTC_LOG(LS_WARNING) << "Invalid parameters for " << kPacketLossOptimizationName << ", using default values."; - return absl::make_unique< - AudioEncoderOpusImpl::NewPacketLossRateOptimizer>(); + return std::make_unique(); } return nullptr; } @@ -300,7 +298,7 @@ std::unique_ptr AudioEncoderOpusImpl::MakeAudioEncoder( const AudioEncoderOpusConfig& config, int payload_type) { RTC_DCHECK(config.IsOk()); - return absl::make_unique(config, payload_type); + return std::make_unique(config, payload_type); } absl::optional AudioEncoderOpusImpl::SdpToConfig( @@ -417,7 +415,7 @@ AudioEncoderOpusImpl::AudioEncoderOpusImpl(const AudioEncoderOpusConfig& config, return DefaultAudioNetworkAdaptorCreator(config_string, event_log); }, // We choose 5sec as initial time constant due to empirical data. - absl::make_unique(5000)) {} + std::make_unique(5000)) {} AudioEncoderOpusImpl::AudioEncoderOpusImpl( const AudioEncoderOpusConfig& config, diff --git a/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc b/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc index 3870ecd071..698b4413b2 100644 --- a/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc +++ b/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "common_audio/mocks/mock_smoothing_filter.h" #include "modules/audio_coding/audio_network_adaptor/mock/mock_audio_network_adaptor.h" #include "modules/audio_coding/codecs/opus/audio_encoder_opus.h" @@ -55,7 +54,7 @@ struct AudioEncoderOpusStates { std::unique_ptr CreateCodec(int sample_rate_hz, size_t num_channels) { std::unique_ptr states = - absl::make_unique(); + std::make_unique(); states->mock_audio_network_adaptor = nullptr; states->fake_clock.reset(new rtc::ScopedFakeClock()); states->fake_clock->SetTime(Timestamp::us(kInitialTimeUs)); diff --git a/modules/audio_coding/neteq/delay_manager.cc b/modules/audio_coding/neteq/delay_manager.cc index afa2a3fa94..3fda0385cd 100644 --- a/modules/audio_coding/neteq/delay_manager.cc +++ b/modules/audio_coding/neteq/delay_manager.cc @@ -15,10 +15,10 @@ #include #include +#include #include #include -#include "absl/memory/memory.h" #include "modules/audio_coding/neteq/delay_peak_detector.h" #include "modules/audio_coding/neteq/histogram.h" #include "modules/audio_coding/neteq/statistics_calculator.h" @@ -149,9 +149,9 @@ std::unique_ptr DelayManager::Create( const HistogramMode mode = RELATIVE_ARRIVAL_DELAY; DelayHistogramConfig config = GetDelayHistogramConfig(); const int quantile = config.quantile; - std::unique_ptr histogram = absl::make_unique( + std::unique_ptr histogram = std::make_unique( kDelayBuckets, config.forget_factor, config.start_forget_weight); - return absl::make_unique( + return std::make_unique( max_packets_in_buffer, base_minimum_delay_ms, quantile, mode, enable_rtx_handling, peak_detector, tick_timer, statistics, std::move(histogram)); diff --git a/modules/audio_coding/neteq/delay_manager_unittest.cc b/modules/audio_coding/neteq/delay_manager_unittest.cc index 6979789f27..c691fd5bc9 100644 --- a/modules/audio_coding/neteq/delay_manager_unittest.cc +++ b/modules/audio_coding/neteq/delay_manager_unittest.cc @@ -14,7 +14,8 @@ #include -#include "absl/memory/memory.h" +#include + #include "modules/audio_coding/neteq/histogram.h" #include "modules/audio_coding/neteq/mock/mock_delay_peak_detector.h" #include "modules/audio_coding/neteq/mock/mock_histogram.h" @@ -80,7 +81,7 @@ void DelayManagerTest::RecreateDelayManager() { if (use_mock_histogram_) { mock_histogram_ = new MockHistogram(kMaxIat, kForgetFactor); std::unique_ptr histogram(mock_histogram_); - dm_ = absl::make_unique( + dm_ = std::make_unique( kMaxNumberOfPackets, kMinDelayMs, kDefaultHistogramQuantile, histogram_mode_, enable_rtx_handling_, &detector_, &tick_timer_, &stats_, std::move(histogram)); diff --git a/modules/audio_coding/neteq/neteq_decoder_plc_unittest.cc b/modules/audio_coding/neteq/neteq_decoder_plc_unittest.cc index 21b15a9003..49eb1ccb3d 100644 --- a/modules/audio_coding/neteq/neteq_decoder_plc_unittest.cc +++ b/modules/audio_coding/neteq/neteq_decoder_plc_unittest.cc @@ -11,10 +11,10 @@ // Test to verify correct operation when using the decoder-internal PLC. #include +#include #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h" #include "modules/audio_coding/neteq/tools/audio_checksum.h" @@ -156,31 +156,31 @@ NetEqNetworkStatistics RunTest(int loss_cadence, std::string* checksum) { // The input is mostly useless. It sends zero-samples to a PCM16b encoder, // but the actual encoded samples will never be used by the decoder in the // test. See below about the decoder. - auto generator = absl::make_unique(); + auto generator = std::make_unique(); constexpr int kSampleRateHz = 32000; constexpr int kPayloadType = 100; AudioEncoderPcm16B::Config encoder_config; encoder_config.sample_rate_hz = kSampleRateHz; encoder_config.payload_type = kPayloadType; - auto encoder = absl::make_unique(encoder_config); + auto encoder = std::make_unique(encoder_config); constexpr int kRunTimeMs = 10000; - auto input = absl::make_unique( + auto input = std::make_unique( std::move(generator), std::move(encoder), kRunTimeMs); // Wrap the input in a loss function. auto lossy_input = - absl::make_unique(loss_cadence, std::move(input)); + std::make_unique(loss_cadence, std::move(input)); // Settinng up decoders. NetEqTest::DecoderMap decoders; // Using a fake decoder which simply reads the output audio from a file. - auto input_file = absl::make_unique( + auto input_file = std::make_unique( webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm")); AudioDecoderPlc dec(std::move(input_file), kSampleRateHz); // Masquerading as a PCM16b decoder. decoders.emplace(kPayloadType, SdpAudioFormat("l16", 32000, 1)); // Output is simply a checksum calculator. - auto output = absl::make_unique(checksum); + auto output = std::make_unique(checksum); // No callback objects. NetEqTest::Callbacks callbacks; diff --git a/modules/audio_coding/neteq/neteq_impl_unittest.cc b/modules/audio_coding/neteq/neteq_impl_unittest.cc index ded54bf7ee..39c4e521dd 100644 --- a/modules/audio_coding/neteq/neteq_impl_unittest.cc +++ b/modules/audio_coding/neteq/neteq_impl_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "modules/audio_coding/neteq/accelerate.h" #include "modules/audio_coding/neteq/expand.h" @@ -109,7 +108,7 @@ class NetEqImplTest : public ::testing::Test { config_.max_packets_in_buffer, config_.min_delay_ms, 1020054733, DelayManager::HistogramMode::INTER_ARRIVAL_TIME, config_.enable_rtx_handling, delay_peak_detector_, tick_timer_, - deps.stats.get(), absl::make_unique(50, 32745))); + deps.stats.get(), std::make_unique(50, 32745))); mock_delay_manager_ = mock.get(); deps.delay_manager = std::move(mock); } @@ -1567,7 +1566,7 @@ class NetEqImplTest120ms : public NetEqImplTest { new rtc::RefCountedObject( [sampling_freq, speech_type]() { std::unique_ptr decoder = - absl::make_unique(sampling_freq, speech_type); + std::make_unique(sampling_freq, speech_type); RTC_CHECK_EQ(2, decoder->Channels()); return decoder; }); diff --git a/modules/audio_coding/neteq/packet_buffer_unittest.cc b/modules/audio_coding/neteq/packet_buffer_unittest.cc index 688ce8d68d..0b638bfbe9 100644 --- a/modules/audio_coding/neteq/packet_buffer_unittest.cc +++ b/modules/audio_coding/neteq/packet_buffer_unittest.cc @@ -12,7 +12,8 @@ #include "modules/audio_coding/neteq/packet_buffer.h" -#include "absl/memory/memory.h" +#include + #include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "modules/audio_coding/neteq/mock/mock_decoder_database.h" #include "modules/audio_coding/neteq/mock/mock_statistics_calculator.h" @@ -704,7 +705,7 @@ TEST(PacketBuffer, GetSpanSamples) { Packet packet_1 = gen.NextPacket(kPayloadSizeBytes, nullptr); std::unique_ptr mock_audio_frame = - absl::make_unique(); + std::make_unique(); EXPECT_CALL(*mock_audio_frame, Duration()) .WillRepeatedly(Return(kFrameSizeSamples)); Packet packet_2 = diff --git a/modules/audio_coding/neteq/tools/neteq_test_factory.cc b/modules/audio_coding/neteq/tools/neteq_test_factory.cc index 8147142bc4..3c3add48c9 100644 --- a/modules/audio_coding/neteq/tools/neteq_test_factory.cc +++ b/modules/audio_coding/neteq/tools/neteq_test_factory.cc @@ -22,7 +22,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "modules/audio_coding/neteq/include/neteq.h" #include "modules/audio_coding/neteq/tools/audio_sink.h" @@ -194,19 +193,19 @@ std::unique_ptr NetEqTestFactory::InitializeTest( // If an output file is requested, open it. std::unique_ptr output; if (!config.output_audio_filename.has_value()) { - output = absl::make_unique(); + output = std::make_unique(); std::cout << "No output audio file" << std::endl; } else if (config.output_audio_filename->size() >= 4 && config.output_audio_filename->substr( config.output_audio_filename->size() - 4) == ".wav") { // Open a wav file with the known sample rate. - output = absl::make_unique(*config.output_audio_filename, - *sample_rate_hz); + output = std::make_unique(*config.output_audio_filename, + *sample_rate_hz); std::cout << "Output WAV file: " << *config.output_audio_filename << std::endl; } else { // Open a pcm file. - output = absl::make_unique(*config.output_audio_filename); + output = std::make_unique(*config.output_audio_filename); std::cout << "Output PCM file: " << *config.output_audio_filename << std::endl; } @@ -254,9 +253,8 @@ std::unique_ptr NetEqTestFactory::InitializeTest( std::unique_ptr decoder = decoder_factory->MakeAudioDecoder(format, codec_pair_id); if (!decoder && format.name == "replacement") { - decoder = absl::make_unique( - absl::make_unique( - config.replacement_audio_file), + decoder = std::make_unique( + std::make_unique(config.replacement_audio_file), format.clockrate_hz, format.num_channels > 1); } return decoder; @@ -274,11 +272,11 @@ std::unique_ptr NetEqTestFactory::InitializeTest( // Create a text log file if needed. std::unique_ptr text_log; if (config.textlog_filename.has_value()) { - text_log = absl::make_unique(*config.textlog_filename); + text_log = std::make_unique(*config.textlog_filename); } NetEqTest::Callbacks callbacks; - stats_plotter_ = absl::make_unique( + stats_plotter_ = std::make_unique( config.matlabplot, config.pythonplot, config.concealment_events, config.plot_scripts_basename.value_or("")); @@ -291,9 +289,9 @@ std::unique_ptr NetEqTestFactory::InitializeTest( neteq_config.sample_rate_hz = *sample_rate_hz; neteq_config.max_packets_in_buffer = config.max_nr_packets_in_buffer; neteq_config.enable_fast_accelerate = config.enable_fast_accelerate; - return absl::make_unique(neteq_config, decoder_factory, codecs, - std::move(text_log), std::move(input), - std::move(output), callbacks); + return std::make_unique(neteq_config, decoder_factory, codecs, + std::move(text_log), std::move(input), + std::move(output), callbacks); } } // namespace test diff --git a/modules/audio_coding/neteq/tools/rtc_event_log_source.cc b/modules/audio_coding/neteq/tools/rtc_event_log_source.cc index f864aa12cf..30f4f95bd2 100644 --- a/modules/audio_coding/neteq/tools/rtc_event_log_source.cc +++ b/modules/audio_coding/neteq/tools/rtc_event_log_source.cc @@ -14,10 +14,10 @@ #include #include +#include #include #include -#include "absl/memory/memory.h" #include "logging/rtc_event_log/rtc_event_processor.h" #include "modules/audio_coding/neteq/tools/packet.h" #include "rtc_base/checks.h" @@ -96,7 +96,7 @@ bool RtcEventLogSource::Initialize(const ParsedRtcEventLog& parsed_log, &packet_ssrcs](const webrtc::LoggedRtpPacketIncoming& incoming) { if (!filter_.test(incoming.rtp.header.payloadType) && incoming.log_time_us() < first_log_end_time_us) { - rtp_packets_.emplace_back(absl::make_unique( + rtp_packets_.emplace_back(std::make_unique( incoming.rtp.header, incoming.rtp.total_length, incoming.rtp.total_length - incoming.rtp.header_length, static_cast(incoming.log_time_ms()))); diff --git a/modules/audio_coding/neteq/tools/rtp_file_source.cc b/modules/audio_coding/neteq/tools/rtp_file_source.cc index 410af27809..f578065578 100644 --- a/modules/audio_coding/neteq/tools/rtp_file_source.cc +++ b/modules/audio_coding/neteq/tools/rtp_file_source.cc @@ -18,7 +18,6 @@ #include -#include "absl/memory/memory.h" #include "modules/audio_coding/neteq/tools/packet.h" #include "rtc_base/checks.h" #include "test/rtp_file_reader.h" @@ -66,7 +65,7 @@ std::unique_ptr RtpFileSource::NextPacket() { std::unique_ptr packet_memory(new uint8_t[temp_packet.length]); memcpy(packet_memory.get(), temp_packet.data, temp_packet.length); RtpUtility::RtpHeaderParser parser(packet_memory.get(), temp_packet.length); - auto packet = absl::make_unique( + auto packet = std::make_unique( packet_memory.release(), temp_packet.length, temp_packet.original_length, temp_packet.time_ms, parser, &rtp_header_extension_map_); diff --git a/modules/audio_coding/test/TestRedFec.cc b/modules/audio_coding/test/TestRedFec.cc index 5155958a29..d2c8d8a132 100644 --- a/modules/audio_coding/test/TestRedFec.cc +++ b/modules/audio_coding/test/TestRedFec.cc @@ -10,9 +10,9 @@ #include "modules/audio_coding/test/TestRedFec.h" +#include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "api/audio_codecs/L16/audio_decoder_L16.h" #include "api/audio_codecs/L16/audio_encoder_L16.h" @@ -190,7 +190,7 @@ void TestRedFec::RegisterSendCodec( AudioEncoderCopyRed::Config config; config.payload_type = red_payload_type; config.speech_encoder = std::move(encoder); - encoder = absl::make_unique(std::move(config)); + encoder = std::make_unique(std::move(config)); receive_codecs.emplace( std::make_pair(red_payload_type, SdpAudioFormat("red", codec_format.clockrate_hz, 1))); diff --git a/modules/audio_device/BUILD.gn b/modules/audio_device/BUILD.gn index 64a9ddcb70..b32014859f 100644 --- a/modules/audio_device/BUILD.gn +++ b/modules/audio_device/BUILD.gn @@ -148,7 +148,6 @@ rtc_source_set("audio_device_module_from_input_and_output") { "../../api/task_queue", "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -181,7 +180,6 @@ rtc_source_set("audio_device_impl") { "../../system_wrappers:field_trial", "../../system_wrappers:metrics", "../utility", - "//third_party/abseil-cpp/absl/memory", ] if (rtc_include_internal_audio_device && is_ios) { deps += [ "../../sdk:audio_device" ] @@ -393,7 +391,6 @@ if (rtc_include_tests) { ] if (is_linux || is_mac || is_win) { sources += [ "audio_device_unittest.cc" ] - deps += [ "//third_party/abseil-cpp/absl/memory" ] } if (is_win) { sources += [ "win/core_audio_utility_win_unittest.cc" ] diff --git a/modules/audio_device/android/aaudio_player.cc b/modules/audio_device/android/aaudio_player.cc index 7e3721fa3f..def0322dfd 100644 --- a/modules/audio_device/android/aaudio_player.cc +++ b/modules/audio_device/android/aaudio_player.cc @@ -10,7 +10,8 @@ #include "modules/audio_device/android/aaudio_player.h" -#include "absl/memory/memory.h" +#include + #include "api/array_view.h" #include "modules/audio_device/android/audio_manager.h" #include "modules/audio_device/fine_audio_buffer.h" @@ -123,7 +124,7 @@ void AAudioPlayer::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) { // Create a modified audio buffer class which allows us to ask for any number // of samples (and not only multiple of 10ms) to match the optimal buffer // size per callback used by AAudio. - fine_audio_buffer_ = absl::make_unique(audio_device_buffer_); + fine_audio_buffer_ = std::make_unique(audio_device_buffer_); } int AAudioPlayer::SpeakerVolumeIsAvailable(bool& available) { diff --git a/modules/audio_device/android/aaudio_recorder.cc b/modules/audio_device/android/aaudio_recorder.cc index 2aca3fefd1..3c5dae9e57 100644 --- a/modules/audio_device/android/aaudio_recorder.cc +++ b/modules/audio_device/android/aaudio_recorder.cc @@ -10,7 +10,8 @@ #include "modules/audio_device/android/aaudio_recorder.h" -#include "absl/memory/memory.h" +#include + #include "api/array_view.h" #include "modules/audio_device/android/audio_manager.h" #include "modules/audio_device/fine_audio_buffer.h" @@ -110,7 +111,7 @@ void AAudioRecorder::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) { // Create a modified audio buffer class which allows us to deliver any number // of samples (and not only multiples of 10ms which WebRTC uses) to match the // native AAudio buffer size. - fine_audio_buffer_ = absl::make_unique(audio_device_buffer_); + fine_audio_buffer_ = std::make_unique(audio_device_buffer_); } int AAudioRecorder::EnableBuiltInAEC(bool enable) { diff --git a/modules/audio_device/android/opensles_player.cc b/modules/audio_device/android/opensles_player.cc index 61365703b2..b5851f7582 100644 --- a/modules/audio_device/android/opensles_player.cc +++ b/modules/audio_device/android/opensles_player.cc @@ -12,7 +12,8 @@ #include -#include "absl/memory/memory.h" +#include + #include "api/array_view.h" #include "modules/audio_device/android/audio_common.h" #include "modules/audio_device/android/audio_manager.h" @@ -216,7 +217,7 @@ void OpenSLESPlayer::AllocateDataBuffers() { ALOGD("native buffer size: %" RTC_PRIuS, buffer_size_in_samples); ALOGD("native buffer size in ms: %.2f", audio_parameters_.GetBufferSizeInMilliseconds()); - fine_audio_buffer_ = absl::make_unique(audio_device_buffer_); + fine_audio_buffer_ = std::make_unique(audio_device_buffer_); // Allocated memory for audio buffers. for (int i = 0; i < kNumOfOpenSLESBuffers; ++i) { audio_buffers_[i].reset(new SLint16[buffer_size_in_samples]); diff --git a/modules/audio_device/android/opensles_recorder.cc b/modules/audio_device/android/opensles_recorder.cc index 05b5581912..8becd202cc 100644 --- a/modules/audio_device/android/opensles_recorder.cc +++ b/modules/audio_device/android/opensles_recorder.cc @@ -12,7 +12,8 @@ #include -#include "absl/memory/memory.h" +#include + #include "api/array_view.h" #include "modules/audio_device/android/audio_common.h" #include "modules/audio_device/android/audio_manager.h" @@ -341,7 +342,7 @@ void OpenSLESRecorder::AllocateDataBuffers() { audio_parameters_.GetBytesPerBuffer()); ALOGD("native sample rate: %d", audio_parameters_.sample_rate()); RTC_DCHECK(audio_device_buffer_); - fine_audio_buffer_ = absl::make_unique(audio_device_buffer_); + fine_audio_buffer_ = std::make_unique(audio_device_buffer_); // Allocate queue of audio buffers that stores recorded audio samples. const int buffer_size_samples = audio_parameters_.frames_per_buffer() * audio_parameters_.channels(); diff --git a/modules/audio_device/audio_device_unittest.cc b/modules/audio_device/audio_device_unittest.cc index cd6be0ab7f..3e75d7624d 100644 --- a/modules/audio_device/audio_device_unittest.cc +++ b/modules/audio_device/audio_device_unittest.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/array_view.h" #include "api/scoped_refptr.h" @@ -595,7 +594,7 @@ class MAYBE_AudioDeviceTest // We must initialize the COM library on a thread before we calling any of // the library functions. All COM functions in the ADM will return // CO_E_NOTINITIALIZED otherwise. - com_initializer_ = absl::make_unique( + com_initializer_ = std::make_unique( webrtc_win::ScopedCOMInitializer::kMTA); EXPECT_TRUE(com_initializer_->Succeeded()); EXPECT_TRUE(webrtc_win::core_audio_utility::IsSupported()); diff --git a/modules/audio_device/include/audio_device_factory.cc b/modules/audio_device/include/audio_device_factory.cc index df5129f3c1..909506b9fc 100644 --- a/modules/audio_device/include/audio_device_factory.cc +++ b/modules/audio_device/include/audio_device_factory.cc @@ -10,6 +10,8 @@ #include "modules/audio_device/include/audio_device_factory.h" +#include + #if defined(WEBRTC_WIN) #include "modules/audio_device/win/audio_device_module_win.h" #include "modules/audio_device/win/core_audio_input_win.h" @@ -17,7 +19,6 @@ #include "modules/audio_device/win/core_audio_utility_win.h" #endif -#include "absl/memory/memory.h" #include "api/task_queue/task_queue_factory.h" #include "rtc_base/logging.h" @@ -44,8 +45,8 @@ CreateWindowsCoreAudioAudioDeviceModuleForTest( return nullptr; } return CreateWindowsCoreAudioAudioDeviceModuleFromInputAndOutput( - absl::make_unique(automatic_restart), - absl::make_unique(automatic_restart), + std::make_unique(automatic_restart), + std::make_unique(automatic_restart), task_queue_factory); } diff --git a/modules/audio_device/include/audio_device_factory.h b/modules/audio_device/include/audio_device_factory.h index 4d4cb5eaf8..fb1ac41fad 100644 --- a/modules/audio_device/include/audio_device_factory.h +++ b/modules/audio_device/include/audio_device_factory.h @@ -11,7 +11,8 @@ #ifndef MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_FACTORY_H_ #define MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_FACTORY_H_ -#include "absl/memory/memory.h" +#include + #include "api/task_queue/task_queue_factory.h" #include "modules/audio_device/include/audio_device.h" @@ -29,7 +30,7 @@ namespace webrtc { // rtc::scoped_refptr CreateAudioDevice() { // task_queue_factory_ = CreateDefaultTaskQueueFactory(); // // Tell COM that this thread shall live in the MTA. -// com_initializer_ = absl::make_unique( +// com_initializer_ = std::make_unique( // webrtc_win::ScopedCOMInitializer::kMTA); // if (!com_initializer_->Succeeded()) { // return nullptr; diff --git a/modules/audio_device/include/test_audio_device.cc b/modules/audio_device/include/test_audio_device.cc index fd9bf644dd..4c7e49b554 100644 --- a/modules/audio_device/include/test_audio_device.cc +++ b/modules/audio_device/include/test_audio_device.cc @@ -18,7 +18,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/array_view.h" #include "common_audio/wav_file.h" #include "modules/audio_device/include/audio_device_default.h" @@ -89,7 +88,7 @@ class TestAudioDeviceModuleImpl int32_t Init() override { task_queue_ = - absl::make_unique(task_queue_factory_->CreateTaskQueue( + std::make_unique(task_queue_factory_->CreateTaskQueue( "TestAudioDeviceModuleImpl", TaskQueueFactory::Priority::NORMAL)); RepeatingTaskHandle::Start(task_queue_->Get(), [this]() { @@ -271,7 +270,7 @@ class WavFileReader final : public TestAudioDeviceModule::Capturer { int sampling_frequency_in_hz, int num_channels, bool repeat) - : WavFileReader(absl::make_unique(filename), + : WavFileReader(std::make_unique(filename), sampling_frequency_in_hz, num_channels, repeat) {} @@ -324,9 +323,9 @@ class WavFileWriter final : public TestAudioDeviceModule::Renderer { WavFileWriter(std::string filename, int sampling_frequency_in_hz, int num_channels) - : WavFileWriter(absl::make_unique(filename, - sampling_frequency_in_hz, - num_channels), + : WavFileWriter(std::make_unique(filename, + sampling_frequency_in_hz, + num_channels), sampling_frequency_in_hz, num_channels) {} @@ -456,23 +455,23 @@ std::unique_ptr TestAudioDeviceModule::CreatePulsedNoiseCapturer(int16_t max_amplitude, int sampling_frequency_in_hz, int num_channels) { - return absl::make_unique( + return std::make_unique( max_amplitude, sampling_frequency_in_hz, num_channels); } std::unique_ptr TestAudioDeviceModule::CreateDiscardRenderer(int sampling_frequency_in_hz, int num_channels) { - return absl::make_unique(sampling_frequency_in_hz, - num_channels); + return std::make_unique(sampling_frequency_in_hz, + num_channels); } std::unique_ptr TestAudioDeviceModule::CreateWavFileReader(std::string filename, int sampling_frequency_in_hz, int num_channels) { - return absl::make_unique(filename, sampling_frequency_in_hz, - num_channels, false); + return std::make_unique(filename, sampling_frequency_in_hz, + num_channels, false); } std::unique_ptr @@ -480,23 +479,23 @@ TestAudioDeviceModule::CreateWavFileReader(std::string filename, bool repeat) { WavReader reader(filename); int sampling_frequency_in_hz = reader.sample_rate(); int num_channels = rtc::checked_cast(reader.num_channels()); - return absl::make_unique(filename, sampling_frequency_in_hz, - num_channels, repeat); + return std::make_unique(filename, sampling_frequency_in_hz, + num_channels, repeat); } std::unique_ptr TestAudioDeviceModule::CreateWavFileWriter(std::string filename, int sampling_frequency_in_hz, int num_channels) { - return absl::make_unique(filename, sampling_frequency_in_hz, - num_channels); + return std::make_unique(filename, sampling_frequency_in_hz, + num_channels); } std::unique_ptr TestAudioDeviceModule::CreateBoundedWavFileWriter(std::string filename, int sampling_frequency_in_hz, int num_channels) { - return absl::make_unique( + return std::make_unique( filename, sampling_frequency_in_hz, num_channels); } diff --git a/modules/audio_device/mac/audio_device_mac.cc b/modules/audio_device/mac/audio_device_mac.cc index 6b4ba9247d..345935f5d3 100644 --- a/modules/audio_device/mac/audio_device_mac.cc +++ b/modules/audio_device/mac/audio_device_mac.cc @@ -15,7 +15,8 @@ #include // mach_task_self() #include // sysctlbyname() -#include "absl/memory/memory.h" +#include + #include "modules/audio_device/audio_device_config.h" #include "modules/third_party/portaudio/pa_ringbuffer.h" #include "rtc_base/arraysize.h" @@ -1557,7 +1558,7 @@ int32_t AudioDeviceMac::GetNumberDevices(const AudioObjectPropertyScope scope, } UInt32 numberDevices = size / sizeof(AudioDeviceID); - const auto deviceIds = absl::make_unique(numberDevices); + const auto deviceIds = std::make_unique(numberDevices); AudioBufferList* bufferList = NULL; UInt32 numberScopedDevices = 0; diff --git a/modules/audio_device/win/audio_device_module_win.cc b/modules/audio_device/win/audio_device_module_win.cc index cc23ae6320..b77a24aadb 100644 --- a/modules/audio_device/win/audio_device_module_win.cc +++ b/modules/audio_device/win/audio_device_module_win.cc @@ -10,9 +10,9 @@ #include "modules/audio_device/win/audio_device_module_win.h" +#include #include -#include "absl/memory/memory.h" #include "modules/audio_device/audio_device_buffer.h" #include "modules/audio_device/include/audio_device.h" #include "rtc_base/checks.h" @@ -133,7 +133,7 @@ class WindowsAudioDeviceModule : public AudioDeviceModuleForTest { return 0; } audio_device_buffer_ = - absl::make_unique(task_queue_factory_); + std::make_unique(task_queue_factory_); AttachAudioBuffer(); InitStatus status; if (output_->Init() != 0) { diff --git a/modules/audio_device/win/core_audio_base_win.cc b/modules/audio_device/win/core_audio_base_win.cc index b18d97d99e..56abe85e64 100644 --- a/modules/audio_device/win/core_audio_base_win.cc +++ b/modules/audio_device/win/core_audio_base_win.cc @@ -11,9 +11,9 @@ #include "modules/audio_device/win/core_audio_base_win.h" #include "modules/audio_device/audio_device_buffer.h" +#include #include -#include "absl/memory/memory.h" #include "rtc_base/arraysize.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" @@ -516,7 +516,7 @@ bool CoreAudioBase::Start() { // Start an audio thread but only if one does not already exist (which is the // case during restart). if (!audio_thread_) { - audio_thread_ = absl::make_unique( + audio_thread_ = std::make_unique( Run, this, IsInput() ? "wasapi_capture_thread" : "wasapi_render_thread", rtc::kRealtimePriority); RTC_DCHECK(audio_thread_); diff --git a/modules/audio_device/win/core_audio_input_win.cc b/modules/audio_device/win/core_audio_input_win.cc index 91a1d1646e..53500764bf 100644 --- a/modules/audio_device/win/core_audio_input_win.cc +++ b/modules/audio_device/win/core_audio_input_win.cc @@ -10,7 +10,8 @@ #include "modules/audio_device/win/core_audio_input_win.h" -#include "absl/memory/memory.h" +#include + #include "modules/audio_device/audio_device_buffer.h" #include "modules/audio_device/fine_audio_buffer.h" #include "rtc_base/checks.h" @@ -121,7 +122,7 @@ int CoreAudioInput::InitRecording() { // of samples (and not only multiple of 10ms) to match the optimal buffer // size per callback used by Core Audio. // TODO(henrika): can we share one FineAudioBuffer with the output side? - fine_audio_buffer_ = absl::make_unique(audio_device_buffer_); + fine_audio_buffer_ = std::make_unique(audio_device_buffer_); // Create an IAudioCaptureClient for an initialized IAudioClient. // The IAudioCaptureClient interface enables a client to read input data from diff --git a/modules/audio_device/win/core_audio_output_win.cc b/modules/audio_device/win/core_audio_output_win.cc index f3b01511ee..aeada677b9 100644 --- a/modules/audio_device/win/core_audio_output_win.cc +++ b/modules/audio_device/win/core_audio_output_win.cc @@ -10,7 +10,8 @@ #include "modules/audio_device/win/core_audio_output_win.h" -#include "absl/memory/memory.h" +#include + #include "modules/audio_device/audio_device_buffer.h" #include "modules/audio_device/fine_audio_buffer.h" #include "rtc_base/bind.h" @@ -120,7 +121,7 @@ int CoreAudioOutput::InitPlayout() { // of samples (and not only multiple of 10ms) to match the optimal // buffer size per callback used by Core Audio. // TODO(henrika): can we share one FineAudioBuffer with the input side? - fine_audio_buffer_ = absl::make_unique(audio_device_buffer_); + fine_audio_buffer_ = std::make_unique(audio_device_buffer_); // Create an IAudioRenderClient for an initialized IAudioClient. // The IAudioRenderClient interface enables us to write output data to diff --git a/modules/audio_mixer/BUILD.gn b/modules/audio_mixer/BUILD.gn index 9e8fab47ab..99bc2d14ce 100644 --- a/modules/audio_mixer/BUILD.gn +++ b/modules/audio_mixer/BUILD.gn @@ -52,7 +52,6 @@ rtc_static_library("audio_mixer_impl") { "../audio_processing:apm_logging", "../audio_processing:audio_frame_view", "../audio_processing/agc2:fixed_digital", - "//third_party/abseil-cpp/absl/memory", ] } @@ -116,7 +115,6 @@ if (rtc_include_tests) { "../../rtc_base:rtc_base_approved", "../../rtc_base:task_queue_for_test", "../../test:test_support", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/modules/audio_mixer/audio_mixer_impl_unittest.cc b/modules/audio_mixer/audio_mixer_impl_unittest.cc index 16ff33849f..cfb3319d01 100644 --- a/modules/audio_mixer/audio_mixer_impl_unittest.cc +++ b/modules/audio_mixer/audio_mixer_impl_unittest.cc @@ -17,7 +17,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/audio/audio_mixer.h" #include "modules/audio_mixer/default_output_rate_calculator.h" #include "rtc_base/bind.h" @@ -611,7 +610,7 @@ TEST(AudioMixer, MultipleChannelsAndHighRate) { AudioFrame::kMaxDataSizeSamples / kSamplesPerChannel; MockMixerAudioSource source; const auto mixer = AudioMixerImpl::Create( - absl::make_unique(), true); + std::make_unique(), true); mixer->AddSource(&source); ResetFrame(source.fake_frame()); mixer->Mix(1, &frame_for_mixing); diff --git a/modules/audio_mixer/frame_combiner.cc b/modules/audio_mixer/frame_combiner.cc index f7ce95234d..e52904fe66 100644 --- a/modules/audio_mixer/frame_combiner.cc +++ b/modules/audio_mixer/frame_combiner.cc @@ -14,9 +14,9 @@ #include #include #include +#include #include -#include "absl/memory/memory.h" #include "api/array_view.h" #include "common_audio/include/audio_util.h" #include "modules/audio_mixer/audio_frame_manipulator.h" @@ -129,8 +129,8 @@ constexpr size_t FrameCombiner::kMaximumChannelSize; FrameCombiner::FrameCombiner(bool use_limiter) : data_dumper_(new ApmDataDumper(0)), mixing_buffer_( - absl::make_unique, - kMaximumNumberOfChannels>>()), + std::make_unique, + kMaximumNumberOfChannels>>()), limiter_(static_cast(48000), data_dumper_.get(), "AudioMixer"), use_limiter_(use_limiter) { static_assert(kMaximumChannelSize * kMaximumNumberOfChannels <= diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn index 1341f76c17..d2be4f81f2 100644 --- a/modules/audio_processing/BUILD.gn +++ b/modules/audio_processing/BUILD.gn @@ -58,7 +58,6 @@ rtc_source_set("api") { "../../rtc_base:rtc_base_approved", "../../rtc_base/system:arch", "../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -202,7 +201,6 @@ rtc_static_library("audio_processing") { "agc2:fixed_digital", "agc2:gain_applier", "vad", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] @@ -301,7 +299,6 @@ rtc_source_set("audio_generator_factory") { "../../common_audio", "../../rtc_base:rtc_base_approved", "../../system_wrappers", - "//third_party/abseil-cpp/absl/memory", ] } @@ -503,7 +500,6 @@ if (rtc_include_tests) { "utility:pffft_wrapper_unittest", "vad:vad_unittests", "//testing/gtest", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] @@ -609,7 +605,6 @@ if (rtc_include_tests) { "../../rtc_base:rtc_base_approved", "../../rtc_base:safe_minmax", "agc:gain_map", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -655,7 +650,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", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -670,7 +664,6 @@ if (rtc_include_tests) { ":audio_processing", "../../api:audioproc_f_api", "../../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", ] } # audioproc_f } @@ -766,7 +759,6 @@ if (rtc_include_tests) { "../../rtc_base:protobuf_utils", "../../rtc_base:rtc_base_approved", "../../rtc_base/system:arch", - "//third_party/abseil-cpp/absl/memory:memory", ] } diff --git a/modules/audio_processing/aec_dump/BUILD.gn b/modules/audio_processing/aec_dump/BUILD.gn index 554fee57d8..419a5ec96f 100644 --- a/modules/audio_processing/aec_dump/BUILD.gn +++ b/modules/audio_processing/aec_dump/BUILD.gn @@ -48,7 +48,6 @@ rtc_source_set("mock_aec_dump_unittests") { "../", "../../../rtc_base:rtc_base_approved", "//testing/gtest", - "//third_party/abseil-cpp/absl/memory", ] } @@ -74,7 +73,6 @@ if (rtc_enable_protobuf) { "../../../rtc_base:rtc_task_queue", "../../../rtc_base/system:file_wrapper", "../../../system_wrappers", - "//third_party/abseil-cpp/absl/memory", ] deps += [ "../:audioproc_debug_proto" ] diff --git a/modules/audio_processing/aec_dump/aec_dump_impl.cc b/modules/audio_processing/aec_dump/aec_dump_impl.cc index 904033aab3..a7ac552d46 100644 --- a/modules/audio_processing/aec_dump/aec_dump_impl.cc +++ b/modules/audio_processing/aec_dump/aec_dump_impl.cc @@ -10,9 +10,9 @@ #include "modules/audio_processing/aec_dump/aec_dump_impl.h" +#include #include -#include "absl/memory/memory.h" #include "modules/audio_processing/aec_dump/aec_dump_factory.h" #include "rtc_base/checks.h" #include "rtc_base/event.h" @@ -212,8 +212,8 @@ void AecDumpImpl::WriteRuntimeSetting( } std::unique_ptr AecDumpImpl::CreateWriteToFileTask() { - return absl::make_unique(&debug_file_, - &num_bytes_left_for_log_); + return std::make_unique(&debug_file_, + &num_bytes_left_for_log_); } std::unique_ptr AecDumpFactory::Create(webrtc::FileWrapper file, @@ -223,8 +223,8 @@ std::unique_ptr AecDumpFactory::Create(webrtc::FileWrapper file, if (!file.is_open()) return nullptr; - return absl::make_unique(std::move(file), max_log_size_bytes, - worker_queue); + return std::make_unique(std::move(file), max_log_size_bytes, + worker_queue); } std::unique_ptr AecDumpFactory::Create(std::string file_name, diff --git a/modules/audio_processing/aec_dump/aec_dump_integration_test.cc b/modules/audio_processing/aec_dump/aec_dump_integration_test.cc index a32867fd61..f3544b5143 100644 --- a/modules/audio_processing/aec_dump/aec_dump_integration_test.cc +++ b/modules/audio_processing/aec_dump/aec_dump_integration_test.cc @@ -8,9 +8,9 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include #include -#include "absl/memory/memory.h" #include "modules/audio_processing/aec_dump/mock_aec_dump.h" #include "modules/audio_processing/include/audio_processing.h" @@ -31,14 +31,14 @@ std::unique_ptr CreateAudioProcessing() { std::unique_ptr CreateMockAecDump() { auto mock_aec_dump = - absl::make_unique>(); + std::make_unique>(); EXPECT_CALL(*mock_aec_dump.get(), WriteConfig(_)).Times(AtLeast(1)); EXPECT_CALL(*mock_aec_dump.get(), WriteInitMessage(_, _)).Times(AtLeast(1)); return std::unique_ptr(std::move(mock_aec_dump)); } std::unique_ptr CreateFakeFrame() { - auto fake_frame = absl::make_unique(); + auto fake_frame = std::make_unique(); fake_frame->num_channels_ = 1; fake_frame->sample_rate_hz_ = 48000; fake_frame->samples_per_channel_ = 480; diff --git a/modules/audio_processing/agc2/BUILD.gn b/modules/audio_processing/agc2/BUILD.gn index 5431a150c2..5a8e81aea1 100644 --- a/modules/audio_processing/agc2/BUILD.gn +++ b/modules/audio_processing/agc2/BUILD.gn @@ -235,7 +235,6 @@ rtc_source_set("fixed_digital_unittests") { "../../../rtc_base:gunit_helpers", "../../../rtc_base:rtc_base_approved", "../../../system_wrappers:metrics", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/modules/audio_processing/agc2/rnn_vad/BUILD.gn b/modules/audio_processing/agc2/rnn_vad/BUILD.gn index 670bbb6c13..63ce0c1f0c 100644 --- a/modules/audio_processing/agc2/rnn_vad/BUILD.gn +++ b/modules/audio_processing/agc2/rnn_vad/BUILD.gn @@ -57,7 +57,6 @@ if (rtc_include_tests) { "../../../../rtc_base:checks", "../../../../test:fileutils", "../../../../test:test_support", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/modules/audio_processing/agc2/rnn_vad/test_utils.cc b/modules/audio_processing/agc2/rnn_vad/test_utils.cc index 8236d5f750..6e0eb5b122 100644 --- a/modules/audio_processing/agc2/rnn_vad/test_utils.cc +++ b/modules/audio_processing/agc2/rnn_vad/test_utils.cc @@ -10,7 +10,8 @@ #include "modules/audio_processing/agc2/rnn_vad/test_utils.h" -#include "absl/memory/memory.h" +#include + #include "rtc_base/checks.h" #include "test/gtest.h" #include "test/testsupport/file_utils.h" @@ -48,7 +49,7 @@ void ExpectNearAbsolute(rtc::ArrayView expected, std::pair>, const size_t> CreatePcmSamplesReader(const size_t frame_length) { - auto ptr = absl::make_unique>( + auto ptr = std::make_unique>( test::ResourcePath("audio_processing/agc2/rnn_vad/samples", "pcm"), frame_length); // The last incomplete frame is ignored. @@ -57,14 +58,14 @@ CreatePcmSamplesReader(const size_t frame_length) { ReaderPairType CreatePitchBuffer24kHzReader() { constexpr size_t cols = 864; - auto ptr = absl::make_unique>( + auto ptr = std::make_unique>( ResourcePath("audio_processing/agc2/rnn_vad/pitch_buf_24k", "dat"), cols); return {std::move(ptr), rtc::CheckedDivExact(ptr->data_length(), cols)}; } ReaderPairType CreateLpResidualAndPitchPeriodGainReader() { constexpr size_t num_lp_residual_coeffs = 864; - auto ptr = absl::make_unique>( + auto ptr = std::make_unique>( ResourcePath("audio_processing/agc2/rnn_vad/pitch_lp_res", "dat"), num_lp_residual_coeffs); return {std::move(ptr), @@ -72,7 +73,7 @@ ReaderPairType CreateLpResidualAndPitchPeriodGainReader() { } ReaderPairType CreateVadProbsReader() { - auto ptr = absl::make_unique>( + auto ptr = std::make_unique>( test::ResourcePath("audio_processing/agc2/rnn_vad/vad_prob", "dat")); return {std::move(ptr), ptr->data_length()}; } diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc index 55bdaae208..cdc37c698a 100644 --- a/modules/audio_processing/audio_processing_impl.cc +++ b/modules/audio_processing/audio_processing_impl.cc @@ -12,11 +12,11 @@ #include #include +#include #include #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/array_view.h" #include "common_audio/audio_converter.h" @@ -1845,7 +1845,7 @@ void AudioProcessingImpl::InitializeEchoController() { private_submodules_->echo_controller = echo_control_factory_->Create(proc_sample_rate_hz()); } else { - private_submodules_->echo_controller = absl::make_unique( + private_submodules_->echo_controller = std::make_unique( EchoCanceller3Config(), proc_sample_rate_hz(), /*num_render_channels=*/1, /*num_capture_channels=*/1); } diff --git a/modules/audio_processing/audio_processing_impl_unittest.cc b/modules/audio_processing/audio_processing_impl_unittest.cc index 72bd673531..292b632bd2 100644 --- a/modules/audio_processing/audio_processing_impl_unittest.cc +++ b/modules/audio_processing/audio_processing_impl_unittest.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "api/scoped_refptr.h" #include "modules/audio_processing/include/audio_processing.h" #include "modules/audio_processing/test/echo_control_mock.h" @@ -51,12 +50,12 @@ class MockInitialize : public AudioProcessingImpl { // to the creation of a new EchoControl object. class MockEchoControlFactory : public EchoControlFactory { public: - MockEchoControlFactory() : next_mock_(absl::make_unique()) {} + MockEchoControlFactory() : next_mock_(std::make_unique()) {} // Returns a pointer to the next MockEchoControl that this factory creates. MockEchoControl* GetNext() const { return next_mock_.get(); } std::unique_ptr Create(int sample_rate_hz) override { std::unique_ptr mock = std::move(next_mock_); - next_mock_ = absl::make_unique(); + next_mock_ = std::make_unique(); return mock; } @@ -215,7 +214,7 @@ TEST(AudioProcessingImplTest, EchoControllerObservesPreAmplifierEchoPathGainChange) { // Tests that the echo controller observes an echo path gain change when the // pre-amplifier submodule changes the gain. - auto echo_control_factory = absl::make_unique(); + auto echo_control_factory = std::make_unique(); const auto* echo_control_factory_ptr = echo_control_factory.get(); std::unique_ptr apm( @@ -258,7 +257,7 @@ TEST(AudioProcessingImplTest, EchoControllerObservesAnalogAgc1EchoPathGainChange) { // Tests that the echo controller observes an echo path gain change when the // AGC1 analog adaptive submodule changes the analog gain. - auto echo_control_factory = absl::make_unique(); + auto echo_control_factory = std::make_unique(); const auto* echo_control_factory_ptr = echo_control_factory.get(); std::unique_ptr apm( @@ -299,7 +298,7 @@ TEST(AudioProcessingImplTest, TEST(AudioProcessingImplTest, EchoControllerObservesPlayoutVolumeChange) { // Tests that the echo controller observes an echo path gain change when a // playout volume change is reported. - auto echo_control_factory = absl::make_unique(); + auto echo_control_factory = std::make_unique(); const auto* echo_control_factory_ptr = echo_control_factory.get(); std::unique_ptr apm( diff --git a/modules/audio_processing/gain_controller2_unittest.cc b/modules/audio_processing/gain_controller2_unittest.cc index 3295328845..9369a8a8d9 100644 --- a/modules/audio_processing/gain_controller2_unittest.cc +++ b/modules/audio_processing/gain_controller2_unittest.cc @@ -11,8 +11,8 @@ #include "modules/audio_processing/gain_controller2.h" #include +#include -#include "absl/memory/memory.h" #include "api/array_view.h" #include "modules/audio_processing/agc2/agc2_testing_common.h" #include "modules/audio_processing/audio_buffer.h" @@ -62,7 +62,7 @@ AudioProcessing::Config::GainController2 CreateAgc2FixedDigitalModeConfig( std::unique_ptr CreateAgc2FixedDigitalMode( float fixed_gain_db, size_t sample_rate_hz) { - auto agc2 = absl::make_unique(); + auto agc2 = std::make_unique(); agc2->ApplyConfig(CreateAgc2FixedDigitalModeConfig(fixed_gain_db)); agc2->Initialize(sample_rate_hz); return agc2; diff --git a/modules/audio_processing/include/audio_generator_factory.cc b/modules/audio_processing/include/audio_generator_factory.cc index 69a5401514..d132f89607 100644 --- a/modules/audio_processing/include/audio_generator_factory.cc +++ b/modules/audio_processing/include/audio_generator_factory.cc @@ -10,7 +10,8 @@ #include "modules/audio_processing/include/audio_generator_factory.h" -#include "absl/memory/memory.h" +#include + #include "common_audio/wav_file.h" #include "modules/audio_processing/audio_generator/file_audio_generator.h" @@ -19,7 +20,7 @@ namespace webrtc { std::unique_ptr AudioGeneratorFactory::Create( const std::string& file_name) { std::unique_ptr input_audio_file(new WavReader(file_name)); - return absl::make_unique(std::move(input_audio_file)); + return std::make_unique(std::move(input_audio_file)); } } // namespace webrtc diff --git a/modules/audio_processing/test/aec_dump_based_simulator.cc b/modules/audio_processing/test/aec_dump_based_simulator.cc index 0d6bdd1167..ba39274a1a 100644 --- a/modules/audio_processing/test/aec_dump_based_simulator.cc +++ b/modules/audio_processing/test/aec_dump_based_simulator.cc @@ -11,8 +11,8 @@ #include "modules/audio_processing/test/aec_dump_based_simulator.h" #include +#include -#include "absl/memory/memory.h" #include "modules/audio_processing/echo_cancellation_impl.h" #include "modules/audio_processing/echo_control_mobile_impl.h" #include "modules/audio_processing/test/protobuf_utils.h" @@ -609,7 +609,7 @@ void AecDumpBasedSimulator::MaybeOpenCallOrderFile() { "_" + std::to_string(output_reset_counter_) : *settings_.call_order_output_filename; - call_order_output_file_ = absl::make_unique(filename); + call_order_output_file_ = std::make_unique(filename); } } diff --git a/modules/audio_processing/test/api_call_statistics.cc b/modules/audio_processing/test/api_call_statistics.cc index 5e95668750..736b77b7cf 100644 --- a/modules/audio_processing/test/api_call_statistics.cc +++ b/modules/audio_processing/test/api_call_statistics.cc @@ -16,7 +16,6 @@ #include #include -#include "absl/memory/memory.h" #include "rtc_base/time_utils.h" namespace webrtc { @@ -75,7 +74,7 @@ void ApiCallStatistics::PrintReport() const { void ApiCallStatistics::WriteReportToFile(const std::string& filename) const { std::unique_ptr out = - absl::make_unique(filename); + std::make_unique(filename); for (auto v : calls_) { if (v.call_type == CallType::kRender) { *out << "render, "; diff --git a/modules/audio_processing/test/audio_processing_simulator.cc b/modules/audio_processing/test/audio_processing_simulator.cc index 1565e7109a..e3534cc471 100644 --- a/modules/audio_processing/test/audio_processing_simulator.cc +++ b/modules/audio_processing/test/audio_processing_simulator.cc @@ -13,11 +13,11 @@ #include #include #include +#include #include #include #include -#include "absl/memory/memory.h" #include "api/audio/echo_canceller3_config_json.h" #include "api/audio/echo_canceller3_factory.h" #include "common_audio/include/audio_util.h" @@ -139,7 +139,7 @@ AudioProcessingSimulator::AudioProcessingSimulator( std::unique_ptr ap_builder) : settings_(settings), ap_builder_(ap_builder ? std::move(ap_builder) - : absl::make_unique()), + : std::make_unique()), analog_mic_level_(settings.initial_mic_level), fake_recording_device_( settings.initial_mic_level, @@ -341,7 +341,7 @@ void AudioProcessingSimulator::SetupOutput() { static_cast(out_config_.num_channels()))); buffer_file_writer_.reset(new ChannelBufferWavWriter(std::move(out_file))); } else if (settings_.aec_dump_input_string.has_value()) { - buffer_memory_writer_ = absl::make_unique( + buffer_memory_writer_ = std::make_unique( settings_.processed_capture_samples); } diff --git a/modules/audio_processing/test/audioproc_float_main.cc b/modules/audio_processing/test/audioproc_float_main.cc index 900b927211..3cc6d4323b 100644 --- a/modules/audio_processing/test/audioproc_float_main.cc +++ b/modules/audio_processing/test/audioproc_float_main.cc @@ -8,11 +8,12 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "api/test/audioproc_float.h" #include "modules/audio_processing/include/audio_processing.h" int main(int argc, char* argv[]) { return webrtc::test::AudioprocFloat( - absl::make_unique(), argc, argv); + std::make_unique(), argc, argv); } diff --git a/modules/audio_processing/test/conversational_speech/BUILD.gn b/modules/audio_processing/test/conversational_speech/BUILD.gn index 7a278a33ad..298e68447f 100644 --- a/modules/audio_processing/test/conversational_speech/BUILD.gn +++ b/modules/audio_processing/test/conversational_speech/BUILD.gn @@ -26,7 +26,6 @@ rtc_executable("conversational_speech_generator") { "../../../../test:test_support", "//third_party/abseil-cpp/absl/flags:flag", "//third_party/abseil-cpp/absl/flags:parse", - "//third_party/abseil-cpp/absl/memory", ] } @@ -52,7 +51,6 @@ rtc_static_library("lib") { "../../../../rtc_base:checks", "../../../../rtc_base:rtc_base_approved", "../../../../test:fileutils", - "//third_party/abseil-cpp/absl/memory", ] visibility = [ ":*" ] # Only targets in this file can depend on this. } diff --git a/modules/audio_processing/test/conversational_speech/generator.cc b/modules/audio_processing/test/conversational_speech/generator.cc index abbea8c2df..d0bc2f2319 100644 --- a/modules/audio_processing/test/conversational_speech/generator.cc +++ b/modules/audio_processing/test/conversational_speech/generator.cc @@ -11,9 +11,10 @@ #include #include +#include + #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include "absl/memory/memory.h" #include "modules/audio_processing/test/conversational_speech/config.h" #include "modules/audio_processing/test/conversational_speech/multiend_call.h" #include "modules/audio_processing/test/conversational_speech/simulator.h" @@ -59,7 +60,7 @@ int main(int argc, char* argv[]) { // Parse timing and audio tracks. auto wavreader_factory = - absl::make_unique(); + std::make_unique(); conversational_speech::MultiEndCall multiend_call( timing, config.audiotracks_path(), std::move(wavreader_factory)); diff --git a/modules/audio_processing/test/conversational_speech/simulator.cc b/modules/audio_processing/test/conversational_speech/simulator.cc index 81b73fba52..0591252b36 100644 --- a/modules/audio_processing/test/conversational_speech/simulator.cc +++ b/modules/audio_processing/test/conversational_speech/simulator.cc @@ -13,11 +13,11 @@ #include #include +#include #include #include #include -#include "absl/memory/memory.h" #include "api/array_view.h" #include "common_audio/include/audio_util.h" #include "common_audio/wav_file.h" @@ -42,7 +42,7 @@ InitSpeakerOutputFilePaths(const std::set& speaker_names, const std::string& output_path) { // Create map. auto speaker_output_file_paths_map = - absl::make_unique>(); + std::make_unique>(); // Add near-end and far-end output paths into the map. for (const auto& speaker_name : speaker_names) { @@ -89,7 +89,7 @@ InitSpeakersWavWriters(const std::map& int sample_rate) { // Create map. auto speaker_wav_writers_map = - absl::make_unique>(); + std::make_unique>(); // Add SpeakerWavWriters instance into the map. for (auto it = speaker_output_file_paths.begin(); @@ -108,7 +108,7 @@ std::unique_ptr>> PreloadAudioTracks( audiotrack_readers) { // Create map. auto audiotracks_map = - absl::make_unique>>(); + std::make_unique>>(); // Add audio track vectors. for (auto it = audiotrack_readers.begin(); it != audiotrack_readers.end(); diff --git a/modules/audio_processing/test/fake_recording_device.cc b/modules/audio_processing/test/fake_recording_device.cc index ee134ea087..b82cb1d90c 100644 --- a/modules/audio_processing/test/fake_recording_device.cc +++ b/modules/audio_processing/test/fake_recording_device.cc @@ -11,8 +11,8 @@ #include "modules/audio_processing/test/fake_recording_device.h" #include +#include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "modules/audio_processing/agc/gain_map_internal.h" #include "rtc_base/logging.h" @@ -141,13 +141,13 @@ FakeRecordingDevice::FakeRecordingDevice(int initial_mic_level, switch (device_kind) { case 0: worker_ = - absl::make_unique(initial_mic_level); + std::make_unique(initial_mic_level); break; case 1: - worker_ = absl::make_unique(initial_mic_level); + worker_ = std::make_unique(initial_mic_level); break; case 2: - worker_ = absl::make_unique(initial_mic_level); + worker_ = std::make_unique(initial_mic_level); break; default: RTC_NOTREACHED(); diff --git a/modules/audio_processing/test/fake_recording_device_unittest.cc b/modules/audio_processing/test/fake_recording_device_unittest.cc index da62beb6ae..74bb47f710 100644 --- a/modules/audio_processing/test/fake_recording_device_unittest.cc +++ b/modules/audio_processing/test/fake_recording_device_unittest.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/array_view.h" #include "rtc_base/strings/string_builder.h" #include "test/gtest.h" @@ -48,7 +47,7 @@ void WritesDataIntoChannelBuffer(const std::vector>& data, std::unique_ptr> CreateChannelBufferWithData( const std::vector>& data) { auto buff = - absl::make_unique>(data[0].size(), data.size()); + std::make_unique>(data[0].size(), data.size()); WritesDataIntoChannelBuffer(data, buff.get()); return buff; } diff --git a/modules/audio_processing/test/protobuf_utils.cc b/modules/audio_processing/test/protobuf_utils.cc index 3042bce29f..75574961b0 100644 --- a/modules/audio_processing/test/protobuf_utils.cc +++ b/modules/audio_processing/test/protobuf_utils.cc @@ -10,7 +10,8 @@ #include "modules/audio_processing/test/protobuf_utils.h" -#include "absl/memory/memory.h" +#include + #include "rtc_base/system/arch.h" namespace { @@ -27,7 +28,7 @@ size_t ReadMessageBytesFromString(std::stringstream* input, if (size <= 0) return 0; - *bytes = absl::make_unique(size); + *bytes = std::make_unique(size); input->read(reinterpret_cast(bytes->get()), size * sizeof((*bytes)[0])); size_read = input->gcount(); @@ -49,7 +50,7 @@ size_t ReadMessageBytesFromFile(FILE* file, std::unique_ptr* bytes) { if (size <= 0) return 0; - *bytes = absl::make_unique(size); + *bytes = std::make_unique(size); return fread(bytes->get(), sizeof((*bytes)[0]), size, file); } diff --git a/modules/bitrate_controller/BUILD.gn b/modules/bitrate_controller/BUILD.gn index ce1dcf062d..52dee8a04d 100644 --- a/modules/bitrate_controller/BUILD.gn +++ b/modules/bitrate_controller/BUILD.gn @@ -36,7 +36,6 @@ rtc_static_library("bitrate_controller") { "../../system_wrappers:field_trial", "../../system_wrappers:metrics", "../remote_bitrate_estimator", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/modules/bitrate_controller/send_side_bandwidth_estimation.cc b/modules/bitrate_controller/send_side_bandwidth_estimation.cc index 0d072ad8e4..b3c6a753c1 100644 --- a/modules/bitrate_controller/send_side_bandwidth_estimation.cc +++ b/modules/bitrate_controller/send_side_bandwidth_estimation.cc @@ -13,9 +13,9 @@ #include #include #include +#include #include -#include "absl/memory/memory.h" #include "api/rtc_event_log/rtc_event.h" #include "api/rtc_event_log/rtc_event_log.h" #include "logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h" @@ -653,7 +653,7 @@ void SendSideBandwidthEstimation::CapBitrateToThresholds(Timestamp at_time, if (bitrate != current_bitrate_ || last_fraction_loss_ != last_logged_fraction_loss_ || at_time - last_rtc_event_log_ > kRtcEventLogPeriod) { - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( bitrate.bps(), last_fraction_loss_, expected_packets_since_last_loss_update_)); last_logged_fraction_loss_ = last_fraction_loss_; diff --git a/modules/congestion_controller/bbr/BUILD.gn b/modules/congestion_controller/bbr/BUILD.gn index c3c9e1082a..f44f2bf80a 100644 --- a/modules/congestion_controller/bbr/BUILD.gn +++ b/modules/congestion_controller/bbr/BUILD.gn @@ -18,7 +18,6 @@ rtc_static_library("bbr") { "../../../api/transport:network_control", "../../../api/units:time_delta", "../../../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/modules/congestion_controller/bbr/bbr_factory.cc b/modules/congestion_controller/bbr/bbr_factory.cc index 43fc86d660..c20123721a 100644 --- a/modules/congestion_controller/bbr/bbr_factory.cc +++ b/modules/congestion_controller/bbr/bbr_factory.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "modules/congestion_controller/bbr/bbr_network_controller.h" namespace webrtc { @@ -21,7 +20,7 @@ BbrNetworkControllerFactory::BbrNetworkControllerFactory() {} std::unique_ptr BbrNetworkControllerFactory::Create( NetworkControllerConfig config) { - return absl::make_unique(config); + return std::make_unique(config); } TimeDelta BbrNetworkControllerFactory::GetProcessInterval() const { diff --git a/modules/congestion_controller/goog_cc/BUILD.gn b/modules/congestion_controller/goog_cc/BUILD.gn index d932e64423..c3f7d8c9e3 100644 --- a/modules/congestion_controller/goog_cc/BUILD.gn +++ b/modules/congestion_controller/goog_cc/BUILD.gn @@ -50,7 +50,6 @@ rtc_static_library("goog_cc") { "../../../system_wrappers", "../../bitrate_controller", "../../remote_bitrate_estimator", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -98,7 +97,6 @@ rtc_source_set("alr_detector") { "../../../rtc_base/experiments:alr_experiment", "../../../rtc_base/experiments:field_trial_parser", "../../pacing:interval_budget", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -134,7 +132,6 @@ rtc_source_set("estimators") { "../../../rtc_base:safe_minmax", "../../../rtc_base/experiments:field_trial_parser", "../../remote_bitrate_estimator", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -160,7 +157,6 @@ rtc_source_set("delay_based_bwe") { "../../../system_wrappers:metrics", "../../pacing", "../../remote_bitrate_estimator", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -187,7 +183,6 @@ rtc_source_set("probe_controller") { "../../../rtc_base/experiments:field_trial_parser", "../../../rtc_base/system:unused", "../../../system_wrappers:metrics", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -254,7 +249,6 @@ if (rtc_include_tests) { "../../../test/scenario", "../../pacing", "//testing/gmock", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.cc b/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.cc index dcfb3d791f..f3c992f571 100644 --- a/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.cc +++ b/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.cc @@ -13,9 +13,9 @@ #include #include +#include #include -#include "absl/memory/memory.h" #include "rtc_base/checks.h" #include "rtc_base/numerics/safe_conversions.h" @@ -25,7 +25,7 @@ AcknowledgedBitrateEstimator::AcknowledgedBitrateEstimator( const WebRtcKeyValueConfig* key_value_config) : AcknowledgedBitrateEstimator( key_value_config, - absl::make_unique(key_value_config)) {} + std::make_unique(key_value_config)) {} AcknowledgedBitrateEstimator::~AcknowledgedBitrateEstimator() {} diff --git a/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_unittest.cc b/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_unittest.cc index e16849d951..83ead59e18 100644 --- a/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_unittest.cc +++ b/modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_unittest.cc @@ -10,9 +10,9 @@ #include "modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.h" +#include #include -#include "absl/memory/memory.h" #include "api/transport/field_trial_based_config.h" #include "rtc_base/fake_clock.h" #include "test/gmock.h" @@ -50,10 +50,10 @@ struct AcknowledgedBitrateEstimatorTestStates { AcknowledgedBitrateEstimatorTestStates CreateTestStates() { AcknowledgedBitrateEstimatorTestStates states; auto mock_bitrate_estimator = - absl::make_unique(&states.field_trial_config); + std::make_unique(&states.field_trial_config); states.mock_bitrate_estimator = mock_bitrate_estimator.get(); states.acknowledged_bitrate_estimator = - absl::make_unique( + std::make_unique( &states.field_trial_config, std::move(mock_bitrate_estimator)); return states; } diff --git a/modules/congestion_controller/goog_cc/alr_detector.cc b/modules/congestion_controller/goog_cc/alr_detector.cc index ff50429448..6a62954c36 100644 --- a/modules/congestion_controller/goog_cc/alr_detector.cc +++ b/modules/congestion_controller/goog_cc/alr_detector.cc @@ -12,8 +12,8 @@ #include #include +#include -#include "absl/memory/memory.h" #include "api/rtc_event_log/rtc_event.h" #include "api/rtc_event_log/rtc_event_log.h" #include "logging/rtc_event_log/events/rtc_event_alr_state.h" @@ -93,7 +93,7 @@ void AlrDetector::OnBytesSent(size_t bytes_sent, int64_t send_time_ms) { } if (event_log_ && state_changed) { event_log_->Log( - absl::make_unique(alr_started_time_ms_.has_value())); + std::make_unique(alr_started_time_ms_.has_value())); } } diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe.cc b/modules/congestion_controller/goog_cc/delay_based_bwe.cc index 706e2dba09..2b62891daa 100644 --- a/modules/congestion_controller/goog_cc/delay_based_bwe.cc +++ b/modules/congestion_controller/goog_cc/delay_based_bwe.cc @@ -13,10 +13,10 @@ #include #include #include +#include #include #include -#include "absl/memory/memory.h" #include "api/rtc_event_log/rtc_event.h" #include "api/rtc_event_log/rtc_event_log.h" #include "logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h" @@ -224,7 +224,7 @@ DelayBasedBwe::Result DelayBasedBwe::MaybeUpdateEstimate( BWE_TEST_LOGGING_PLOT(1, "target_bitrate_bps", at_time.ms(), bitrate.bps()); if (event_log_) { - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( bitrate.bps(), detector_state)); } diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc index 3ad6db1916..e8e2ffdeb5 100644 --- a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc +++ b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc @@ -11,8 +11,8 @@ #include #include +#include -#include "absl/memory/memory.h" #include "modules/congestion_controller/goog_cc/delay_based_bwe.h" #include "rtc_base/checks.h" @@ -149,8 +149,7 @@ DelayBasedBweTest::DelayBasedBweTest() : field_trial(), clock_(100000000), acknowledged_bitrate_estimator_( - absl::make_unique( - &field_trial_config_)), + std::make_unique(&field_trial_config_)), probe_bitrate_estimator_(new ProbeBitrateEstimator(nullptr)), bitrate_estimator_( new DelayBasedBwe(&field_trial_config_, nullptr, nullptr)), @@ -161,11 +160,10 @@ DelayBasedBweTest::DelayBasedBweTest() DelayBasedBweTest::DelayBasedBweTest(const std::string& field_trial_string) : field_trial( - absl::make_unique(field_trial_string)), + std::make_unique(field_trial_string)), clock_(100000000), acknowledged_bitrate_estimator_( - absl::make_unique( - &field_trial_config_)), + std::make_unique(&field_trial_config_)), probe_bitrate_estimator_(new ProbeBitrateEstimator(nullptr)), bitrate_estimator_( new DelayBasedBwe(&field_trial_config_, nullptr, nullptr)), diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc index 6fb340f79f..fea7fc341f 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc +++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc @@ -21,7 +21,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/units/time_delta.h" #include "modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.h" #include "modules/congestion_controller/goog_cc/alr_detector.h" @@ -80,13 +79,13 @@ GoogCcNetworkController::GoogCcNetworkController(NetworkControllerConfig config, new ProbeController(key_value_config_, config.event_log)), congestion_window_pushback_controller_( rate_control_settings_.UseCongestionWindowPushback() - ? absl::make_unique( + ? std::make_unique( key_value_config_) : nullptr), bandwidth_estimation_( - absl::make_unique(event_log_)), + std::make_unique(event_log_)), alr_detector_( - absl::make_unique(key_value_config_, config.event_log)), + std::make_unique(key_value_config_, config.event_log)), probe_bitrate_estimator_(new ProbeBitrateEstimator(config.event_log)), network_estimator_(std::move(goog_cc_config.network_state_estimator)), network_state_predictor_( @@ -95,7 +94,7 @@ GoogCcNetworkController::GoogCcNetworkController(NetworkControllerConfig config, event_log_, network_state_predictor_.get())), acknowledged_bitrate_estimator_( - absl::make_unique(key_value_config_)), + std::make_unique(key_value_config_)), initial_config_(config), last_raw_target_rate_(*config.constraints.starting_rate), last_pushback_target_rate_(last_raw_target_rate_), diff --git a/modules/congestion_controller/goog_cc/probe_bitrate_estimator.cc b/modules/congestion_controller/goog_cc/probe_bitrate_estimator.cc index 23aec87672..7a157803e4 100644 --- a/modules/congestion_controller/goog_cc/probe_bitrate_estimator.cc +++ b/modules/congestion_controller/goog_cc/probe_bitrate_estimator.cc @@ -11,8 +11,8 @@ #include "modules/congestion_controller/goog_cc/probe_bitrate_estimator.h" #include +#include -#include "absl/memory/memory.h" #include "api/rtc_event_log/rtc_event_log.h" #include "logging/rtc_event_log/events/rtc_event_probe_result_failure.h" #include "logging/rtc_event_log/events/rtc_event_probe_result_success.h" @@ -112,7 +112,7 @@ absl::optional ProbeBitrateEstimator::HandleProbeAndEstimateBitrate( << " [receive interval: " << ToString(receive_interval) << "]"; if (event_log_) { - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( cluster_id, ProbeFailureReason::kInvalidSendReceiveInterval)); } return absl::nullopt; @@ -145,7 +145,7 @@ absl::optional ProbeBitrateEstimator::HandleProbeAndEstimateBitrate( << ToString(send_rate) << " = " << ratio << " > kMaxValidRatio (" << kMaxValidRatio << ")]"; if (event_log_) { - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( cluster_id, ProbeFailureReason::kInvalidSendReceiveRatio)); } return absl::nullopt; @@ -169,7 +169,7 @@ absl::optional ProbeBitrateEstimator::HandleProbeAndEstimateBitrate( } if (event_log_) { event_log_->Log( - absl::make_unique(cluster_id, res.bps())); + std::make_unique(cluster_id, res.bps())); } last_estimate_ = res; estimated_data_rate_ = res; diff --git a/modules/congestion_controller/goog_cc/probe_controller.cc b/modules/congestion_controller/goog_cc/probe_controller.cc index 65150db271..02b5833705 100644 --- a/modules/congestion_controller/goog_cc/probe_controller.cc +++ b/modules/congestion_controller/goog_cc/probe_controller.cc @@ -12,9 +12,9 @@ #include #include +#include #include -#include "absl/memory/memory.h" #include "api/units/data_rate.h" #include "api/units/time_delta.h" #include "api/units/timestamp.h" @@ -82,7 +82,7 @@ void MaybeLogProbeClusterCreated(RtcEventLog* event_log, size_t min_bytes = static_cast(probe.target_data_rate.bps() * probe.target_duration.ms() / 8000); - event_log->Log(absl::make_unique( + event_log->Log(std::make_unique( probe.id, probe.target_data_rate.bps(), probe.target_probe_count, min_bytes)); } diff --git a/modules/congestion_controller/pcc/BUILD.gn b/modules/congestion_controller/pcc/BUILD.gn index 2a30a22602..6a2f7647f6 100644 --- a/modules/congestion_controller/pcc/BUILD.gn +++ b/modules/congestion_controller/pcc/BUILD.gn @@ -18,7 +18,6 @@ rtc_static_library("pcc") { "../../../api/transport:network_control", "../../../api/units:time_delta", "../../../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", ] } @@ -38,7 +37,6 @@ rtc_static_library("pcc_controller") { "../../../api/units:timestamp", "../../../rtc_base:checks", "../../../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -96,7 +94,6 @@ rtc_static_library("bitrate_controller") { "../../../api/transport:network_control", "../../../api/units:data_rate", "../../../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -126,7 +123,6 @@ if (rtc_include_tests) { "../../../rtc_base:rtc_base_approved", "../../../test:test_support", "../../../test/scenario", - "//third_party/abseil-cpp/absl/memory", ] } } diff --git a/modules/congestion_controller/pcc/bitrate_controller.cc b/modules/congestion_controller/pcc/bitrate_controller.cc index 2d2269fd69..44f306d20d 100644 --- a/modules/congestion_controller/pcc/bitrate_controller.cc +++ b/modules/congestion_controller/pcc/bitrate_controller.cc @@ -13,10 +13,10 @@ #include #include #include +#include #include #include -#include "absl/memory/memory.h" namespace webrtc { namespace pcc { @@ -33,7 +33,7 @@ PccBitrateController::PccBitrateController(double initial_conversion_factor, : PccBitrateController(initial_conversion_factor, initial_dynamic_boundary, dynamic_boundary_increment, - absl::make_unique( + std::make_unique( rtt_gradient_coefficient, loss_coefficient, throughput_coefficient, diff --git a/modules/congestion_controller/pcc/bitrate_controller_unittest.cc b/modules/congestion_controller/pcc/bitrate_controller_unittest.cc index 73d0f755e6..7188ea33f4 100644 --- a/modules/congestion_controller/pcc/bitrate_controller_unittest.cc +++ b/modules/congestion_controller/pcc/bitrate_controller_unittest.cc @@ -10,9 +10,9 @@ #include "modules/congestion_controller/pcc/bitrate_controller.h" +#include #include -#include "absl/memory/memory.h" #include "modules/congestion_controller/pcc/monitor_interval.h" #include "test/gmock.h" #include "test/gtest.h" @@ -109,7 +109,7 @@ TEST(PccBitrateControllerTest, IncreaseRateWhenNoChangesForTestBitrates) { TEST(PccBitrateControllerTest, NoChangesWhenUtilityFunctionDoesntChange) { std::unique_ptr mock_utility_function = - absl::make_unique(); + std::make_unique(); EXPECT_CALL(*mock_utility_function, Compute(::testing::_)) .Times(2) .WillOnce(::testing::Return(100)) @@ -140,7 +140,7 @@ TEST(PccBitrateControllerTest, NoChangesWhenUtilityFunctionDoesntChange) { TEST(PccBitrateControllerTest, NoBoundaryWhenSmallGradient) { std::unique_ptr mock_utility_function = - absl::make_unique(); + std::make_unique(); constexpr double kFirstMonitorIntervalUtility = 0; const double kSecondMonitorIntervalUtility = 2 * kTargetSendingRate.bps() * kEpsilon; @@ -177,7 +177,7 @@ TEST(PccBitrateControllerTest, NoBoundaryWhenSmallGradient) { TEST(PccBitrateControllerTest, FaceBoundaryWhenLargeGradient) { std::unique_ptr mock_utility_function = - absl::make_unique(); + std::make_unique(); constexpr double kFirstMonitorIntervalUtility = 0; const double kSecondMonitorIntervalUtility = 10 * kInitialDynamicBoundary * kTargetSendingRate.bps() * 2 * @@ -219,7 +219,7 @@ TEST(PccBitrateControllerTest, FaceBoundaryWhenLargeGradient) { TEST(PccBitrateControllerTest, SlowStartMode) { std::unique_ptr mock_utility_function = - absl::make_unique(); + std::make_unique(); constexpr double kFirstUtilityFunction = 1000; EXPECT_CALL(*mock_utility_function, Compute(::testing::_)) .Times(4) @@ -256,7 +256,7 @@ TEST(PccBitrateControllerTest, SlowStartMode) { TEST(PccBitrateControllerTest, StepSizeIncrease) { std::unique_ptr mock_utility_function = - absl::make_unique(); + std::make_unique(); constexpr double kFirstMiUtilityFunction = 0; const double kSecondMiUtilityFunction = 2 * kTargetSendingRate.bps() * kEpsilon; diff --git a/modules/congestion_controller/pcc/pcc_factory.cc b/modules/congestion_controller/pcc/pcc_factory.cc index fb92859847..c35c6e8ab2 100644 --- a/modules/congestion_controller/pcc/pcc_factory.cc +++ b/modules/congestion_controller/pcc/pcc_factory.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "modules/congestion_controller/pcc/pcc_network_controller.h" namespace webrtc { @@ -21,7 +20,7 @@ PccNetworkControllerFactory::PccNetworkControllerFactory() {} std::unique_ptr PccNetworkControllerFactory::Create( NetworkControllerConfig config) { - return absl::make_unique(config); + return std::make_unique(config); } TimeDelta PccNetworkControllerFactory::GetProcessInterval() const { diff --git a/modules/congestion_controller/rtp/BUILD.gn b/modules/congestion_controller/rtp/BUILD.gn index 04c42348aa..4caef7ea14 100644 --- a/modules/congestion_controller/rtp/BUILD.gn +++ b/modules/congestion_controller/rtp/BUILD.gn @@ -33,7 +33,6 @@ rtc_source_set("control_handler") { "../../../rtc_base/synchronization:sequence_checker", "../../../system_wrappers:field_trial", "../../pacing", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn index 19b2827e99..bf2da6337a 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -33,7 +33,6 @@ rtc_static_library("primitives") { "../../api:scoped_refptr", "../../rtc_base:checks", "../../rtc_base/system:rtc_export", - "//third_party/abseil-cpp/absl/memory", ] if (!build_with_mozilla) { @@ -50,7 +49,6 @@ if (rtc_include_tests) { "../../api:function_view", "../../api:scoped_refptr", "../../rtc_base:checks", - "//third_party/abseil-cpp/absl/memory", ] if (rtc_desktop_capture_supported) { deps += [ @@ -105,7 +103,6 @@ if (rtc_include_tests) { "../../rtc_base:rtc_base_approved", "../../system_wrappers:cpu_features_api", "../../test:test_support", - "//third_party/abseil-cpp/absl/memory", ] if (rtc_desktop_capture_supported) { sources += [ @@ -139,7 +136,6 @@ if (rtc_include_tests) { "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", "../../system_wrappers", - "//third_party/abseil-cpp/absl/memory", ] if (is_posix || is_fuchsia) { @@ -247,7 +243,6 @@ if (is_mac) { "../../rtc_base:rtc_base_approved", "../../rtc_base/synchronization:rw_lock_wrapper", "../../sdk:helpers_objc", - "//third_party/abseil-cpp/absl/memory", ] libs = [ "AppKit.framework", diff --git a/modules/desktop_capture/cropped_desktop_frame_unittest.cc b/modules/desktop_capture/cropped_desktop_frame_unittest.cc index e50f1d7156..c4ccb87596 100644 --- a/modules/desktop_capture/cropped_desktop_frame_unittest.cc +++ b/modules/desktop_capture/cropped_desktop_frame_unittest.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "modules/desktop_capture/desktop_frame.h" #include "modules/desktop_capture/shared_desktop_frame.h" #include "test/gtest.h" @@ -21,7 +20,7 @@ namespace webrtc { std::unique_ptr CreateTestFrame() { - return absl::make_unique(DesktopSize(10, 20)); + return std::make_unique(DesktopSize(10, 20)); } TEST(CroppedDesktopFrameTest, DoNotCreateWrapperIfSizeIsNotChanged) { diff --git a/modules/desktop_capture/desktop_and_cursor_composer.cc b/modules/desktop_capture/desktop_and_cursor_composer.cc index 369d2ac456..b66849078a 100644 --- a/modules/desktop_capture/desktop_and_cursor_composer.cc +++ b/modules/desktop_capture/desktop_and_cursor_composer.cc @@ -13,9 +13,9 @@ #include #include +#include #include -#include "absl/memory/memory.h" #include "modules/desktop_capture/desktop_capturer.h" #include "modules/desktop_capture/desktop_frame.h" #include "modules/desktop_capture/mouse_cursor.h" @@ -185,7 +185,7 @@ void DesktopAndCursorComposer::OnCaptureResult( relative_position.set(relative_position.x() * scale, relative_position.y() * scale); #endif - frame = absl::make_unique( + frame = std::make_unique( std::move(frame), *cursor_, relative_position); } } diff --git a/modules/desktop_capture/desktop_frame.cc b/modules/desktop_capture/desktop_frame.cc index a69cbcca79..fd10dd5d23 100644 --- a/modules/desktop_capture/desktop_frame.cc +++ b/modules/desktop_capture/desktop_frame.cc @@ -13,9 +13,9 @@ #include #include +#include #include -#include "absl/memory/memory.h" #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/desktop_geometry.h" #include "rtc_base/checks.h" @@ -179,7 +179,7 @@ std::unique_ptr SharedMemoryDesktopFrame::Create( if (!shared_memory) return nullptr; - return absl::make_unique( + return std::make_unique( size, size.width() * kBytesPerPixel, std::move(shared_memory)); } diff --git a/modules/desktop_capture/desktop_frame_unittest.cc b/modules/desktop_capture/desktop_frame_unittest.cc index d3417f7126..ce0cbb45f5 100644 --- a/modules/desktop_capture/desktop_frame_unittest.cc +++ b/modules/desktop_capture/desktop_frame_unittest.cc @@ -10,7 +10,8 @@ #include "modules/desktop_capture/desktop_frame.h" -#include "absl/memory/memory.h" +#include + #include "modules/desktop_capture/desktop_region.h" #include "modules/desktop_capture/test_utils.h" #include "rtc_base/arraysize.h" @@ -23,7 +24,7 @@ namespace { std::unique_ptr CreateTestFrame(DesktopRect rect, int pixels_value) { DesktopSize size = rect.size(); - auto frame = absl::make_unique(size); + auto frame = std::make_unique(size); frame->set_top_left(rect.top_left()); memset(frame->data(), pixels_value, frame->stride() * size.height()); return frame; diff --git a/modules/desktop_capture/linux/screen_capturer_pipewire.cc b/modules/desktop_capture/linux/screen_capturer_pipewire.cc index 724d8537d3..fe672140cc 100644 --- a/modules/desktop_capture/linux/screen_capturer_pipewire.cc +++ b/modules/desktop_capture/linux/screen_capturer_pipewire.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" namespace webrtc { @@ -24,7 +23,7 @@ ScreenCapturerPipeWire::~ScreenCapturerPipeWire() {} std::unique_ptr ScreenCapturerPipeWire::CreateRawScreenCapturer( const DesktopCaptureOptions& options) { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/modules/desktop_capture/linux/screen_capturer_x11.cc b/modules/desktop_capture/linux/screen_capturer_x11.cc index 128f81fb9e..4bb49fbd48 100644 --- a/modules/desktop_capture/linux/screen_capturer_x11.cc +++ b/modules/desktop_capture/linux/screen_capturer_x11.cc @@ -20,7 +20,6 @@ #include #include -#include "absl/memory/memory.h" #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_capturer.h" #include "modules/desktop_capture/desktop_frame.h" @@ -53,7 +52,7 @@ bool ScreenCapturerX11::Init(const DesktopCaptureOptions& options) { TRACE_EVENT0("webrtc", "ScreenCapturerX11::Init"); options_ = options; - atom_cache_ = absl::make_unique(display()); + atom_cache_ = std::make_unique(display()); root_window_ = RootWindow(display(), DefaultScreen(display())); if (root_window_ == BadValue) { diff --git a/modules/desktop_capture/linux/window_capturer_pipewire.cc b/modules/desktop_capture/linux/window_capturer_pipewire.cc index 1c195aaf4a..b4559156dc 100644 --- a/modules/desktop_capture/linux/window_capturer_pipewire.cc +++ b/modules/desktop_capture/linux/window_capturer_pipewire.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" namespace webrtc { @@ -24,7 +23,7 @@ WindowCapturerPipeWire::~WindowCapturerPipeWire() {} std::unique_ptr WindowCapturerPipeWire::CreateRawWindowCapturer( const DesktopCaptureOptions& options) { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/modules/desktop_capture/linux/window_finder_x11.cc b/modules/desktop_capture/linux/window_finder_x11.cc index 6f0517c081..16fb3252ad 100644 --- a/modules/desktop_capture/linux/window_finder_x11.cc +++ b/modules/desktop_capture/linux/window_finder_x11.cc @@ -14,7 +14,6 @@ #include -#include "absl/memory/memory.h" #include "modules/desktop_capture/linux/window_list_utils.h" #include "rtc_base/checks.h" @@ -47,7 +46,7 @@ std::unique_ptr WindowFinder::Create( return nullptr; } - return absl::make_unique(options.cache); + return std::make_unique(options.cache); } } // namespace webrtc diff --git a/modules/desktop_capture/screen_drawer_linux.cc b/modules/desktop_capture/screen_drawer_linux.cc index 47a50dcd4b..afd29ced01 100644 --- a/modules/desktop_capture/screen_drawer_linux.cc +++ b/modules/desktop_capture/screen_drawer_linux.cc @@ -14,7 +14,6 @@ #include -#include "absl/memory/memory.h" #include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/desktop_geometry.h" @@ -172,13 +171,13 @@ void ScreenDrawerLinux::BringToFront() { // static std::unique_ptr ScreenDrawerLock::Create() { - return absl::make_unique(); + return std::make_unique(); } // static std::unique_ptr ScreenDrawer::Create() { if (SharedXDisplay::CreateDefault().get()) { - return absl::make_unique(); + return std::make_unique(); } return nullptr; } diff --git a/modules/desktop_capture/screen_drawer_mac.cc b/modules/desktop_capture/screen_drawer_mac.cc index 156a2e993f..17719e4439 100644 --- a/modules/desktop_capture/screen_drawer_mac.cc +++ b/modules/desktop_capture/screen_drawer_mac.cc @@ -10,7 +10,8 @@ // TODO(zijiehe): Implement ScreenDrawerMac -#include "absl/memory/memory.h" +#include + #include "modules/desktop_capture/screen_drawer.h" #include "modules/desktop_capture/screen_drawer_lock_posix.h" @@ -18,7 +19,7 @@ namespace webrtc { // static std::unique_ptr ScreenDrawerLock::Create() { - return absl::make_unique(); + return std::make_unique(); } // static diff --git a/modules/desktop_capture/screen_drawer_unittest.cc b/modules/desktop_capture/screen_drawer_unittest.cc index e51b0aa986..42e3587b11 100644 --- a/modules/desktop_capture/screen_drawer_unittest.cc +++ b/modules/desktop_capture/screen_drawer_unittest.cc @@ -13,8 +13,8 @@ #include #include +#include -#include "absl/memory/memory.h" #include "api/function_view.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" @@ -154,7 +154,7 @@ TEST(ScreenDrawerTest, MAYBE_TwoScreenDrawerLocks) { ScreenDrawerLockPosix::Unlink(semaphore_name); TestScreenDrawerLock([semaphore_name]() { - return absl::make_unique(semaphore_name); + return std::make_unique(semaphore_name); }); #elif defined(WEBRTC_WIN) TestScreenDrawerLock([]() { return ScreenDrawerLock::Create(); }); diff --git a/modules/desktop_capture/win/screen_capturer_win_directx.cc b/modules/desktop_capture/win/screen_capturer_win_directx.cc index ad62fb8867..df3bee8f26 100644 --- a/modules/desktop_capture/win/screen_capturer_win_directx.cc +++ b/modules/desktop_capture/win/screen_capturer_win_directx.cc @@ -11,11 +11,11 @@ #include "modules/desktop_capture/win/screen_capturer_win_directx.h" #include +#include #include #include #include -#include "absl/memory/memory.h" #include "modules/desktop_capture/desktop_frame.h" #include "modules/desktop_capture/win/screen_capture_utils.h" #include "rtc_base/checks.h" @@ -124,7 +124,7 @@ void ScreenCapturerWinDirectx::CaptureFrame() { frames_.MoveToNextFrame(); if (!frames_.current_frame()) { frames_.ReplaceCurrentFrame( - absl::make_unique(shared_memory_factory_.get())); + std::make_unique(shared_memory_factory_.get())); } DxgiDuplicatorController::Result result; diff --git a/modules/desktop_capture/window_capturer_win.cc b/modules/desktop_capture/window_capturer_win.cc index de3a7b36fc..7258e89251 100644 --- a/modules/desktop_capture/window_capturer_win.cc +++ b/modules/desktop_capture/window_capturer_win.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "modules/desktop_capture/cropped_desktop_frame.h" #include "modules/desktop_capture/desktop_capturer.h" #include "modules/desktop_capture/desktop_frame_win.h" @@ -442,7 +441,7 @@ WindowCapturerWin::CaptureResults WindowCapturerWin::CaptureFrame( if (!owned_windows_.empty()) { if (!owned_window_capturer_) { - owned_window_capturer_ = absl::make_unique(); + owned_window_capturer_ = std::make_unique(); } // Owned windows are stored in top-down z-order, so this iterates in diff --git a/modules/desktop_capture/window_finder_mac.mm b/modules/desktop_capture/window_finder_mac.mm index f75822a1a3..64979c62cd 100644 --- a/modules/desktop_capture/window_finder_mac.mm +++ b/modules/desktop_capture/window_finder_mac.mm @@ -12,9 +12,9 @@ #include +#include #include -#include "absl/memory/memory.h" #include "modules/desktop_capture/mac/desktop_configuration.h" #include "modules/desktop_capture/mac/desktop_configuration_monitor.h" #include "modules/desktop_capture/mac/window_list_utils.h" @@ -45,7 +45,7 @@ WindowId WindowFinderMac::GetWindowUnderPoint(DesktopVector point) { // static std::unique_ptr WindowFinder::Create( const WindowFinder::Options& options) { - return absl::make_unique(options.configuration_monitor); + return std::make_unique(options.configuration_monitor); } } // namespace webrtc diff --git a/modules/desktop_capture/window_finder_unittest.cc b/modules/desktop_capture/window_finder_unittest.cc index 6fda6b7561..df4d65c2b5 100644 --- a/modules/desktop_capture/window_finder_unittest.cc +++ b/modules/desktop_capture/window_finder_unittest.cc @@ -21,7 +21,6 @@ #include "test/gtest.h" #if defined(USE_X11) -#include "absl/memory/memory.h" #include "modules/desktop_capture/linux/shared_x_display.h" #include "modules/desktop_capture/linux/x_atom_cache.h" #endif @@ -97,7 +96,7 @@ TEST(WindowFinderTest, FindDrawerWindow) { std::unique_ptr cache; const auto shared_x_display = SharedXDisplay::CreateDefault(); if (shared_x_display) { - cache = absl::make_unique(shared_x_display->display()); + cache = std::make_unique(shared_x_display->display()); options.cache = cache.get(); } #endif @@ -153,7 +152,7 @@ TEST(WindowFinderTest, ShouldReturnNullWindowIfSpotIsOutOfScreen) { std::unique_ptr cache; const auto shared_x_display = SharedXDisplay::CreateDefault(); if (shared_x_display) { - cache = absl::make_unique(shared_x_display->display()); + cache = std::make_unique(shared_x_display->display()); options.cache = cache.get(); } #endif diff --git a/modules/desktop_capture/window_finder_win.cc b/modules/desktop_capture/window_finder_win.cc index 10ffe0d979..a8c3d39e19 100644 --- a/modules/desktop_capture/window_finder_win.cc +++ b/modules/desktop_capture/window_finder_win.cc @@ -12,7 +12,7 @@ #include -#include "absl/memory/memory.h" +#include namespace webrtc { @@ -40,7 +40,7 @@ WindowId WindowFinderWin::GetWindowUnderPoint(DesktopVector point) { // static std::unique_ptr WindowFinder::Create( const WindowFinder::Options& options) { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/modules/pacing/BUILD.gn b/modules/pacing/BUILD.gn index 258e511929..edd5c70f93 100644 --- a/modules/pacing/BUILD.gn +++ b/modules/pacing/BUILD.gn @@ -96,7 +96,6 @@ if (rtc_include_tests) { "../rtp_rtcp", "../rtp_rtcp:mock_rtp_rtcp", "../rtp_rtcp:rtp_rtcp_format", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/modules/pacing/paced_sender_unittest.cc b/modules/pacing/paced_sender_unittest.cc index 581ff20ce4..7eb5350f51 100644 --- a/modules/pacing/paced_sender_unittest.cc +++ b/modules/pacing/paced_sender_unittest.cc @@ -16,7 +16,6 @@ #include #include -#include "absl/memory/memory.h" #include "modules/pacing/packet_router.h" #include "modules/utility/include/mock/mock_process_thread.h" #include "system_wrappers/include/clock.h" @@ -53,7 +52,7 @@ class MockCallback : public PacketRouter { }; std::unique_ptr BuildRtpPacket(RtpPacketToSend::Type type) { - auto packet = absl::make_unique(nullptr); + auto packet = std::make_unique(nullptr); packet->set_packet_type(type); switch (type) { case RtpPacketToSend::Type::kAudio: diff --git a/modules/pacing/pacing_controller.cc b/modules/pacing/pacing_controller.cc index 3ee7410e3d..1633de96f9 100644 --- a/modules/pacing/pacing_controller.cc +++ b/modules/pacing/pacing_controller.cc @@ -11,10 +11,10 @@ #include "modules/pacing/pacing_controller.h" #include +#include #include #include -#include "absl/memory/memory.h" #include "modules/pacing/bitrate_prober.h" #include "modules/pacing/interval_budget.h" #include "modules/utility/include/process_thread.h" @@ -81,7 +81,7 @@ PacingController::PacingController(Clock* clock, : clock_(clock), packet_sender_(packet_sender), fallback_field_trials_( - !field_trials ? absl::make_unique() : nullptr), + !field_trials ? std::make_unique() : nullptr), field_trials_(field_trials ? field_trials : fallback_field_trials_.get()), drain_large_queues_( !IsDisabled(*field_trials_, "WebRTC-Pacer-DrainQueue")), diff --git a/modules/pacing/pacing_controller_unittest.cc b/modules/pacing/pacing_controller_unittest.cc index e07e8c85ab..bcd4384b66 100644 --- a/modules/pacing/pacing_controller_unittest.cc +++ b/modules/pacing/pacing_controller_unittest.cc @@ -17,7 +17,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/units/data_rate.h" #include "modules/pacing/packet_router.h" #include "system_wrappers/include/clock.h" @@ -56,7 +55,7 @@ std::unique_ptr BuildPacket(RtpPacketToSend::Type type, uint16_t sequence_number, int64_t capture_time_ms, size_t size) { - auto packet = absl::make_unique(nullptr); + auto packet = std::make_unique(nullptr); packet->set_packet_type(type); packet->SetSsrc(ssrc); packet->SetSequenceNumber(sequence_number); @@ -83,7 +82,7 @@ class MockPacingControllerCallback : public PacingController::PacketSender { std::vector> ret; size_t padding_size = SendPadding(target_size.bytes()); if (padding_size > 0) { - auto packet = absl::make_unique(nullptr); + auto packet = std::make_unique(nullptr); packet->SetPayloadSize(padding_size); packet->set_packet_type(RtpPacketToSend::Type::kPadding); ret.emplace_back(std::move(packet)); @@ -126,7 +125,7 @@ class PacingControllerPadding : public PacingController::PacketSender { (target_size.bytes() + kPaddingPacketSize - 1) / kPaddingPacketSize; std::vector> packets; for (size_t i = 0; i < num_packets; ++i) { - packets.emplace_back(absl::make_unique(nullptr)); + packets.emplace_back(std::make_unique(nullptr)); packets.back()->SetPadding(kPaddingPacketSize); packets.back()->set_packet_type(RtpPacketToSend::Type::kPadding); padding_sent_ += kPaddingPacketSize; @@ -154,7 +153,7 @@ class PacingControllerProbing : public PacingController::PacketSender { std::vector> GeneratePadding( DataSize target_size) override { std::vector> packets; - packets.emplace_back(absl::make_unique(nullptr)); + packets.emplace_back(std::make_unique(nullptr)); packets.back()->SetPadding(target_size.bytes()); packets.back()->set_packet_type(RtpPacketToSend::Type::kPadding); padding_sent_ += target_size.bytes(); @@ -175,8 +174,8 @@ class PacingControllerTest : public ::testing::Test { PacingControllerTest() : clock_(123456) { srand(0); // Need to initialize PacingController after we initialize clock. - pacer_ = absl::make_unique(&clock_, &callback_, nullptr, - nullptr); + pacer_ = std::make_unique(&clock_, &callback_, nullptr, + nullptr); Init(); } @@ -215,7 +214,7 @@ class PacingControllerTest : public ::testing::Test { } std::unique_ptr BuildRtpPacket(RtpPacketToSend::Type type) { - auto packet = absl::make_unique(nullptr); + auto packet = std::make_unique(nullptr); packet->set_packet_type(type); switch (type) { case RtpPacketToSend::Type::kAudio: @@ -614,7 +613,7 @@ TEST_F(PacingControllerTest, VerifyAverageBitrateVaryingMediaPayload) { const int64_t kBitrateWindow = 10000; PacingControllerPadding callback; pacer_ = - absl::make_unique(&clock_, &callback, nullptr, nullptr); + std::make_unique(&clock_, &callback, nullptr, nullptr); pacer_->SetProbingEnabled(false); pacer_->SetPacingRates(kTargetRate * kPaceMultiplier, kTargetRate); @@ -1066,8 +1065,8 @@ TEST_F(PacingControllerTest, ProbingWithInsertedPackets) { uint16_t sequence_number = 1234; PacingControllerProbing packet_sender; - pacer_ = absl::make_unique(&clock_, &packet_sender, nullptr, - nullptr); + pacer_ = std::make_unique(&clock_, &packet_sender, nullptr, + nullptr); pacer_->CreateProbeCluster(kFirstClusterRate, /*cluster_id=*/0); pacer_->CreateProbeCluster(kSecondClusterRate, @@ -1113,8 +1112,8 @@ TEST_F(PacingControllerTest, ProbingWithPaddingSupport) { uint16_t sequence_number = 1234; PacingControllerProbing packet_sender; - pacer_ = absl::make_unique(&clock_, &packet_sender, nullptr, - nullptr); + pacer_ = std::make_unique(&clock_, &packet_sender, nullptr, + nullptr); pacer_->CreateProbeCluster(kFirstClusterRate, /*cluster_id=*/0); pacer_->SetPacingRates(DataRate::bps(kInitialBitrateBps * kPaceMultiplier), @@ -1174,7 +1173,7 @@ TEST_F(PacingControllerTest, ProbeClusterId) { MockPacketSender callback; pacer_ = - absl::make_unique(&clock_, &callback, nullptr, nullptr); + std::make_unique(&clock_, &callback, nullptr, nullptr); Init(); uint32_t ssrc = 12346; @@ -1228,7 +1227,7 @@ TEST_F(PacingControllerTest, ProbeClusterId) { TEST_F(PacingControllerTest, OwnedPacketPrioritizedOnType) { MockPacketSender callback; pacer_ = - absl::make_unique(&clock_, &callback, nullptr, nullptr); + std::make_unique(&clock_, &callback, nullptr, nullptr); Init(); // Insert a packet of each type, from low to high priority. Since priority diff --git a/modules/pacing/packet_router_unittest.cc b/modules/pacing/packet_router_unittest.cc index ec82a66c4c..22de6179ab 100644 --- a/modules/pacing/packet_router_unittest.cc +++ b/modules/pacing/packet_router_unittest.cc @@ -12,9 +12,9 @@ #include #include +#include #include -#include "absl/memory/memory.h" #include "api/units/time_delta.h" #include "modules/rtp_rtcp/include/rtp_header_extension_map.h" #include "modules/rtp_rtcp/mocks/mock_rtp_rtcp.h" @@ -58,7 +58,7 @@ class PacketRouterTest : public ::testing::Test { protected: std::unique_ptr BuildRtpPacket(uint32_t ssrc) { std::unique_ptr packet = - absl::make_unique(&extension_manager); + std::make_unique(&extension_manager); packet->SetSsrc(ssrc); return packet; } @@ -265,7 +265,7 @@ TEST_F(PacketRouterTest, SendPacketWithoutTransportSequenceNumbers) { // Send a packet without TransportSequenceNumber extension registered, // packets sent should not have the extension set. RtpHeaderExtensionMap extension_manager; - auto packet = absl::make_unique(&extension_manager); + auto packet = std::make_unique(&extension_manager); packet->SetSsrc(kSsrc1); EXPECT_CALL( rtp_1, diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index 2f3c079998..ddb8eb2158 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -117,7 +117,6 @@ rtc_source_set("rtp_rtcp_format") { "../../system_wrappers", "../video_coding:codec_globals_headers", "//third_party/abseil-cpp/absl/algorithm:container", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:variant", @@ -260,7 +259,6 @@ rtc_static_library("rtp_rtcp") { "../video_coding:codec_globals_headers", "//third_party/abseil-cpp/absl/algorithm:container", "//third_party/abseil-cpp/absl/container:inlined_vector", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:variant", diff --git a/modules/rtp_rtcp/source/nack_rtx_unittest.cc b/modules/rtp_rtcp/source/nack_rtx_unittest.cc index bd13280410..d9717a6f7e 100644 --- a/modules/rtp_rtcp/source/nack_rtx_unittest.cc +++ b/modules/rtp_rtcp/source/nack_rtx_unittest.cc @@ -14,7 +14,6 @@ #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/call/transport.h" #include "api/transport/field_trial_based_config.h" #include "call/rtp_stream_receiver_controller.h" @@ -137,7 +136,7 @@ class RtpRtcpRtxNackTest : public ::testing::Test { configuration.retransmission_rate_limiter = &retransmission_rate_limiter_; configuration.local_media_ssrc = kTestSsrc; rtp_rtcp_module_ = RtpRtcp::Create(configuration); - rtp_sender_video_ = absl::make_unique( + rtp_sender_video_ = std::make_unique( &fake_clock, rtp_rtcp_module_->RtpSender(), nullptr, &playout_delay_oracle_, nullptr, false, false, false, FieldTrialBasedConfig()); diff --git a/modules/rtp_rtcp/source/receive_statistics_impl.cc b/modules/rtp_rtcp/source/receive_statistics_impl.cc index 4720776d81..0c47e08b1e 100644 --- a/modules/rtp_rtcp/source/receive_statistics_impl.cc +++ b/modules/rtp_rtcp/source/receive_statistics_impl.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "modules/remote_bitrate_estimator/test/bwe_test_logging.h" #include "modules/rtp_rtcp/source/rtp_packet_received.h" #include "modules/rtp_rtcp/source/rtp_rtcp_config.h" @@ -296,7 +295,7 @@ bool StreamStatisticianImpl::IsRetransmitOfOldPacket( } std::unique_ptr ReceiveStatistics::Create(Clock* clock) { - return absl::make_unique(clock); + return std::make_unique(clock); } ReceiveStatisticsImpl::ReceiveStatisticsImpl(Clock* clock) diff --git a/modules/rtp_rtcp/source/rtcp_receiver.cc b/modules/rtp_rtcp/source/rtcp_receiver.cc index 71005daaf2..f06fd1c361 100644 --- a/modules/rtp_rtcp/source/rtcp_receiver.cc +++ b/modules/rtp_rtcp/source/rtcp_receiver.cc @@ -18,7 +18,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/video/video_bitrate_allocation.h" #include "api/video/video_bitrate_allocator.h" #include "modules/rtp_rtcp/source/rtcp_packet/bye.h" @@ -911,7 +910,7 @@ void RTCPReceiver::HandlePsfbApp(const CommonHeader& rtcp_block, } { - auto loss_notification = absl::make_unique(); + auto loss_notification = std::make_unique(); if (loss_notification->Parse(rtcp_block)) { packet_information->packet_type_flags |= kRtcpLossNotification; packet_information->loss_notification = std::move(loss_notification); diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc index 4c1a2410bb..ba46ecef58 100644 --- a/modules/rtp_rtcp/source/rtcp_sender.cc +++ b/modules/rtp_rtcp/source/rtcp_sender.cc @@ -13,9 +13,9 @@ #include // memcpy #include // std::min +#include #include -#include "absl/memory/memory.h" #include "api/rtc_event_log/rtc_event_log.h" #include "logging/rtc_event_log/events/rtc_event_rtcp_packet_outgoing.h" #include "modules/rtp_rtcp/source/rtcp_packet/app.h" @@ -82,8 +82,7 @@ class PacketContainer : public rtcp::CompoundPacket { if (transport_->SendRtcp(packet.data(), packet.size())) { bytes_sent += packet.size(); if (event_log_) { - event_log_->Log( - absl::make_unique(packet)); + event_log_->Log(std::make_unique(packet)); } } }); @@ -606,7 +605,7 @@ std::unique_ptr RTCPSender::BuildAPP(const RtcpContext& ctx) { std::unique_ptr RTCPSender::BuildLossNotification( const RtcpContext& ctx) { - auto loss_notification = absl::make_unique( + auto loss_notification = std::make_unique( loss_notification_state_.last_decoded_seq_num, loss_notification_state_.last_received_seq_num, loss_notification_state_.decodability_flag); @@ -989,7 +988,7 @@ bool RTCPSender::SendFeedbackPacket(const rtcp::TransportFeedback& packet) { auto callback = [&](rtc::ArrayView packet) { if (transport_->SendRtcp(packet.data(), packet.size())) { if (event_log_) - event_log_->Log(absl::make_unique(packet)); + event_log_->Log(std::make_unique(packet)); } else { send_failure = true; } diff --git a/modules/rtp_rtcp/source/rtcp_transceiver.cc b/modules/rtp_rtcp/source/rtcp_transceiver.cc index 91ef4cdde3..4538301c2a 100644 --- a/modules/rtp_rtcp/source/rtcp_transceiver.cc +++ b/modules/rtp_rtcp/source/rtcp_transceiver.cc @@ -10,9 +10,9 @@ #include "modules/rtp_rtcp/source/rtcp_transceiver.h" +#include #include -#include "absl/memory/memory.h" #include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" #include "rtc_base/checks.h" #include "rtc_base/event.h" @@ -23,7 +23,7 @@ namespace webrtc { RtcpTransceiver::RtcpTransceiver(const RtcpTransceiverConfig& config) : task_queue_(config.task_queue), - rtcp_transceiver_(absl::make_unique(config)) { + rtcp_transceiver_(std::make_unique(config)) { RTC_DCHECK(task_queue_); } diff --git a/modules/rtp_rtcp/source/rtcp_transceiver_unittest.cc b/modules/rtp_rtcp/source/rtcp_transceiver_unittest.cc index 12bf49c268..8be17ca47e 100644 --- a/modules/rtp_rtcp/source/rtcp_transceiver_unittest.cc +++ b/modules/rtp_rtcp/source/rtcp_transceiver_unittest.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "modules/rtp_rtcp/source/rtcp_packet/sender_report.h" #include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" #include "rtc_base/event.h" @@ -79,7 +78,7 @@ TEST(RtcpTransceiverTest, SendsRtcpOnTaskQueueWhenCreatedOnTaskQueue) { std::unique_ptr rtcp_transceiver; queue.PostTask([&] { - rtcp_transceiver = absl::make_unique(config); + rtcp_transceiver = std::make_unique(config); rtcp_transceiver->SendCompoundPacket(); }); WaitPostedTasks(&queue); @@ -91,7 +90,7 @@ TEST(RtcpTransceiverTest, CanBeDestroyedOnTaskQueue) { RtcpTransceiverConfig config; config.outgoing_transport = &outgoing_transport; config.task_queue = &queue; - auto rtcp_transceiver = absl::make_unique(config); + auto rtcp_transceiver = std::make_unique(config); queue.PostTask([&] { // Insert a packet just before destruction to test for races. @@ -162,7 +161,7 @@ TEST(RtcpTransceiverTest, DoesntPostToRtcpObserverAfterCallToRemove) { RtcpTransceiver rtcp_transceiver(config); rtc::Event observer_deleted; - auto observer = absl::make_unique(); + auto observer = std::make_unique(); EXPECT_CALL(*observer, OnSenderReport(kRemoteSsrc, _, 1)); EXPECT_CALL(*observer, OnSenderReport(kRemoteSsrc, _, 2)).Times(0); @@ -187,7 +186,7 @@ TEST(RtcpTransceiverTest, RemoveMediaReceiverRtcpObserverIsNonBlocking) { config.outgoing_transport = &null_transport; config.task_queue = &queue; RtcpTransceiver rtcp_transceiver(config); - auto observer = absl::make_unique(); + auto observer = std::make_unique(); rtcp_transceiver.AddMediaReceiverRtcpObserver(kRemoteSsrc, observer.get()); rtc::Event queue_blocker; @@ -241,7 +240,7 @@ TEST(RtcpTransceiverTest, DoesntSendPacketsAfterStopCallback) { config.task_queue = &queue; config.schedule_periodic_compound_packets = true; - auto rtcp_transceiver = absl::make_unique(config); + auto rtcp_transceiver = std::make_unique(config); rtc::Event done; rtcp_transceiver->SendCompoundPacket(); rtcp_transceiver->Stop([&] { diff --git a/modules/rtp_rtcp/source/rtp_dependency_descriptor_reader.cc b/modules/rtp_rtcp/source/rtp_dependency_descriptor_reader.cc index 1ed0e20bad..8f0dcedf7b 100644 --- a/modules/rtp_rtcp/source/rtp_dependency_descriptor_reader.cc +++ b/modules/rtp_rtcp/source/rtp_dependency_descriptor_reader.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "rtc_base/bit_buffer.h" #include "rtc_base/checks.h" @@ -65,7 +64,7 @@ uint32_t RtpDependencyDescriptorReader::ReadNonSymmetric(size_t num_values) { void RtpDependencyDescriptorReader::ReadTemplateDependencyStructure() { descriptor_->attached_structure = - absl::make_unique(); + std::make_unique(); descriptor_->attached_structure->structure_id = ReadBits(6); descriptor_->attached_structure->num_decode_targets = ReadBits(5) + 1; diff --git a/modules/rtp_rtcp/source/rtp_format.cc b/modules/rtp_rtcp/source/rtp_format.cc index e870232a4d..df9cb023ad 100644 --- a/modules/rtp_rtcp/source/rtp_format.cc +++ b/modules/rtp_rtcp/source/rtp_format.cc @@ -10,7 +10,8 @@ #include "modules/rtp_rtcp/source/rtp_format.h" -#include "absl/memory/memory.h" +#include + #include "absl/types/variant.h" #include "modules/rtp_rtcp/source/rtp_format_h264.h" #include "modules/rtp_rtcp/source/rtp_format_video_generic.h" @@ -33,7 +34,7 @@ std::unique_ptr RtpPacketizer::Create( const RTPFragmentationHeader* fragmentation) { if (!type) { // Use raw packetizer. - return absl::make_unique(payload, limits); + return std::make_unique(payload, limits); } switch (*type) { @@ -41,21 +42,21 @@ std::unique_ptr RtpPacketizer::Create( RTC_CHECK(fragmentation); const auto& h264 = absl::get(rtp_video_header.video_type_header); - return absl::make_unique( + return std::make_unique( payload, limits, h264.packetization_mode, *fragmentation); } case kVideoCodecVP8: { const auto& vp8 = absl::get(rtp_video_header.video_type_header); - return absl::make_unique(payload, limits, vp8); + return std::make_unique(payload, limits, vp8); } case kVideoCodecVP9: { const auto& vp9 = absl::get(rtp_video_header.video_type_header); - return absl::make_unique(payload, limits, vp9); + return std::make_unique(payload, limits, vp9); } default: { - return absl::make_unique( + return std::make_unique( payload, limits, rtp_video_header, frame_type); } } diff --git a/modules/rtp_rtcp/source/rtp_packet_history.cc b/modules/rtp_rtcp/source/rtp_packet_history.cc index e23e0bf647..fd8e5ddb17 100644 --- a/modules/rtp_rtcp/source/rtp_packet_history.cc +++ b/modules/rtp_rtcp/source/rtp_packet_history.cc @@ -12,9 +12,9 @@ #include #include +#include #include -#include "absl/memory/memory.h" #include "modules/rtp_rtcp/source/rtp_packet_to_send.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" @@ -190,14 +190,14 @@ std::unique_ptr RtpPacketHistory::GetPacketAndSetSendTime( packet->pending_transmission_ = false; // Return copy of packet instance since it may need to be retransmitted. - return absl::make_unique(*packet->packet_); + return std::make_unique(*packet->packet_); } std::unique_ptr RtpPacketHistory::GetPacketAndMarkAsPending( uint16_t sequence_number) { return GetPacketAndMarkAsPending( sequence_number, [](const RtpPacketToSend& packet) { - return absl::make_unique(packet); + return std::make_unique(packet); }); } @@ -298,7 +298,7 @@ bool RtpPacketHistory::VerifyRtt(const RtpPacketHistory::StoredPacket& packet, std::unique_ptr RtpPacketHistory::GetPayloadPaddingPacket() { // Default implementation always just returns a copy of the packet. return GetPayloadPaddingPacket([](const RtpPacketToSend& packet) { - return absl::make_unique(packet); + return std::make_unique(packet); }); } diff --git a/modules/rtp_rtcp/source/rtp_packet_history_unittest.cc b/modules/rtp_rtcp/source/rtp_packet_history_unittest.cc index c26c2cccb4..9e9d6213c9 100644 --- a/modules/rtp_rtcp/source/rtp_packet_history_unittest.cc +++ b/modules/rtp_rtcp/source/rtp_packet_history_unittest.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "modules/rtp_rtcp/source/rtp_packet_to_send.h" #include "system_wrappers/include/clock.h" @@ -600,7 +599,7 @@ TEST_F(RtpPacketHistoryTest, GetPacketWithEncapsulation) { hist_.GetPacketAndMarkAsPending( kStartSeqNum, [](const RtpPacketToSend& packet) { auto encapsulated_packet = - absl::make_unique(packet); + std::make_unique(packet); encapsulated_packet->SetSsrc(packet.Ssrc() + 1); return encapsulated_packet; }); @@ -728,7 +727,7 @@ TEST_F(RtpPacketHistoryTest, PayloadPaddingWithEncapsulation) { // Get copy of packet, but with sequence number modified. auto padding_packet = hist_.GetPayloadPaddingPacket([&](const RtpPacketToSend& packet) { - auto encapsulated_packet = absl::make_unique(packet); + auto encapsulated_packet = std::make_unique(packet); encapsulated_packet->SetSequenceNumber(kStartSeqNum + 1); return encapsulated_packet; }); diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc index eaba788c88..cb826f6655 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc @@ -14,11 +14,11 @@ #include #include +#include #include #include #include -#include "absl/memory/memory.h" #include "api/transport/field_trial_based_config.h" #include "modules/rtp_rtcp/source/rtcp_packet/dlrr.h" #include "modules/rtp_rtcp/source/rtp_rtcp_config.h" @@ -43,7 +43,7 @@ RtpRtcp::Configuration::Configuration(Configuration&& rhs) = default; std::unique_ptr RtpRtcp::Create(const Configuration& configuration) { RTC_DCHECK(configuration.clock); - return absl::make_unique(configuration); + return std::make_unique(configuration); } ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration) diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc index 97dbe01e13..3a9775e897 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/transport/field_trial_based_config.h" #include "api/video_codecs/video_codec.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" @@ -179,7 +178,7 @@ class RtpRtcpImplTest : public ::testing::Test { sender_.impl_->SetSequenceNumber(kSequenceNumber); sender_.impl_->SetStorePacketsStatus(true, 100); - sender_video_ = absl::make_unique( + sender_video_ = std::make_unique( &clock_, sender_.impl_->RtpSender(), nullptr, &playout_delay_oracle_, nullptr, false, false, false, FieldTrialBasedConfig()); diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc index 135564d284..b95041a115 100644 --- a/modules/rtp_rtcp/source/rtp_sender.cc +++ b/modules/rtp_rtcp/source/rtp_sender.cc @@ -12,10 +12,10 @@ #include #include +#include #include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "api/array_view.h" #include "api/rtc_event_log/rtc_event_log.h" @@ -329,7 +329,7 @@ int32_t RTPSender::ReSendPacket(uint16_t packet_id) { retransmit_packet = BuildRtxPacket(stored_packet); } else { retransmit_packet = - absl::make_unique(stored_packet); + std::make_unique(stored_packet); } if (retransmit_packet) { retransmit_packet->set_retransmitted_sequence_number( @@ -367,7 +367,7 @@ bool RTPSender::SendPacketToNetwork(const RtpPacketToSend& packet, ? static_cast(packet.size()) : -1; if (event_log_ && bytes_sent > 0) { - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( packet, pacing_info.probe_cluster_id)); } } @@ -492,7 +492,7 @@ bool RTPSender::TrySendPacket(RtpPacketToSend* packet, // Put packet in retransmission history or update pending status even if // actual sending fails. if (is_media && packet->allow_retransmission()) { - packet_history_.PutRtpPacket(absl::make_unique(*packet), + packet_history_.PutRtpPacket(std::make_unique(*packet), now_ms); } else if (packet->retransmitted_sequence_number()) { packet_history_.MarkPacketAsSent(*packet->retransmitted_sequence_number()); @@ -599,7 +599,7 @@ std::vector> RTPSender::GeneratePadding( while (bytes_left > 0) { auto padding_packet = - absl::make_unique(&rtp_header_extension_map_); + std::make_unique(&rtp_header_extension_map_); padding_packet->set_packet_type(RtpPacketToSend::Type::kPadding); padding_packet->SetMarker(false); padding_packet->SetTimestamp(last_rtp_timestamp_); @@ -825,7 +825,7 @@ std::unique_ptr RTPSender::AllocatePacket() const { // While sending slightly oversized packet increase chance of dropped packet, // it is better than crash on drop packet without trying to send it. static constexpr int kExtraCapacity = 16; - auto packet = absl::make_unique( + auto packet = std::make_unique( &rtp_header_extension_map_, max_packet_size_ + kExtraCapacity); RTC_DCHECK(ssrc_); packet->SetSsrc(*ssrc_); @@ -1037,8 +1037,8 @@ std::unique_ptr RTPSender::BuildRtxPacket( if (kv == rtx_payload_type_map_.end()) return nullptr; - rtx_packet = absl::make_unique(&rtp_header_extension_map_, - max_packet_size_); + rtx_packet = std::make_unique(&rtp_header_extension_map_, + max_packet_size_); rtx_packet->SetPayloadType(kv->second); diff --git a/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_unittest.cc index eb594c1efe..0d5c941765 100644 --- a/modules/rtp_rtcp/source/rtp_sender_unittest.cc +++ b/modules/rtp_rtcp/source/rtp_sender_unittest.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/rtc_event_log/rtc_event.h" #include "api/transport/field_trial_based_config.h" #include "api/video/video_codec_constants.h" @@ -262,8 +261,8 @@ class RtpSenderTest : public ::testing::TestWithParam { packet->set_allow_retransmission(true); // Packet should be stored in a send bucket. - EXPECT_TRUE(rtp_sender_->SendToNetwork( - absl::make_unique(*packet))); + EXPECT_TRUE( + rtp_sender_->SendToNetwork(std::make_unique(*packet))); return packet; } @@ -406,7 +405,7 @@ TEST_P(RtpSenderTest, AssignSequenceNumberAllowsPaddingOnAudio) { config.local_media_ssrc = kSsrc; config.event_log = &mock_rtc_event_log_; config.retransmission_rate_limiter = &retransmission_rate_limiter_; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); rtp_sender_->SetTimestampOffset(0); @@ -456,7 +455,7 @@ TEST_P(RtpSenderTestWithoutPacer, config.event_log = &mock_rtc_event_log_; config.retransmission_rate_limiter = &retransmission_rate_limiter_; config.overhead_observer = &mock_overhead_observer; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); EXPECT_EQ(0, rtp_sender_->RegisterRtpHeaderExtension( kRtpExtensionTransportSequenceNumber, @@ -492,7 +491,7 @@ TEST_P(RtpSenderTestWithoutPacer, SendsPacketsWithTransportSequenceNumber) { config.event_log = &mock_rtc_event_log_; config.send_packet_observer = &send_packet_observer_; config.retransmission_rate_limiter = &retransmission_rate_limiter_; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); EXPECT_EQ(0, rtp_sender_->RegisterRtpHeaderExtension( kRtpExtensionTransportSequenceNumber, @@ -531,7 +530,7 @@ TEST_P(RtpSenderTestWithoutPacer, PacketOptionsNoRetransmission) { config.event_log = &mock_rtc_event_log_; config.send_packet_observer = &send_packet_observer_; config.retransmission_rate_limiter = &retransmission_rate_limiter_; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); SendGenericPacket(); @@ -584,7 +583,7 @@ TEST_P(RtpSenderTestWithoutPacer, OnSendSideDelayUpdated) { config.local_media_ssrc = kSsrc; config.send_side_delay_observer = &send_side_delay_observer_; config.event_log = &mock_rtc_event_log_; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); PlayoutDelayOracle playout_delay_oracle; RTPSenderVideo rtp_sender_video(&fake_clock_, rtp_sender_.get(), nullptr, @@ -674,7 +673,7 @@ TEST_P(RtpSenderTest, SendsPacketsWithTransportSequenceNumber) { config.event_log = &mock_rtc_event_log_; config.send_packet_observer = &send_packet_observer_; config.retransmission_rate_limiter = &retransmission_rate_limiter_; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); rtp_sender_->SetSequenceNumber(kSeqNum); rtp_sender_->SetStorePacketsStatus(true, 10); @@ -735,7 +734,7 @@ TEST_P(RtpSenderTest, WritesPacerExitToTimingExtension) { EXPECT_CALL(mock_paced_sender_, EnqueuePacket(Pointee(Property(&RtpPacketToSend::Ssrc, kSsrc)))); EXPECT_TRUE( - rtp_sender_->SendToNetwork(absl::make_unique(*packet))); + rtp_sender_->SendToNetwork(std::make_unique(*packet))); fake_clock_.AdvanceTimeMilliseconds(kStoredTimeInMs); rtp_sender_->TrySendPacket(packet.get(), PacedPacketInfo()); EXPECT_EQ(1, transport_.packets_sent()); @@ -771,8 +770,8 @@ TEST_P(RtpSenderTest, WritesNetwork2ToTimingExtensionWithPacer) { EXPECT_CALL( mock_paced_sender_, EnqueuePacket(Pointee(Property(&RtpPacketToSend::Ssrc, kSsrc)))); - EXPECT_TRUE(rtp_sender_->SendToNetwork( - absl::make_unique(*packet))); + EXPECT_TRUE( + rtp_sender_->SendToNetwork(std::make_unique(*packet))); fake_clock_.AdvanceTimeMilliseconds(kStoredTimeInMs); rtp_sender_->TrySendPacket(packet.get(), PacedPacketInfo()); @@ -835,8 +834,8 @@ TEST_P(RtpSenderTest, TrafficSmoothingWithExtensions) { Pointee(Property(&RtpPacketToSend::SequenceNumber, kSeqNum))))); packet->set_packet_type(RtpPacketToSend::Type::kVideo); packet->set_allow_retransmission(true); - EXPECT_TRUE(rtp_sender_->SendToNetwork( - absl::make_unique(*packet))); + EXPECT_TRUE( + rtp_sender_->SendToNetwork(std::make_unique(*packet))); EXPECT_EQ(0, transport_.packets_sent()); fake_clock_.AdvanceTimeMilliseconds(kStoredTimeInMs); rtp_sender_->TrySendPacket(packet.get(), PacedPacketInfo()); @@ -879,8 +878,8 @@ TEST_P(RtpSenderTest, TrafficSmoothingRetransmits) { Pointee(Property(&RtpPacketToSend::SequenceNumber, kSeqNum))))); packet->set_packet_type(RtpPacketToSend::Type::kVideo); packet->set_allow_retransmission(true); - EXPECT_TRUE(rtp_sender_->SendToNetwork( - absl::make_unique(*packet))); + EXPECT_TRUE( + rtp_sender_->SendToNetwork(std::make_unique(*packet))); // Immediately process send bucket and send packet. rtp_sender_->TrySendPacket(packet.get(), PacedPacketInfo()); @@ -958,8 +957,8 @@ TEST_P(RtpSenderTest, SendPadding) { Pointee(Property(&RtpPacketToSend::SequenceNumber, kSeqNum))))); packet->set_packet_type(RtpPacketToSend::Type::kVideo); packet->set_allow_retransmission(true); - EXPECT_TRUE(rtp_sender_->SendToNetwork( - absl::make_unique(*packet))); + EXPECT_TRUE( + rtp_sender_->SendToNetwork(std::make_unique(*packet))); EXPECT_EQ(total_packets_sent, transport_.packets_sent()); fake_clock_.AdvanceTimeMilliseconds(kStoredTimeInMs); rtp_sender_->TrySendPacket(packet.get(), PacedPacketInfo()); @@ -1012,8 +1011,8 @@ TEST_P(RtpSenderTest, SendPadding) { EnqueuePacket(AllOf( Pointee(Property(&RtpPacketToSend::Ssrc, kSsrc)), Pointee(Property(&RtpPacketToSend::SequenceNumber, seq_num))))); - EXPECT_TRUE(rtp_sender_->SendToNetwork( - absl::make_unique(*packet))); + EXPECT_TRUE( + rtp_sender_->SendToNetwork(std::make_unique(*packet))); rtp_sender_->TrySendPacket(packet.get(), PacedPacketInfo()); // Process send bucket. @@ -1160,7 +1159,7 @@ TEST_P(RtpSenderTest, SendFlexfecPackets) { config.event_log = &mock_rtc_event_log_; config.send_packet_observer = &send_packet_observer_; config.retransmission_rate_limiter = &retransmission_rate_limiter_; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); rtp_sender_->SetSequenceNumber(kSeqNum); rtp_sender_->SetStorePacketsStatus(true, 10); @@ -1246,7 +1245,7 @@ TEST_P(RtpSenderTest, NoFlexfecForTimingFrames) { config.send_packet_observer = &send_packet_observer_; config.retransmission_rate_limiter = &retransmission_rate_limiter_; config.local_media_ssrc = kSsrc; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); rtp_sender_->SetSequenceNumber(kSeqNum); rtp_sender_->SetStorePacketsStatus(true, 10); @@ -1370,7 +1369,7 @@ TEST_P(RtpSenderTestWithoutPacer, SendFlexfecPackets) { config.event_log = &mock_rtc_event_log_; config.send_packet_observer = &send_packet_observer_; config.retransmission_rate_limiter = &retransmission_rate_limiter_; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); rtp_sender_->SetSequenceNumber(kSeqNum); @@ -1638,7 +1637,7 @@ TEST_P(RtpSenderTest, FecOverheadRate) { config.event_log = &mock_rtc_event_log_; config.send_packet_observer = &send_packet_observer_; config.retransmission_rate_limiter = &retransmission_rate_limiter_; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); rtp_sender_->SetSequenceNumber(kSeqNum); @@ -1713,7 +1712,7 @@ TEST_P(RtpSenderTest, BitrateCallbacks) { config.local_media_ssrc = kSsrc; config.send_bitrate_observer = &callback; config.retransmission_rate_limiter = &retransmission_rate_limiter_; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); PlayoutDelayOracle playout_delay_oracle; RTPSenderVideo rtp_sender_video(&fake_clock_, rtp_sender_.get(), nullptr, @@ -1952,7 +1951,7 @@ TEST_P(RtpSenderTest, OnOverheadChanged) { config.local_media_ssrc = kSsrc; config.retransmission_rate_limiter = &retransmission_rate_limiter_; config.overhead_observer = &mock_overhead_observer; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); // RTP overhead is 12B. EXPECT_CALL(mock_overhead_observer, OnOverheadChanged(12)).Times(1); @@ -1975,7 +1974,7 @@ TEST_P(RtpSenderTest, DoesNotUpdateOverheadOnEqualSize) { config.local_media_ssrc = kSsrc; config.retransmission_rate_limiter = &retransmission_rate_limiter_; config.overhead_observer = &mock_overhead_observer; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); EXPECT_CALL(mock_overhead_observer, OnOverheadChanged(_)).Times(1); SendGenericPacket(); @@ -2201,7 +2200,7 @@ TEST_P(RtpSenderTest, TrySendPacketUpdatesStats) { config.send_side_delay_observer = &send_side_delay_observer; config.event_log = &mock_rtc_event_log_; config.send_packet_observer = &send_packet_observer_; - rtp_sender_ = absl::make_unique(config); + rtp_sender_ = std::make_unique(config); ASSERT_EQ(0, rtp_sender_->RegisterRtpHeaderExtension( kRtpExtensionTransportSequenceNumber, kTransportSequenceNumberExtensionId)); diff --git a/modules/rtp_rtcp/source/rtp_sender_video.cc b/modules/rtp_rtcp/source/rtp_sender_video.cc index cd475cd8eb..a0fd668fe3 100644 --- a/modules/rtp_rtcp/source/rtp_sender_video.cc +++ b/modules/rtp_rtcp/source/rtp_sender_video.cc @@ -18,7 +18,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "api/crypto/frame_encryptor_interface.h" #include "modules/remote_bitrate_estimator/test/bwe_test_logging.h" @@ -216,7 +215,7 @@ RTPSenderVideo::RTPSenderVideo(Clock* clock, transmit_color_space_next_frame_(false), playout_delay_oracle_(playout_delay_oracle), rtp_sequence_number_map_(need_rtp_packet_infos - ? absl::make_unique( + ? std::make_unique( kRtpSequenceNumberMapMaxEntries) : nullptr), red_payload_type_(-1), @@ -552,9 +551,9 @@ bool RTPSenderVideo::SendVideo( single_packet->SetTimestamp(rtp_timestamp); single_packet->set_capture_time_ms(capture_time_ms); - auto first_packet = absl::make_unique(*single_packet); - auto middle_packet = absl::make_unique(*single_packet); - auto last_packet = absl::make_unique(*single_packet); + auto first_packet = std::make_unique(*single_packet); + auto middle_packet = std::make_unique(*single_packet); + auto last_packet = std::make_unique(*single_packet); // Simplest way to estimate how much extensions would occupy is to set them. AddRtpHeaderExtensions(*video_header, playout_delay, frame_type, set_video_rotation, set_color_space, set_frame_marking, @@ -706,7 +705,7 @@ bool RTPSenderVideo::SendVideo( expected_payload_capacity = limits.max_payload_len - limits.last_packet_reduction_len; } else { - packet = absl::make_unique(*middle_packet); + packet = std::make_unique(*middle_packet); expected_payload_capacity = limits.max_payload_len; } diff --git a/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc b/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc index 1974923ead..80e0302d01 100644 --- a/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc +++ b/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/scoped_refptr.h" #include "modules/rtp_rtcp/source/byte_io.h" #include "modules/rtp_rtcp/source/rtp_packet_received.h" @@ -28,7 +27,7 @@ std::unique_ptr UlpfecReceiver::Create( uint32_t ssrc, RecoveredPacketReceiver* callback, rtc::ArrayView extensions) { - return absl::make_unique(ssrc, callback, extensions); + return std::make_unique(ssrc, callback, extensions); } UlpfecReceiverImpl::UlpfecReceiverImpl( diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index a385695ac4..ae7e32ab10 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -337,7 +337,6 @@ rtc_static_library("webrtc_h264") { "../../rtc_base/system:rtc_export", "../../system_wrappers:field_trial", "../../system_wrappers:metrics", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", "//third_party/libyuv", @@ -423,7 +422,6 @@ rtc_static_library("webrtc_vp8") { "../../rtc_base/experiments:rate_control_settings", "../../system_wrappers:field_trial", "../../system_wrappers:metrics", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", "//third_party/libyuv", ] @@ -457,7 +455,6 @@ rtc_static_library("webrtc_vp8_temporal_layers") { "../../rtc_base:rtc_numerics", "../../system_wrappers:field_trial", "../../system_wrappers:metrics", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -593,7 +590,6 @@ if (rtc_include_tests) { "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", "../../test:test_support", - "//third_party/abseil-cpp/absl/memory", ] } @@ -636,7 +632,6 @@ if (rtc_include_tests) { "../../test:video_test_common", "../../test:video_test_support", "../rtp_rtcp:rtp_rtcp_format", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", "//third_party/libyuv", ] @@ -712,7 +707,6 @@ if (rtc_include_tests) { "../../test:test_support", "../../test:video_test_common", "../../test:video_test_support", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -787,7 +781,6 @@ if (rtc_include_tests) { "../../test:test_support", "../../test:video_test_common", "../rtp_rtcp:rtp_rtcp_format", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", "//third_party/libyuv", ] diff --git a/modules/video_coding/codecs/h264/h264.cc b/modules/video_coding/codecs/h264/h264.cc index 3c46b4316f..147e964b54 100644 --- a/modules/video_coding/codecs/h264/h264.cc +++ b/modules/video_coding/codecs/h264/h264.cc @@ -11,9 +11,9 @@ #include "modules/video_coding/codecs/h264/include/h264.h" +#include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/video_codecs/sdp_video_format.h" #include "media/base/h264_profile_level_id.h" @@ -91,7 +91,7 @@ std::unique_ptr H264Encoder::Create( #if defined(WEBRTC_USE_H264) RTC_CHECK(g_rtc_use_h264); RTC_LOG(LS_INFO) << "Creating H264EncoderImpl."; - return absl::make_unique(codec); + return std::make_unique(codec); #else RTC_NOTREACHED(); return nullptr; @@ -107,7 +107,7 @@ std::unique_ptr H264Decoder::Create() { #if defined(WEBRTC_USE_H264) RTC_CHECK(g_rtc_use_h264); RTC_LOG(LS_INFO) << "Creating H264DecoderImpl."; - return absl::make_unique(); + return std::make_unique(); #else RTC_NOTREACHED(); return nullptr; diff --git a/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/modules/video_coding/codecs/h264/h264_decoder_impl.cc index 620542963f..bfbdf75ef4 100644 --- a/modules/video_coding/codecs/h264/h264_decoder_impl.cc +++ b/modules/video_coding/codecs/h264/h264_decoder_impl.cc @@ -18,6 +18,7 @@ #include #include +#include extern "C" { #include "third_party/ffmpeg/libavcodec/avcodec.h" @@ -25,7 +26,6 @@ extern "C" { #include "third_party/ffmpeg/libavutil/imgutils.h" } // extern "C" -#include "absl/memory/memory.h" #include "api/video/color_space.h" #include "api/video/i010_buffer.h" #include "api/video/i420_buffer.h" @@ -130,13 +130,13 @@ int H264DecoderImpl::AVGetBuffer2(AVCodecContext* context, // Refactor to do not use a VideoFrame object at all. av_frame->buf[0] = av_buffer_create( av_frame->data[kYPlaneIndex], total_size, AVFreeBuffer2, - static_cast(absl::make_unique( - VideoFrame::Builder() - .set_video_frame_buffer(frame_buffer) - .set_rotation(kVideoRotation_0) - .set_timestamp_us(0) - .build()) - .release()), + static_cast( + std::make_unique(VideoFrame::Builder() + .set_video_frame_buffer(frame_buffer) + .set_rotation(kVideoRotation_0) + .set_timestamp_us(0) + .build()) + .release()), 0); RTC_CHECK(av_frame->buf[0]); return 0; diff --git a/modules/video_coding/codecs/h264/h264_simulcast_unittest.cc b/modules/video_coding/codecs/h264/h264_simulcast_unittest.cc index c7f36612c6..12b5da1404 100644 --- a/modules/video_coding/codecs/h264/h264_simulcast_unittest.cc +++ b/modules/video_coding/codecs/h264/h264_simulcast_unittest.cc @@ -10,7 +10,6 @@ #include -#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" @@ -24,10 +23,10 @@ namespace test { namespace { std::unique_ptr CreateSpecificSimulcastTestFixture() { std::unique_ptr encoder_factory = - absl::make_unique( + std::make_unique( []() { return H264Encoder::Create(cricket::VideoCodec("H264")); }); std::unique_ptr decoder_factory = - absl::make_unique( + std::make_unique( []() { return H264Decoder::Create(); }); return CreateSimulcastTestFixture(std::move(encoder_factory), std::move(decoder_factory), diff --git a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc b/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc index 554da92d16..53ae2856ea 100644 --- a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc +++ b/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/scoped_refptr.h" #include "api/test/mock_video_decoder_factory.h" @@ -65,13 +64,13 @@ class TestMultiplexAdapter : public VideoCodecUnitTest, protected: std::unique_ptr CreateDecoder() override { - return absl::make_unique( + return std::make_unique( decoder_factory_.get(), SdpVideoFormat(kMultiplexAssociatedCodecName), supports_augmenting_data_); } std::unique_ptr CreateEncoder() override { - return absl::make_unique( + return std::make_unique( encoder_factory_.get(), SdpVideoFormat(kMultiplexAssociatedCodecName), supports_augmenting_data_); } @@ -95,7 +94,7 @@ class TestMultiplexAdapter : public VideoCodecUnitTest, rtc::scoped_refptr augmented_video_frame_buffer = new rtc::RefCountedObject( video_buffer, std::move(data), 16); - return absl::make_unique( + return std::make_unique( VideoFrame::Builder() .set_video_frame_buffer(augmented_video_frame_buffer) .set_timestamp_rtp(video_frame->timestamp()) @@ -114,13 +113,12 @@ class TestMultiplexAdapter : public VideoCodecUnitTest, yuv_buffer->StrideY(), yuv_buffer->DataU(), yuv_buffer->StrideU(), yuv_buffer->DataV(), yuv_buffer->StrideV(), yuv_buffer->DataY(), yuv_buffer->StrideY(), rtc::KeepRefUntilDone(yuv_buffer)); - return absl::make_unique( - VideoFrame::Builder() - .set_video_frame_buffer(yuva_buffer) - .set_timestamp_rtp(123) - .set_timestamp_ms(345) - .set_rotation(kVideoRotation_0) - .build()); + return std::make_unique(VideoFrame::Builder() + .set_video_frame_buffer(yuva_buffer) + .set_timestamp_rtp(123) + .set_timestamp_ms(345) + .set_rotation(kVideoRotation_0) + .build()); } std::unique_ptr CreateInputFrame(bool contains_alpha) { @@ -129,7 +127,7 @@ class TestMultiplexAdapter : public VideoCodecUnitTest, video_frame = CreateI420AInputFrame(); } else { VideoFrame* next_frame = NextInputFrame(); - video_frame = absl::make_unique( + video_frame = std::make_unique( VideoFrame::Builder() .set_video_frame_buffer(next_frame->video_frame_buffer()) .set_timestamp_rtp(next_frame->timestamp()) @@ -172,12 +170,12 @@ class TestMultiplexAdapter : public VideoCodecUnitTest, yuva_buffer->StrideA(), yuva_buffer->DataU(), yuva_buffer->StrideU(), yuva_buffer->DataV(), yuva_buffer->StrideV(), rtc::KeepRefUntilDone(video_frame_buffer)); - return absl::make_unique(VideoFrame::Builder() - .set_video_frame_buffer(axx_buffer) - .set_timestamp_rtp(123) - .set_timestamp_ms(345) - .set_rotation(kVideoRotation_0) - .build()); + return std::make_unique(VideoFrame::Builder() + .set_video_frame_buffer(axx_buffer) + .set_timestamp_rtp(123) + .set_timestamp_ms(345) + .set_rotation(kVideoRotation_0) + .build()); } private: diff --git a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc index 071075d81a..63a6b6dc32 100644 --- a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc +++ b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc @@ -20,7 +20,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/array_view.h" #include "api/video/video_bitrate_allocation.h" @@ -379,8 +378,8 @@ class VideoCodecTestFixtureImpl::CpuProcessTime final { }; VideoCodecTestFixtureImpl::VideoCodecTestFixtureImpl(Config config) - : encoder_factory_(absl::make_unique()), - decoder_factory_(absl::make_unique()), + : encoder_factory_(std::make_unique()), + decoder_factory_(std::make_unique()), config_(config) {} VideoCodecTestFixtureImpl::VideoCodecTestFixtureImpl( @@ -689,7 +688,7 @@ void VideoCodecTestFixtureImpl::SetUpAndInitObjects( task_queue->SendTask([this]() { CreateEncoderAndDecoder(); - processor_ = absl::make_unique( + processor_ = std::make_unique( encoder_.get(), &decoders_, source_frame_reader_.get(), config_, &stats_, &encoded_frame_writers_, decoded_frame_writers_.empty() ? nullptr : &decoded_frame_writers_); diff --git a/modules/video_coding/codecs/test/videocodec_test_libvpx.cc b/modules/video_coding/codecs/test/videocodec_test_libvpx.cc index cb78f21ca8..244dbc4121 100644 --- a/modules/video_coding/codecs/test/videocodec_test_libvpx.cc +++ b/modules/video_coding/codecs/test/videocodec_test_libvpx.cc @@ -8,9 +8,9 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include #include -#include "absl/memory/memory.h" #include "api/test/create_videocodec_test_fixture.h" #include "api/test/video/function_video_encoder_factory.h" #include "api/video_codecs/sdp_video_format.h" @@ -94,7 +94,7 @@ TEST(VideoCodecTestLibvpx, HighBitrateVP9) { config.SetCodecSettings(cricket::kVp9CodecName, 1, 1, 1, false, true, false, kCifWidth, kCifHeight); config.num_frames = kNumFramesShort; - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -112,7 +112,7 @@ TEST(VideoCodecTestLibvpx, ChangeBitrateVP9) { auto config = CreateConfig(); config.SetCodecSettings(cricket::kVp9CodecName, 1, 1, 1, false, true, false, kCifWidth, kCifHeight); - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -136,7 +136,7 @@ TEST(VideoCodecTestLibvpx, ChangeFramerateVP9) { auto config = CreateConfig(); config.SetCodecSettings(cricket::kVp9CodecName, 1, 1, 1, false, true, false, kCifWidth, kCifHeight); - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -163,7 +163,7 @@ TEST(VideoCodecTestLibvpx, DenoiserOnVP9) { config.SetCodecSettings(cricket::kVp9CodecName, 1, 1, 1, true, true, false, kCifWidth, kCifHeight); config.num_frames = kNumFramesShort; - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -181,7 +181,7 @@ TEST(VideoCodecTestLibvpx, VeryLowBitrateVP9) { auto config = CreateConfig(); config.SetCodecSettings(cricket::kVp9CodecName, 1, 1, 1, false, true, true, kCifWidth, kCifHeight); - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -205,7 +205,7 @@ TEST(VideoCodecTestLibvpx, HighBitrateVP8) { config.SetCodecSettings(cricket::kVp8CodecName, 1, 1, 1, true, true, false, kCifWidth, kCifHeight); config.num_frames = kNumFramesShort; - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -241,7 +241,7 @@ TEST(VideoCodecTestLibvpx, MAYBE_ChangeBitrateVP8) { auto config = CreateConfig(); config.SetCodecSettings(cricket::kVp8CodecName, 1, 1, 1, true, true, false, kCifWidth, kCifHeight); - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -275,7 +275,7 @@ TEST(VideoCodecTestLibvpx, MAYBE_ChangeFramerateVP8) { auto config = CreateConfig(); config.SetCodecSettings(cricket::kVp8CodecName, 1, 1, 1, true, true, false, kCifWidth, kCifHeight); - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -315,7 +315,7 @@ TEST(VideoCodecTestLibvpx, MAYBE_TemporalLayersVP8) { auto config = CreateConfig(); config.SetCodecSettings(cricket::kVp8CodecName, 1, 1, 3, true, true, false, kCifWidth, kCifHeight); - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -351,7 +351,7 @@ TEST(VideoCodecTestLibvpx, MAYBE_MultiresVP8) { config.num_frames = 100; config.SetCodecSettings(cricket::kVp8CodecName, 3, 1, 3, true, true, false, 1280, 720); - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -380,13 +380,13 @@ TEST(VideoCodecTestLibvpx, MAYBE_SimulcastVP8) { config.num_frames = 100; config.SetCodecSettings(cricket::kVp8CodecName, 3, 1, 3, true, true, false, 1280, 720); - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); InternalEncoderFactory internal_encoder_factory; std::unique_ptr adapted_encoder_factory = - absl::make_unique([&]() { - return absl::make_unique( + std::make_unique([&]() { + return std::make_unique( &internal_encoder_factory, SdpVideoFormat(cricket::kVp8CodecName)); }); std::unique_ptr internal_decoder_factory( @@ -417,7 +417,7 @@ TEST(VideoCodecTestLibvpx, MAYBE_SvcVP9) { config.num_frames = 100; config.SetCodecSettings(cricket::kVp9CodecName, 1, 3, 3, true, true, false, 1280, 720); - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -438,7 +438,7 @@ TEST(VideoCodecTestLibvpx, DISABLED_MultiresVP8RdPerf) { config.print_frame_level_stats = true; config.SetCodecSettings(cricket::kVp8CodecName, 3, 1, 3, true, true, false, 1280, 720); - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); @@ -464,7 +464,7 @@ TEST(VideoCodecTestLibvpx, DISABLED_SvcVP9RdPerf) { config.print_frame_level_stats = true; config.SetCodecSettings(cricket::kVp9CodecName, 1, 3, 3, true, true, false, 1280, 720); - const auto frame_checker = absl::make_unique(); + const auto frame_checker = std::make_unique(); config.encoded_frame_checker = frame_checker.get(); auto fixture = CreateVideoCodecTestFixture(config); diff --git a/modules/video_coding/codecs/test/videocodec_test_mediacodec.cc b/modules/video_coding/codecs/test/videocodec_test_mediacodec.cc index df6afa0a4d..9f887160a4 100644 --- a/modules/video_coding/codecs/test/videocodec_test_mediacodec.cc +++ b/modules/video_coding/codecs/test/videocodec_test_mediacodec.cc @@ -8,11 +8,11 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include #include #include #include -#include "absl/memory/memory.h" #include "api/test/create_videocodec_test_fixture.h" #include "media/base/media_constants.h" #include "modules/video_coding/codecs/test/android_codec_factory_helper.h" @@ -69,7 +69,7 @@ TEST(VideoCodecTestMediaCodec, ForemanCif500kbpsVp8) { TEST(VideoCodecTestMediaCodec, ForemanCif500kbpsH264CBP) { auto config = CreateConfig(); const auto frame_checker = - absl::make_unique(); + std::make_unique(); config.encoded_frame_checker = frame_checker.get(); config.SetCodecSettings(cricket::kH264CodecName, 1, 1, 1, false, false, false, 352, 288); @@ -93,7 +93,7 @@ TEST(VideoCodecTestMediaCodec, ForemanCif500kbpsH264CBP) { TEST(VideoCodecTestMediaCodec, DISABLED_ForemanCif500kbpsH264CHP) { auto config = CreateConfig(); const auto frame_checker = - absl::make_unique(); + std::make_unique(); config.h264_codec_settings.profile = H264::kProfileConstrainedHigh; config.encoded_frame_checker = frame_checker.get(); diff --git a/modules/video_coding/codecs/test/videocodec_test_openh264.cc b/modules/video_coding/codecs/test/videocodec_test_openh264.cc index 59d214c058..6513074bad 100644 --- a/modules/video_coding/codecs/test/videocodec_test_openh264.cc +++ b/modules/video_coding/codecs/test/videocodec_test_openh264.cc @@ -8,9 +8,9 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include #include -#include "absl/memory/memory.h" #include "api/test/create_videocodec_test_fixture.h" #include "media/base/media_constants.h" #include "modules/video_coding/codecs/test/videocodec_test_fixture_impl.h" @@ -39,7 +39,7 @@ VideoCodecTestFixture::Config CreateConfig() { TEST(VideoCodecTestOpenH264, ConstantHighBitrate) { auto frame_checker = - absl::make_unique(); + std::make_unique(); auto config = CreateConfig(); config.SetCodecSettings(cricket::kH264CodecName, 1, 1, 1, false, true, false, kCifWidth, kCifHeight); @@ -60,7 +60,7 @@ TEST(VideoCodecTestOpenH264, ConstantHighBitrate) { // large frames into multiple slices and limit length of NAL units. TEST(VideoCodecTestOpenH264, SingleNalUnit) { auto frame_checker = - absl::make_unique(); + std::make_unique(); auto config = CreateConfig(); config.h264_codec_settings.packetization_mode = H264PacketizationMode::SingleNalUnit; diff --git a/modules/video_coding/codecs/test/videocodec_test_videotoolbox.cc b/modules/video_coding/codecs/test/videocodec_test_videotoolbox.cc index 10bcf65978..0f02080f27 100644 --- a/modules/video_coding/codecs/test/videocodec_test_videotoolbox.cc +++ b/modules/video_coding/codecs/test/videocodec_test_videotoolbox.cc @@ -8,9 +8,9 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include #include -#include "absl/memory/memory.h" #include "api/test/create_videocodec_test_fixture.h" #include "media/base/media_constants.h" #include "modules/video_coding/codecs/test/objc_codec_factory_helper.h" @@ -53,7 +53,7 @@ std::unique_ptr CreateTestFixtureWithConfig( // longer in use. MAYBE_TEST(VideoCodecTestVideoToolbox, ForemanCif500kbpsH264CBP) { const auto frame_checker = - absl::make_unique(); + std::make_unique(); auto config = CreateConfig(); config.SetCodecSettings(cricket::kH264CodecName, 1, 1, 1, false, false, false, 352, 288); @@ -69,7 +69,7 @@ MAYBE_TEST(VideoCodecTestVideoToolbox, ForemanCif500kbpsH264CBP) { MAYBE_TEST(VideoCodecTestVideoToolbox, ForemanCif500kbpsH264CHP) { const auto frame_checker = - absl::make_unique(); + std::make_unique(); auto config = CreateConfig(); config.h264_codec_settings.profile = H264::kProfileConstrainedHigh; config.SetCodecSettings(cricket::kH264CodecName, 1, 1, 1, false, false, false, diff --git a/modules/video_coding/codecs/test/videoprocessor.cc b/modules/video_coding/codecs/test/videoprocessor.cc index 79525100e1..8fbbe4a04e 100644 --- a/modules/video_coding/codecs/test/videoprocessor.cc +++ b/modules/video_coding/codecs/test/videoprocessor.cc @@ -15,9 +15,9 @@ #include #include #include +#include #include -#include "absl/memory/memory.h" #include "api/scoped_refptr.h" #include "api/video/builtin_video_bitrate_allocator_factory.h" #include "api/video/i420_buffer.h" @@ -220,7 +220,7 @@ VideoProcessor::VideoProcessor(webrtc::VideoEncoder* encoder, for (size_t i = 0; i < num_simulcast_or_spatial_layers_; ++i) { decode_callback_.push_back( - absl::make_unique(this, i)); + std::make_unique(this, i)); RTC_CHECK_EQ( decoders_->at(i)->InitDecode(&config_.codec_settings, static_cast(config_.NumberOfCores())), diff --git a/modules/video_coding/codecs/test/videoprocessor.h b/modules/video_coding/codecs/test/videoprocessor.h index fe0211de7d..bed65bdb2e 100644 --- a/modules/video_coding/codecs/test/videoprocessor.h +++ b/modules/video_coding/codecs/test/videoprocessor.h @@ -19,7 +19,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/task_queue/queued_task.h" #include "api/task_queue/task_queue_base.h" @@ -98,7 +97,7 @@ class VideoProcessor { // Post the callback to the right task queue, if needed. if (!task_queue_->IsCurrent()) { - task_queue_->PostTask(absl::make_unique( + task_queue_->PostTask(std::make_unique( video_processor_, encoded_image, codec_specific_info)); return Result(Result::OK, 0); } diff --git a/modules/video_coding/codecs/test/videoprocessor_unittest.cc b/modules/video_coding/codecs/test/videoprocessor_unittest.cc index 59a64a72b5..49f68f2cf5 100644 --- a/modules/video_coding/codecs/test/videoprocessor_unittest.cc +++ b/modules/video_coding/codecs/test/videoprocessor_unittest.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "api/scoped_refptr.h" #include "api/test/mock_video_decoder.h" #include "api/test/mock_video_encoder.h" @@ -56,7 +55,7 @@ class VideoProcessorTest : public ::testing::Test { EXPECT_CALL(frame_reader_mock_, FrameLength()) .WillRepeatedly(Return(kFrameSize)); q_.SendTask([this] { - video_processor_ = absl::make_unique( + video_processor_ = std::make_unique( &encoder_mock_, &decoders_, &frame_reader_mock_, config_, &stats_, &encoded_frame_writers_, /*decoded_frame_writers=*/nullptr); }); diff --git a/modules/video_coding/codecs/vp8/default_temporal_layers_unittest.cc b/modules/video_coding/codecs/vp8/default_temporal_layers_unittest.cc index 9085afd8ea..54f091da5b 100644 --- a/modules/video_coding/codecs/vp8/default_temporal_layers_unittest.cc +++ b/modules/video_coding/codecs/vp8/default_temporal_layers_unittest.cc @@ -11,8 +11,8 @@ #include "modules/video_coding/codecs/vp8/default_temporal_layers.h" #include +#include -#include "absl/memory/memory.h" #include "api/video/video_bitrate_allocation.h" #include "api/video_codecs/video_codec.h" #include "api/video_codecs/vp8_frame_config.h" @@ -114,7 +114,7 @@ class TemporalLayersTest : public ::testing::Test { ~TemporalLayersTest() override = default; CodecSpecificInfo* IgnoredCodecSpecificInfo() { - codec_specific_info_ = absl::make_unique(); + codec_specific_info_ = std::make_unique(); return codec_specific_info_.get(); } diff --git a/modules/video_coding/codecs/vp8/libvpx_interface.cc b/modules/video_coding/codecs/vp8/libvpx_interface.cc index fd2e80a0cf..1a3df403ae 100644 --- a/modules/video_coding/codecs/vp8/libvpx_interface.cc +++ b/modules/video_coding/codecs/vp8/libvpx_interface.cc @@ -10,7 +10,8 @@ #include "modules/video_coding/codecs/vp8/libvpx_interface.h" -#include "absl/memory/memory.h" +#include + #include "rtc_base/checks.h" namespace webrtc { @@ -199,7 +200,7 @@ class LibvpxVp8Facade : public LibvpxInterface { } // namespace std::unique_ptr LibvpxInterface::CreateEncoder() { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc index 6983c5575f..bc4ddf65e9 100644 --- a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc +++ b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc @@ -14,9 +14,9 @@ #include #include +#include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" @@ -69,7 +69,7 @@ void GetPostProcParamsFromFieldTrialGroup( } // namespace std::unique_ptr VP8Decoder::Create() { - return absl::make_unique(); + return std::make_unique(); } class LibvpxVp8Decoder::QpSmoother { diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc index dcda30db71..c8e47d4345 100644 --- a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc +++ b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc @@ -21,7 +21,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/scoped_refptr.h" #include "api/video/video_content_type.h" #include "api/video/video_frame_buffer.h" @@ -229,7 +228,7 @@ std::unique_ptr VP8Encoder::Create() { std::unique_ptr VP8Encoder::Create( std::unique_ptr frame_buffer_controller_factory) { - return absl::make_unique( + return std::make_unique( std::move(frame_buffer_controller_factory)); } diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_simulcast_test.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_simulcast_test.cc index d493e2aceb..67c9110b3c 100644 --- a/modules/video_coding/codecs/vp8/libvpx_vp8_simulcast_test.cc +++ b/modules/video_coding/codecs/vp8/libvpx_vp8_simulcast_test.cc @@ -10,7 +10,6 @@ #include -#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" @@ -24,10 +23,10 @@ namespace test { namespace { std::unique_ptr CreateSpecificSimulcastTestFixture() { std::unique_ptr encoder_factory = - absl::make_unique( + std::make_unique( []() { return VP8Encoder::Create(); }); std::unique_ptr decoder_factory = - absl::make_unique( + std::make_unique( []() { return VP8Decoder::Create(); }); return CreateSimulcastTestFixture(std::move(encoder_factory), std::move(decoder_factory), diff --git a/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc b/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc index a2384b564c..edbe4ad7c9 100644 --- a/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc +++ b/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc @@ -17,7 +17,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/video_codecs/vp8_frame_config.h" #include "modules/video_coding/codecs/interface/common_constants.h" #include "modules/video_coding/codecs/vp8/libvpx_vp8_encoder.h" @@ -204,7 +203,7 @@ class ScreenshareLayerTest : public ::testing::Test { bool config_updated_; CodecSpecificInfo* IgnoredCodecSpecificInfo() { - ignored_codec_specific_info_ = absl::make_unique(); + ignored_codec_specific_info_ = std::make_unique(); return ignored_codec_specific_info_.get(); } @@ -218,14 +217,14 @@ TEST_F(ScreenshareLayerTest, 1Layer) { // One layer screenshare should not use the frame dropper as all frames will // belong to the base layer. const int kSingleLayerFlags = 0; - auto info = absl::make_unique(); + auto info = std::make_unique(); int flags = EncodeFrame(false, info.get()); timestamp_ += kTimestampDelta5Fps; EXPECT_EQ(static_cast(kNoTemporalIdx), info->codecSpecific.VP8.temporalIdx); EXPECT_FALSE(info->codecSpecific.VP8.layerSync); - info = absl::make_unique(); + info = std::make_unique(); flags = EncodeFrame(false, info.get()); EXPECT_EQ(kSingleLayerFlags, flags); EXPECT_EQ(static_cast(kNoTemporalIdx), diff --git a/modules/video_coding/codecs/vp8/temporal_layers_checker.cc b/modules/video_coding/codecs/vp8/temporal_layers_checker.cc index f798c5bbf5..53a68bd5e8 100644 --- a/modules/video_coding/codecs/vp8/temporal_layers_checker.cc +++ b/modules/video_coding/codecs/vp8/temporal_layers_checker.cc @@ -10,7 +10,8 @@ #include "modules/video_coding/codecs/vp8/include/temporal_layers_checker.h" -#include "absl/memory/memory.h" +#include + #include "modules/video_coding/codecs/interface/common_constants.h" #include "modules/video_coding/codecs/vp8/default_temporal_layers.h" #include "rtc_base/logging.h" @@ -22,11 +23,11 @@ TemporalLayersChecker::CreateTemporalLayersChecker(Vp8TemporalLayersType type, int num_temporal_layers) { switch (type) { case Vp8TemporalLayersType::kFixedPattern: - return absl::make_unique( + return std::make_unique( num_temporal_layers); case Vp8TemporalLayersType::kBitrateDynamic: // Conference mode temporal layering for screen content in base stream. - return absl::make_unique(num_temporal_layers); + return std::make_unique(num_temporal_layers); } } diff --git a/modules/video_coding/codecs/vp9/vp9.cc b/modules/video_coding/codecs/vp9/vp9.cc index 22a0888120..527bce7729 100644 --- a/modules/video_coding/codecs/vp9/vp9.cc +++ b/modules/video_coding/codecs/vp9/vp9.cc @@ -10,7 +10,8 @@ #include "modules/video_coding/codecs/vp9/include/vp9.h" -#include "absl/memory/memory.h" +#include + #include "api/video_codecs/sdp_video_format.h" #include "modules/video_coding/codecs/vp9/vp9_impl.h" #include "rtc_base/checks.h" @@ -46,7 +47,7 @@ std::vector SupportedVP9Codecs() { std::unique_ptr VP9Encoder::Create() { #ifdef RTC_ENABLE_VP9 - return absl::make_unique(cricket::VideoCodec()); + return std::make_unique(cricket::VideoCodec()); #else RTC_NOTREACHED(); return nullptr; @@ -56,7 +57,7 @@ std::unique_ptr VP9Encoder::Create() { std::unique_ptr VP9Encoder::Create( const cricket::VideoCodec& codec) { #ifdef RTC_ENABLE_VP9 - return absl::make_unique(codec); + return std::make_unique(codec); #else RTC_NOTREACHED(); return nullptr; @@ -65,7 +66,7 @@ std::unique_ptr VP9Encoder::Create( std::unique_ptr VP9Decoder::Create() { #ifdef RTC_ENABLE_VP9 - return absl::make_unique(); + return std::make_unique(); #else RTC_NOTREACHED(); return nullptr; diff --git a/modules/video_coding/frame_buffer2_unittest.cc b/modules/video_coding/frame_buffer2_unittest.cc index bc2fd8bc4c..d96960e267 100644 --- a/modules/video_coding/frame_buffer2_unittest.cc +++ b/modules/video_coding/frame_buffer2_unittest.cc @@ -13,9 +13,9 @@ #include #include #include +#include #include -#include "absl/memory/memory.h" #include "modules/video_coding/frame_object.h" #include "modules/video_coding/jitter_estimator.h" #include "modules/video_coding/timing.h" @@ -162,7 +162,7 @@ class TestFrameBuffer2 : public ::testing::Test { std::array references = { {rtc::checked_cast(refs)...}}; - auto frame = absl::make_unique(); + auto frame = std::make_unique(); frame->id.picture_id = picture_id; frame->id.spatial_layer = spatial_layer; frame->SetSpatialIndex(spatial_layer); diff --git a/modules/video_coding/jitter_estimator_tests.cc b/modules/video_coding/jitter_estimator_tests.cc index de9d5d4b79..1ad9abb56f 100644 --- a/modules/video_coding/jitter_estimator_tests.cc +++ b/modules/video_coding/jitter_estimator_tests.cc @@ -12,7 +12,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/array_view.h" #include "modules/video_coding/jitter_estimator.h" @@ -31,7 +30,7 @@ class TestVCMJitterEstimator : public ::testing::Test { TestVCMJitterEstimator() : fake_clock_(0) {} virtual void SetUp() { - estimator_ = absl::make_unique(&fake_clock_); + estimator_ = std::make_unique(&fake_clock_); } void AdvanceClock(int64_t microseconds) { diff --git a/modules/video_coding/utility/simulcast_test_fixture_impl.cc b/modules/video_coding/utility/simulcast_test_fixture_impl.cc index 7d94182f03..f091636aed 100644 --- a/modules/video_coding/utility/simulcast_test_fixture_impl.cc +++ b/modules/video_coding/utility/simulcast_test_fixture_impl.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/video/encoded_image.h" #include "api/video_codecs/sdp_video_format.h" #include "api/video_codecs/video_encoder.h" @@ -288,7 +287,7 @@ void SimulcastTestFixtureImpl::SetUpCodec(const int* temporal_layer_profile) { EXPECT_EQ(0, decoder_->InitDecode(&settings_, 1)); input_buffer_ = I420Buffer::Create(kDefaultWidth, kDefaultHeight); input_buffer_->InitializeData(); - input_frame_ = absl::make_unique( + input_frame_ = std::make_unique( webrtc::VideoFrame::Builder() .set_video_frame_buffer(input_buffer_) .set_rotation(webrtc::kVideoRotation_0) @@ -615,7 +614,7 @@ void SimulcastTestFixtureImpl::SwitchingToOneStream(int width, int height) { input_buffer_ = I420Buffer::Create(settings_.width, settings_.height); input_buffer_->InitializeData(); - input_frame_ = absl::make_unique( + input_frame_ = std::make_unique( webrtc::VideoFrame::Builder() .set_video_frame_buffer(input_buffer_) .set_rotation(webrtc::kVideoRotation_0) @@ -660,7 +659,7 @@ void SimulcastTestFixtureImpl::SwitchingToOneStream(int width, int height) { // Resize |input_frame_| to the new resolution. input_buffer_ = I420Buffer::Create(settings_.width, settings_.height); input_buffer_->InitializeData(); - input_frame_ = absl::make_unique( + input_frame_ = std::make_unique( webrtc::VideoFrame::Builder() .set_video_frame_buffer(input_buffer_) .set_rotation(webrtc::kVideoRotation_0) @@ -824,7 +823,7 @@ void SimulcastTestFixtureImpl::TestStrideEncodeDecode() { int stride_uv = ((kDefaultWidth + 1) / 2) + 5; input_buffer_ = I420Buffer::Create(kDefaultWidth, kDefaultHeight, stride_y, stride_uv, stride_uv); - input_frame_ = absl::make_unique( + input_frame_ = std::make_unique( webrtc::VideoFrame::Builder() .set_video_frame_buffer(input_buffer_) .set_rotation(webrtc::kVideoRotation_0) diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn index 75ded5624e..d9a9209f08 100644 --- a/p2p/BUILD.gn +++ b/p2p/BUILD.gn @@ -24,7 +24,6 @@ rtc_source_set("stun_types") { "../rtc_base:checks", "../rtc_base:rtc_base", "../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", ] } @@ -107,6 +106,7 @@ rtc_static_library("rtc_p2p") { "../logging:ice_log", "../rtc_base", "../rtc_base:checks", + "//third_party/abseil-cpp/absl/memory", # Needed by pseudo_tcp, which should move to a separate target. "../rtc_base:safe_minmax", @@ -119,7 +119,6 @@ rtc_static_library("rtc_p2p") { "../system_wrappers:field_trial", "../system_wrappers:metrics", "//third_party/abseil-cpp/absl/algorithm:container", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -182,7 +181,6 @@ if (rtc_include_tests) { "../rtc_base/third_party/sigslot", "../test:test_support", "//third_party/abseil-cpp/absl/algorithm:container", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -261,7 +259,6 @@ rtc_source_set("p2p_server_utils") { "../rtc_base:rtc_base_tests_utils", "../rtc_base/third_party/sigslot", "//third_party/abseil-cpp/absl/algorithm:container", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/p2p/base/connection.cc b/p2p/base/connection.cc index 8b2c8d96db..e50890bc37 100644 --- a/p2p/base/connection.cc +++ b/p2p/base/connection.cc @@ -18,7 +18,6 @@ #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "p2p/base/port_allocator.h" #include "rtc_base/checks.h" @@ -156,45 +155,45 @@ void ConnectionRequest::Prepare(StunMessage* request) { // receiver side. The attribute is retrieved then by iterating and matching // over all parsed attributes. See StunMessage::GetAttribute. request->AddAttribute( - absl::make_unique(STUN_ATTR_USERNAME, username)); + std::make_unique(STUN_ATTR_USERNAME, username)); // connection_ already holds this ping, so subtract one from count. if (connection_->port()->send_retransmit_count_attribute()) { - request->AddAttribute(absl::make_unique( + request->AddAttribute(std::make_unique( STUN_ATTR_RETRANSMIT_COUNT, static_cast(connection_->pings_since_last_response_.size() - 1))); } uint32_t network_info = connection_->port()->Network()->id(); network_info = (network_info << 16) | connection_->port()->network_cost(); - request->AddAttribute(absl::make_unique( + request->AddAttribute(std::make_unique( STUN_ATTR_NETWORK_INFO, network_info)); if (webrtc::field_trial::IsEnabled( "WebRTC-PiggybackIceCheckAcknowledgement") && connection_->last_ping_id_received()) { - request->AddAttribute(absl::make_unique( + request->AddAttribute(std::make_unique( STUN_ATTR_LAST_ICE_CHECK_RECEIVED, connection_->last_ping_id_received().value())); } // Adding ICE_CONTROLLED or ICE_CONTROLLING attribute based on the role. if (connection_->port()->GetIceRole() == ICEROLE_CONTROLLING) { - request->AddAttribute(absl::make_unique( + request->AddAttribute(std::make_unique( STUN_ATTR_ICE_CONTROLLING, connection_->port()->IceTiebreaker())); // We should have either USE_CANDIDATE attribute or ICE_NOMINATION // attribute but not both. That was enforced in p2ptransportchannel. if (connection_->use_candidate_attr()) { request->AddAttribute( - absl::make_unique(STUN_ATTR_USE_CANDIDATE)); + std::make_unique(STUN_ATTR_USE_CANDIDATE)); } if (connection_->nomination() && connection_->nomination() != connection_->acked_nomination()) { - request->AddAttribute(absl::make_unique( + request->AddAttribute(std::make_unique( STUN_ATTR_NOMINATION, connection_->nomination())); } } else if (connection_->port()->GetIceRole() == ICEROLE_CONTROLLED) { - request->AddAttribute(absl::make_unique( + request->AddAttribute(std::make_unique( STUN_ATTR_ICE_CONTROLLED, connection_->port()->IceTiebreaker())); } else { RTC_NOTREACHED(); @@ -213,7 +212,7 @@ void ConnectionRequest::Prepare(StunMessage* request) { uint32_t prflx_priority = type_preference << 24 | (connection_->local_candidate().priority() & 0x00FFFFFF); - request->AddAttribute(absl::make_unique( + request->AddAttribute(std::make_unique( STUN_ATTR_PRIORITY, prflx_priority)); // Adding Message Integrity attribute. diff --git a/p2p/base/dtls_transport.cc b/p2p/base/dtls_transport.cc index ce78361ec0..01cd9f71fd 100644 --- a/p2p/base/dtls_transport.cc +++ b/p2p/base/dtls_transport.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/rtc_event_log/rtc_event_log.h" #include "logging/rtc_event_log/events/rtc_event_dtls_transport_state.h" #include "logging/rtc_event_log/events/rtc_event_dtls_writable_state.h" @@ -752,7 +751,7 @@ void DtlsTransport::set_writable(bool writable) { } if (event_log_) { event_log_->Log( - absl::make_unique(writable)); + std::make_unique(writable)); } RTC_LOG(LS_VERBOSE) << ToString() << ": set_writable to: " << writable; writable_ = writable; @@ -767,7 +766,7 @@ void DtlsTransport::set_dtls_state(DtlsTransportState state) { return; } if (event_log_) { - event_log_->Log(absl::make_unique( + event_log_->Log(std::make_unique( ConvertDtlsTransportState(state))); } RTC_LOG(LS_VERBOSE) << ToString() << ": set_dtls_state from:" << dtls_state_ diff --git a/p2p/base/dtls_transport_unittest.cc b/p2p/base/dtls_transport_unittest.cc index 1da486ccac..287264da9e 100644 --- a/p2p/base/dtls_transport_unittest.cc +++ b/p2p/base/dtls_transport_unittest.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "p2p/base/fake_ice_transport.h" #include "p2p/base/packet_transport_internal.h" #include "rtc_base/checks.h" @@ -88,9 +87,9 @@ class DtlsTestClient : public sigslot::has_slots<> { fake_ice_transport_->SignalReadPacket.connect( this, &DtlsTestClient::OnFakeIceTransportReadPacket); - dtls_transport_ = absl::make_unique( - fake_ice_transport_.get(), webrtc::CryptoOptions(), - /*event_log=*/nullptr); + dtls_transport_ = std::make_unique(fake_ice_transport_.get(), + webrtc::CryptoOptions(), + /*event_log=*/nullptr); dtls_transport_->SetSslMaxProtocolVersion(ssl_max_version_); // Note: Certificate may be null here if testing passthrough. dtls_transport_->SetLocalCertificate(certificate_); diff --git a/p2p/base/fake_dtls_transport.h b/p2p/base/fake_dtls_transport.h index 841e196186..c26cae9c37 100644 --- a/p2p/base/fake_dtls_transport.h +++ b/p2p/base/fake_dtls_transport.h @@ -16,7 +16,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/crypto/crypto_options.h" #include "p2p/base/dtls_transport_internal.h" #include "p2p/base/fake_ice_transport.h" @@ -57,8 +56,8 @@ class FakeDtlsTransport : public DtlsTransportInternal { // If this constructor is called, a new fake ICE transport will be created, // and this FakeDtlsTransport will take the ownership. explicit FakeDtlsTransport(const std::string& name, int component) - : FakeDtlsTransport( - absl::make_unique(name, component)) {} + : FakeDtlsTransport(std::make_unique(name, component)) { + } ~FakeDtlsTransport() override { if (dest_ && dest_->dest_ == this) { @@ -195,7 +194,7 @@ class FakeDtlsTransport : public DtlsTransportInternal { if (!remote_cert_) { return nullptr; } - return absl::make_unique(remote_cert_->Clone()); + return std::make_unique(remote_cert_->Clone()); } bool ExportKeyingMaterial(const std::string& label, const uint8_t* context, diff --git a/p2p/base/p2p_transport_channel.cc b/p2p/base/p2p_transport_channel.cc index 72e36e1d25..c6f2f2031f 100644 --- a/p2p/base/p2p_transport_channel.cc +++ b/p2p/base/p2p_transport_channel.cc @@ -11,11 +11,11 @@ #include "p2p/base/p2p_transport_channel.h" #include +#include #include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/candidate.h" #include "logging/rtc_event_log/ice_logger.h" #include "p2p/base/candidate_pair_interface.h" @@ -153,7 +153,7 @@ P2PTransportChannel::P2PTransportChannel( config_.regather_all_networks_interval_range, config_.regather_on_failed_networks_interval_or_default()); regathering_controller_ = - absl::make_unique( + std::make_unique( regathering_config, this, network_thread_); // We populate the change in the candidate filter to the session taken by // the transport. diff --git a/p2p/base/p2p_transport_channel_unittest.cc b/p2p/base/p2p_transport_channel_unittest.cc index dd48979269..46ce53501a 100644 --- a/p2p/base/p2p_transport_channel_unittest.cc +++ b/p2p/base/p2p_transport_channel_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "p2p/base/connection.h" #include "p2p/base/fake_port_allocator.h" #include "p2p/base/ice_transport_internal.h" @@ -3314,17 +3313,17 @@ class P2PTransportChannelPingTest : public ::testing::Test, const absl::optional& piggyback_ping_id) { IceMessage msg; msg.SetType(STUN_BINDING_REQUEST); - msg.AddAttribute(absl::make_unique( + msg.AddAttribute(std::make_unique( STUN_ATTR_USERNAME, conn->local_candidate().username() + ":" + remote_ufrag)); msg.AddAttribute( - absl::make_unique(STUN_ATTR_PRIORITY, priority)); + std::make_unique(STUN_ATTR_PRIORITY, priority)); if (nomination != 0) { - msg.AddAttribute(absl::make_unique( + msg.AddAttribute(std::make_unique( STUN_ATTR_NOMINATION, nomination)); } if (piggyback_ping_id) { - msg.AddAttribute(absl::make_unique( + msg.AddAttribute(std::make_unique( STUN_ATTR_LAST_ICE_CHECK_RECEIVED, piggyback_ping_id.value())); } msg.SetTransactionID(rtc::CreateRandomString(kStunTransactionIdLength)); @@ -3558,11 +3557,11 @@ TEST_F(P2PTransportChannelPingTest, PingingStartedAsSoonAsPossible) { // candidate pair while we still don't have remote ICE parameters. IceMessage request; request.SetType(STUN_BINDING_REQUEST); - request.AddAttribute(absl::make_unique( + request.AddAttribute(std::make_unique( STUN_ATTR_USERNAME, kIceUfrag[1])); uint32_t prflx_priority = ICE_TYPE_PREFERENCE_PRFLX << 24; - request.AddAttribute(absl::make_unique( - STUN_ATTR_PRIORITY, prflx_priority)); + request.AddAttribute(std::make_unique(STUN_ATTR_PRIORITY, + prflx_priority)); Port* port = GetPort(&ch); ASSERT_NE(nullptr, port); port->SignalUnknownAddress(port, rtc::SocketAddress("1.1.1.1", 1), PROTO_UDP, @@ -3727,11 +3726,11 @@ TEST_F(P2PTransportChannelPingTest, ConnectionResurrection) { // Create a minimal STUN message with prflx priority. IceMessage request; request.SetType(STUN_BINDING_REQUEST); - request.AddAttribute(absl::make_unique( + request.AddAttribute(std::make_unique( STUN_ATTR_USERNAME, kIceUfrag[1])); uint32_t prflx_priority = ICE_TYPE_PREFERENCE_PRFLX << 24; - request.AddAttribute(absl::make_unique( - STUN_ATTR_PRIORITY, prflx_priority)); + request.AddAttribute(std::make_unique(STUN_ATTR_PRIORITY, + prflx_priority)); EXPECT_NE(prflx_priority, remote_priority); Port* port = GetPort(&ch); @@ -3878,11 +3877,11 @@ TEST_F(P2PTransportChannelPingTest, TestSelectConnectionFromUnknownAddress) { // A minimal STUN message with prflx priority. IceMessage request; request.SetType(STUN_BINDING_REQUEST); - request.AddAttribute(absl::make_unique( + request.AddAttribute(std::make_unique( STUN_ATTR_USERNAME, kIceUfrag[1])); uint32_t prflx_priority = ICE_TYPE_PREFERENCE_PRFLX << 24; - request.AddAttribute(absl::make_unique( - STUN_ATTR_PRIORITY, prflx_priority)); + request.AddAttribute(std::make_unique(STUN_ATTR_PRIORITY, + prflx_priority)); TestUDPPort* port = static_cast(GetPort(&ch)); port->SignalUnknownAddress(port, rtc::SocketAddress("1.1.1.1", 1), PROTO_UDP, &request, kIceUfrag[1], false); @@ -3921,7 +3920,7 @@ TEST_F(P2PTransportChannelPingTest, TestSelectConnectionFromUnknownAddress) { // However if the request contains use_candidate attribute, it will be // selected as the selected connection. request.AddAttribute( - absl::make_unique(STUN_ATTR_USE_CANDIDATE)); + std::make_unique(STUN_ATTR_USE_CANDIDATE)); port->SignalUnknownAddress(port, rtc::SocketAddress("4.4.4.4", 4), PROTO_UDP, &request, kIceUfrag[1], false); Connection* conn4 = WaitForConnectionTo(&ch, "4.4.4.4", 4); @@ -3976,13 +3975,13 @@ TEST_F(P2PTransportChannelPingTest, TestSelectConnectionBasedOnMediaReceived) { // nominate the selected connection. IceMessage request; request.SetType(STUN_BINDING_REQUEST); - request.AddAttribute(absl::make_unique( + request.AddAttribute(std::make_unique( STUN_ATTR_USERNAME, kIceUfrag[1])); uint32_t prflx_priority = ICE_TYPE_PREFERENCE_PRFLX << 24; - request.AddAttribute(absl::make_unique( - STUN_ATTR_PRIORITY, prflx_priority)); + request.AddAttribute(std::make_unique(STUN_ATTR_PRIORITY, + prflx_priority)); request.AddAttribute( - absl::make_unique(STUN_ATTR_USE_CANDIDATE)); + std::make_unique(STUN_ATTR_USE_CANDIDATE)); Port* port = GetPort(&ch); port->SignalUnknownAddress(port, rtc::SocketAddress("3.3.3.3", 3), PROTO_UDP, &request, kIceUfrag[1], false); @@ -4785,7 +4784,7 @@ TEST_F(P2PTransportChannelTest, // ICE parameter will be set up when creating the channels. set_remote_ice_parameter_source(FROM_SETICEPARAMETERS); GetEndpoint(0)->network_manager_.set_mdns_responder( - absl::make_unique(rtc::Thread::Current())); + std::make_unique(rtc::Thread::Current())); GetEndpoint(1)->async_resolver_factory_ = &mock_async_resolver_factory; CreateChannels(); // Pause sending candidates from both endpoints until we find out what port @@ -4857,7 +4856,7 @@ TEST_F(P2PTransportChannelTest, // ICE parameter will be set up when creating the channels. set_remote_ice_parameter_source(FROM_SETICEPARAMETERS); GetEndpoint(0)->network_manager_.set_mdns_responder( - absl::make_unique(rtc::Thread::Current())); + std::make_unique(rtc::Thread::Current())); GetEndpoint(1)->async_resolver_factory_ = &mock_async_resolver_factory; CreateChannels(); // Pause sending candidates from both endpoints until we find out what port @@ -4925,7 +4924,7 @@ TEST_F(P2PTransportChannelTest, CanConnectWithHostCandidateWithMdnsName) { // ICE parameter will be set up when creating the channels. set_remote_ice_parameter_source(FROM_SETICEPARAMETERS); GetEndpoint(0)->network_manager_.set_mdns_responder( - absl::make_unique(rtc::Thread::Current())); + std::make_unique(rtc::Thread::Current())); GetEndpoint(1)->async_resolver_factory_ = &mock_async_resolver_factory; CreateChannels(); // Pause sending candidates from both endpoints until we find out what port @@ -4982,7 +4981,7 @@ TEST_F(P2PTransportChannelTest, // ICE parameter will be set up when creating the channels. set_remote_ice_parameter_source(FROM_SETICEPARAMETERS); GetEndpoint(0)->network_manager_.set_mdns_responder( - absl::make_unique(rtc::Thread::Current())); + std::make_unique(rtc::Thread::Current())); GetEndpoint(1)->async_resolver_factory_ = &mock_async_resolver_factory; CreateChannels(); // Pause sending candidates from both endpoints until we find out what port @@ -5163,7 +5162,7 @@ TEST_F(P2PTransportChannelTest, // ICE parameter will be set up when creating the channels. set_remote_ice_parameter_source(FROM_SETICEPARAMETERS); GetEndpoint(0)->network_manager_.set_mdns_responder( - absl::make_unique(rtc::Thread::Current())); + std::make_unique(rtc::Thread::Current())); GetEndpoint(1)->async_resolver_factory_ = &mock_async_resolver_factory; CreateChannels(); // Pause sending candidates from both endpoints until we find out what port @@ -5225,7 +5224,7 @@ TEST_F(P2PTransportChannelTest, set_remote_ice_parameter_source(FROM_SETICEPARAMETERS); // Use a mock mDNS responder, which does not complete the name registration by // ignoring the completion callback. - auto mock_mdns_responder = absl::make_unique(); + auto mock_mdns_responder = std::make_unique(); EXPECT_CALL(*mock_mdns_responder, CreateNameForAddress(_, _)) .Times(1) .WillOnce(Return()); diff --git a/p2p/base/port.cc b/p2p/base/port.cc index 3582da6a9b..742c15dbf8 100644 --- a/p2p/base/port.cc +++ b/p2p/base/port.cc @@ -13,11 +13,11 @@ #include #include +#include #include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "p2p/base/connection.h" #include "p2p/base/port_allocator.h" @@ -683,7 +683,7 @@ void Port::SendBindingResponse(StunMessage* request, if (retransmit_attr) { // Inherit the incoming retransmit value in the response so the other side // can see our view of lost pings. - response.AddAttribute(absl::make_unique( + response.AddAttribute(std::make_unique( STUN_ATTR_RETRANSMIT_COUNT, retransmit_attr->value())); if (retransmit_attr->value() > CONNECTION_WRITE_CONNECT_FAILURES) { @@ -694,7 +694,7 @@ void Port::SendBindingResponse(StunMessage* request, } } - response.AddAttribute(absl::make_unique( + response.AddAttribute(std::make_unique( STUN_ATTR_XOR_MAPPED_ADDRESS, addr)); response.AddMessageIntegrity(password_); response.AddFingerprint(); diff --git a/p2p/base/port_unittest.cc b/p2p/base/port_unittest.cc index a801f537d2..3556e3102a 100644 --- a/p2p/base/port_unittest.cc +++ b/p2p/base/port_unittest.cc @@ -19,7 +19,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/candidate.h" #include "api/packet_socket_factory.h" @@ -125,7 +124,7 @@ SocketAddress GetAddress(Port* port) { } std::unique_ptr CopyStunMessage(const IceMessage& src) { - auto dst = absl::make_unique(); + auto dst = std::make_unique(); ByteBufferWriter buf; src.Write(&buf); ByteBufferReader read_buf(buf); @@ -222,8 +221,8 @@ class TestPort : public Port { const rtc::PacketOptions& options, bool payload) { if (!payload) { - auto msg = absl::make_unique(); - auto buf = absl::make_unique>( + auto msg = std::make_unique(); + auto buf = std::make_unique>( static_cast(data), size); ByteBufferReader read_buf(*buf); if (!msg->Read(&read_buf)) { @@ -588,8 +587,8 @@ class PortTest : public ::testing::Test, public sigslot::has_slots<> { } std::unique_ptr CreateNatServer(const SocketAddress& addr, rtc::NATType type) { - return absl::make_unique(type, ss_.get(), addr, addr, - ss_.get(), addr); + return std::make_unique(type, ss_.get(), addr, addr, + ss_.get(), addr); } static const char* StunName(NATType type) { switch (type) { @@ -783,7 +782,7 @@ class PortTest : public ::testing::Test, public sigslot::has_slots<> { } std::unique_ptr CreateStunMessage(int type) { - auto msg = absl::make_unique(); + auto msg = std::make_unique(); msg->SetType(type); msg->SetTransactionID("TESTTESTTEST"); return msg; @@ -792,16 +791,16 @@ class PortTest : public ::testing::Test, public sigslot::has_slots<> { int type, const std::string& username) { std::unique_ptr msg = CreateStunMessage(type); - msg->AddAttribute(absl::make_unique( + msg->AddAttribute(std::make_unique( STUN_ATTR_USERNAME, username)); return msg; } std::unique_ptr CreateTestPort(const rtc::SocketAddress& addr, const std::string& username, const std::string& password) { - auto port = absl::make_unique(&main_, "test", &socket_factory_, - MakeNetwork(addr), 0, 0, username, - password); + auto port = + std::make_unique(&main_, "test", &socket_factory_, + MakeNetwork(addr), 0, 0, username, password); port->SignalRoleConflict.connect(this, &PortTest::OnRoleConflict); return port; } @@ -819,8 +818,8 @@ class PortTest : public ::testing::Test, public sigslot::has_slots<> { std::unique_ptr CreateTestPort(rtc::Network* network, const std::string& username, const std::string& password) { - auto port = absl::make_unique(&main_, "test", &socket_factory_, - network, 0, 0, username, password); + auto port = std::make_unique(&main_, "test", &socket_factory_, + network, 0, 0, username, password); port->SignalRoleConflict.connect(this, &PortTest::OnRoleConflict); return port; } @@ -1440,17 +1439,17 @@ TEST_F(PortTest, TestLoopbackCall) { CreateStunMessage(STUN_BINDING_REQUEST)); const StunByteStringAttribute* username_attr = msg->GetByteString(STUN_ATTR_USERNAME); - modified_req->AddAttribute(absl::make_unique( + modified_req->AddAttribute(std::make_unique( STUN_ATTR_USERNAME, username_attr->GetString())); // To make sure we receive error response, adding tiebreaker less than // what's present in request. - modified_req->AddAttribute(absl::make_unique( + modified_req->AddAttribute(std::make_unique( STUN_ATTR_ICE_CONTROLLING, kTiebreaker1 - 1)); modified_req->AddMessageIntegrity("lpass"); modified_req->AddFingerprint(); lport->Reset(); - auto buf = absl::make_unique(); + auto buf = std::make_unique(); WriteStunMessage(*modified_req, buf.get()); conn1->OnReadPacket(buf->Data(), buf->Length(), /* packet_time_us */ -1); ASSERT_TRUE_WAIT(lport->last_stun_msg() != NULL, kDefaultTimeout); @@ -2052,7 +2051,7 @@ TEST_F(PortTest, TestHandleStunMessage) { auto port = CreateTestPort(kLocalAddr2, "rfrag", "rpass"); std::unique_ptr in_msg, out_msg; - auto buf = absl::make_unique(); + auto buf = std::make_unique(); rtc::SocketAddress addr(kLocalAddr1); std::string username; @@ -2069,7 +2068,7 @@ TEST_F(PortTest, TestHandleStunMessage) { // BINDING-RESPONSE without username, with MESSAGE-INTEGRITY and FINGERPRINT. in_msg = CreateStunMessage(STUN_BINDING_RESPONSE); - in_msg->AddAttribute(absl::make_unique( + in_msg->AddAttribute(std::make_unique( STUN_ATTR_XOR_MAPPED_ADDRESS, kLocalAddr2)); in_msg->AddMessageIntegrity("rpass"); in_msg->AddFingerprint(); @@ -2081,7 +2080,7 @@ TEST_F(PortTest, TestHandleStunMessage) { // BINDING-ERROR-RESPONSE without username, with error, M-I, and FINGERPRINT. in_msg = CreateStunMessage(STUN_BINDING_ERROR_RESPONSE); - in_msg->AddAttribute(absl::make_unique( + in_msg->AddAttribute(std::make_unique( STUN_ATTR_ERROR_CODE, STUN_ERROR_SERVER_ERROR, STUN_ERROR_REASON_SERVER_ERROR)); in_msg->AddFingerprint(); @@ -2101,7 +2100,7 @@ TEST_F(PortTest, TestHandleStunMessageBadUsername) { auto port = CreateTestPort(kLocalAddr2, "rfrag", "rpass"); std::unique_ptr in_msg, out_msg; - auto buf = absl::make_unique(); + auto buf = std::make_unique(); rtc::SocketAddress addr(kLocalAddr1); std::string username; @@ -2167,7 +2166,7 @@ TEST_F(PortTest, TestHandleStunMessageBadMessageIntegrity) { auto port = CreateTestPort(kLocalAddr2, "rfrag", "rpass"); std::unique_ptr in_msg, out_msg; - auto buf = absl::make_unique(); + auto buf = std::make_unique(); rtc::SocketAddress addr(kLocalAddr1); std::string username; @@ -2205,7 +2204,7 @@ TEST_F(PortTest, TestHandleStunMessageBadFingerprint) { auto port = CreateTestPort(kLocalAddr2, "rfrag", "rpass"); std::unique_ptr in_msg, out_msg; - auto buf = absl::make_unique(); + auto buf = std::make_unique(); rtc::SocketAddress addr(kLocalAddr1); std::string username; @@ -2228,7 +2227,7 @@ TEST_F(PortTest, TestHandleStunMessageBadFingerprint) { // Valid BINDING-RESPONSE, except no FINGERPRINT. in_msg = CreateStunMessage(STUN_BINDING_RESPONSE); - in_msg->AddAttribute(absl::make_unique( + in_msg->AddAttribute(std::make_unique( STUN_ATTR_XOR_MAPPED_ADDRESS, kLocalAddr2)); in_msg->AddMessageIntegrity("rpass"); WriteStunMessage(*in_msg, buf.get()); @@ -2246,7 +2245,7 @@ TEST_F(PortTest, TestHandleStunMessageBadFingerprint) { // Valid BINDING-ERROR-RESPONSE, except no FINGERPRINT. in_msg = CreateStunMessage(STUN_BINDING_ERROR_RESPONSE); - in_msg->AddAttribute(absl::make_unique( + in_msg->AddAttribute(std::make_unique( STUN_ATTR_ERROR_CODE, STUN_ERROR_SERVER_ERROR, STUN_ERROR_REASON_SERVER_ERROR)); in_msg->AddMessageIntegrity("rpass"); diff --git a/p2p/base/stun.cc b/p2p/base/stun.cc index f40395bde3..8809756578 100644 --- a/p2p/base/stun.cc +++ b/p2p/base/stun.cc @@ -16,7 +16,6 @@ #include #include -#include "absl/memory/memory.h" #include "rtc_base/byte_order.h" #include "rtc_base/checks.h" #include "rtc_base/crc32.h" @@ -265,7 +264,7 @@ bool StunMessage::AddMessageIntegrity(const std::string& password) { bool StunMessage::AddMessageIntegrity(const char* key, size_t keylen) { // Add the attribute with a dummy value. Since this is a known attribute, it // can't fail. - auto msg_integrity_attr_ptr = absl::make_unique( + auto msg_integrity_attr_ptr = std::make_unique( STUN_ATTR_MESSAGE_INTEGRITY, std::string(kStunMessageIntegritySize, '0')); auto* msg_integrity_attr = msg_integrity_attr_ptr.get(); AddAttribute(std::move(msg_integrity_attr_ptr)); @@ -326,7 +325,7 @@ bool StunMessage::AddFingerprint() { // Add the attribute with a dummy value. Since this is a known attribute, // it can't fail. auto fingerprint_attr_ptr = - absl::make_unique(STUN_ATTR_FINGERPRINT, 0); + std::make_unique(STUN_ATTR_FINGERPRINT, 0); auto* fingerprint_attr = fingerprint_attr_ptr.get(); AddAttribute(std::move(fingerprint_attr_ptr)); @@ -546,38 +545,38 @@ StunAttribute* StunAttribute::Create(StunAttributeValueType value_type, std::unique_ptr StunAttribute::CreateAddress( uint16_t type) { - return absl::make_unique(type, 0); + return std::make_unique(type, 0); } std::unique_ptr StunAttribute::CreateXorAddress( uint16_t type) { - return absl::make_unique(type, 0, nullptr); + return std::make_unique(type, 0, nullptr); } std::unique_ptr StunAttribute::CreateUInt64( uint16_t type) { - return absl::make_unique(type); + return std::make_unique(type); } std::unique_ptr StunAttribute::CreateUInt32( uint16_t type) { - return absl::make_unique(type); + return std::make_unique(type); } std::unique_ptr StunAttribute::CreateByteString( uint16_t type) { - return absl::make_unique(type, 0); + return std::make_unique(type, 0); } std::unique_ptr StunAttribute::CreateErrorCode() { - return absl::make_unique( + return std::make_unique( STUN_ATTR_ERROR_CODE, StunErrorCodeAttribute::MIN_SIZE); } std::unique_ptr StunAttribute::CreateUnknownAttributes() { - return absl::make_unique( - STUN_ATTR_UNKNOWN_ATTRIBUTES, 0); + return std::make_unique(STUN_ATTR_UNKNOWN_ATTRIBUTES, + 0); } StunAddressAttribute::StunAddressAttribute(uint16_t type, diff --git a/p2p/base/stun_request.cc b/p2p/base/stun_request.cc index 44aa4839c1..964b80f04e 100644 --- a/p2p/base/stun_request.cc +++ b/p2p/base/stun_request.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "rtc_base/checks.h" #include "rtc_base/helpers.h" #include "rtc_base/logging.h" @@ -204,8 +203,8 @@ StunRequest::~StunRequest() { void StunRequest::Construct() { if (msg_->type() == 0) { if (!origin_.empty()) { - msg_->AddAttribute(absl::make_unique( - STUN_ATTR_ORIGIN, origin_)); + msg_->AddAttribute( + std::make_unique(STUN_ATTR_ORIGIN, origin_)); } Prepare(msg_); RTC_DCHECK(msg_->type() != 0); diff --git a/p2p/base/stun_unittest.cc b/p2p/base/stun_unittest.cc index b7d5f50fdb..69f6f2da58 100644 --- a/p2p/base/stun_unittest.cc +++ b/p2p/base/stun_unittest.cc @@ -12,10 +12,10 @@ #include +#include #include #include -#include "absl/memory/memory.h" #include "rtc_base/arraysize.h" #include "rtc_base/byte_buffer.h" #include "rtc_base/byte_order.h" @@ -1118,7 +1118,7 @@ TEST_F(StunTest, WriteMessageWithOriginAttribute) { std::string(reinterpret_cast(kTestTransactionId1), kStunTransactionIdLength)); auto origin = - absl::make_unique(STUN_ATTR_ORIGIN, kTestOrigin); + std::make_unique(STUN_ATTR_ORIGIN, kTestOrigin); msg.AddAttribute(std::move(origin)); rtc::ByteBufferWriter out; diff --git a/p2p/base/test_turn_customizer.h b/p2p/base/test_turn_customizer.h index ae8864acd2..415b13fbf2 100644 --- a/p2p/base/test_turn_customizer.h +++ b/p2p/base/test_turn_customizer.h @@ -11,7 +11,8 @@ #ifndef P2P_BASE_TEST_TURN_CUSTOMIZER_H_ #define P2P_BASE_TEST_TURN_CUSTOMIZER_H_ -#include "absl/memory/memory.h" +#include + #include "api/turn_customizer.h" #include "rtc_base/gunit.h" @@ -33,7 +34,7 @@ class TestTurnCustomizer : public webrtc::TurnCustomizer { ASSERT_NE(0, message->type()); if (add_counter_) { - message->AddAttribute(absl::make_unique( + message->AddAttribute(std::make_unique( STUN_ATTR_COUNTER, modify_cnt_)); } return; diff --git a/p2p/base/transport_description_factory.cc b/p2p/base/transport_description_factory.cc index 518a2ac6bf..f417c5ad86 100644 --- a/p2p/base/transport_description_factory.cc +++ b/p2p/base/transport_description_factory.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "p2p/base/transport_description.h" #include "rtc_base/logging.h" #include "rtc_base/ssl_fingerprint.h" @@ -31,7 +30,7 @@ std::unique_ptr TransportDescriptionFactory::CreateOffer( const TransportOptions& options, const TransportDescription* current_description, IceCredentialsIterator* ice_credentials) const { - auto desc = absl::make_unique(); + auto desc = std::make_unique(); // Generate the ICE credentials if we don't already have them. if (!current_description || options.ice_restart) { @@ -74,7 +73,7 @@ std::unique_ptr TransportDescriptionFactory::CreateAnswer( return NULL; } - auto desc = absl::make_unique(); + auto desc = std::make_unique(); // Generate the ICE credentials if we don't already have them or ice is // being restarted. if (!current_description || options.ice_restart) { diff --git a/p2p/base/turn_port.cc b/p2p/base/turn_port.cc index e86bf09e98..68535b7373 100644 --- a/p2p/base/turn_port.cc +++ b/p2p/base/turn_port.cc @@ -11,11 +11,11 @@ #include "p2p/base/turn_port.h" #include +#include #include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "p2p/base/connection.h" #include "p2p/base/stun.h" @@ -1107,12 +1107,12 @@ void TurnPort::SendRequest(StunRequest* req, int delay) { void TurnPort::AddRequestAuthInfo(StunMessage* msg) { // If we've gotten the necessary data from the server, add it to our request. RTC_DCHECK(!hash_.empty()); - msg->AddAttribute(absl::make_unique( + msg->AddAttribute(std::make_unique( STUN_ATTR_USERNAME, credentials_.username)); msg->AddAttribute( - absl::make_unique(STUN_ATTR_REALM, realm_)); + std::make_unique(STUN_ATTR_REALM, realm_)); msg->AddAttribute( - absl::make_unique(STUN_ATTR_NONCE, nonce_)); + std::make_unique(STUN_ATTR_NONCE, nonce_)); const bool success = msg->AddMessageIntegrity(hash()); RTC_DCHECK(success); } @@ -1325,7 +1325,7 @@ bool TurnPort::TurnCustomizerAllowChannelData(const void* data, void TurnPort::MaybeAddTurnLoggingId(StunMessage* msg) { if (!turn_logging_id_.empty()) { - msg->AddAttribute(absl::make_unique( + msg->AddAttribute(std::make_unique( STUN_ATTR_TURN_LOGGING_ID, turn_logging_id_)); } } @@ -1527,7 +1527,7 @@ void TurnRefreshRequest::Prepare(StunMessage* request) { request->SetType(TURN_REFRESH_REQUEST); if (lifetime_ > -1) { request->AddAttribute( - absl::make_unique(STUN_ATTR_LIFETIME, lifetime_)); + std::make_unique(STUN_ATTR_LIFETIME, lifetime_)); } port_->AddRequestAuthInfo(request); @@ -1612,10 +1612,10 @@ TurnCreatePermissionRequest::TurnCreatePermissionRequest( void TurnCreatePermissionRequest::Prepare(StunMessage* request) { // Create the request as indicated in RFC5766, Section 9.1. request->SetType(TURN_CREATE_PERMISSION_REQUEST); - request->AddAttribute(absl::make_unique( + request->AddAttribute(std::make_unique( STUN_ATTR_XOR_PEER_ADDRESS, ext_addr_)); if (webrtc::field_trial::IsEnabled("WebRTC-TurnAddMultiMapping")) { - request->AddAttribute(absl::make_unique( + request->AddAttribute(std::make_unique( STUN_ATTR_MULTI_MAPPING, remote_ufrag_)); } port_->AddRequestAuthInfo(request); @@ -1684,9 +1684,9 @@ TurnChannelBindRequest::TurnChannelBindRequest( void TurnChannelBindRequest::Prepare(StunMessage* request) { // Create the request as indicated in RFC5766, Section 11.1. request->SetType(TURN_CHANNEL_BIND_REQUEST); - request->AddAttribute(absl::make_unique( + request->AddAttribute(std::make_unique( STUN_ATTR_CHANNEL_NUMBER, channel_id_ << 16)); - request->AddAttribute(absl::make_unique( + request->AddAttribute(std::make_unique( STUN_ATTR_XOR_PEER_ADDRESS, ext_addr_)); port_->AddRequestAuthInfo(request); port_->TurnCustomizerMaybeModifyOutgoingStunMessage(request); @@ -1780,10 +1780,10 @@ int TurnEntry::Send(const void* data, TurnMessage msg; msg.SetType(TURN_SEND_INDICATION); msg.SetTransactionID(rtc::CreateRandomString(kStunTransactionIdLength)); - msg.AddAttribute(absl::make_unique( + msg.AddAttribute(std::make_unique( STUN_ATTR_XOR_PEER_ADDRESS, ext_addr_)); msg.AddAttribute( - absl::make_unique(STUN_ATTR_DATA, data, size)); + std::make_unique(STUN_ATTR_DATA, data, size)); port_->TurnCustomizerMaybeModifyOutgoingStunMessage(&msg); diff --git a/p2p/base/turn_port_unittest.cc b/p2p/base/turn_port_unittest.cc index 73dadb6718..f9e0205cd6 100644 --- a/p2p/base/turn_port_unittest.cc +++ b/p2p/base/turn_port_unittest.cc @@ -16,7 +16,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/units/time_delta.h" #include "p2p/base/basic_packet_socket_factory.h" @@ -838,7 +837,7 @@ TEST_F(TurnPortTest, TestTurnAllocateWithLoggingId) { CreateTurnPort(kTurnUsername, kTurnPassword, kTurnUdpProtoAddr); turn_port_->SetTurnLoggingId("KESO"); turn_server_.server()->SetStunMessageObserver( - absl::make_unique("KESO")); + std::make_unique("KESO")); turn_port_->PrepareAddress(); EXPECT_TRUE_SIMULATED_WAIT(turn_ready_, kSimulatedRtt * 2, fake_clock_); ASSERT_EQ(1U, turn_port_->Candidates().size()); @@ -850,7 +849,7 @@ TEST_F(TurnPortTest, TestTurnAllocateWithLoggingId) { TEST_F(TurnPortTest, TestTurnAllocateWithoutLoggingId) { CreateTurnPort(kTurnUsername, kTurnPassword, kTurnUdpProtoAddr); turn_server_.server()->SetStunMessageObserver( - absl::make_unique(nullptr)); + std::make_unique(nullptr)); turn_port_->PrepareAddress(); EXPECT_TRUE_SIMULATED_WAIT(turn_ready_, kSimulatedRtt * 2, fake_clock_); ASSERT_EQ(1U, turn_port_->Candidates().size()); diff --git a/p2p/base/turn_server.cc b/p2p/base/turn_server.cc index 2892d75d2e..386921329d 100644 --- a/p2p/base/turn_server.cc +++ b/p2p/base/turn_server.cc @@ -10,11 +10,11 @@ #include "p2p/base/turn_server.h" +#include #include // for std::tie #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/packet_socket_factory.h" #include "p2p/base/async_stun_tcp_socket.h" #include "p2p/base/stun.h" @@ -116,7 +116,7 @@ static bool InitErrorResponse(const StunMessage* req, return false; resp->SetType(resp_type); resp->SetTransactionID(req->transaction_id()); - resp->AddAttribute(absl::make_unique( + resp->AddAttribute(std::make_unique( STUN_ATTR_ERROR_CODE, code, reason)); return true; } @@ -375,7 +375,7 @@ void TurnServer::HandleBindingRequest(TurnServerConnection* conn, InitResponse(req, &response); // Tell the user the address that we received their request from. - auto mapped_addr_attr = absl::make_unique( + auto mapped_addr_attr = std::make_unique( STUN_ATTR_XOR_MAPPED_ADDRESS, conn->src()); response.AddAttribute(std::move(mapped_addr_attr)); @@ -503,10 +503,10 @@ void TurnServer::SendErrorResponseWithRealmAndNonce(TurnServerConnection* conn, timestamp = ts_for_next_nonce_; ts_for_next_nonce_ = 0; } - resp.AddAttribute(absl::make_unique( + resp.AddAttribute(std::make_unique( STUN_ATTR_NONCE, GenerateNonce(timestamp))); resp.AddAttribute( - absl::make_unique(STUN_ATTR_REALM, realm_)); + std::make_unique(STUN_ATTR_REALM, realm_)); SendStun(conn, &resp); } @@ -518,8 +518,8 @@ void TurnServer::SendErrorResponseWithAlternateServer( TurnMessage resp; InitErrorResponse(msg, STUN_ERROR_TRY_ALTERNATE, STUN_ERROR_REASON_TRY_ALTERNATE_SERVER, &resp); - resp.AddAttribute(absl::make_unique( - STUN_ATTR_ALTERNATE_SERVER, addr)); + resp.AddAttribute( + std::make_unique(STUN_ATTR_ALTERNATE_SERVER, addr)); SendStun(conn, &resp); } @@ -528,7 +528,7 @@ void TurnServer::SendStun(TurnServerConnection* conn, StunMessage* msg) { rtc::ByteBufferWriter buf; // Add a SOFTWARE attribute if one is set. if (!software_.empty()) { - msg->AddAttribute(absl::make_unique( + msg->AddAttribute(std::make_unique( STUN_ATTR_SOFTWARE, software_)); } msg->Write(&buf); @@ -691,12 +691,12 @@ void TurnServerAllocation::HandleAllocateRequest(const TurnMessage* msg) { TurnMessage response; InitResponse(msg, &response); - auto mapped_addr_attr = absl::make_unique( + auto mapped_addr_attr = std::make_unique( STUN_ATTR_XOR_MAPPED_ADDRESS, conn_.src()); - auto relayed_addr_attr = absl::make_unique( + auto relayed_addr_attr = std::make_unique( STUN_ATTR_XOR_RELAYED_ADDRESS, external_socket_->GetLocalAddress()); auto lifetime_attr = - absl::make_unique(STUN_ATTR_LIFETIME, lifetime_secs); + std::make_unique(STUN_ATTR_LIFETIME, lifetime_secs); response.AddAttribute(std::move(mapped_addr_attr)); response.AddAttribute(std::move(relayed_addr_attr)); response.AddAttribute(std::move(lifetime_attr)); @@ -721,7 +721,7 @@ void TurnServerAllocation::HandleRefreshRequest(const TurnMessage* msg) { InitResponse(msg, &response); auto lifetime_attr = - absl::make_unique(STUN_ATTR_LIFETIME, lifetime_secs); + std::make_unique(STUN_ATTR_LIFETIME, lifetime_secs); response.AddAttribute(std::move(lifetime_attr)); SendResponse(&response); @@ -862,10 +862,10 @@ void TurnServerAllocation::OnExternalPacket( TurnMessage msg; msg.SetType(TURN_DATA_INDICATION); msg.SetTransactionID(rtc::CreateRandomString(kStunTransactionIdLength)); - msg.AddAttribute(absl::make_unique( + msg.AddAttribute(std::make_unique( STUN_ATTR_XOR_PEER_ADDRESS, addr)); msg.AddAttribute( - absl::make_unique(STUN_ATTR_DATA, data, size)); + std::make_unique(STUN_ATTR_DATA, data, size)); server_->SendStun(&conn_, &msg); } else { RTC_LOG(LS_WARNING) diff --git a/p2p/client/basic_port_allocator_unittest.cc b/p2p/client/basic_port_allocator_unittest.cc index 86544c811e..4b7c08453e 100644 --- a/p2p/client/basic_port_allocator_unittest.cc +++ b/p2p/client/basic_port_allocator_unittest.cc @@ -14,7 +14,6 @@ #include // no-presubmit-check TODO(webrtc:8982) #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "p2p/base/basic_packet_socket_factory.h" #include "p2p/base/p2p_constants.h" #include "p2p/base/stun_port.h" @@ -2399,7 +2398,7 @@ TEST_F(BasicPortAllocatorTest, HostCandidateAddressIsReplacedByHostname) { ASSERT_EQ(&network_manager_, allocator().network_manager()); network_manager_.set_mdns_responder( - absl::make_unique(rtc::Thread::Current())); + std::make_unique(rtc::Thread::Current())); AddInterface(kClientAddr); ASSERT_TRUE(CreateSession(ICE_CANDIDATE_COMPONENT_RTP)); session_->StartGettingPorts(); diff --git a/pc/BUILD.gn b/pc/BUILD.gn index 44341398aa..fb9bf2768f 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -260,7 +260,6 @@ rtc_static_library("peerconnection") { "../system_wrappers:field_trial", "../system_wrappers:metrics", "//third_party/abseil-cpp/absl/algorithm:container", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] @@ -387,7 +386,6 @@ if (rtc_include_tests) { "../system_wrappers", "../test:perf_test", "../test:test_support", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -482,7 +480,6 @@ if (rtc_include_tests) { "../rtc_base/third_party/sigslot", "../test:test_support", "../test:video_test_common", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/pc/channel_manager.cc b/pc/channel_manager.cc index 0023a2f6e4..ce8f473600 100644 --- a/pc/channel_manager.cc +++ b/pc/channel_manager.cc @@ -187,7 +187,7 @@ VoiceChannel* ChannelManager::CreateVoiceChannel( return nullptr; } - auto voice_channel = absl::make_unique( + auto voice_channel = std::make_unique( worker_thread_, network_thread_, signaling_thread, absl::WrapUnique(media_channel), content_name, srtp_required, crypto_options, ssrc_generator); @@ -259,7 +259,7 @@ VideoChannel* ChannelManager::CreateVideoChannel( return nullptr; } - auto video_channel = absl::make_unique( + auto video_channel = std::make_unique( worker_thread_, network_thread_, signaling_thread, absl::WrapUnique(media_channel), content_name, srtp_required, crypto_options, ssrc_generator); @@ -320,7 +320,7 @@ RtpDataChannel* ChannelManager::CreateRtpDataChannel( return nullptr; } - auto data_channel = absl::make_unique( + auto data_channel = std::make_unique( worker_thread_, network_thread_, signaling_thread, absl::WrapUnique(media_channel), content_name, srtp_required, crypto_options, ssrc_generator); diff --git a/pc/channel_manager_unittest.cc b/pc/channel_manager_unittest.cc index e88b09cb4f..ab3b88b76e 100644 --- a/pc/channel_manager_unittest.cc +++ b/pc/channel_manager_unittest.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "api/rtc_error.h" #include "api/test/fake_media_transport.h" #include "api/transport/media/media_transport_config.h" @@ -66,9 +65,9 @@ class ChannelManagerTest : public ::testing::Test { } std::unique_ptr CreateDtlsSrtpTransport() { - rtp_dtls_transport_ = absl::make_unique( + rtp_dtls_transport_ = std::make_unique( "fake_dtls_transport", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto dtls_srtp_transport = absl::make_unique( + auto dtls_srtp_transport = std::make_unique( /*rtcp_mux_required=*/true); dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport_.get(), /*rtcp_dtls_transport=*/nullptr); diff --git a/pc/channel_unittest.cc b/pc/channel_unittest.cc index 5b388ea967..efc1d59758 100644 --- a/pc/channel_unittest.cc +++ b/pc/channel_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/array_view.h" #include "api/audio_options.h" #include "api/rtp_parameters.h" @@ -132,9 +131,9 @@ class ChannelTest : public ::testing::Test, public sigslot::has_slots<> { } void CreateChannels(int flags1, int flags2) { - CreateChannels(absl::make_unique( + CreateChannels(std::make_unique( nullptr, typename T::Options()), - absl::make_unique( + std::make_unique( nullptr, typename T::Options()), flags1, flags2); } @@ -262,7 +261,7 @@ class ChannelTest : public ::testing::Test, public sigslot::has_slots<> { webrtc::RtpTransportInternal* rtp_transport, int flags) { rtc::Thread* signaling_thread = rtc::Thread::Current(); - auto channel = absl::make_unique( + auto channel = std::make_unique( worker_thread, network_thread, signaling_thread, std::move(ch), cricket::CN_AUDIO, (flags & DTLS) != 0, webrtc::CryptoOptions(), &ssrc_generator_); @@ -297,7 +296,7 @@ class ChannelTest : public ::testing::Test, public sigslot::has_slots<> { std::unique_ptr CreateUnencryptedTransport( rtc::PacketTransportInternal* rtp_packet_transport, rtc::PacketTransportInternal* rtcp_packet_transport) { - auto rtp_transport = absl::make_unique( + auto rtp_transport = std::make_unique( rtcp_packet_transport == nullptr); rtp_transport->SetRtpPacketTransport(rtp_packet_transport); @@ -310,7 +309,7 @@ class ChannelTest : public ::testing::Test, public sigslot::has_slots<> { std::unique_ptr CreateDtlsSrtpTransport( cricket::DtlsTransportInternal* rtp_dtls_transport, cricket::DtlsTransportInternal* rtcp_dtls_transport) { - auto dtls_srtp_transport = absl::make_unique( + auto dtls_srtp_transport = std::make_unique( rtcp_dtls_transport == nullptr); dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport, @@ -959,8 +958,8 @@ class ChannelTest : public ::testing::Test, public sigslot::has_slots<> { T::MediaChannel::SendRtcp(kRtcpReport, sizeof(kRtcpReport)); } }; - CreateChannels(absl::make_unique(), - absl::make_unique(), RTCP_MUX, + CreateChannels(std::make_unique(), + std::make_unique(), RTCP_MUX, RTCP_MUX); EXPECT_TRUE(SendInitiate()); EXPECT_TRUE(SendAccept()); @@ -1621,7 +1620,7 @@ std::unique_ptr ChannelTest::CreateChannel( webrtc::RtpTransportInternal* rtp_transport, int flags) { rtc::Thread* signaling_thread = rtc::Thread::Current(); - auto channel = absl::make_unique( + auto channel = std::make_unique( worker_thread, network_thread, signaling_thread, std::move(ch), cricket::CN_VIDEO, (flags & DTLS) != 0, webrtc::CryptoOptions(), &ssrc_generator_); @@ -2440,7 +2439,7 @@ std::unique_ptr ChannelTest::CreateChannel( webrtc::RtpTransportInternal* rtp_transport, int flags) { rtc::Thread* signaling_thread = rtc::Thread::Current(); - auto channel = absl::make_unique( + auto channel = std::make_unique( worker_thread, network_thread, signaling_thread, std::move(ch), cricket::CN_DATA, (flags & DTLS) != 0, webrtc::CryptoOptions(), &ssrc_generator_); diff --git a/pc/composite_rtp_transport_test.cc b/pc/composite_rtp_transport_test.cc index 77512d9929..02480844a0 100644 --- a/pc/composite_rtp_transport_test.cc +++ b/pc/composite_rtp_transport_test.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "modules/rtp_rtcp/source/rtp_packet_received.h" #include "p2p/base/fake_packet_transport.h" #include "pc/rtp_transport.h" @@ -34,17 +33,17 @@ class CompositeRtpTransportTest : public ::testing::Test, public: CompositeRtpTransportTest() : packet_transport_1_( - absl::make_unique(kTransportName)), + std::make_unique(kTransportName)), packet_transport_2_( - absl::make_unique(kTransportName)), + std::make_unique(kTransportName)), rtcp_transport_1_( - absl::make_unique(kRtcpTransportName)), + std::make_unique(kRtcpTransportName)), rtcp_transport_2_( - absl::make_unique(kRtcpTransportName)) {} + std::make_unique(kRtcpTransportName)) {} void SetupRtpTransports(bool rtcp_mux) { - transport_1_ = absl::make_unique(rtcp_mux); - transport_2_ = absl::make_unique(rtcp_mux); + transport_1_ = std::make_unique(rtcp_mux); + transport_2_ = std::make_unique(rtcp_mux); transport_1_->SetRtpPacketTransport(packet_transport_1_.get()); transport_2_->SetRtpPacketTransport(packet_transport_2_.get()); @@ -53,7 +52,7 @@ class CompositeRtpTransportTest : public ::testing::Test, transport_2_->SetRtcpPacketTransport(rtcp_transport_2_.get()); } - composite_ = absl::make_unique( + composite_ = std::make_unique( std::vector{transport_1_.get(), transport_2_.get()}); diff --git a/pc/data_channel.cc b/pc/data_channel.cc index 586520b6e0..c5a8aebdf3 100644 --- a/pc/data_channel.cc +++ b/pc/data_channel.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "media/sctp/sctp_transport_internal.h" #include "pc/sctp_utils.h" #include "rtc_base/checks.h" @@ -426,7 +425,7 @@ void DataChannel::OnDataReceived(const cricket::ReceiveDataParams& params, } bool binary = (params.type == cricket::DMT_BINARY); - auto buffer = absl::make_unique(payload, binary); + auto buffer = std::make_unique(payload, binary); if (state_ == kOpen && observer_) { ++messages_received_; bytes_received_ += buffer->size(); @@ -663,7 +662,7 @@ bool DataChannel::QueueSendDataMessage(const DataBuffer& buffer) { RTC_LOG(LS_ERROR) << "Can't buffer any more data for the data channel."; return false; } - queued_send_data_.PushBack(absl::make_unique(buffer)); + queued_send_data_.PushBack(std::make_unique(buffer)); return true; } @@ -678,7 +677,7 @@ void DataChannel::SendQueuedControlMessages() { } void DataChannel::QueueControlMessage(const rtc::CopyOnWriteBuffer& buffer) { - queued_control_data_.PushBack(absl::make_unique(buffer, true)); + queued_control_data_.PushBack(std::make_unique(buffer, true)); } bool DataChannel::SendControlMessage(const rtc::CopyOnWriteBuffer& buffer) { diff --git a/pc/dtls_srtp_transport_unittest.cc b/pc/dtls_srtp_transport_unittest.cc index 38d04582af..770c140ce7 100644 --- a/pc/dtls_srtp_transport_unittest.cc +++ b/pc/dtls_srtp_transport_unittest.cc @@ -16,7 +16,6 @@ #include #include -#include "absl/memory/memory.h" #include "call/rtp_demuxer.h" #include "media/base/fake_rtp.h" #include "p2p/base/dtls_transport_internal.h" @@ -59,7 +58,7 @@ class DtlsSrtpTransportTest : public ::testing::Test, FakeDtlsTransport* rtcp_dtls, bool rtcp_mux_enabled) { auto dtls_srtp_transport = - absl::make_unique(rtcp_mux_enabled); + std::make_unique(rtcp_mux_enabled); dtls_srtp_transport->SetDtlsTransports(rtp_dtls, rtcp_dtls); @@ -261,17 +260,17 @@ class DtlsSrtpTransportTest : public ::testing::Test, // Tests that if RTCP muxing is enabled and transports are set after RTP // transport finished the handshake, SRTP is set up. TEST_F(DtlsSrtpTransportTest, SetTransportsAfterHandshakeCompleteWithRtcpMux) { - auto rtp_dtls1 = absl::make_unique( + auto rtp_dtls1 = std::make_unique( "video", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtp_dtls2 = absl::make_unique( + auto rtp_dtls2 = std::make_unique( "video", cricket::ICE_CANDIDATE_COMPONENT_RTP); MakeDtlsSrtpTransports(rtp_dtls1.get(), nullptr, rtp_dtls2.get(), nullptr, /*rtcp_mux_enabled=*/true); - auto rtp_dtls3 = absl::make_unique( + auto rtp_dtls3 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtp_dtls4 = absl::make_unique( + auto rtp_dtls4 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); CompleteDtlsHandshake(rtp_dtls3.get(), rtp_dtls4.get()); @@ -286,25 +285,25 @@ TEST_F(DtlsSrtpTransportTest, SetTransportsAfterHandshakeCompleteWithRtcpMux) { // RTP and RTCP transports finished the handshake, SRTP is set up. TEST_F(DtlsSrtpTransportTest, SetTransportsAfterHandshakeCompleteWithoutRtcpMux) { - auto rtp_dtls1 = absl::make_unique( + auto rtp_dtls1 = std::make_unique( "video", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls1 = absl::make_unique( + auto rtcp_dtls1 = std::make_unique( "video", cricket::ICE_CANDIDATE_COMPONENT_RTCP); - auto rtp_dtls2 = absl::make_unique( + auto rtp_dtls2 = std::make_unique( "video", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls2 = absl::make_unique( + auto rtcp_dtls2 = std::make_unique( "video", cricket::ICE_CANDIDATE_COMPONENT_RTCP); MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(), rtcp_dtls2.get(), /*rtcp_mux_enabled=*/false); - auto rtp_dtls3 = absl::make_unique( + auto rtp_dtls3 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls3 = absl::make_unique( + auto rtcp_dtls3 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); - auto rtp_dtls4 = absl::make_unique( + auto rtp_dtls4 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls4 = absl::make_unique( + auto rtcp_dtls4 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); CompleteDtlsHandshake(rtp_dtls3.get(), rtp_dtls4.get()); CompleteDtlsHandshake(rtcp_dtls3.get(), rtcp_dtls4.get()); @@ -318,13 +317,13 @@ TEST_F(DtlsSrtpTransportTest, // Tests if RTCP muxing is enabled, SRTP is set up as soon as the RTP DTLS // handshake is finished. TEST_F(DtlsSrtpTransportTest, SetTransportsBeforeHandshakeCompleteWithRtcpMux) { - auto rtp_dtls1 = absl::make_unique( + auto rtp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls1 = absl::make_unique( + auto rtcp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); - auto rtp_dtls2 = absl::make_unique( + auto rtp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls2 = absl::make_unique( + auto rtcp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(), @@ -341,13 +340,13 @@ TEST_F(DtlsSrtpTransportTest, SetTransportsBeforeHandshakeCompleteWithRtcpMux) { // RTCP DTLS handshake are finished. TEST_F(DtlsSrtpTransportTest, SetTransportsBeforeHandshakeCompleteWithoutRtcpMux) { - auto rtp_dtls1 = absl::make_unique( + auto rtp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls1 = absl::make_unique( + auto rtcp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); - auto rtp_dtls2 = absl::make_unique( + auto rtp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls2 = absl::make_unique( + auto rtcp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(), @@ -364,9 +363,9 @@ TEST_F(DtlsSrtpTransportTest, // context will be reset and will be re-setup once the new transports' handshake // complete. TEST_F(DtlsSrtpTransportTest, DtlsSrtpResetAfterDtlsTransportChange) { - auto rtp_dtls1 = absl::make_unique( + auto rtp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtp_dtls2 = absl::make_unique( + auto rtp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); MakeDtlsSrtpTransports(rtp_dtls1.get(), nullptr, rtp_dtls2.get(), nullptr, @@ -376,9 +375,9 @@ TEST_F(DtlsSrtpTransportTest, DtlsSrtpResetAfterDtlsTransportChange) { EXPECT_TRUE(dtls_srtp_transport1_->IsSrtpActive()); EXPECT_TRUE(dtls_srtp_transport2_->IsSrtpActive()); - auto rtp_dtls3 = absl::make_unique( + auto rtp_dtls3 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtp_dtls4 = absl::make_unique( + auto rtp_dtls4 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); // The previous context is reset. @@ -396,13 +395,13 @@ TEST_F(DtlsSrtpTransportTest, DtlsSrtpResetAfterDtlsTransportChange) { // enabled, SRTP is set up. TEST_F(DtlsSrtpTransportTest, RtcpMuxEnabledAfterRtpTransportHandshakeComplete) { - auto rtp_dtls1 = absl::make_unique( + auto rtp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls1 = absl::make_unique( + auto rtcp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); - auto rtp_dtls2 = absl::make_unique( + auto rtp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls2 = absl::make_unique( + auto rtcp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(), @@ -423,9 +422,9 @@ TEST_F(DtlsSrtpTransportTest, // Tests that when SetSend/RecvEncryptedHeaderExtensionIds is called, the SRTP // sessions are updated with new encryped header extension IDs immediately. TEST_F(DtlsSrtpTransportTest, EncryptedHeaderExtensionIdUpdated) { - auto rtp_dtls1 = absl::make_unique( + auto rtp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtp_dtls2 = absl::make_unique( + auto rtp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); MakeDtlsSrtpTransports(rtp_dtls1.get(), nullptr, rtp_dtls2.get(), nullptr, @@ -449,9 +448,9 @@ TEST_F(DtlsSrtpTransportTest, EncryptedHeaderExtensionIdUpdated) { // Tests if RTCP muxing is enabled. DtlsSrtpTransport is ready to send once the // RTP DtlsTransport is ready. TEST_F(DtlsSrtpTransportTest, SignalReadyToSendFiredWithRtcpMux) { - auto rtp_dtls1 = absl::make_unique( + auto rtp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtp_dtls2 = absl::make_unique( + auto rtp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); MakeDtlsSrtpTransports(rtp_dtls1.get(), nullptr, rtp_dtls2.get(), nullptr, @@ -465,13 +464,13 @@ TEST_F(DtlsSrtpTransportTest, SignalReadyToSendFiredWithRtcpMux) { // Tests if RTCP muxing is not enabled. DtlsSrtpTransport is ready to send once // both the RTP and RTCP DtlsTransport are ready. TEST_F(DtlsSrtpTransportTest, SignalReadyToSendFiredWithoutRtcpMux) { - auto rtp_dtls1 = absl::make_unique( + auto rtp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls1 = absl::make_unique( + auto rtcp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); - auto rtp_dtls2 = absl::make_unique( + auto rtp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls2 = absl::make_unique( + auto rtcp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(), @@ -492,13 +491,13 @@ TEST_F(DtlsSrtpTransportTest, SignalReadyToSendFiredWithoutRtcpMux) { // when attempting to unprotect packets. // Regression test for bugs.webrtc.org/8996 TEST_F(DtlsSrtpTransportTest, SrtpSessionNotResetWhenRtcpTransportRemoved) { - auto rtp_dtls1 = absl::make_unique( + auto rtp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls1 = absl::make_unique( + auto rtcp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); - auto rtp_dtls2 = absl::make_unique( + auto rtp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls2 = absl::make_unique( + auto rtcp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(), @@ -521,13 +520,13 @@ TEST_F(DtlsSrtpTransportTest, SrtpSessionNotResetWhenRtcpTransportRemoved) { // Tests that RTCP packets can be sent and received if both sides actively reset // the SRTP parameters with the |active_reset_srtp_params_| flag. TEST_F(DtlsSrtpTransportTest, ActivelyResetSrtpParams) { - auto rtp_dtls1 = absl::make_unique( + auto rtp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls1 = absl::make_unique( + auto rtcp_dtls1 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); - auto rtp_dtls2 = absl::make_unique( + auto rtp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); - auto rtcp_dtls2 = absl::make_unique( + auto rtcp_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP); MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(), diff --git a/pc/dtls_transport_unittest.cc b/pc/dtls_transport_unittest.cc index c97c4196b6..f7d7a88d1e 100644 --- a/pc/dtls_transport_unittest.cc +++ b/pc/dtls_transport_unittest.cc @@ -56,7 +56,7 @@ class DtlsTransportTest : public ::testing::Test { DtlsTransportObserverInterface* observer() { return &observer_; } void CreateTransport(rtc::FakeSSLCertificate* certificate = nullptr) { - auto cricket_transport = absl::make_unique( + auto cricket_transport = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); if (certificate) { cricket_transport->SetRemoteSSLCertificate(certificate); @@ -68,7 +68,7 @@ class DtlsTransportTest : public ::testing::Test { void CompleteDtlsHandshake() { auto fake_dtls1 = static_cast(transport_->internal()); - auto fake_dtls2 = absl::make_unique( + auto fake_dtls2 = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); auto cert1 = rtc::RTCCertificate::Create(absl::WrapUnique( rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT))); @@ -84,7 +84,7 @@ class DtlsTransportTest : public ::testing::Test { }; TEST_F(DtlsTransportTest, CreateClearDelete) { - auto cricket_transport = absl::make_unique( + auto cricket_transport = std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); rtc::scoped_refptr webrtc_transport = new rtc::RefCountedObject(std::move(cricket_transport)); diff --git a/pc/ice_transport_unittest.cc b/pc/ice_transport_unittest.cc index a801bbae35..3711a86d5d 100644 --- a/pc/ice_transport_unittest.cc +++ b/pc/ice_transport_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/ice_transport_factory.h" #include "p2p/base/fake_ice_transport.h" #include "p2p/base/fake_port_allocator.h" @@ -28,7 +27,7 @@ class IceTransportTest : public ::testing::Test {}; TEST_F(IceTransportTest, CreateNonSelfDeletingTransport) { auto cricket_transport = - absl::make_unique("name", 0, nullptr); + std::make_unique("name", 0, nullptr); rtc::scoped_refptr ice_transport = new rtc::RefCountedObject( cricket_transport.get()); @@ -39,7 +38,7 @@ TEST_F(IceTransportTest, CreateNonSelfDeletingTransport) { TEST_F(IceTransportTest, CreateSelfDeletingTransport) { std::unique_ptr port_allocator( - absl::make_unique(nullptr, nullptr)); + std::make_unique(nullptr, nullptr)); IceTransportInit init; init.set_port_allocator(port_allocator.get()); auto ice_transport = CreateIceTransport(std::move(init)); diff --git a/pc/jsep_ice_candidate.cc b/pc/jsep_ice_candidate.cc index c9dc9c18bf..4e4542182a 100644 --- a/pc/jsep_ice_candidate.cc +++ b/pc/jsep_ice_candidate.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "pc/webrtc_sdp.h" namespace webrtc { @@ -33,8 +32,8 @@ std::unique_ptr CreateIceCandidate( const std::string& sdp_mid, int sdp_mline_index, const cricket::Candidate& candidate) { - return absl::make_unique(sdp_mid, sdp_mline_index, - candidate); + return std::make_unique(sdp_mid, sdp_mline_index, + candidate); } JsepIceCandidate::JsepIceCandidate(const std::string& sdp_mid, diff --git a/pc/jsep_session_description.cc b/pc/jsep_session_description.cc index 4c0453198d..cc544dc5e1 100644 --- a/pc/jsep_session_description.cc +++ b/pc/jsep_session_description.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "p2p/base/port.h" #include "pc/media_session.h" #include "pc/webrtc_sdp.h" @@ -152,7 +151,7 @@ std::unique_ptr CreateSessionDescription( SdpType type, const std::string& sdp, SdpParseError* error_out) { - auto jsep_desc = absl::make_unique(type); + auto jsep_desc = std::make_unique(type); if (!SdpDeserialize(sdp, jsep_desc.get(), error_out)) { return nullptr; } @@ -164,7 +163,7 @@ std::unique_ptr CreateSessionDescription( const std::string& session_id, const std::string& session_version, std::unique_ptr description) { - auto jsep_description = absl::make_unique(type); + auto jsep_description = std::make_unique(type); bool initialize_success = jsep_description->Initialize( std::move(description), session_id, session_version); RTC_DCHECK(initialize_success); diff --git a/pc/jsep_session_description_unittest.cc b/pc/jsep_session_description_unittest.cc index ef86ef41fb..8caac94613 100644 --- a/pc/jsep_session_description_unittest.cc +++ b/pc/jsep_session_description_unittest.cc @@ -18,7 +18,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/candidate.h" #include "api/jsep.h" #include "api/jsep_ice_candidate.h" @@ -57,12 +56,12 @@ static const uint32_t kCandidateGeneration = 2; // In SDP this is described by two m lines, one audio and one video. static std::unique_ptr CreateCricketSessionDescription() { - auto desc = absl::make_unique(); + auto desc = std::make_unique(); // AudioContentDescription - auto audio = absl::make_unique(); + auto audio = std::make_unique(); // VideoContentDescription - auto video = absl::make_unique(); + auto video = std::make_unique(); audio->AddCodec(cricket::AudioCodec(103, "ISAC", 16000, 0, 0)); desc->AddContent(cricket::CN_AUDIO, MediaProtocolType::kRtp, @@ -95,7 +94,7 @@ class JsepSessionDescriptionTest : public ::testing::Test { candidate_ = candidate; const std::string session_id = rtc::ToString(rtc::CreateRandomId64()); const std::string session_version = rtc::ToString(rtc::CreateRandomId()); - jsep_desc_ = absl::make_unique(SdpType::kOffer); + jsep_desc_ = std::make_unique(SdpType::kOffer); ASSERT_TRUE(jsep_desc_->Initialize(CreateCricketSessionDescription(), session_id, session_version)); } @@ -109,7 +108,7 @@ class JsepSessionDescriptionTest : public ::testing::Test { std::unique_ptr DeSerialize( const std::string& sdp) { - auto jsep_desc = absl::make_unique(SdpType::kOffer); + auto jsep_desc = std::make_unique(SdpType::kOffer); EXPECT_TRUE(webrtc::SdpDeserialize(sdp, jsep_desc.get(), nullptr)); return std::move(jsep_desc); } diff --git a/pc/jsep_transport.cc b/pc/jsep_transport.cc index 577787305e..22f4f8d1f5 100644 --- a/pc/jsep_transport.cc +++ b/pc/jsep_transport.cc @@ -17,7 +17,6 @@ #include #include // for std::pair -#include "absl/memory/memory.h" #include "api/array_view.h" #include "api/candidate.h" #include "p2p/base/p2p_constants.h" @@ -145,7 +144,7 @@ JsepTransport::JsepTransport( } if (datagram_rtp_transport_ && default_rtp_transport()) { - composite_rtp_transport_ = absl::make_unique( + composite_rtp_transport_ = std::make_unique( std::vector{ datagram_rtp_transport_.get(), default_rtp_transport()}); } @@ -606,7 +605,7 @@ webrtc::RTCError JsepTransport::NegotiateAndSetDtlsParameters( rtc::SSLFingerprint* remote_fp = remote_description_->transport_desc.identity_fingerprint.get(); if (remote_fp && local_fp) { - remote_fingerprint = absl::make_unique(*remote_fp); + remote_fingerprint = std::make_unique(*remote_fp); webrtc::RTCError error = NegotiateDtlsRole(local_description_type, local_description_->transport_desc.connection_role, @@ -621,7 +620,7 @@ webrtc::RTCError JsepTransport::NegotiateAndSetDtlsParameters( "Local fingerprint supplied when caller didn't offer DTLS."); } else { // We are not doing DTLS - remote_fingerprint = absl::make_unique( + remote_fingerprint = std::make_unique( "", rtc::ArrayView()); } // Now that we have negotiated everything, push it downward. diff --git a/pc/jsep_transport_controller.cc b/pc/jsep_transport_controller.cc index 10250ced13..4f7000964f 100644 --- a/pc/jsep_transport_controller.cc +++ b/pc/jsep_transport_controller.cc @@ -14,7 +14,6 @@ #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/transport/datagram_transport_interface.h" #include "api/transport/media/media_transport_interface.h" #include "p2p/base/ice_transport_internal.h" @@ -476,7 +475,7 @@ JsepTransportController::CreateIceTransport(const std::string transport_name, return config_.external_transport_factory->CreateIceTransport( transport_name, component); } else { - return absl::make_unique( + return std::make_unique( transport_name, component, port_allocator_, async_resolver_factory_, config_.event_log); } @@ -500,14 +499,14 @@ JsepTransportController::CreateDtlsTransport( // If media transport is used for both media and data channels, // then we don't need to create DTLS. // Otherwise, DTLS is still created. - dtls = absl::make_unique( - ice, config_.crypto_options); + dtls = std::make_unique(ice, + config_.crypto_options); } else if (config_.external_transport_factory) { dtls = config_.external_transport_factory->CreateDtlsTransport( ice, config_.crypto_options); } else { - dtls = absl::make_unique( - ice, config_.crypto_options, config_.event_log); + dtls = std::make_unique(ice, config_.crypto_options, + config_.event_log); } RTC_DCHECK(dtls); @@ -553,7 +552,7 @@ JsepTransportController::CreateUnencryptedRtpTransport( rtc::PacketTransportInternal* rtcp_packet_transport) { RTC_DCHECK(network_thread_->IsCurrent()); auto unencrypted_rtp_transport = - absl::make_unique(rtcp_packet_transport == nullptr); + std::make_unique(rtcp_packet_transport == nullptr); unencrypted_rtp_transport->SetRtpPacketTransport(rtp_packet_transport); if (rtcp_packet_transport) { unencrypted_rtp_transport->SetRtcpPacketTransport(rtcp_packet_transport); @@ -568,7 +567,7 @@ JsepTransportController::CreateSdesTransport( cricket::DtlsTransportInternal* rtcp_dtls_transport) { RTC_DCHECK(network_thread_->IsCurrent()); auto srtp_transport = - absl::make_unique(rtcp_dtls_transport == nullptr); + std::make_unique(rtcp_dtls_transport == nullptr); RTC_DCHECK(rtp_dtls_transport); srtp_transport->SetRtpPacketTransport(rtp_dtls_transport); if (rtcp_dtls_transport) { @@ -586,7 +585,7 @@ JsepTransportController::CreateDtlsSrtpTransport( cricket::DtlsTransportInternal* rtp_dtls_transport, cricket::DtlsTransportInternal* rtcp_dtls_transport) { RTC_DCHECK(network_thread_->IsCurrent()); - auto dtls_srtp_transport = absl::make_unique( + auto dtls_srtp_transport = std::make_unique( rtcp_dtls_transport == nullptr); if (config_.enable_external_auth) { dtls_srtp_transport->EnableExternalAuth(); @@ -1209,7 +1208,7 @@ RTCError JsepTransportController::MaybeCreateJsepTransport( RTC_LOG(LS_INFO) << "Creating UnencryptedRtpTransport, because datagram " "transport is used."; RTC_DCHECK(!rtcp_dtls_transport); - datagram_rtp_transport = absl::make_unique( + datagram_rtp_transport = std::make_unique( content_info.media_description()->rtp_header_extensions(), ice.get(), datagram_transport.get()); } @@ -1230,7 +1229,7 @@ RTCError JsepTransportController::MaybeCreateJsepTransport( } std::unique_ptr jsep_transport = - absl::make_unique( + std::make_unique( content_info.name, certificate_, std::move(ice), std::move(rtcp_ice), std::move(unencrypted_rtp_transport), std::move(sdes_transport), std::move(dtls_srtp_transport), std::move(datagram_rtp_transport), diff --git a/pc/jsep_transport_controller_unittest.cc b/pc/jsep_transport_controller_unittest.cc index 35ebb87cb4..70cbe961a5 100644 --- a/pc/jsep_transport_controller_unittest.cc +++ b/pc/jsep_transport_controller_unittest.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/test/fake_media_transport.h" #include "api/test/loopback_media_transport.h" #include "api/transport/media/media_transport_interface.h" @@ -65,14 +64,14 @@ class FakeTransportFactory : public cricket::TransportFactoryInterface { std::unique_ptr CreateIceTransport( const std::string& transport_name, int component) override { - return absl::make_unique(transport_name, - component); + return std::make_unique(transport_name, + component); } std::unique_ptr CreateDtlsTransport( cricket::IceTransportInternal* ice, const webrtc::CryptoOptions& crypto_options) override { - return absl::make_unique( + return std::make_unique( static_cast(ice)); } }; @@ -82,7 +81,7 @@ class JsepTransportControllerTest : public JsepTransportController::Observer, public sigslot::has_slots<> { public: JsepTransportControllerTest() : signaling_thread_(rtc::Thread::Current()) { - fake_transport_factory_ = absl::make_unique(); + fake_transport_factory_ = std::make_unique(); } void CreateJsepTransportController( @@ -94,7 +93,7 @@ class JsepTransportControllerTest : public JsepTransportController::Observer, // The tests only works with |fake_transport_factory|; config.external_transport_factory = fake_transport_factory_.get(); // TODO(zstein): Provide an AsyncResolverFactory once it is required. - transport_controller_ = absl::make_unique( + transport_controller_ = std::make_unique( signaling_thread, network_thread, port_allocator, nullptr, config); ConnectTransportControllerSignals(); } @@ -114,7 +113,7 @@ class JsepTransportControllerTest : public JsepTransportController::Observer, std::unique_ptr CreateSessionDescriptionWithoutBundle() { - auto description = absl::make_unique(); + auto description = std::make_unique(); AddAudioSection(description.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); @@ -957,7 +956,7 @@ TEST_F(JsepTransportControllerTest, SetAndGetLocalCertificate) { rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT))); rtc::scoped_refptr returned_certificate; - auto description = absl::make_unique(); + auto description = std::make_unique(); AddAudioSection(description.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, certificate1); @@ -1015,11 +1014,11 @@ TEST_F(JsepTransportControllerTest, GetDtlsRole) { rtc::SSLIdentity::Generate("answer", rtc::KT_DEFAULT))); transport_controller_->SetLocalCertificate(offer_certificate); - auto offer_desc = absl::make_unique(); + auto offer_desc = std::make_unique(); AddAudioSection(offer_desc.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, offer_certificate); - auto answer_desc = absl::make_unique(); + auto answer_desc = std::make_unique(); AddAudioSection(answer_desc.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, answer_certificate); @@ -1485,11 +1484,11 @@ TEST_F(JsepTransportControllerTest, IceSignalingOccursOnSignalingThread) { TEST_F(JsepTransportControllerTest, IceRoleRedeterminedOnIceRestartByDefault) { CreateJsepTransportController(JsepTransportController::Config()); // Let the |transport_controller_| be the controlled side initially. - auto remote_offer = absl::make_unique(); + auto remote_offer = std::make_unique(); AddAudioSection(remote_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); - auto local_answer = absl::make_unique(); + auto local_answer = std::make_unique(); AddAudioSection(local_answer.get(), kAudioMid1, kIceUfrag2, kIcePwd2, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, nullptr); @@ -1507,7 +1506,7 @@ TEST_F(JsepTransportControllerTest, IceRoleRedeterminedOnIceRestartByDefault) { fake_dtls->fake_ice_transport()->GetIceRole()); // New offer will trigger the ICE restart. - auto restart_local_offer = absl::make_unique(); + auto restart_local_offer = std::make_unique(); AddAudioSection(restart_local_offer.get(), kAudioMid1, kIceUfrag3, kIcePwd3, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); @@ -1528,11 +1527,11 @@ TEST_F(JsepTransportControllerTest, IceRoleNotRedetermined) { CreateJsepTransportController(config); // Let the |transport_controller_| be the controlled side initially. - auto remote_offer = absl::make_unique(); + auto remote_offer = std::make_unique(); AddAudioSection(remote_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); - auto local_answer = absl::make_unique(); + auto local_answer = std::make_unique(); AddAudioSection(local_answer.get(), kAudioMid1, kIceUfrag2, kIcePwd2, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, nullptr); @@ -1550,7 +1549,7 @@ TEST_F(JsepTransportControllerTest, IceRoleNotRedetermined) { fake_dtls->fake_ice_transport()->GetIceRole()); // New offer will trigger the ICE restart. - auto restart_local_offer = absl::make_unique(); + auto restart_local_offer = std::make_unique(); AddAudioSection(restart_local_offer.get(), kAudioMid1, kIceUfrag3, kIcePwd3, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); @@ -1565,7 +1564,7 @@ TEST_F(JsepTransportControllerTest, IceRoleNotRedetermined) { // Tests ICE-Lite mode in remote answer. TEST_F(JsepTransportControllerTest, SetIceRoleWhenIceLiteInRemoteAnswer) { CreateJsepTransportController(JsepTransportController::Config()); - auto local_offer = absl::make_unique(); + auto local_offer = std::make_unique(); AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); @@ -1579,7 +1578,7 @@ TEST_F(JsepTransportControllerTest, SetIceRoleWhenIceLiteInRemoteAnswer) { EXPECT_EQ(cricket::ICEMODE_FULL, fake_dtls->fake_ice_transport()->remote_ice_mode()); - auto remote_answer = absl::make_unique(); + auto remote_answer = std::make_unique(); AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag2, kIcePwd2, cricket::ICEMODE_LITE, cricket::CONNECTIONROLE_PASSIVE, nullptr); @@ -1598,11 +1597,11 @@ TEST_F(JsepTransportControllerTest, SetIceRoleWhenIceLiteInRemoteAnswer) { TEST_F(JsepTransportControllerTest, IceRoleIsControllingAfterIceRestartFromIceLiteEndpoint) { CreateJsepTransportController(JsepTransportController::Config()); - auto remote_offer = absl::make_unique(); + auto remote_offer = std::make_unique(); AddAudioSection(remote_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_LITE, cricket::CONNECTIONROLE_ACTPASS, nullptr); - auto local_answer = absl::make_unique(); + auto local_answer = std::make_unique(); AddAudioSection(local_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, nullptr); @@ -1620,11 +1619,11 @@ TEST_F(JsepTransportControllerTest, fake_dtls->fake_ice_transport()->GetIceRole()); // In the subsequence remote offer triggers an ICE restart. - auto remote_offer2 = absl::make_unique(); + auto remote_offer2 = std::make_unique(); AddAudioSection(remote_offer2.get(), kAudioMid1, kIceUfrag2, kIcePwd2, cricket::ICEMODE_LITE, cricket::CONNECTIONROLE_ACTPASS, nullptr); - auto local_answer2 = absl::make_unique(); + auto local_answer2 = std::make_unique(); AddAudioSection(local_answer2.get(), kAudioMid1, kIceUfrag2, kIcePwd2, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, nullptr); @@ -1651,7 +1650,7 @@ TEST_F(JsepTransportControllerTest, MultipleMediaSectionsOfSameTypeWithBundle) { bundle_group.AddContentName(kVideoMid1); bundle_group.AddContentName(kDataMid1); - auto local_offer = absl::make_unique(); + auto local_offer = std::make_unique(); AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); @@ -1666,7 +1665,7 @@ TEST_F(JsepTransportControllerTest, MultipleMediaSectionsOfSameTypeWithBundle) { cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); - auto remote_answer = absl::make_unique(); + auto remote_answer = std::make_unique(); AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, nullptr); @@ -1724,7 +1723,7 @@ TEST_F(JsepTransportControllerTest, BundleSubsetOfMediaSections) { bundle_group.AddContentName(kAudioMid1); bundle_group.AddContentName(kVideoMid1); - auto local_offer = absl::make_unique(); + auto local_offer = std::make_unique(); AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); @@ -1735,7 +1734,7 @@ TEST_F(JsepTransportControllerTest, BundleSubsetOfMediaSections) { cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); - auto remote_answer = absl::make_unique(); + auto remote_answer = std::make_unique(); AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, nullptr); @@ -1776,12 +1775,12 @@ TEST_F(JsepTransportControllerTest, BundleOnDataSectionInSubsequentOffer) { cricket::ContentGroup bundle_group(cricket::GROUP_TYPE_BUNDLE); bundle_group.AddContentName(kDataMid1); - auto local_offer = absl::make_unique(); + auto local_offer = std::make_unique(); AddDataSection(local_offer.get(), kDataMid1, cricket::MediaProtocolType::kSctp, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); - auto remote_answer = absl::make_unique(); + auto remote_answer = std::make_unique(); AddDataSection(remote_answer.get(), kDataMid1, cricket::MediaProtocolType::kSctp, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, @@ -1839,7 +1838,7 @@ TEST_F(JsepTransportControllerTest, VideoDataRejectedInAnswer) { bundle_group.AddContentName(kVideoMid1); bundle_group.AddContentName(kDataMid1); - auto local_offer = absl::make_unique(); + auto local_offer = std::make_unique(); AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); @@ -1851,7 +1850,7 @@ TEST_F(JsepTransportControllerTest, VideoDataRejectedInAnswer) { cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); - auto remote_answer = absl::make_unique(); + auto remote_answer = std::make_unique(); AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, nullptr); @@ -1898,7 +1897,7 @@ TEST_F(JsepTransportControllerTest, ChangeBundledMidNotSupported) { bundle_group.AddContentName(kAudioMid1); bundle_group.AddContentName(kVideoMid1); - auto local_offer = absl::make_unique(); + auto local_offer = std::make_unique(); AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); @@ -1906,7 +1905,7 @@ TEST_F(JsepTransportControllerTest, ChangeBundledMidNotSupported) { cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); - auto remote_answer = absl::make_unique(); + auto remote_answer = std::make_unique(); AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, nullptr); @@ -1948,7 +1947,7 @@ TEST_F(JsepTransportControllerTest, RejectFirstContentInBundleGroup) { bundle_group.AddContentName(kVideoMid1); bundle_group.AddContentName(kDataMid1); - auto local_offer = absl::make_unique(); + auto local_offer = std::make_unique(); AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); @@ -1960,7 +1959,7 @@ TEST_F(JsepTransportControllerTest, RejectFirstContentInBundleGroup) { cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); - auto remote_answer = absl::make_unique(); + auto remote_answer = std::make_unique(); AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, nullptr); @@ -2001,7 +2000,7 @@ TEST_F(JsepTransportControllerTest, ApplyNonRtcpMuxOfferWhenMuxingRequired) { JsepTransportController::Config config; config.rtcp_mux_policy = PeerConnectionInterface::kRtcpMuxPolicyRequire; CreateJsepTransportController(config); - auto local_offer = absl::make_unique(); + auto local_offer = std::make_unique(); AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); @@ -2019,7 +2018,7 @@ TEST_F(JsepTransportControllerTest, ApplyNonRtcpMuxAnswerWhenMuxingRequired) { JsepTransportController::Config config; config.rtcp_mux_policy = PeerConnectionInterface::kRtcpMuxPolicyRequire; CreateJsepTransportController(config); - auto local_offer = absl::make_unique(); + auto local_offer = std::make_unique(); AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); @@ -2027,7 +2026,7 @@ TEST_F(JsepTransportControllerTest, ApplyNonRtcpMuxAnswerWhenMuxingRequired) { ->SetLocalDescription(SdpType::kOffer, local_offer.get()) .ok()); - auto remote_answer = absl::make_unique(); + auto remote_answer = std::make_unique(); AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE, nullptr); @@ -2129,7 +2128,7 @@ TEST_F(JsepTransportControllerTest, RemoveContentFromBundleGroup) { TEST_F(JsepTransportControllerTest, ChangeTaggedMediaSectionMaxBundle) { CreateJsepTransportController(JsepTransportController::Config()); - auto local_offer = absl::make_unique(); + auto local_offer = std::make_unique(); AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1, cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS, nullptr); diff --git a/pc/jsep_transport_unittest.cc b/pc/jsep_transport_unittest.cc index 1e51392f08..123482c347 100644 --- a/pc/jsep_transport_unittest.cc +++ b/pc/jsep_transport_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "media/base/fake_rtp.h" #include "p2p/base/fake_dtls_transport.h" #include "p2p/base/fake_ice_transport.h" @@ -46,7 +45,7 @@ class JsepTransport2Test : public ::testing::Test, public sigslot::has_slots<> { std::unique_ptr CreateSdesTransport( rtc::PacketTransportInternal* rtp_packet_transport, rtc::PacketTransportInternal* rtcp_packet_transport) { - auto srtp_transport = absl::make_unique( + auto srtp_transport = std::make_unique( rtcp_packet_transport == nullptr); srtp_transport->SetRtpPacketTransport(rtp_packet_transport); @@ -59,7 +58,7 @@ class JsepTransport2Test : public ::testing::Test, public sigslot::has_slots<> { std::unique_ptr CreateDtlsSrtpTransport( cricket::DtlsTransportInternal* rtp_dtls_transport, cricket::DtlsTransportInternal* rtcp_dtls_transport) { - auto dtls_srtp_transport = absl::make_unique( + auto dtls_srtp_transport = std::make_unique( rtcp_dtls_transport == nullptr); dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport, rtcp_dtls_transport); @@ -70,17 +69,16 @@ class JsepTransport2Test : public ::testing::Test, public sigslot::has_slots<> { // FakeIceTransport. std::unique_ptr CreateJsepTransport2(bool rtcp_mux_enabled, SrtpMode srtp_mode) { - auto ice = absl::make_unique(kTransportName, - ICE_CANDIDATE_COMPONENT_RTP); - auto rtp_dtls_transport = absl::make_unique(ice.get()); + auto ice = std::make_unique(kTransportName, + ICE_CANDIDATE_COMPONENT_RTP); + auto rtp_dtls_transport = std::make_unique(ice.get()); std::unique_ptr rtcp_ice; std::unique_ptr rtcp_dtls_transport; if (!rtcp_mux_enabled) { - rtcp_ice = absl::make_unique( + rtcp_ice = std::make_unique( kTransportName, ICE_CANDIDATE_COMPONENT_RTCP); - rtcp_dtls_transport = - absl::make_unique(rtcp_ice.get()); + rtcp_dtls_transport = std::make_unique(rtcp_ice.get()); } std::unique_ptr unencrypted_rtp_transport; @@ -105,7 +103,7 @@ class JsepTransport2Test : public ::testing::Test, public sigslot::has_slots<> { // media_transport = nullptr. In the future we will probably add // more logic that require unit tests. Note that creation of media_transport // is covered in jseptransportcontroller_unittest. - auto jsep_transport = absl::make_unique( + auto jsep_transport = std::make_unique( kTransportName, /*local_certificate=*/nullptr, std::move(ice), std::move(rtcp_ice), std::move(unencrypted_rtp_transport), std::move(sdes_transport), std::move(dtls_srtp_transport), diff --git a/pc/media_session.cc b/pc/media_session.cc index e229ed6758..ff9c17b27c 100644 --- a/pc/media_session.cc +++ b/pc/media_session.cc @@ -19,7 +19,6 @@ #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "absl/types/optional.h" #include "api/crypto_params.h" @@ -1431,7 +1430,7 @@ std::unique_ptr MediaSessionDescriptionFactory::CreateOffer( session_options.offer_extmap_allow_mixed, &audio_rtp_extensions, &video_rtp_extensions); - auto offer = absl::make_unique(); + auto offer = std::make_unique(); // Iterate through the media description options, matching with existing media // descriptions in |current_description|. @@ -1576,7 +1575,7 @@ MediaSessionDescriptionFactory::CreateAnswer( FilterDataCodecs(&answer_rtp_data_codecs, session_options.data_channel_type == DCT_SCTP); - auto answer = absl::make_unique(); + auto answer = std::make_unique(); // If the offer supports BUNDLE, and we want to use it too, create a BUNDLE // group in the answer with the appropriate content names. @@ -2536,7 +2535,7 @@ bool MediaSessionDescriptionFactory::AddDataContentForAnswer( std::unique_ptr data_answer; if (offer_content->media_description()->as_sctp()) { // SCTP data content - data_answer = absl::make_unique(); + data_answer = std::make_unique(); const SctpDataContentDescription* offer_data_description = offer_content->media_description()->as_sctp(); // Respond with the offerer's proto, whatever it is. @@ -2564,7 +2563,7 @@ bool MediaSessionDescriptionFactory::AddDataContentForAnswer( data_answer->as_sctp()->set_use_sctpmap(offer_uses_sctpmap); } else { // RTP offer - data_answer = absl::make_unique(); + data_answer = std::make_unique(); const RtpDataContentDescription* offer_data_description = offer_content->media_description()->as_rtp_data(); diff --git a/pc/media_session_unittest.cc b/pc/media_session_unittest.cc index a0d9d0c102..e3778d6964 100644 --- a/pc/media_session_unittest.cc +++ b/pc/media_session_unittest.cc @@ -485,7 +485,7 @@ class MediaSessionDescriptionFactoryTest : public ::testing::Test { std::unique_ptr current_desc; std::unique_ptr desc; if (has_current_desc) { - current_desc = absl::make_unique(); + current_desc = std::make_unique(); current_desc->AddTransportInfo(TransportInfo( "audio", TransportDescription(current_audio_ufrag, current_audio_pwd))); @@ -3283,7 +3283,7 @@ TEST(MediaSessionDescription, CopySessionDescription) { cricket::ContentGroup group(cricket::CN_AUDIO); source.AddGroup(group); std::unique_ptr acd = - absl::make_unique(); + std::make_unique(); acd->set_codecs(MAKE_VECTOR(kAudioCodecs1)); acd->AddLegacyStream(1); std::unique_ptr acd_passed = @@ -3291,7 +3291,7 @@ TEST(MediaSessionDescription, CopySessionDescription) { source.AddContent(cricket::CN_AUDIO, MediaProtocolType::kRtp, std::move(acd_passed)); std::unique_ptr vcd = - absl::make_unique(); + std::make_unique(); vcd->set_codecs(MAKE_VECTOR(kVideoCodecs1)); vcd->AddLegacyStream(2); std::unique_ptr vcd_passed = diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc index 6f0fd60d9b..ed936437a7 100644 --- a/pc/peer_connection.cc +++ b/pc/peer_connection.cc @@ -12,13 +12,13 @@ #include #include +#include #include #include #include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "api/jsep_ice_candidate.h" #include "api/jsep_session_description.h" @@ -6803,7 +6803,7 @@ bool PeerConnection::SetupDataChannelTransport_n(const std::string& mid) { } RTC_LOG(LS_INFO) << "Setting up data channel transport for mid=" << mid; - data_channel_transport_invoker_ = absl::make_unique(); + data_channel_transport_invoker_ = std::make_unique(); data_channel_transport_->SetDataSink(this); sctp_mid_ = mid; // TODO(mellem): Handling data channel state through media transport is diff --git a/pc/peer_connection_bundle_unittest.cc b/pc/peer_connection_bundle_unittest.cc index 7780ac6442..543c9be81a 100644 --- a/pc/peer_connection_bundle_unittest.cc +++ b/pc/peer_connection_bundle_unittest.cc @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include + #include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/create_peerconnection_factory.h" @@ -24,7 +26,6 @@ #ifdef WEBRTC_ANDROID #include "pc/test/android_test_initializer.h" #endif -#include "absl/memory/memory.h" #include "pc/test/fake_audio_capture_module.h" #include "rtc_base/fake_network.h" #include "rtc_base/gunit.h" @@ -185,11 +186,11 @@ class PeerConnectionBundleBaseTest : public ::testing::Test { WrapperPtr CreatePeerConnection(const RTCConfiguration& config) { auto* fake_network = NewFakeNetwork(); auto port_allocator = - absl::make_unique(fake_network); + std::make_unique(fake_network); port_allocator->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | cricket::PORTALLOCATOR_DISABLE_RELAY); port_allocator->set_step_delay(cricket::kMinimumStepDelay); - auto observer = absl::make_unique(); + auto observer = std::make_unique(); RTCConfiguration modified_config = config; modified_config.sdp_semantics = sdp_semantics_; auto pc = pc_factory_->CreatePeerConnection( @@ -198,7 +199,7 @@ class PeerConnectionBundleBaseTest : public ::testing::Test { return nullptr; } - auto wrapper = absl::make_unique( + auto wrapper = std::make_unique( pc_factory_, pc, std::move(observer)); wrapper->set_network(fake_network); return wrapper; diff --git a/pc/peer_connection_crypto_unittest.cc b/pc/peer_connection_crypto_unittest.cc index 077ac36aa6..99eb5cd7ac 100644 --- a/pc/peer_connection_crypto_unittest.cc +++ b/pc/peer_connection_crypto_unittest.cc @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include + #include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/create_peerconnection_factory.h" @@ -20,7 +22,6 @@ #ifdef WEBRTC_ANDROID #include "pc/test/android_test_initializer.h" #endif -#include "absl/memory/memory.h" #include "pc/test/fake_audio_capture_module.h" #include "pc/test/fake_rtc_certificate_generator.h" #include "rtc_base/gunit.h" @@ -65,9 +66,9 @@ class PeerConnectionCryptoBaseTest : public ::testing::Test { WrapperPtr CreatePeerConnection( const RTCConfiguration& config, std::unique_ptr cert_gen) { - auto fake_port_allocator = absl::make_unique( + auto fake_port_allocator = std::make_unique( rtc::Thread::Current(), nullptr); - auto observer = absl::make_unique(); + auto observer = std::make_unique(); RTCConfiguration modified_config = config; modified_config.sdp_semantics = sdp_semantics_; auto pc = pc_factory_->CreatePeerConnection( @@ -78,8 +79,8 @@ class PeerConnectionCryptoBaseTest : public ::testing::Test { } observer->SetPeerConnectionInterface(pc.get()); - return absl::make_unique(pc_factory_, pc, - std::move(observer)); + return std::make_unique(pc_factory_, pc, + std::move(observer)); } // Accepts the same arguments as CreatePeerConnection and adds default audio @@ -591,7 +592,7 @@ TEST_P(PeerConnectionCryptoDtlsCertGenTest, TestCertificateGeneration) { RTCConfiguration config; config.enable_dtls_srtp.emplace(true); auto owned_fake_certificate_generator = - absl::make_unique(); + std::make_unique(); auto* fake_certificate_generator = owned_fake_certificate_generator.get(); fake_certificate_generator->set_should_fail(cert_gen_result_ == CertGenResult::kFail); diff --git a/pc/peer_connection_data_channel_unittest.cc b/pc/peer_connection_data_channel_unittest.cc index 609a718063..81ef22058c 100644 --- a/pc/peer_connection_data_channel_unittest.cc +++ b/pc/peer_connection_data_channel_unittest.cc @@ -47,7 +47,6 @@ #ifdef WEBRTC_ANDROID #include "pc/test/android_test_initializer.h" #endif -#include "absl/memory/memory.h" #include "pc/test/fake_sctp_transport.h" #include "rtc_base/virtual_socket_server.h" @@ -90,13 +89,13 @@ class PeerConnectionFactoryForDataChannelTest rtc::Thread::Current(), rtc::Thread::Current(), rtc::Thread::Current(), - absl::make_unique(), + std::make_unique(), CreateCallFactory(), - absl::make_unique())) {} + std::make_unique())) {} std::unique_ptr CreateSctpTransportInternalFactory() { - auto factory = absl::make_unique(); + auto factory = std::make_unique(); last_fake_sctp_transport_factory_ = factory.get(); return factory; } @@ -165,7 +164,7 @@ class PeerConnectionDataChannelBaseTest : public ::testing::Test { new PeerConnectionFactoryForDataChannelTest()); pc_factory->SetOptions(factory_options); RTC_CHECK(pc_factory->Initialize()); - auto observer = absl::make_unique(); + auto observer = std::make_unique(); RTCConfiguration modified_config = config; modified_config.sdp_semantics = sdp_semantics_; auto pc = pc_factory->CreatePeerConnection(modified_config, nullptr, @@ -175,7 +174,7 @@ class PeerConnectionDataChannelBaseTest : public ::testing::Test { } observer->SetPeerConnectionInterface(pc.get()); - auto wrapper = absl::make_unique( + auto wrapper = std::make_unique( pc_factory, pc, std::move(observer)); RTC_DCHECK(pc_factory->last_fake_sctp_transport_factory_); wrapper->set_sctp_transport_factory( diff --git a/pc/peer_connection_end_to_end_unittest.cc b/pc/peer_connection_end_to_end_unittest.cc index d9feb7d022..435c523c38 100644 --- a/pc/peer_connection_end_to_end_unittest.cc +++ b/pc/peer_connection_end_to_end_unittest.cc @@ -10,7 +10,6 @@ #include -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "api/audio_codecs/L16/audio_decoder_L16.h" #include "api/audio_codecs/L16/audio_encoder_L16.h" @@ -223,7 +222,7 @@ std::unique_ptr CreateForwardingMockDecoder( const auto dec = real_decoder.get(); // For lambda capturing. auto mock_decoder = - absl::make_unique(std::move(real_decoder)); + std::make_unique(std::move(real_decoder)); EXPECT_CALL(*mock_decoder, Channels()) .Times(AtLeast(1)) .WillRepeatedly(Invoke([dec] { return dec->Channels(); })); diff --git a/pc/peer_connection_factory.cc b/pc/peer_connection_factory.cc index 16fb928eae..08007180af 100644 --- a/pc/peer_connection_factory.cc +++ b/pc/peer_connection_factory.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/fec_controller.h" #include "api/media_stream_proxy.h" #include "api/media_stream_track_proxy.h" @@ -135,8 +134,8 @@ bool PeerConnectionFactory::Initialize() { return false; } - channel_manager_ = absl::make_unique( - std::move(media_engine_), absl::make_unique(), + channel_manager_ = std::make_unique( + std::move(media_engine_), std::make_unique(), worker_thread_, network_thread_); channel_manager_->SetVideoRtxEnabled(true); @@ -249,8 +248,8 @@ PeerConnectionFactory::CreatePeerConnection( // Set internal defaults if optional dependencies are not set. if (!dependencies.cert_generator) { dependencies.cert_generator = - absl::make_unique(signaling_thread_, - network_thread_); + std::make_unique(signaling_thread_, + network_thread_); } if (!dependencies.allocator) { rtc::PacketSocketFactory* packet_socket_factory; @@ -262,7 +261,7 @@ PeerConnectionFactory::CreatePeerConnection( network_thread_->Invoke(RTC_FROM_HERE, [this, &configuration, &dependencies, &packet_socket_factory]() { - dependencies.allocator = absl::make_unique( + dependencies.allocator = std::make_unique( default_network_manager_.get(), packet_socket_factory, configuration.turn_customizer); }); @@ -323,7 +322,7 @@ rtc::scoped_refptr PeerConnectionFactory::CreateAudioTrack( std::unique_ptr PeerConnectionFactory::CreateSctpTransportInternalFactory() { #ifdef HAVE_SCTP - return absl::make_unique(network_thread()); + return std::make_unique(network_thread()); #else return nullptr; #endif @@ -341,7 +340,7 @@ std::unique_ptr PeerConnectionFactory::CreateRtcEventLog_w() { encoding_type = RtcEventLog::EncodingType::NewFormat; return event_log_factory_ ? event_log_factory_->CreateRtcEventLog(encoding_type) - : absl::make_unique(); + : std::make_unique(); } std::unique_ptr PeerConnectionFactory::CreateCall_w( diff --git a/pc/peer_connection_histogram_unittest.cc b/pc/peer_connection_histogram_unittest.cc index 2894c48021..0aeb080bcd 100644 --- a/pc/peer_connection_histogram_unittest.cc +++ b/pc/peer_connection_histogram_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/call/call_factory_interface.h" #include "api/jsep.h" @@ -81,7 +80,7 @@ class PeerConnectionFactoryForUsageHistogramTest dependencies.signaling_thread = rtc::Thread::Current(); dependencies.task_queue_factory = CreateDefaultTaskQueueFactory(); dependencies.media_engine = - absl::make_unique(); + std::make_unique(); dependencies.call_factory = CreateCallFactory(); return dependencies; }()) {} @@ -255,13 +254,13 @@ class PeerConnectionUsageHistogramTest : public ::testing::Test { WrapperPtr CreatePeerConnectionWithMdns(const RTCConfiguration& config) { auto resolver_factory = - absl::make_unique>(); + std::make_unique>(); webrtc::PeerConnectionDependencies deps(nullptr /* observer_in */); auto fake_network = NewFakeNetwork(); fake_network->set_mdns_responder( - absl::make_unique(rtc::Thread::Current())); + std::make_unique(rtc::Thread::Current())); fake_network->AddInterface(NextLocalAddress()); std::unique_ptr port_allocator( @@ -287,7 +286,7 @@ class PeerConnectionUsageHistogramTest : public ::testing::Test { fake_network->AddInterface(kPrivateLocalAddress); auto port_allocator = - absl::make_unique(fake_network); + std::make_unique(fake_network); return CreatePeerConnection(RTCConfiguration(), PeerConnectionFactoryInterface::Options(), @@ -300,7 +299,7 @@ class PeerConnectionUsageHistogramTest : public ::testing::Test { fake_network->AddInterface(kPrivateIpv6LocalAddress); auto port_allocator = - absl::make_unique(fake_network); + std::make_unique(fake_network); return CreatePeerConnection(RTCConfiguration(), PeerConnectionFactoryInterface::Options(), @@ -338,10 +337,10 @@ class PeerConnectionUsageHistogramTest : public ::testing::Test { auto fake_network = NewFakeNetwork(); fake_network->AddInterface(NextLocalAddress()); deps.allocator = - absl::make_unique(fake_network); + std::make_unique(fake_network); } - auto observer = absl::make_unique(); + auto observer = std::make_unique(); deps.observer = observer.get(); auto pc = pc_factory->CreatePeerConnection(config, std::move(deps)); @@ -350,9 +349,8 @@ class PeerConnectionUsageHistogramTest : public ::testing::Test { } observer->SetPeerConnectionInterface(pc.get()); - auto wrapper = - absl::make_unique( - pc_factory, pc, std::move(observer)); + auto wrapper = std::make_unique( + pc_factory, pc, std::move(observer)); return wrapper; } @@ -369,7 +367,7 @@ class PeerConnectionUsageHistogramTest : public ::testing::Test { // Therefore, the test fixture will own all the fake networks even though // tests should access the fake network through the PeerConnectionWrapper. rtc::FakeNetworkManager* NewFakeNetwork() { - fake_networks_.emplace_back(absl::make_unique()); + fake_networks_.emplace_back(std::make_unique()); return fake_networks_.back().get(); } @@ -719,7 +717,7 @@ TEST_F(PeerConnectionUsageHistogramTest, ASSERT_TRUE(cur_offer); std::string sdp_with_candidates_str; cur_offer->ToString(&sdp_with_candidates_str); - auto offer = absl::make_unique(SdpType::kOffer); + auto offer = std::make_unique(SdpType::kOffer); ASSERT_TRUE(SdpDeserialize(sdp_with_candidates_str, offer.get(), nullptr /* error */)); ASSERT_TRUE(callee->SetRemoteDescription(std::move(offer))); diff --git a/pc/peer_connection_ice_unittest.cc b/pc/peer_connection_ice_unittest.cc index 0ca4be2832..61034d0138 100644 --- a/pc/peer_connection_ice_unittest.cc +++ b/pc/peer_connection_ice_unittest.cc @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include + #include "p2p/base/fake_port_allocator.h" #include "p2p/base/test_stun_server.h" #include "p2p/client/basic_port_allocator.h" @@ -18,7 +20,6 @@ #ifdef WEBRTC_ANDROID #include "pc/test/android_test_initializer.h" #endif -#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/create_peerconnection_factory.h" @@ -115,13 +116,13 @@ class PeerConnectionIceBaseTest : public ::testing::Test { WrapperPtr CreatePeerConnection(const RTCConfiguration& config) { auto* fake_network = NewFakeNetwork(); auto port_allocator = - absl::make_unique(fake_network); + std::make_unique(fake_network); port_allocator->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP | cricket::PORTALLOCATOR_DISABLE_RELAY); port_allocator->set_step_delay(cricket::kMinimumStepDelay); RTCConfiguration modified_config = config; modified_config.sdp_semantics = sdp_semantics_; - auto observer = absl::make_unique(); + auto observer = std::make_unique(); auto port_allocator_copy = port_allocator.get(); auto pc = pc_factory_->CreatePeerConnection( modified_config, std::move(port_allocator), nullptr, observer.get()); @@ -130,7 +131,7 @@ class PeerConnectionIceBaseTest : public ::testing::Test { } observer->SetPeerConnectionInterface(pc.get()); - auto wrapper = absl::make_unique( + auto wrapper = std::make_unique( pc_factory_, pc, std::move(observer)); wrapper->set_network(fake_network); wrapper->port_allocator_ = port_allocator_copy; diff --git a/pc/peer_connection_integrationtest.cc b/pc/peer_connection_integrationtest.cc index 2151b5ef18..8798278e1b 100644 --- a/pc/peer_connection_integrationtest.cc +++ b/pc/peer_connection_integrationtest.cc @@ -22,7 +22,6 @@ #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/media_stream_interface.h" #include "api/peer_connection_interface.h" #include "api/peer_connection_proxy.h" @@ -625,7 +624,7 @@ class PeerConnectionWrapper : public webrtc::PeerConnectionObserver, pc_factory_dependencies.event_log_factory = std::move(event_log_factory); } else { pc_factory_dependencies.event_log_factory = - absl::make_unique( + std::make_unique( pc_factory_dependencies.task_queue_factory.get()); } if (media_transport_factory) { @@ -905,7 +904,7 @@ class PeerConnectionWrapper : public webrtc::PeerConnectionObserver, ASSERT_TRUE(fake_video_renderers_.find(video_track->id()) == fake_video_renderers_.end()); fake_video_renderers_[video_track->id()] = - absl::make_unique(video_track); + std::make_unique(video_track); } } void OnRemoveTrack( @@ -1235,7 +1234,7 @@ class PeerConnectionIntegrationBaseTest : public ::testing::Test { modified_config.sdp_semantics = sdp_semantics_; if (!dependencies.cert_generator) { dependencies.cert_generator = - absl::make_unique(); + std::make_unique(); } std::unique_ptr client( new PeerConnectionWrapper(debug_name)); @@ -1384,7 +1383,7 @@ class PeerConnectionIntegrationBaseTest : public ::testing::Test { network_thread()->Invoke>( RTC_FROM_HERE, [thread, internal_address, external_address, type, common_name] { - return absl::make_unique( + return std::make_unique( thread, internal_address, external_address, type, /*ignore_bad_certs=*/true, common_name); }); @@ -1397,7 +1396,7 @@ class PeerConnectionIntegrationBaseTest : public ::testing::Test { std::unique_ptr turn_customizer = network_thread()->Invoke>( RTC_FROM_HERE, - [] { return absl::make_unique(); }); + [] { return std::make_unique(); }); turn_customizers_.push_back(std::move(turn_customizer)); // Interactions with the turn customizer should be done on the network // thread. @@ -4072,9 +4071,9 @@ constexpr int kOnlyLocalPorts = cricket::PORTALLOCATOR_DISABLE_STUN | TEST_P(PeerConnectionIntegrationTest, IceStatesReachCompletionWithRemoteHostname) { auto caller_resolver_factory = - absl::make_unique>(); + std::make_unique>(); auto callee_resolver_factory = - absl::make_unique>(); + std::make_unique>(); NiceMock callee_async_resolver; NiceMock caller_async_resolver; @@ -4102,9 +4101,9 @@ TEST_P(PeerConnectionIntegrationTest, // Enable hostname candidates with mDNS names. caller()->SetMdnsResponder( - absl::make_unique(network_thread())); + std::make_unique(network_thread())); callee()->SetMdnsResponder( - absl::make_unique(network_thread())); + std::make_unique(network_thread())); SetPortAllocatorFlags(kOnlyLocalPorts, kOnlyLocalPorts); @@ -5127,7 +5126,7 @@ TEST_P(PeerConnectionIntegrationTest, RtcEventLogOutputWriteCalled) { ASSERT_TRUE(CreatePeerConnectionWrappers()); ConnectFakeSignaling(); - auto output = absl::make_unique>(); + auto output = std::make_unique>(); ON_CALL(*output, IsActive()).WillByDefault(::testing::Return(true)); ON_CALL(*output, Write(::testing::_)).WillByDefault(::testing::Return(true)); EXPECT_CALL(*output, Write(::testing::_)).Times(::testing::AtLeast(1)); diff --git a/pc/peer_connection_interface_unittest.cc b/pc/peer_connection_interface_unittest.cc index f9c40c2f8d..2d0687c10d 100644 --- a/pc/peer_connection_interface_unittest.cc +++ b/pc/peer_connection_interface_unittest.cc @@ -19,7 +19,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/str_replace.h" #include "absl/types/optional.h" #include "api/audio/audio_mixer.h" @@ -656,7 +655,7 @@ class PeerConnectionFactoryForTest : public webrtc::PeerConnectionFactory { dependencies.media_engine = cricket::CreateMediaEngine(std::move(media_deps)); dependencies.call_factory = webrtc::CreateCallFactory(); - dependencies.event_log_factory = absl::make_unique( + dependencies.event_log_factory = std::make_unique( dependencies.task_queue_factory.get()); return new rtc::RefCountedObject( @@ -3463,7 +3462,7 @@ TEST_P(PeerConnectionInterfaceTest, pc_->Close(); EXPECT_FALSE( - pc_->StartRtcEventLog(absl::make_unique(), + pc_->StartRtcEventLog(std::make_unique(), webrtc::RtcEventLog::kImmediateOutput)); pc_->StopRtcEventLog(); } diff --git a/pc/peer_connection_jsep_unittest.cc b/pc/peer_connection_jsep_unittest.cc index 2afb72ba8c..1fe8d074f5 100644 --- a/pc/peer_connection_jsep_unittest.cc +++ b/pc/peer_connection_jsep_unittest.cc @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include + #include "api/task_queue/default_task_queue_factory.h" #include "media/engine/webrtc_media_engine.h" #include "media/engine/webrtc_media_engine_defaults.h" @@ -18,7 +20,6 @@ #ifdef WEBRTC_ANDROID #include "pc/test/android_test_initializer.h" #endif -#include "absl/memory/memory.h" #include "pc/test/fake_audio_capture_module.h" #include "pc/test/fake_sctp_transport.h" #include "rtc_base/gunit.h" @@ -61,7 +62,7 @@ class PeerConnectionFactoryForJsepTest : public PeerConnectionFactory { std::unique_ptr CreateSctpTransportInternalFactory() { - return absl::make_unique(); + return std::make_unique(); } }; @@ -86,7 +87,7 @@ class PeerConnectionJsepTest : public ::testing::Test { rtc::scoped_refptr pc_factory( new rtc::RefCountedObject()); RTC_CHECK(pc_factory->Initialize()); - auto observer = absl::make_unique(); + auto observer = std::make_unique(); auto pc = pc_factory->CreatePeerConnection(config, nullptr, nullptr, observer.get()); if (!pc) { @@ -94,8 +95,8 @@ class PeerConnectionJsepTest : public ::testing::Test { } observer->SetPeerConnectionInterface(pc.get()); - return absl::make_unique(pc_factory, pc, - std::move(observer)); + return std::make_unique(pc_factory, pc, + std::move(observer)); } std::unique_ptr vss_; diff --git a/pc/peer_connection_media_unittest.cc b/pc/peer_connection_media_unittest.cc index a9803347e6..62368a29a1 100644 --- a/pc/peer_connection_media_unittest.cc +++ b/pc/peer_connection_media_unittest.cc @@ -12,6 +12,7 @@ // PeerConnection and the underlying media engine, as well as tests that check // the media-related aspects of SDP. +#include #include #include "absl/algorithm/container.h" @@ -29,7 +30,6 @@ #ifdef WEBRTC_ANDROID #include "pc/test/android_test_initializer.h" #endif -#include "absl/memory/memory.h" #include "pc/test/fake_rtc_certificate_generator.h" #include "rtc_base/gunit.h" #include "rtc_base/virtual_socket_server.h" @@ -76,7 +76,7 @@ class PeerConnectionMediaBaseTest : public ::testing::Test { } WrapperPtr CreatePeerConnection(const RTCConfiguration& config) { - return CreatePeerConnection(config, absl::make_unique()); + return CreatePeerConnection(config, std::make_unique()); } WrapperPtr CreatePeerConnection( @@ -101,17 +101,17 @@ class PeerConnectionMediaBaseTest : public ::testing::Test { factory_dependencies.media_engine = std::move(media_engine); factory_dependencies.call_factory = CreateCallFactory(); factory_dependencies.event_log_factory = - absl::make_unique( + std::make_unique( factory_dependencies.task_queue_factory.get()); factory_dependencies.media_transport_factory = - absl::make_unique(); + std::make_unique(); auto pc_factory = CreateModularPeerConnectionFactory(std::move(factory_dependencies)); - auto fake_port_allocator = absl::make_unique( + auto fake_port_allocator = std::make_unique( rtc::Thread::Current(), nullptr); - auto observer = absl::make_unique(); + auto observer = std::make_unique(); auto modified_config = config; modified_config.sdp_semantics = sdp_semantics_; auto pc = pc_factory->CreatePeerConnection(modified_config, @@ -122,7 +122,7 @@ class PeerConnectionMediaBaseTest : public ::testing::Test { } observer->SetPeerConnectionInterface(pc.get()); - auto wrapper = absl::make_unique( + auto wrapper = std::make_unique( pc_factory, pc, std::move(observer)); wrapper->set_media_engine(media_engine_ptr); return wrapper; @@ -530,7 +530,7 @@ TEST_P(PeerConnectionMediaTest, RawPacketizationNotSetInOffer) { fake_codecs.push_back(cricket::VideoCodec(113, cricket::kVp9CodecName)); fake_codecs.push_back(cricket::VideoCodec(114, cricket::kH264CodecName)); fake_codecs.push_back(cricket::VideoCodec(115, "HEVC")); - auto caller_fake_engine = absl::make_unique(); + auto caller_fake_engine = std::make_unique(); caller_fake_engine->SetVideoCodecs(fake_codecs); auto caller = CreatePeerConnectionWithVideo(std::move(caller_fake_engine)); @@ -552,9 +552,9 @@ TEST_P(PeerConnectionMediaTest, RawPacketizationSetInOfferAndAnswer) { fake_codecs.push_back(cricket::VideoCodec(113, cricket::kVp9CodecName)); fake_codecs.push_back(cricket::VideoCodec(114, cricket::kH264CodecName)); fake_codecs.push_back(cricket::VideoCodec(115, "HEVC")); - auto caller_fake_engine = absl::make_unique(); + auto caller_fake_engine = std::make_unique(); caller_fake_engine->SetVideoCodecs(fake_codecs); - auto callee_fake_engine = absl::make_unique(); + auto callee_fake_engine = std::make_unique(); callee_fake_engine->SetVideoCodecs(fake_codecs); RTCOfferAnswerOptions options; @@ -595,9 +595,9 @@ TEST_P(PeerConnectionMediaTest, fake_codecs.push_back(cricket::VideoCodec(113, cricket::kVp9CodecName)); fake_codecs.push_back(cricket::VideoCodec(114, cricket::kH264CodecName)); fake_codecs.push_back(cricket::VideoCodec(115, "HEVC")); - auto caller_fake_engine = absl::make_unique(); + auto caller_fake_engine = std::make_unique(); caller_fake_engine->SetVideoCodecs(fake_codecs); - auto callee_fake_engine = absl::make_unique(); + auto callee_fake_engine = std::make_unique(); callee_fake_engine->SetVideoCodecs(fake_codecs); RTCOfferAnswerOptions caller_options; @@ -1398,7 +1398,7 @@ bool CompareCodecs(const std::vector& capabilities, TEST_F(PeerConnectionMediaTestUnifiedPlan, SetCodecPreferencesAudioMissingRecvCodec) { - auto fake_engine = absl::make_unique(); + auto fake_engine = std::make_unique(); auto send_codecs = fake_engine->voice().send_codecs(); send_codecs.push_back(cricket::AudioCodec(send_codecs.back().id + 1, "send_only_codec", 0, 0, 1)); @@ -1422,7 +1422,7 @@ TEST_F(PeerConnectionMediaTestUnifiedPlan, TEST_F(PeerConnectionMediaTestUnifiedPlan, SetCodecPreferencesAudioMissingSendCodec) { - auto fake_engine = absl::make_unique(); + auto fake_engine = std::make_unique(); auto recv_codecs = fake_engine->voice().recv_codecs(); recv_codecs.push_back(cricket::AudioCodec(recv_codecs.back().id + 1, "recv_only_codec", 0, 0, 1)); @@ -1463,7 +1463,7 @@ TEST_F(PeerConnectionMediaTestUnifiedPlan, TEST_F(PeerConnectionMediaTestUnifiedPlan, SetCodecPreferencesAudioRejectsOnlyRtxRedFec) { - auto fake_engine = absl::make_unique(); + auto fake_engine = std::make_unique(); auto audio_codecs = fake_engine->voice().send_codecs(); audio_codecs.push_back(cricket::AudioCodec(audio_codecs.back().id + 1, cricket::kRtxCodecName, 0, 0, 1)); @@ -1560,7 +1560,7 @@ TEST_F(PeerConnectionMediaTestUnifiedPlan, TEST_F(PeerConnectionMediaTestUnifiedPlan, SetCodecPreferencesVideoRejectsOnlyRtxRedFec) { - auto fake_engine = absl::make_unique(); + auto fake_engine = std::make_unique(); auto video_codecs = fake_engine->video().codecs(); video_codecs.push_back( cricket::VideoCodec(video_codecs.back().id + 1, cricket::kRtxCodecName)); @@ -1666,7 +1666,7 @@ TEST_F(PeerConnectionMediaTestUnifiedPlan, } TEST_F(PeerConnectionMediaTestUnifiedPlan, SetCodecPreferencesVideoWithRtx) { - auto caller_fake_engine = absl::make_unique(); + auto caller_fake_engine = std::make_unique(); auto caller_video_codecs = caller_fake_engine->video().codecs(); caller_video_codecs.push_back(cricket::VideoCodec( caller_video_codecs.back().id + 1, cricket::kVp8CodecName)); @@ -1718,7 +1718,7 @@ TEST_F(PeerConnectionMediaTestUnifiedPlan, SetCodecPreferencesVideoWithRtx) { TEST_F(PeerConnectionMediaTestUnifiedPlan, SetCodecPreferencesVideoCodecsNegotiation) { - auto caller_fake_engine = absl::make_unique(); + auto caller_fake_engine = std::make_unique(); auto caller_video_codecs = caller_fake_engine->video().codecs(); caller_video_codecs.push_back(cricket::VideoCodec( caller_video_codecs.back().id + 1, cricket::kVp8CodecName)); @@ -1734,7 +1734,7 @@ TEST_F(PeerConnectionMediaTestUnifiedPlan, std::to_string(caller_video_codecs.back().id - 1); caller_fake_engine->SetVideoCodecs(caller_video_codecs); - auto callee_fake_engine = absl::make_unique(); + auto callee_fake_engine = std::make_unique(); callee_fake_engine->SetVideoCodecs(caller_video_codecs); auto caller = CreatePeerConnectionWithVideo(std::move(caller_fake_engine)); @@ -1792,7 +1792,7 @@ TEST_F(PeerConnectionMediaTestUnifiedPlan, TEST_F(PeerConnectionMediaTestUnifiedPlan, SetCodecPreferencesVideoCodecsNegotiationReverseOrder) { - auto caller_fake_engine = absl::make_unique(); + auto caller_fake_engine = std::make_unique(); auto caller_video_codecs = caller_fake_engine->video().codecs(); caller_video_codecs.push_back(cricket::VideoCodec( caller_video_codecs.back().id + 1, cricket::kVp8CodecName)); @@ -1808,7 +1808,7 @@ TEST_F(PeerConnectionMediaTestUnifiedPlan, std::to_string(caller_video_codecs.back().id - 1); caller_fake_engine->SetVideoCodecs(caller_video_codecs); - auto callee_fake_engine = absl::make_unique(); + auto callee_fake_engine = std::make_unique(); callee_fake_engine->SetVideoCodecs(caller_video_codecs); auto caller = CreatePeerConnectionWithVideo(std::move(caller_fake_engine)); diff --git a/pc/peer_connection_rampup_tests.cc b/pc/peer_connection_rampup_tests.cc index dd769e684c..b50489d534 100644 --- a/pc/peer_connection_rampup_tests.cc +++ b/pc/peer_connection_rampup_tests.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/audio/audio_mixer.h" #include "api/audio_codecs/audio_decoder_factory.h" @@ -183,7 +182,7 @@ class PeerConnectionRampUpTest : public ::testing::Test { fake_network_manager->AddInterface(kDefaultLocalAddress); fake_network_managers_.emplace_back(fake_network_manager); - auto observer = absl::make_unique(); + auto observer = std::make_unique(); webrtc::PeerConnectionDependencies dependencies(observer.get()); cricket::BasicPortAllocator* port_allocator = new cricket::BasicPortAllocator(fake_network_manager); @@ -191,7 +190,7 @@ class PeerConnectionRampUpTest : public ::testing::Test { dependencies.allocator = std::unique_ptr(port_allocator); dependencies.tls_cert_verifier = - absl::make_unique(); + std::make_unique(); auto pc = pc_factory_->CreatePeerConnection(config, std::move(dependencies)); @@ -199,7 +198,7 @@ class PeerConnectionRampUpTest : public ::testing::Test { return nullptr; } - return absl::make_unique( + return std::make_unique( pc_factory_, pc, std::move(observer)); } @@ -241,7 +240,7 @@ class PeerConnectionRampUpTest : public ::testing::Test { kTurnInternalAddress, kTurnInternalPort}; static const rtc::SocketAddress turn_server_external_address{ kTurnExternalAddress, kTurnExternalPort}; - return absl::make_unique( + return std::make_unique( thread, turn_server_internal_address, turn_server_external_address, type, true /*ignore_bad_certs=*/, common_name); diff --git a/pc/peer_connection_rtp_unittest.cc b/pc/peer_connection_rtp_unittest.cc index 67aa98d3c8..b70999289f 100644 --- a/pc/peer_connection_rtp_unittest.cc +++ b/pc/peer_connection_rtp_unittest.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/audio/audio_mixer.h" #include "api/audio_codecs/audio_decoder_factory.h" @@ -138,13 +137,13 @@ class PeerConnectionRtpBaseTest : public ::testing::Test { // adjustment. std::unique_ptr CreatePeerConnectionInternal( const RTCConfiguration& config) { - auto observer = absl::make_unique(); + auto observer = std::make_unique(); auto pc = pc_factory_->CreatePeerConnection(config, nullptr, nullptr, observer.get()); EXPECT_TRUE(pc.get()); observer->SetPeerConnectionInterface(pc.get()); - return absl::make_unique(pc_factory_, pc, - std::move(observer)); + return std::make_unique(pc_factory_, pc, + std::move(observer)); } }; diff --git a/pc/peer_connection_signaling_unittest.cc b/pc/peer_connection_signaling_unittest.cc index db65de4b76..9916539431 100644 --- a/pc/peer_connection_signaling_unittest.cc +++ b/pc/peer_connection_signaling_unittest.cc @@ -11,6 +11,7 @@ // This file contains tests that check the PeerConnection's signaling state // machine, as well as tests that check basic, media-agnostic aspects of SDP. +#include #include #include "api/audio_codecs/builtin_audio_decoder_factory.h" @@ -25,7 +26,6 @@ #ifdef WEBRTC_ANDROID #include "pc/test/android_test_initializer.h" #endif -#include "absl/memory/memory.h" #include "pc/test/fake_audio_capture_module.h" #include "pc/test/fake_rtc_certificate_generator.h" #include "rtc_base/gunit.h" @@ -81,7 +81,7 @@ class PeerConnectionSignalingBaseTest : public ::testing::Test { } WrapperPtr CreatePeerConnection(const RTCConfiguration& config) { - auto observer = absl::make_unique(); + auto observer = std::make_unique(); RTCConfiguration modified_config = config; modified_config.sdp_semantics = sdp_semantics_; auto pc = pc_factory_->CreatePeerConnection(modified_config, nullptr, @@ -91,7 +91,7 @@ class PeerConnectionSignalingBaseTest : public ::testing::Test { } observer->SetPeerConnectionInterface(pc.get()); - return absl::make_unique( + return std::make_unique( pc_factory_, pc, std::move(observer)); } diff --git a/pc/peer_connection_simulcast_unittest.cc b/pc/peer_connection_simulcast_unittest.cc index cb36bb133f..b8743c6246 100644 --- a/pc/peer_connection_simulcast_unittest.cc +++ b/pc/peer_connection_simulcast_unittest.cc @@ -8,10 +8,10 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include #include // no-presubmit-check TODO(webrtc:8982) #include "absl/algorithm/container.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 "api/create_peerconnection_factory.h" @@ -116,10 +116,10 @@ class PeerConnectionSimulcastTests : public ::testing::Test { } std::unique_ptr CreatePeerConnectionWrapper() { - auto observer = absl::make_unique(); + auto observer = std::make_unique(); auto pc = CreatePeerConnection(observer.get()); - return absl::make_unique(pc_factory_, pc, - std::move(observer)); + return std::make_unique(pc_factory_, pc, + std::move(observer)); } void ExchangeOfferAnswer(PeerConnectionWrapper* local, diff --git a/pc/remote_audio_source.cc b/pc/remote_audio_source.cc index 2590f85851..d9752f3052 100644 --- a/pc/remote_audio_source.cc +++ b/pc/remote_audio_source.cc @@ -12,10 +12,10 @@ #include +#include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/scoped_refptr.h" #include "rtc_base/checks.h" #include "rtc_base/constructor_magic.h" @@ -72,7 +72,7 @@ void RemoteAudioSource::Start(cricket::VoiceMediaChannel* media_channel, // is destroyed). worker_thread_->Invoke(RTC_FROM_HERE, [&] { media_channel->SetRawAudioSink(ssrc, - absl::make_unique(this)); + std::make_unique(this)); }); } diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc index eba54f6e26..50c49a701b 100644 --- a/pc/rtc_stats_collector.cc +++ b/pc/rtc_stats_collector.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/candidate.h" #include "api/media_stream_interface.h" #include "api/peer_connection_interface.h" @@ -419,7 +418,7 @@ ProduceRemoteInboundRtpStreamStatsFromReportBlockData( // RTCStats' timestamp generally refers to when the metric was sampled, but // for "remote-[outbound/inbound]-rtp" it refers to the local time when the // Report Block was received. - auto remote_inbound = absl::make_unique( + auto remote_inbound = std::make_unique( RTCRemoteInboundRtpStreamStatsIdFromSourceSsrc(media_type, report_block.source_ssrc), /*timestamp=*/report_block_data.report_block_timestamp_utc_us()); @@ -1408,7 +1407,7 @@ void RTCStatsCollector::ProduceMediaSourceStats_s( // create separate media source stats objects on a per-attachment basis. std::unique_ptr media_source_stats; if (track->kind() == MediaStreamTrackInterface::kAudioKind) { - auto audio_source_stats = absl::make_unique( + auto audio_source_stats = std::make_unique( RTCMediaSourceStatsIDFromKindAndAttachment( cricket::MEDIA_TYPE_AUDIO, sender_internal->AttachmentId()), timestamp_us); @@ -1433,7 +1432,7 @@ void RTCStatsCollector::ProduceMediaSourceStats_s( media_source_stats = std::move(audio_source_stats); } else { RTC_DCHECK_EQ(MediaStreamTrackInterface::kVideoKind, track->kind()); - auto video_source_stats = absl::make_unique( + auto video_source_stats = std::make_unique( RTCMediaSourceStatsIDFromKindAndAttachment( cricket::MEDIA_TYPE_VIDEO, sender_internal->AttachmentId()), timestamp_us); @@ -1513,7 +1512,7 @@ void RTCStatsCollector::ProduceAudioRTPStreamStats_n( track_media_info_map.voice_media_info()->receivers) { if (!voice_receiver_info.connected()) continue; - auto inbound_audio = absl::make_unique( + auto inbound_audio = std::make_unique( RTCInboundRTPStreamStatsIDFromSSRC(true, voice_receiver_info.ssrc()), timestamp_us); SetInboundRTPStreamStatsFromVoiceReceiverInfo(mid, voice_receiver_info, @@ -1535,7 +1534,7 @@ void RTCStatsCollector::ProduceAudioRTPStreamStats_n( track_media_info_map.voice_media_info()->senders) { if (!voice_sender_info.connected()) continue; - auto outbound_audio = absl::make_unique( + auto outbound_audio = std::make_unique( RTCOutboundRTPStreamStatsIDFromSSRC(true, voice_sender_info.ssrc()), timestamp_us); SetOutboundRTPStreamStatsFromVoiceSenderInfo(mid, voice_sender_info, @@ -1587,7 +1586,7 @@ void RTCStatsCollector::ProduceVideoRTPStreamStats_n( track_media_info_map.video_media_info()->receivers) { if (!video_receiver_info.connected()) continue; - auto inbound_video = absl::make_unique( + auto inbound_video = std::make_unique( RTCInboundRTPStreamStatsIDFromSSRC(false, video_receiver_info.ssrc()), timestamp_us); SetInboundRTPStreamStatsFromVideoReceiverInfo(mid, video_receiver_info, @@ -1608,7 +1607,7 @@ void RTCStatsCollector::ProduceVideoRTPStreamStats_n( track_media_info_map.video_media_info()->senders) { if (!video_sender_info.connected()) continue; - auto outbound_video = absl::make_unique( + auto outbound_video = std::make_unique( RTCOutboundRTPStreamStatsIDFromSSRC(false, video_sender_info.ssrc()), timestamp_us); SetOutboundRTPStreamStatsFromVideoSenderInfo(mid, video_sender_info, @@ -1780,13 +1779,13 @@ RTCStatsCollector::PrepareTransceiverStatsInfos_s() const { RTC_DCHECK(voice_stats.find(voice_channel->media_channel()) == voice_stats.end()); voice_stats[voice_channel->media_channel()] = - absl::make_unique(); + std::make_unique(); } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { auto* video_channel = static_cast(channel); RTC_DCHECK(video_stats.find(video_channel->media_channel()) == video_stats.end()); video_stats[video_channel->media_channel()] = - absl::make_unique(); + std::make_unique(); } else { RTC_NOTREACHED(); } @@ -1836,7 +1835,7 @@ RTCStatsCollector::PrepareTransceiverStatsInfos_s() const { for (const auto& receiver : transceiver->receivers()) { receivers.push_back(receiver->internal()); } - stats.track_media_info_map = absl::make_unique( + stats.track_media_info_map = std::make_unique( std::move(voice_media_info), std::move(video_media_info), senders, receivers); } diff --git a/pc/rtp_sender_receiver_unittest.cc b/pc/rtp_sender_receiver_unittest.cc index 02d7452f56..9026cfc201 100644 --- a/pc/rtp_sender_receiver_unittest.cc +++ b/pc/rtp_sender_receiver_unittest.cc @@ -109,7 +109,7 @@ class RtpSenderReceiverTest // test RtpSenders/RtpReceivers. media_engine_(new cricket::FakeMediaEngine()), channel_manager_(absl::WrapUnique(media_engine_), - absl::make_unique(), + std::make_unique(), worker_thread_, network_thread_), fake_call_(), @@ -117,7 +117,7 @@ class RtpSenderReceiverTest // Create channels to be used by the RtpSenders and RtpReceivers. channel_manager_.Init(); bool srtp_required = true; - rtp_dtls_transport_ = absl::make_unique( + rtp_dtls_transport_ = std::make_unique( "fake_dtls_transport", cricket::ICE_CANDIDATE_COMPONENT_RTP); rtp_transport_ = CreateDtlsSrtpTransport(); @@ -163,7 +163,7 @@ class RtpSenderReceiverTest } std::unique_ptr CreateDtlsSrtpTransport() { - auto dtls_srtp_transport = absl::make_unique( + auto dtls_srtp_transport = std::make_unique( /*rtcp_mux_required=*/true); dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport_.get(), /*rtcp_dtls_transport=*/nullptr); @@ -196,7 +196,7 @@ class RtpSenderReceiverTest audio_track_ = AudioTrack::Create(kAudioTrackId, source); EXPECT_TRUE(local_stream_->AddTrack(audio_track_)); std::unique_ptr set_streams_observer = - absl::make_unique(); + std::make_unique(); audio_rtp_sender_ = AudioRtpSender::Create(worker_thread_, audio_track_->id(), nullptr, set_streams_observer.get()); @@ -261,7 +261,7 @@ class RtpSenderReceiverTest void CreateVideoRtpSender(bool is_screencast, uint32_t ssrc = kVideoSsrc) { AddVideoTrack(is_screencast); std::unique_ptr set_streams_observer = - absl::make_unique(); + std::make_unique(); video_rtp_sender_ = VideoRtpSender::Create( worker_thread_, video_track_->id(), set_streams_observer.get()); ASSERT_TRUE(video_rtp_sender_->SetTrack(video_track_)); @@ -855,7 +855,7 @@ TEST_F(RtpSenderReceiverTest, AudioSenderInitParametersMovedAfterNegotiation) { EXPECT_TRUE(local_stream_->AddTrack(audio_track_)); std::unique_ptr set_streams_observer = - absl::make_unique(); + std::make_unique(); audio_rtp_sender_ = AudioRtpSender::Create( worker_thread_, audio_track_->id(), nullptr, set_streams_observer.get()); ASSERT_TRUE(audio_rtp_sender_->SetTrack(audio_track_)); @@ -1086,7 +1086,7 @@ TEST_F(RtpSenderReceiverTest, VideoSenderInitParametersMovedAfterNegotiation) { AddVideoTrack(false); std::unique_ptr set_streams_observer = - absl::make_unique(); + std::make_unique(); video_rtp_sender_ = VideoRtpSender::Create(worker_thread_, video_track_->id(), set_streams_observer.get()); ASSERT_TRUE(video_rtp_sender_->SetTrack(video_track_)); @@ -1127,7 +1127,7 @@ TEST_F(RtpSenderReceiverTest, AddVideoTrack(false); std::unique_ptr set_streams_observer = - absl::make_unique(); + std::make_unique(); video_rtp_sender_ = VideoRtpSender::Create(worker_thread_, video_track_->id(), set_streams_observer.get()); ASSERT_TRUE(video_rtp_sender_->SetTrack(video_track_)); @@ -1555,7 +1555,7 @@ TEST_F(RtpSenderReceiverTest, PropagatesVideoTrackContentHintSetBeforeEnabling) { AddVideoTrack(); std::unique_ptr set_streams_observer = - absl::make_unique(); + std::make_unique(); // Setting detailed overrides the default non-screencast mode. This should be // applied even if the track is set on construction. video_track_->set_content_hint(VideoTrackInterface::ContentHint::kDetailed); diff --git a/pc/sctp_transport_unittest.cc b/pc/sctp_transport_unittest.cc index ca57d6a702..8566ef3eb5 100644 --- a/pc/sctp_transport_unittest.cc +++ b/pc/sctp_transport_unittest.cc @@ -118,7 +118,7 @@ class SctpTransportTest : public ::testing::Test { void AddDtlsTransport() { std::unique_ptr cricket_transport = - absl::make_unique( + std::make_unique( "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP); dtls_transport_ = new rtc::RefCountedObject(std::move(cricket_transport)); diff --git a/pc/sdp_utils.cc b/pc/sdp_utils.cc index e6cd07f3d3..5bfdaa4bcb 100644 --- a/pc/sdp_utils.cc +++ b/pc/sdp_utils.cc @@ -10,10 +10,10 @@ #include "pc/sdp_utils.h" +#include #include #include -#include "absl/memory/memory.h" #include "api/jsep_session_description.h" namespace webrtc { @@ -28,7 +28,7 @@ std::unique_ptr CloneSessionDescriptionAsType( const SessionDescriptionInterface* sdesc, SdpType type) { RTC_DCHECK(sdesc); - auto clone = absl::make_unique(type); + auto clone = std::make_unique(type); clone->Initialize(sdesc->description()->Clone(), sdesc->session_id(), sdesc->session_version()); // As of writing, our version of GCC does not allow returning a unique_ptr of diff --git a/pc/session_description_unittest.cc b/pc/session_description_unittest.cc index 7f2b41038d..75e0974ecd 100644 --- a/pc/session_description_unittest.cc +++ b/pc/session_description_unittest.cc @@ -9,7 +9,8 @@ */ #include "pc/session_description.h" -#include "absl/memory/memory.h" +#include + #include "test/gtest.h" namespace cricket { @@ -66,7 +67,7 @@ TEST(SessionDescriptionTest, SetExtmapAllowMixed) { TEST(SessionDescriptionTest, SetExtmapAllowMixedPropagatesToMediaLevel) { SessionDescription session_desc; session_desc.AddContent("video", MediaProtocolType::kRtp, - absl::make_unique()); + std::make_unique()); MediaContentDescription* video_desc = session_desc.GetContentDescriptionByName("video"); @@ -107,7 +108,7 @@ TEST(SessionDescriptionTest, AddContentTransfersExtmapAllowMixedSetting) { SessionDescription session_desc; session_desc.set_extmap_allow_mixed(false); std::unique_ptr audio_desc = - absl::make_unique(); + std::make_unique(); audio_desc->set_extmap_allow_mixed_enum(MediaContentDescription::kMedia); // If session setting is false, media level setting is preserved when new @@ -122,7 +123,7 @@ TEST(SessionDescriptionTest, AddContentTransfersExtmapAllowMixedSetting) { // content is added. session_desc.set_extmap_allow_mixed(true); std::unique_ptr video_desc = - absl::make_unique(); + std::make_unique(); session_desc.AddContent("video", MediaProtocolType::kRtp, std::move(video_desc)); EXPECT_EQ(MediaContentDescription::kSession, @@ -131,7 +132,7 @@ TEST(SessionDescriptionTest, AddContentTransfersExtmapAllowMixedSetting) { // Session level setting overrides media level when new content is added. std::unique_ptr data_desc = - absl::make_unique(); + std::make_unique(); data_desc->set_extmap_allow_mixed_enum(MediaContentDescription::kMedia); session_desc.AddContent("data", MediaProtocolType::kRtp, std::move(data_desc)); diff --git a/pc/srtp_transport_unittest.cc b/pc/srtp_transport_unittest.cc index 403ff7c5af..fa095bf399 100644 --- a/pc/srtp_transport_unittest.cc +++ b/pc/srtp_transport_unittest.cc @@ -12,10 +12,10 @@ #include +#include #include #include -#include "absl/memory/memory.h" #include "call/rtp_demuxer.h" #include "media/base/fake_rtp.h" #include "p2p/base/dtls_transport_internal.h" @@ -50,16 +50,16 @@ class SrtpTransportTest : public ::testing::Test, public sigslot::has_slots<> { bool rtcp_mux_enabled = true; rtp_packet_transport1_ = - absl::make_unique("fake_packet_transport1"); + std::make_unique("fake_packet_transport1"); rtp_packet_transport2_ = - absl::make_unique("fake_packet_transport2"); + std::make_unique("fake_packet_transport2"); bool asymmetric = false; rtp_packet_transport1_->SetDestination(rtp_packet_transport2_.get(), asymmetric); - srtp_transport1_ = absl::make_unique(rtcp_mux_enabled); - srtp_transport2_ = absl::make_unique(rtcp_mux_enabled); + srtp_transport1_ = std::make_unique(rtcp_mux_enabled); + srtp_transport2_ = std::make_unique(rtcp_mux_enabled); srtp_transport1_->SetRtpPacketTransport(rtp_packet_transport1_.get()); srtp_transport2_->SetRtpPacketTransport(rtp_packet_transport2_.get()); diff --git a/pc/stats_collector.cc b/pc/stats_collector.cc index a65a5e75f0..1fb2a5b182 100644 --- a/pc/stats_collector.cc +++ b/pc/stats_collector.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "pc/channel.h" #include "pc/peer_connection.h" #include "rtc_base/checks.h" @@ -1009,11 +1008,11 @@ std::unique_ptr CreateMediaChannelStatsGatherer( cricket::MediaChannel* channel) { RTC_DCHECK(channel); if (channel->media_type() == cricket::MEDIA_TYPE_AUDIO) { - return absl::make_unique( + return std::make_unique( static_cast(channel)); } else { RTC_DCHECK_EQ(channel->media_type(), cricket::MEDIA_TYPE_VIDEO); - return absl::make_unique( + return std::make_unique( static_cast(channel)); } } diff --git a/pc/stats_collector_unittest.cc b/pc/stats_collector_unittest.cc index 858e7b6e02..a06b32248f 100644 --- a/pc/stats_collector_unittest.cc +++ b/pc/stats_collector_unittest.cc @@ -15,7 +15,6 @@ #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/audio_codecs/audio_encoder.h" #include "api/candidate.h" @@ -600,7 +599,7 @@ class StatsCollectorTest : public ::testing::Test { std::unique_ptr CreateStatsCollector( PeerConnectionInternal* pc) { - return absl::make_unique(pc); + return std::make_unique(pc); } void VerifyAudioTrackStats(FakeAudioTrack* audio_track, diff --git a/pc/test/fake_peer_connection_for_stats.h b/pc/test/fake_peer_connection_for_stats.h index 826439196b..c6391583f5 100644 --- a/pc/test/fake_peer_connection_for_stats.h +++ b/pc/test/fake_peer_connection_for_stats.h @@ -18,7 +18,6 @@ #include #include -#include "absl/memory/memory.h" #include "media/base/fake_media_engine.h" #include "pc/stream_collection.h" #include "pc/test/fake_data_channel_provider.h" @@ -138,9 +137,9 @@ class FakePeerConnectionForStats : public FakePeerConnectionBase { const std::string& transport_name) { RTC_DCHECK(!voice_channel_); auto voice_media_channel = - absl::make_unique(); + std::make_unique(); auto* voice_media_channel_ptr = voice_media_channel.get(); - voice_channel_ = absl::make_unique( + voice_channel_ = std::make_unique( worker_thread_, network_thread_, signaling_thread_, std::move(voice_media_channel), mid, kDefaultSrtpRequired, webrtc::CryptoOptions(), &ssrc_generator_); @@ -156,9 +155,9 @@ class FakePeerConnectionForStats : public FakePeerConnectionBase { const std::string& transport_name) { RTC_DCHECK(!video_channel_); auto video_media_channel = - absl::make_unique(); + std::make_unique(); auto video_media_channel_ptr = video_media_channel.get(); - video_channel_ = absl::make_unique( + video_channel_ = std::make_unique( worker_thread_, network_thread_, signaling_thread_, std::move(video_media_channel), mid, kDefaultSrtpRequired, webrtc::CryptoOptions(), &ssrc_generator_); diff --git a/pc/test/fake_periodic_video_source.h b/pc/test/fake_periodic_video_source.h index 7575f97ebf..80dff70914 100644 --- a/pc/test/fake_periodic_video_source.h +++ b/pc/test/fake_periodic_video_source.h @@ -13,7 +13,6 @@ #include -#include "absl/memory/memory.h" #include "api/video/video_source_interface.h" #include "media/base/fake_frame_source.h" #include "media/base/video_broadcaster.h" @@ -44,7 +43,7 @@ class FakePeriodicVideoSource final config.height, config.frame_interval_ms * rtc::kNumMicrosecsPerMillisec, config.timestamp_offset_ms * rtc::kNumMicrosecsPerMillisec), - task_queue_(absl::make_unique( + task_queue_(std::make_unique( "FakePeriodicVideoTrackSource")) { thread_checker_.Detach(); frame_source_.SetRotation(config.rotation); diff --git a/pc/test/frame_generator_capturer_video_track_source.h b/pc/test/frame_generator_capturer_video_track_source.h index 007cfc2d5f..c0648ba4aa 100644 --- a/pc/test/frame_generator_capturer_video_track_source.h +++ b/pc/test/frame_generator_capturer_video_track_source.h @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/task_queue/default_task_queue_factory.h" #include "api/task_queue/task_queue_factory.h" #include "pc/video_track_source.h" @@ -46,7 +45,7 @@ class FrameGeneratorCapturerVideoTrackSource : public VideoTrackSource { : VideoTrackSource(false /* remote */), task_queue_factory_(CreateDefaultTaskQueueFactory()), is_screencast_(is_screencast) { - video_capturer_ = absl::make_unique( + video_capturer_ = std::make_unique( clock, test::FrameGenerator::CreateSquareGenerator( config.width, config.height, absl::nullopt, diff --git a/pc/test/mock_peer_connection_observers.h b/pc/test/mock_peer_connection_observers.h index eeac9b05ab..5a388bd91a 100644 --- a/pc/test/mock_peer_connection_observers.h +++ b/pc/test/mock_peer_connection_observers.h @@ -20,7 +20,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/data_channel_interface.h" #include "api/jsep_ice_candidate.h" #include "pc/stream_collection.h" @@ -116,7 +115,7 @@ class MockPeerConnectionObserver : public PeerConnectionObserver { RTC_DCHECK(pc_); RTC_DCHECK(PeerConnectionInterface::kIceGatheringNew != pc_->ice_gathering_state()); - candidates_.push_back(absl::make_unique( + candidates_.push_back(std::make_unique( candidate->sdp_mid(), candidate->sdp_mline_index(), candidate->candidate())); callback_triggered_ = true; diff --git a/pc/test/peer_connection_test_wrapper.cc b/pc/test/peer_connection_test_wrapper.cc index 7b278c8ee7..4f0d72e667 100644 --- a/pc/test/peer_connection_test_wrapper.cc +++ b/pc/test/peer_connection_test_wrapper.cc @@ -12,11 +12,11 @@ #include +#include #include #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/audio/audio_mixer.h" #include "api/create_peerconnection_factory.h" @@ -142,7 +142,7 @@ void PeerConnectionTestWrapper::OnAddTrack( if (receiver->track()->kind() == MediaStreamTrackInterface::kVideoKind) { auto* video_track = static_cast(receiver->track().get()); - renderer_ = absl::make_unique(video_track); + renderer_ = std::make_unique(video_track); } } diff --git a/pc/webrtc_sdp.cc b/pc/webrtc_sdp.cc index 7fefa409b4..ad8fb7ed7b 100644 --- a/pc/webrtc_sdp.cc +++ b/pc/webrtc_sdp.cc @@ -24,7 +24,6 @@ #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "absl/strings/match.h" #include "api/candidate.h" #include "api/crypto_params.h" @@ -987,7 +986,7 @@ bool SdpDeserialize(const std::string& message, TransportDescription session_td("", ""); RtpHeaderExtensions session_extmaps; rtc::SocketAddress session_connection_addr; - auto desc = absl::make_unique(); + auto desc = std::make_unique(); size_t current_pos = 0; // Session Description @@ -2658,7 +2657,7 @@ static std::unique_ptr ParseContentDescription( TransportDescription* transport, std::vector>* candidates, webrtc::SdpParseError* error) { - auto media_desc = absl::make_unique(); + auto media_desc = std::make_unique(); if (!ParseContent(message, media_type, mline_index, protocol, payload_types, pos, content_name, bundle_only, msid_signaling, media_desc.get(), transport, candidates, error)) { @@ -2771,7 +2770,7 @@ bool ParseMediaDescription( // The draft-26 format is: // m=application UDP/DTLS/SCTP webrtc-datachannel // use_sctpmap should be false. - auto data_desc = absl::make_unique(); + auto data_desc = std::make_unique(); // Default max message size is 64K // according to draft-ietf-mmusic-sctp-sdp-26 data_desc->set_max_message_size(kDefaultSctpMaxMessageSize); @@ -3457,7 +3456,7 @@ bool ParseContent(const std::string& message, RTC_DCHECK(candidate.password().empty()); candidate.set_password(transport->ice_pwd); candidates->push_back( - absl::make_unique(mline_id, mline_index, candidate)); + std::make_unique(mline_id, mline_index, candidate)); } return true; diff --git a/pc/webrtc_sdp_unittest.cc b/pc/webrtc_sdp_unittest.cc index 3a105b85ed..a6182c52a7 100644 --- a/pc/webrtc_sdp_unittest.cc +++ b/pc/webrtc_sdp_unittest.cc @@ -4691,7 +4691,7 @@ TEST_F(WebRtcSdpTest, ParseMediaTransportIgnoreNonsenseAttributeLines) { } TEST_F(WebRtcSdpTest, SerializeMediaTransportSettings) { - auto description = absl::make_unique(); + auto description = std::make_unique(); JsepSessionDescription output(SdpType::kOffer); // JsepSessionDescription takes ownership of the description. diff --git a/pc/webrtc_session_description_factory.cc b/pc/webrtc_session_description_factory.cc index 4cf1c8c5f5..aaef7fdeb6 100644 --- a/pc/webrtc_session_description_factory.cc +++ b/pc/webrtc_session_description_factory.cc @@ -12,12 +12,12 @@ #include +#include #include #include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/jsep.h" #include "api/jsep_session_description.h" @@ -357,7 +357,7 @@ void WebRtcSessionDescriptionFactory::InternalCreateOffer( // is created regardless if it's identical to the previous one or not. // The |session_version_| is a uint64_t, the wrap around should not happen. RTC_DCHECK(session_version_ + 1 > session_version_); - auto offer = absl::make_unique( + auto offer = std::make_unique( SdpType::kOffer, std::move(desc), session_id_, rtc::ToString(session_version_++)); if (pc_->local_description()) { @@ -413,7 +413,7 @@ void WebRtcSessionDescriptionFactory::InternalCreateAnswer( // Get a new version number by increasing the |session_version_answer_|. // The |session_version_| is a uint64_t, the wrap around should not happen. RTC_DCHECK(session_version_ + 1 > session_version_); - auto answer = absl::make_unique( + auto answer = std::make_unique( SdpType::kAnswer, std::move(desc), session_id_, rtc::ToString(session_version_++)); if (pc_->local_description()) { diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn index bd0b57f1dd..694823cdf6 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -60,7 +60,6 @@ rtc_source_set("rtc_base_approved") { "system:arch", "system:unused", "third_party/base64", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] public_deps = [] # no-presubmit-check TODO(webrtc:8603) @@ -463,7 +462,6 @@ if (rtc_enable_libevent) { ":safe_conversions", ":timeutils", "../api/task_queue", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", ] if (rtc_build_libevent) { @@ -483,7 +481,6 @@ if (is_mac || is_ios) { ":checks", ":logging", "../api/task_queue", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", ] } @@ -506,7 +503,6 @@ if (is_win) { ":safe_conversions", ":timeutils", "../api/task_queue", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", ] } @@ -527,7 +523,6 @@ rtc_source_set("rtc_task_queue_stdlib") { ":safe_conversions", ":timeutils", "../api/task_queue", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", ] } @@ -1003,7 +998,6 @@ rtc_source_set("testclient") { ":rtc_base", ":rtc_base_tests_utils", ":timeutils", - "//third_party/abseil-cpp/absl/memory", ] } @@ -1228,7 +1222,6 @@ if (rtc_include_tests) { ":weak_ptr", "../test:test_main", "../test:test_support", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/rtc_base/experiments/BUILD.gn b/rtc_base/experiments/BUILD.gn index 0101fd8a34..bbb5345d5a 100644 --- a/rtc_base/experiments/BUILD.gn +++ b/rtc_base/experiments/BUILD.gn @@ -58,7 +58,7 @@ rtc_static_library("field_trial_parser") { "../../rtc_base:logging", "../../rtc_base:safe_conversions", "../../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", ] @@ -166,7 +166,6 @@ rtc_static_library("rate_control_settings") { "../../api/transport:webrtc_key_value_config", "../../api/video_codecs:video_codecs_api", "../../system_wrappers:field_trial", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/rtc_base/fake_ssl_identity.cc b/rtc_base/fake_ssl_identity.cc index 480922c6bd..309708f62d 100644 --- a/rtc_base/fake_ssl_identity.cc +++ b/rtc_base/fake_ssl_identity.cc @@ -10,10 +10,10 @@ #include "rtc_base/fake_ssl_identity.h" +#include #include #include -#include "absl/memory/memory.h" #include "rtc_base/checks.h" #include "rtc_base/message_digest.h" @@ -29,7 +29,7 @@ FakeSSLCertificate::FakeSSLCertificate(const FakeSSLCertificate&) = default; FakeSSLCertificate::~FakeSSLCertificate() = default; std::unique_ptr FakeSSLCertificate::Clone() const { - return absl::make_unique(*this); + return std::make_unique(*this); } std::string FakeSSLCertificate::ToPEMString() const { @@ -77,13 +77,13 @@ FakeSSLIdentity::FakeSSLIdentity(const std::vector& pem_strings) { std::vector> certs; certs.reserve(pem_strings.size()); for (const std::string& pem_string : pem_strings) { - certs.push_back(absl::make_unique(pem_string)); + certs.push_back(std::make_unique(pem_string)); } - cert_chain_ = absl::make_unique(std::move(certs)); + cert_chain_ = std::make_unique(std::move(certs)); } FakeSSLIdentity::FakeSSLIdentity(const FakeSSLCertificate& cert) - : cert_chain_(absl::make_unique(cert.Clone())) {} + : cert_chain_(std::make_unique(cert.Clone())) {} FakeSSLIdentity::FakeSSLIdentity(const FakeSSLIdentity& o) : cert_chain_(o.cert_chain_->Clone()) {} diff --git a/rtc_base/nat_unittest.cc b/rtc_base/nat_unittest.cc index 374e68cbd3..959a4e29c7 100644 --- a/rtc_base/nat_unittest.cc +++ b/rtc_base/nat_unittest.cc @@ -56,7 +56,7 @@ TestClient* CreateTestClient(SocketFactory* factory, } TestClient* CreateTCPTestClient(AsyncSocket* socket) { - return new TestClient(absl::make_unique(socket, false)); + return new TestClient(std::make_unique(socket, false)); } // Tests that when sending from internal_addr to external_addrs through the diff --git a/rtc_base/openssl_adapter.cc b/rtc_base/openssl_adapter.cc index 2c931184c2..d0c1278144 100644 --- a/rtc_base/openssl_adapter.cc +++ b/rtc_base/openssl_adapter.cc @@ -18,7 +18,8 @@ #include #include -#include "absl/memory/memory.h" +#include + #include "rtc_base/checks.h" #include "rtc_base/location.h" #include "rtc_base/logging.h" @@ -943,7 +944,7 @@ OpenSSLAdapter* OpenSSLAdapterFactory::CreateAdapter(AsyncSocket* socket) { } // The OpenSSLSessionCache will upref the ssl_ctx. ssl_session_cache_ = - absl::make_unique(ssl_mode_, ssl_ctx); + std::make_unique(ssl_mode_, ssl_ctx); SSL_CTX_free(ssl_ctx); } return new OpenSSLAdapter(socket, ssl_session_cache_.get(), diff --git a/rtc_base/openssl_certificate.cc b/rtc_base/openssl_certificate.cc index c22e5fbb9d..9459f76df6 100644 --- a/rtc_base/openssl_certificate.cc +++ b/rtc_base/openssl_certificate.cc @@ -20,7 +20,8 @@ #include #include -#include "absl/memory/memory.h" +#include + #include "rtc_base/checks.h" #include "rtc_base/helpers.h" #include "rtc_base/logging.h" @@ -138,7 +139,7 @@ std::unique_ptr OpenSSLCertificate::Generate( #if !defined(NDEBUG) PrintCert(x509); #endif - auto ret = absl::make_unique(x509); + auto ret = std::make_unique(x509); X509_free(x509); return ret; } @@ -158,7 +159,7 @@ std::unique_ptr OpenSSLCertificate::FromPEMString( if (!x509) { return nullptr; } - auto ret = absl::make_unique(x509); + auto ret = std::make_unique(x509); X509_free(x509); return ret; } @@ -238,7 +239,7 @@ OpenSSLCertificate::~OpenSSLCertificate() { } std::unique_ptr OpenSSLCertificate::Clone() const { - return absl::make_unique(x509_); + return std::make_unique(x509_); } std::string OpenSSLCertificate::ToPEMString() const { diff --git a/rtc_base/openssl_identity.cc b/rtc_base/openssl_identity.cc index 81357a8c79..8d12c07816 100644 --- a/rtc_base/openssl_identity.cc +++ b/rtc_base/openssl_identity.cc @@ -301,7 +301,7 @@ SSLIdentity* OpenSSLIdentity::FromPEMChainStrings( } return new OpenSSLIdentity(std::move(key_pair), - absl::make_unique(std::move(certs))); + std::make_unique(std::move(certs))); } const OpenSSLCertificate& OpenSSLIdentity::certificate() const { diff --git a/rtc_base/openssl_stream_adapter.cc b/rtc_base/openssl_stream_adapter.cc index db236d9b2f..7e7fae3db7 100644 --- a/rtc_base/openssl_stream_adapter.cc +++ b/rtc_base/openssl_stream_adapter.cc @@ -25,7 +25,6 @@ #include #include -#include "absl/memory/memory.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" #include "rtc_base/numerics/safe_conversions.h" @@ -1075,7 +1074,7 @@ int OpenSSLStreamAdapter::SSLVerifyCallback(X509_STORE_CTX* store, void* arg) { // Record the peer's certificate. X509* cert = X509_STORE_CTX_get0_cert(store); stream->peer_cert_chain_.reset( - new SSLCertChain(absl::make_unique(cert))); + new SSLCertChain(std::make_unique(cert))); #endif // If the peer certificate digest isn't known yet, we'll wait to verify diff --git a/rtc_base/proxy_server.cc b/rtc_base/proxy_server.cc index ec76782682..a7e8bf5cb7 100644 --- a/rtc_base/proxy_server.cc +++ b/rtc_base/proxy_server.cc @@ -12,7 +12,7 @@ #include -#include "absl/memory/memory.h" +#include #include "rtc_base/checks.h" #include "rtc_base/logging.h" #include "rtc_base/socket_factory.h" @@ -51,7 +51,7 @@ void ProxyServer::OnAcceptEvent(AsyncSocket* socket) { if (ext_socket) { ext_socket->Bind(ext_ip_); bindings_.emplace_back( - absl::make_unique(wrapped_socket, ext_socket)); + std::make_unique(wrapped_socket, ext_socket)); } else { RTC_LOG(LS_ERROR) << "Unable to create external socket on proxy accept event"; diff --git a/rtc_base/rate_statistics.cc b/rtc_base/rate_statistics.cc index bb506aa7f4..b393dc863a 100644 --- a/rtc_base/rate_statistics.cc +++ b/rtc_base/rate_statistics.cc @@ -11,8 +11,8 @@ #include "rtc_base/rate_statistics.h" #include +#include -#include "absl/memory/memory.h" #include "rtc_base/checks.h" namespace webrtc { @@ -35,7 +35,7 @@ RateStatistics::RateStatistics(const RateStatistics& other) scale_(other.scale_), max_window_size_ms_(other.max_window_size_ms_), current_window_size_ms_(other.current_window_size_ms_) { - buckets_ = absl::make_unique(other.max_window_size_ms_); + buckets_ = std::make_unique(other.max_window_size_ms_); std::copy(other.buckets_.get(), other.buckets_.get() + other.max_window_size_ms_, buckets_.get()); } diff --git a/rtc_base/signal_thread.cc b/rtc_base/signal_thread.cc index 84613db309..e100fbe179 100644 --- a/rtc_base/signal_thread.cc +++ b/rtc_base/signal_thread.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "rtc_base/checks.h" #include "rtc_base/location.h" #include "rtc_base/null_socket_server.h" @@ -128,7 +127,7 @@ void SignalThread::OnMessage(Message* msg) { } SignalThread::Worker::Worker(SignalThread* parent) - : Thread(absl::make_unique(), /*do_init=*/false), + : Thread(std::make_unique(), /*do_init=*/false), parent_(parent) { DoInit(); } diff --git a/rtc_base/signal_thread_unittest.cc b/rtc_base/signal_thread_unittest.cc index 9375b5010d..14761865b8 100644 --- a/rtc_base/signal_thread_unittest.cc +++ b/rtc_base/signal_thread_unittest.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/critical_section.h" #include "rtc_base/gunit.h" @@ -133,7 +132,7 @@ class SignalThreadTest : public ::testing::Test, public sigslot::has_slots<> { class OwnerThread : public Thread, public sigslot::has_slots<> { public: explicit OwnerThread(SignalThreadTest* harness) - : Thread(absl::make_unique()), + : Thread(std::make_unique()), harness_(harness), has_run_(false) {} diff --git a/rtc_base/ssl_adapter_unittest.cc b/rtc_base/ssl_adapter_unittest.cc index d723bf1072..3fa12217f7 100644 --- a/rtc_base/ssl_adapter_unittest.cc +++ b/rtc_base/ssl_adapter_unittest.cc @@ -12,7 +12,6 @@ #include #include -#include "absl/memory/memory.h" #include "rtc_base/gunit.h" #include "rtc_base/ip_address.h" #include "rtc_base/message_digest.h" @@ -323,7 +322,7 @@ class SSLAdapterTestBase : public ::testing::Test, public sigslot::has_slots<> { } void SetMockCertVerifier(bool return_value) { - auto mock_verifier = absl::make_unique(); + auto mock_verifier = std::make_unique(); EXPECT_CALL(*mock_verifier, Verify(_)).WillRepeatedly(Return(return_value)); cert_verifier_ = std::unique_ptr(std::move(mock_verifier)); diff --git a/rtc_base/ssl_certificate.cc b/rtc_base/ssl_certificate.cc index 657561a32d..db9097b9a3 100644 --- a/rtc_base/ssl_certificate.cc +++ b/rtc_base/ssl_certificate.cc @@ -10,11 +10,11 @@ #include "rtc_base/ssl_certificate.h" +#include #include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "rtc_base/checks.h" #include "rtc_base/openssl_certificate.h" #include "rtc_base/ssl_fingerprint.h" @@ -65,9 +65,9 @@ std::unique_ptr SSLCertificate::GetStats() const { std::string der_base64; Base64::EncodeFromArray(der_buffer.data(), der_buffer.size(), &der_base64); - return absl::make_unique(std::move(fingerprint), - std::move(digest_algorithm), - std::move(der_base64), nullptr); + return std::make_unique(std::move(fingerprint), + std::move(digest_algorithm), + std::move(der_base64), nullptr); } ////////////////////////////////////////////////////////////////////// @@ -93,7 +93,7 @@ std::unique_ptr SSLCertChain::Clone() const { certs_, new_certs.begin(), [](const std::unique_ptr& cert) -> std::unique_ptr { return cert->Clone(); }); - return absl::make_unique(std::move(new_certs)); + return std::make_unique(std::move(new_certs)); } std::unique_ptr SSLCertChain::GetStats() const { diff --git a/rtc_base/ssl_fingerprint.cc b/rtc_base/ssl_fingerprint.cc index c607810192..5b261e0f53 100644 --- a/rtc_base/ssl_fingerprint.cc +++ b/rtc_base/ssl_fingerprint.cc @@ -12,10 +12,10 @@ #include #include +#include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "rtc_base/logging.h" #include "rtc_base/message_digest.h" #include "rtc_base/rtc_certificate.h" @@ -46,7 +46,7 @@ std::unique_ptr SSLFingerprint::Create( if (!ret) { return nullptr; } - return absl::make_unique( + return std::make_unique( algorithm, ArrayView(digest_val, digest_len)); } @@ -71,7 +71,7 @@ std::unique_ptr SSLFingerprint::CreateUniqueFromRfc4572( if (!value_len) return nullptr; - return absl::make_unique( + return std::make_unique( algorithm, ArrayView(reinterpret_cast(value), value_len)); } diff --git a/rtc_base/synchronization/BUILD.gn b/rtc_base/synchronization/BUILD.gn index d510790cd4..061d8a2b62 100644 --- a/rtc_base/synchronization/BUILD.gn +++ b/rtc_base/synchronization/BUILD.gn @@ -89,7 +89,6 @@ if (rtc_include_tests) { "../../api:function_view", "../../test:test_main", "../../test:test_support", - "//third_party/abseil-cpp/absl/memory", ] } } diff --git a/rtc_base/synchronization/sequence_checker_unittest.cc b/rtc_base/synchronization/sequence_checker_unittest.cc index ccdf6bc2d0..00b847ca1b 100644 --- a/rtc_base/synchronization/sequence_checker_unittest.cc +++ b/rtc_base/synchronization/sequence_checker_unittest.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/function_view.h" #include "rtc_base/event.h" #include "rtc_base/platform_thread.h" @@ -67,7 +66,7 @@ TEST(SequenceCheckerTest, CallsAllowedOnSameThread) { } TEST(SequenceCheckerTest, DestructorAllowedOnDifferentThread) { - auto sequence_checker = absl::make_unique(); + auto sequence_checker = std::make_unique(); RunOnDifferentThread([&] { // Verify that the destructor doesn't assert when called on a different // thread. diff --git a/rtc_base/task_queue.h b/rtc_base/task_queue.h index 2f7c44dbc1..86d35976cb 100644 --- a/rtc_base/task_queue.h +++ b/rtc_base/task_queue.h @@ -62,7 +62,7 @@ namespace rtc { // int count_ = 0; // }; // ... -// queue_.PostDelayedTask(absl::make_unique(), 1000); +// queue_.PostDelayedTask(std::make_unique(), 1000); // // For more examples, see task_queue_unittests.cc. // diff --git a/rtc_base/task_queue_gcd.cc b/rtc_base/task_queue_gcd.cc index 35c7221e83..cb516cc4cc 100644 --- a/rtc_base/task_queue_gcd.cc +++ b/rtc_base/task_queue_gcd.cc @@ -17,7 +17,8 @@ #include #include -#include "absl/memory/memory.h" +#include + #include "absl/strings/string_view.h" #include "api/task_queue/queued_task.h" #include "api/task_queue/task_queue_base.h" @@ -146,7 +147,7 @@ class TaskQueueGcdFactory final : public TaskQueueFactory { } // namespace std::unique_ptr CreateTaskQueueGcdFactory() { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/rtc_base/task_queue_libevent.cc b/rtc_base/task_queue_libevent.cc index df10efd866..7638869bbc 100644 --- a/rtc_base/task_queue_libevent.cc +++ b/rtc_base/task_queue_libevent.cc @@ -23,7 +23,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/string_view.h" #include "api/task_queue/queued_task.h" #include "api/task_queue/task_queue_base.h" @@ -240,7 +239,7 @@ void TaskQueueLibevent::PostDelayedTask(std::unique_ptr task, rtc::dchecked_cast(milliseconds % 1000) * 1000}; event_add(&timer->ev, &tv); } else { - PostTask(absl::make_unique(std::move(task), milliseconds)); + PostTask(std::make_unique(std::move(task), milliseconds)); } } @@ -315,7 +314,7 @@ class TaskQueueLibeventFactory final : public TaskQueueFactory { } // namespace std::unique_ptr CreateTaskQueueLibeventFactory() { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/rtc_base/task_queue_stdlib.cc b/rtc_base/task_queue_stdlib.cc index 415c14de9e..7052f7c6db 100644 --- a/rtc_base/task_queue_stdlib.cc +++ b/rtc_base/task_queue_stdlib.cc @@ -14,10 +14,10 @@ #include #include +#include #include #include -#include "absl/memory/memory.h" #include "absl/strings/string_view.h" #include "api/task_queue/queued_task.h" #include "api/task_queue/task_queue_base.h" @@ -295,7 +295,7 @@ class TaskQueueStdlibFactory final : public TaskQueueFactory { } // namespace std::unique_ptr CreateTaskQueueStdlibFactory() { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/rtc_base/task_queue_win.cc b/rtc_base/task_queue_win.cc index 696eda3bae..dd825d2fdc 100644 --- a/rtc_base/task_queue_win.cc +++ b/rtc_base/task_queue_win.cc @@ -24,10 +24,10 @@ #include #include +#include #include #include -#include "absl/memory/memory.h" #include "absl/strings/string_view.h" #include "api/task_queue/queued_task.h" #include "api/task_queue/task_queue_base.h" @@ -406,7 +406,7 @@ class TaskQueueWinFactory : public TaskQueueFactory { } // namespace std::unique_ptr CreateTaskQueueWinFactory() { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/rtc_base/task_utils/BUILD.gn b/rtc_base/task_utils/BUILD.gn index 7a466a1e8c..7eca496339 100644 --- a/rtc_base/task_utils/BUILD.gn +++ b/rtc_base/task_utils/BUILD.gn @@ -32,7 +32,6 @@ rtc_source_set("to_queued_task") { ] deps = [ "../../api/task_queue", - "//third_party/abseil-cpp/absl/memory", ] } @@ -48,7 +47,6 @@ if (rtc_include_tests) { "..:rtc_task_queue", "..:task_queue_for_test", "../../test:test_support", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/rtc_base/task_utils/repeating_task.cc b/rtc_base/task_utils/repeating_task.cc index 1705918e08..aeeb7c071a 100644 --- a/rtc_base/task_utils/repeating_task.cc +++ b/rtc_base/task_utils/repeating_task.cc @@ -10,6 +10,7 @@ #include "rtc_base/task_utils/repeating_task.h" +#include "absl/memory/memory.h" #include "rtc_base/logging.h" #include "rtc_base/task_utils/to_queued_task.h" #include "rtc_base/time_utils.h" diff --git a/rtc_base/task_utils/repeating_task.h b/rtc_base/task_utils/repeating_task.h index 8549049478..1545d6f757 100644 --- a/rtc_base/task_utils/repeating_task.h +++ b/rtc_base/task_utils/repeating_task.h @@ -11,10 +11,10 @@ #ifndef RTC_BASE_TASK_UTILS_REPEATING_TASK_H_ #define RTC_BASE_TASK_UTILS_REPEATING_TASK_H_ +#include #include #include -#include "absl/memory/memory.h" #include "api/task_queue/queued_task.h" #include "api/task_queue/task_queue_base.h" #include "api/units/time_delta.h" @@ -93,7 +93,7 @@ class RepeatingTaskHandle { template static RepeatingTaskHandle Start(TaskQueueBase* task_queue, Closure&& closure) { - auto repeating_task = absl::make_unique< + auto repeating_task = std::make_unique< webrtc_repeating_task_impl::RepeatingTaskImpl>( task_queue, TimeDelta::Zero(), std::forward(closure)); auto* repeating_task_ptr = repeating_task.get(); @@ -107,7 +107,7 @@ class RepeatingTaskHandle { static RepeatingTaskHandle DelayedStart(TaskQueueBase* task_queue, TimeDelta first_delay, Closure&& closure) { - auto repeating_task = absl::make_unique< + auto repeating_task = std::make_unique< webrtc_repeating_task_impl::RepeatingTaskImpl>( task_queue, first_delay, std::forward(closure)); auto* repeating_task_ptr = repeating_task.get(); diff --git a/rtc_base/task_utils/repeating_task_unittest.cc b/rtc_base/task_utils/repeating_task_unittest.cc index 471914ceef..2532098dd6 100644 --- a/rtc_base/task_utils/repeating_task_unittest.cc +++ b/rtc_base/task_utils/repeating_task_unittest.cc @@ -15,7 +15,6 @@ #include #include // Not allowed in production per Chromium style guide. -#include "absl/memory/memory.h" #include "rtc_base/event.h" #include "rtc_base/task_queue_for_test.h" #include "test/gmock.h" @@ -219,7 +218,7 @@ TEST(RepeatingTaskTest, Example) { } }; TaskQueueForTest task_queue("queue"); - auto object = absl::make_unique(); + auto object = std::make_unique(); // Create and start the periodic task. RepeatingTaskHandle handle; object->StartPeriodicTask(&handle, task_queue.Get()); diff --git a/rtc_base/task_utils/to_queued_task.h b/rtc_base/task_utils/to_queued_task.h index 5088af91ee..ab5e2c9235 100644 --- a/rtc_base/task_utils/to_queued_task.h +++ b/rtc_base/task_utils/to_queued_task.h @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/task_queue/queued_task.h" namespace webrtc { @@ -57,13 +56,13 @@ class ClosureTaskWithCleanup : public ClosureTask { // based parameters. template std::unique_ptr ToQueuedTask(Closure&& closure) { - return absl::make_unique>( + return std::make_unique>( std::forward(closure)); } template std::unique_ptr ToQueuedTask(Closure&& closure, Cleanup&& cleanup) { - return absl::make_unique< + return std::make_unique< webrtc_new_closure_impl::ClosureTaskWithCleanup>( std::forward(closure), std::forward(cleanup)); } diff --git a/rtc_base/test_client.cc b/rtc_base/test_client.cc index e287201b48..e5aa9d7987 100644 --- a/rtc_base/test_client.cc +++ b/rtc_base/test_client.cc @@ -12,9 +12,9 @@ #include +#include #include -#include "absl/memory/memory.h" #include "rtc_base/gunit.h" #include "rtc_base/thread.h" #include "rtc_base/time_utils.h" @@ -151,7 +151,7 @@ void TestClient::OnPacket(AsyncPacketSocket* socket, const int64_t& packet_time_us) { CritScope cs(&crit_); packets_.push_back( - absl::make_unique(remote_addr, buf, size, packet_time_us)); + std::make_unique(remote_addr, buf, size, packet_time_us)); } void TestClient::OnReadyToSend(AsyncPacketSocket* socket) { diff --git a/rtc_base/test_client_unittest.cc b/rtc_base/test_client_unittest.cc index 382aaafe1b..af8a4a7cdd 100644 --- a/rtc_base/test_client_unittest.cc +++ b/rtc_base/test_client_unittest.cc @@ -44,7 +44,7 @@ void TestUdpInternal(const SocketAddress& loopback) { main->socketserver()->CreateAsyncSocket(loopback.family(), SOCK_DGRAM); socket->Bind(loopback); - TestClient client(absl::make_unique(socket)); + TestClient client(std::make_unique(socket)); SocketAddress addr = client.address(), from; EXPECT_EQ(3, client.SendTo("foo", 3, addr)); EXPECT_TRUE(client.CheckNextPacket("foo", 3, &from)); diff --git a/rtc_base/thread_unittest.cc b/rtc_base/thread_unittest.cc index 56af8a507b..0e5026d112 100644 --- a/rtc_base/thread_unittest.cc +++ b/rtc_base/thread_unittest.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "rtc_base/async_invoker.h" #include "rtc_base/async_udp_socket.h" #include "rtc_base/event.h" @@ -518,7 +517,7 @@ TEST_F(AsyncInvokeTest, KillInvokerDuringExecuteWithReentrantInvoke) { bool reentrant_functor_run = false; Thread* main = Thread::Current(); - Thread thread(absl::make_unique()); + Thread thread(std::make_unique()); thread.Start(); { AsyncInvoker invoker; diff --git a/rtc_base/virtual_socket_unittest.cc b/rtc_base/virtual_socket_unittest.cc index 94def0d1ae..8115c23828 100644 --- a/rtc_base/virtual_socket_unittest.cc +++ b/rtc_base/virtual_socket_unittest.cc @@ -57,7 +57,7 @@ using webrtc::testing::StreamSink; struct Sender : public MessageHandler { Sender(Thread* th, AsyncSocket* s, uint32_t rt) : thread(th), - socket(absl::make_unique(s)), + socket(std::make_unique(s)), done(false), rate(rt), count(0) { @@ -103,7 +103,7 @@ struct Sender : public MessageHandler { struct Receiver : public MessageHandler, public sigslot::has_slots<> { Receiver(Thread* th, AsyncSocket* s, uint32_t bw) : thread(th), - socket(absl::make_unique(s)), + socket(std::make_unique(s)), bandwidth(bw), done(false), count(0), @@ -201,8 +201,8 @@ class VirtualSocketServerTest : public ::testing::Test { socket->Bind(EmptySocketAddressWithFamily(default_route.family())); SocketAddress client1_any_addr = socket->GetLocalAddress(); EXPECT_TRUE(client1_any_addr.IsAnyIP()); - auto client1 = absl::make_unique( - absl::make_unique(socket), &fake_clock_); + auto client1 = std::make_unique( + std::make_unique(socket), &fake_clock_); // Create client2 bound to the default route. AsyncSocket* socket2 = @@ -210,8 +210,8 @@ class VirtualSocketServerTest : public ::testing::Test { socket2->Bind(SocketAddress(default_route, 0)); SocketAddress client2_addr = socket2->GetLocalAddress(); EXPECT_FALSE(client2_addr.IsAnyIP()); - auto client2 = absl::make_unique( - absl::make_unique(socket2), &fake_clock_); + auto client2 = std::make_unique( + std::make_unique(socket2), &fake_clock_); // Client1 sends to client2, client2 should see the default route as // client1's address. @@ -234,12 +234,12 @@ class VirtualSocketServerTest : public ::testing::Test { // Make sure VSS didn't switch families on us. EXPECT_EQ(server_addr.family(), initial_addr.family()); - auto client1 = absl::make_unique( - absl::make_unique(socket), &fake_clock_); + auto client1 = std::make_unique( + std::make_unique(socket), &fake_clock_); AsyncSocket* socket2 = ss_.CreateAsyncSocket(initial_addr.family(), SOCK_DGRAM); - auto client2 = absl::make_unique( - absl::make_unique(socket2), &fake_clock_); + auto client2 = std::make_unique( + std::make_unique(socket2), &fake_clock_); SocketAddress client2_addr; EXPECT_EQ(3, client2->SendTo("foo", 3, server_addr)); @@ -252,7 +252,7 @@ class VirtualSocketServerTest : public ::testing::Test { SocketAddress empty = EmptySocketAddressWithFamily(initial_addr.family()); for (int i = 0; i < 10; i++) { - client2 = absl::make_unique( + client2 = std::make_unique( absl::WrapUnique(AsyncUDPSocket::Create(&ss_, empty)), &fake_clock_); SocketAddress next_client2_addr; @@ -838,13 +838,13 @@ class VirtualSocketServerTest : public ::testing::Test { AsyncSocket* socket = ss_.CreateAsyncSocket(AF_INET, SOCK_DGRAM); socket->Bind(server_addr); SocketAddress bound_server_addr = socket->GetLocalAddress(); - auto client1 = absl::make_unique( - absl::make_unique(socket), &fake_clock_); + auto client1 = std::make_unique( + std::make_unique(socket), &fake_clock_); AsyncSocket* socket2 = ss_.CreateAsyncSocket(AF_INET, SOCK_DGRAM); socket2->Bind(client_addr); - auto client2 = absl::make_unique( - absl::make_unique(socket2), &fake_clock_); + auto client2 = std::make_unique( + std::make_unique(socket2), &fake_clock_); SocketAddress client2_addr; if (shouldSucceed) { @@ -1049,8 +1049,8 @@ TEST_F(VirtualSocketServerTest, SetSendingBlockedWithUdpSocket) { ss_.CreateAsyncSocket(kIPv4AnyAddress.family(), SOCK_DGRAM)); socket1->Bind(kIPv4AnyAddress); socket2->Bind(kIPv4AnyAddress); - auto client1 = absl::make_unique( - absl::make_unique(socket1), &fake_clock_); + auto client1 = std::make_unique( + std::make_unique(socket1), &fake_clock_); ss_.SetSendingBlocked(true); EXPECT_EQ(-1, client1->SendTo("foo", 3, socket2->GetLocalAddress())); diff --git a/rtc_base/weak_ptr_unittest.cc b/rtc_base/weak_ptr_unittest.cc index 3906fe741e..9e22312c28 100644 --- a/rtc_base/weak_ptr_unittest.cc +++ b/rtc_base/weak_ptr_unittest.cc @@ -13,7 +13,6 @@ #include #include -#include "absl/memory/memory.h" #include "rtc_base/event.h" #include "rtc_base/task_queue_for_test.h" #include "test/gtest.h" @@ -205,7 +204,7 @@ template std::unique_ptr NewObjectCreatedOnTaskQueue() { std::unique_ptr obj; webrtc::TaskQueueForTest queue("NewObjectCreatedOnTaskQueue"); - queue.SendTask([&] { obj = absl::make_unique(); }); + queue.SendTask([&] { obj = std::make_unique(); }); return obj; } @@ -223,7 +222,7 @@ TEST(WeakPtrTest, WeakPtrInitiateAndUseOnDifferentThreads) { // Test that it is OK to create a WeakPtr on one thread, but use it on // another. This tests that we do not trip runtime checks that ensure that a // WeakPtr is not used by multiple threads. - auto target = absl::make_unique(); + auto target = std::make_unique(); // Create weak ptr on main thread WeakPtr weak_ptr = target->factory.GetWeakPtr(); webrtc::TaskQueueForTest queue("queue"); diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index c262f67e48..c99ed9b780 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -182,7 +182,6 @@ if (!build_with_chromium) { "//third_party/abseil-cpp/absl/flags:flag", "//third_party/abseil-cpp/absl/flags:parse", "//third_party/abseil-cpp/absl/flags:usage", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", ] } @@ -306,7 +305,6 @@ if (!build_with_chromium) { "../rtc_base:rtc_base_approved", "../rtc_base:rtc_numerics", "../rtc_base:stringutils", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", ] } @@ -391,7 +389,6 @@ if (rtc_include_tests) { "../test:test_main", "../test:test_support", "//testing/gtest", - "//third_party/abseil-cpp/absl/memory", "//third_party/libyuv", ] diff --git a/rtc_tools/network_tester/BUILD.gn b/rtc_tools/network_tester/BUILD.gn index 3fb8c609e1..0d2c0434ab 100644 --- a/rtc_tools/network_tester/BUILD.gn +++ b/rtc_tools/network_tester/BUILD.gn @@ -53,7 +53,6 @@ if (rtc_enable_protobuf) { "../../rtc_base:rtc_task_queue", "../../rtc_base/synchronization:sequence_checker", "../../rtc_base/third_party/sigslot", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/rtc_tools/network_tester/packet_sender.cc b/rtc_tools/network_tester/packet_sender.cc index 71e4e5903c..b2c6cd921c 100644 --- a/rtc_tools/network_tester/packet_sender.cc +++ b/rtc_tools/network_tester/packet_sender.cc @@ -15,7 +15,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/task_queue/default_task_queue_factory.h" #include "api/task_queue/queued_task.h" @@ -99,9 +98,9 @@ void PacketSender::StartSending() { RTC_DCHECK_RUN_ON(&worker_queue_checker_); sending_ = true; }); - worker_queue_.PostTask(absl::make_unique( - this, absl::make_unique(config_file_path_))); - worker_queue_.PostTask(absl::make_unique(this)); + worker_queue_.PostTask(std::make_unique( + this, std::make_unique(config_file_path_))); + worker_queue_.PostTask(std::make_unique(this)); } void PacketSender::StopSending() { diff --git a/rtc_tools/rtc_event_log_visualizer/analyzer.cc b/rtc_tools/rtc_event_log_visualizer/analyzer.cc index 60574ee366..126d9caaf1 100644 --- a/rtc_tools/rtc_event_log_visualizer/analyzer.cc +++ b/rtc_tools/rtc_event_log_visualizer/analyzer.cc @@ -14,10 +14,10 @@ #include #include #include +#include #include #include -#include "absl/memory/memory.h" #include "absl/strings/string_view.h" #include "api/function_view.h" #include "api/transport/field_trial_based_config.h" @@ -1168,7 +1168,7 @@ void EventLogAnalyzer::CreateGoogCcSimulationGraph(Plot* plot) { PointStyle::kHighlight); LogBasedNetworkControllerSimulation simulation( - absl::make_unique(), + std::make_unique(), [&](const NetworkControlUpdate& update, Timestamp at_time) { if (update.target_rate) { target_rates.points.emplace_back( @@ -1275,7 +1275,7 @@ void EventLogAnalyzer::CreateSendSideBweSimulationGraph(Plot* plot) { // GoogCcNetworkController since that would lead to duplicate outputs. AcknowledgedBitrateEstimator acknowledged_bitrate_estimator( &field_trial_config_, - absl::make_unique(&field_trial_config_)); + std::make_unique(&field_trial_config_)); #endif // !(BWE_TEST_LOGGING_COMPILE_TIME_ENABLE) int64_t time_us = std::min({NextRtpTime(), NextRtcpTime(), NextProcessTime()}); @@ -1880,10 +1880,10 @@ class ReplacementAudioDecoderFactory : public AudioDecoderFactory { std::unique_ptr MakeAudioDecoder( const SdpAudioFormat& format, absl::optional codec_pair_id) override { - auto replacement_file = absl::make_unique( + auto replacement_file = std::make_unique( replacement_file_name_, file_sample_rate_hz_); replacement_file->set_output_rate_hz(48000); - return absl::make_unique( + return std::make_unique( std::move(replacement_file), 48000, false); } diff --git a/rtc_tools/rtp_generator/rtp_generator.cc b/rtc_tools/rtp_generator/rtp_generator.cc index cd61d85617..f7b691de69 100644 --- a/rtc_tools/rtp_generator/rtp_generator.cc +++ b/rtc_tools/rtp_generator/rtp_generator.cc @@ -11,9 +11,9 @@ #include "rtc_tools/rtp_generator/rtp_generator.h" #include +#include #include -#include "absl/memory/memory.h" #include "api/task_queue/default_task_queue_factory.h" #include "api/video_codecs/builtin_video_decoder_factory.h" #include "api/video_codecs/builtin_video_encoder_factory.h" @@ -161,7 +161,7 @@ RtpGenerator::RtpGenerator(const RtpGeneratorOptions& options) video_decoder_factory_(CreateBuiltinVideoDecoderFactory()), video_bitrate_allocator_factory_( CreateBuiltinVideoBitrateAllocatorFactory()), - event_log_(absl::make_unique()), + event_log_(std::make_unique()), call_(Call::Create(CallConfig(event_log_.get()))), task_queue_(CreateDefaultTaskQueueFactory()) { constexpr int kMinBitrateBps = 30000; // 30 Kbps @@ -222,7 +222,7 @@ RtpGenerator::RtpGenerator(const RtpGeneratorOptions& options) // Setup the fake video stream for this. std::unique_ptr frame_generator = - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), test::FrameGenerator::CreateSquareGenerator( send_config.video_width, send_config.video_height, diff --git a/rtc_tools/sanitizers_unittest.cc b/rtc_tools/sanitizers_unittest.cc index 066ac845d4..b997bf0c23 100644 --- a/rtc_tools/sanitizers_unittest.cc +++ b/rtc_tools/sanitizers_unittest.cc @@ -11,9 +11,9 @@ #include #include +#include #include -#include "absl/memory/memory.h" #include "rtc_base/checks.h" #include "rtc_base/null_socket_server.h" #include "rtc_base/thread.h" @@ -84,7 +84,7 @@ TEST(SanitizersDeathTest, UndefinedSanitizer) { class IncrementThread : public Thread { public: explicit IncrementThread(int* value) - : Thread(absl::make_unique()), value_(value) {} + : Thread(std::make_unique()), value_(value) {} void Run() override { ++*value_; diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 6fa4971556..c3e7885df7 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -947,7 +947,6 @@ if (is_ios || is_mac) { "../rtc_base:checks", "../system_wrappers:field_trial", "../system_wrappers:metrics", - "//third_party/abseil-cpp/absl/memory", ] if (is_ios) { @@ -1616,7 +1615,6 @@ if (is_ios || is_mac) { "../modules/video_coding:video_codec_interface", "../rtc_base", "../rtc_base:checks", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/sdk/android/BUILD.gn b/sdk/android/BUILD.gn index d94bfe5176..6a00b61114 100644 --- a/sdk/android/BUILD.gn +++ b/sdk/android/BUILD.gn @@ -556,7 +556,6 @@ if (current_os == "linux" || is_android) { "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", "../../system_wrappers:metrics", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -795,7 +794,6 @@ if (current_os == "linux" || is_android) { ":base_jni", ":generated_java_audio_jni", ":java_audio_device_module", - "//third_party/abseil-cpp/absl/memory", ] } @@ -896,7 +894,6 @@ if (current_os == "linux" || is_android) { ":native_api_jni", "//rtc_base", "//rtc_base:checks", - "//third_party/abseil-cpp/absl/memory", ] } @@ -920,7 +917,6 @@ if (current_os == "linux" || is_android) { "../../rtc_base:rtc_base_approved", "../../system_wrappers", "../../system_wrappers:metrics", - "//third_party/abseil-cpp/absl/memory", ] if (rtc_enable_android_aaudio) { deps += [ ":aaudio_audio_device_module" ] @@ -944,7 +940,6 @@ if (current_os == "linux" || is_android) { "//api/video_codecs:video_codecs_api", "//rtc_base:checks", "//rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", ] } @@ -999,7 +994,6 @@ if (current_os == "linux" || is_android) { "//api/video:video_rtp_headers", "//rtc_base", "//rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", ] } @@ -1087,7 +1081,6 @@ if (current_os == "linux" || is_android) { "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", "../../system_wrappers:metrics", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -1164,7 +1157,6 @@ if (current_os == "linux" || is_android) { "../../modules/audio_device:audio_device_buffer", "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/sdk/android/native_api/audio_device_module/audio_device_android.cc b/sdk/android/native_api/audio_device_module/audio_device_android.cc index 0cbe758f96..16a3643ae0 100644 --- a/sdk/android/native_api/audio_device_module/audio_device_android.cc +++ b/sdk/android/native_api/audio_device_module/audio_device_android.cc @@ -11,9 +11,10 @@ #include "sdk/android/native_api/audio_device_module/audio_device_android.h" #include + +#include #include -#include "absl/memory/memory.h" #include "api/scoped_refptr.h" #include "rtc_base/logging.h" #include "rtc_base/ref_count.h" @@ -67,8 +68,8 @@ rtc::scoped_refptr CreateAAudioAudioDeviceModule( AudioDeviceModule::kAndroidAAudioAudio, false /* use_stereo_input */, false /* use_stereo_output */, jni::kLowLatencyModeDelayEstimateInMilliseconds, - absl::make_unique(input_parameters), - absl::make_unique(output_parameters)); + std::make_unique(input_parameters), + std::make_unique(output_parameters)); } #endif @@ -85,11 +86,11 @@ rtc::scoped_refptr CreateJavaAudioDeviceModule( GetDefaultAudioParameters(env, application_context, &input_parameters, &output_parameters); // Create ADM from AudioRecord and AudioTrack. - auto audio_input = absl::make_unique( + auto audio_input = std::make_unique( env, input_parameters, jni::kHighLatencyModeDelayEstimateInMilliseconds, jni::AudioRecordJni::CreateJavaWebRtcAudioRecord(env, j_context, j_audio_manager)); - auto audio_output = absl::make_unique( + auto audio_output = std::make_unique( env, output_parameters, jni::AudioTrackJni::CreateJavaWebRtcAudioTrack(env, j_context, j_audio_manager)); @@ -112,9 +113,9 @@ rtc::scoped_refptr CreateOpenSLESAudioDeviceModule( // Create ADM from OpenSLESRecorder and OpenSLESPlayer. rtc::scoped_refptr engine_manager( new jni::OpenSLEngineManager()); - auto audio_input = absl::make_unique(input_parameters, - engine_manager); - auto audio_output = absl::make_unique( + auto audio_input = + std::make_unique(input_parameters, engine_manager); + auto audio_output = std::make_unique( output_parameters, std::move(engine_manager)); return CreateAudioDeviceModuleFromInputAndOutput( AudioDeviceModule::kAndroidOpenSLESAudio, false /* use_stereo_input */, @@ -136,14 +137,14 @@ CreateJavaInputAndOpenSLESOutputAudioDeviceModule(JNIEnv* env, GetDefaultAudioParameters(env, application_context, &input_parameters, &output_parameters); // Create ADM from AudioRecord and OpenSLESPlayer. - auto audio_input = absl::make_unique( + auto audio_input = std::make_unique( env, input_parameters, jni::kLowLatencyModeDelayEstimateInMilliseconds, jni::AudioRecordJni::CreateJavaWebRtcAudioRecord(env, j_context, j_audio_manager)); rtc::scoped_refptr engine_manager( new jni::OpenSLEngineManager()); - auto audio_output = absl::make_unique( + auto audio_output = std::make_unique( output_parameters, std::move(engine_manager)); return CreateAudioDeviceModuleFromInputAndOutput( AudioDeviceModule::kAndroidJavaInputAndOpenSLESOutputAudio, diff --git a/sdk/android/native_api/base/network_monitor.cc b/sdk/android/native_api/base/network_monitor.cc index 822fab9386..515e9f21fb 100644 --- a/sdk/android/native_api/base/network_monitor.cc +++ b/sdk/android/native_api/base/network_monitor.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "sdk/android/src/jni/android_network_monitor.h" namespace webrtc { @@ -20,13 +19,13 @@ namespace webrtc { std::unique_ptr CreateAndroidNetworkMonitorFactory( JNIEnv* env, jobject application_context) { - return absl::make_unique( + return std::make_unique( env, JavaParamRef(application_context)); } std::unique_ptr CreateAndroidNetworkMonitorFactory() { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/sdk/android/native_api/codecs/wrapper.cc b/sdk/android/native_api/codecs/wrapper.cc index 6b78e7e7f7..08cafd83b8 100644 --- a/sdk/android/native_api/codecs/wrapper.cc +++ b/sdk/android/native_api/codecs/wrapper.cc @@ -10,7 +10,8 @@ #include "sdk/android/native_api/codecs/wrapper.h" -#include "absl/memory/memory.h" +#include + #include "sdk/android/native_api/jni/scoped_java_ref.h" #include "sdk/android/src/jni/video_codec_info.h" #include "sdk/android/src/jni/video_decoder_factory_wrapper.h" @@ -26,14 +27,14 @@ SdpVideoFormat JavaToNativeVideoCodecInfo(JNIEnv* jni, jobject codec_info) { std::unique_ptr JavaToNativeVideoDecoderFactory( JNIEnv* jni, jobject decoder_factory) { - return absl::make_unique( + return std::make_unique( jni, JavaParamRef(decoder_factory)); } std::unique_ptr JavaToNativeVideoEncoderFactory( JNIEnv* jni, jobject encoder_factory) { - return absl::make_unique( + return std::make_unique( jni, JavaParamRef(encoder_factory)); } diff --git a/sdk/android/native_api/video/wrapper.cc b/sdk/android/native_api/video/wrapper.cc index 7b87ad6577..8faddc3b26 100644 --- a/sdk/android/native_api/video/wrapper.cc +++ b/sdk/android/native_api/video/wrapper.cc @@ -10,7 +10,8 @@ #include "sdk/android/native_api/video/wrapper.h" -#include "absl/memory/memory.h" +#include + #include "sdk/android/native_api/jni/scoped_java_ref.h" #include "sdk/android/src/jni/video_frame.h" #include "sdk/android/src/jni/video_sink.h" @@ -20,7 +21,7 @@ namespace webrtc { std::unique_ptr> JavaToNativeVideoSink( JNIEnv* jni, jobject video_sink) { - return absl::make_unique( + return std::make_unique( jni, JavaParamRef(video_sink)); } diff --git a/sdk/android/native_unittests/peerconnection/peer_connection_factory_unittest.cc b/sdk/android/native_unittests/peerconnection/peer_connection_factory_unittest.cc index 6e1e46402a..b2672e9ee1 100644 --- a/sdk/android/native_unittests/peerconnection/peer_connection_factory_unittest.cc +++ b/sdk/android/native_unittests/peerconnection/peer_connection_factory_unittest.cc @@ -9,7 +9,8 @@ */ #include "sdk/android/native_api/peerconnection/peer_connection_factory.h" -#include "absl/memory/memory.h" +#include + #include "api/rtc_event_log/rtc_event_log_factory.h" #include "api/task_queue/default_task_queue_factory.h" #include "media/base/media_engine.h" @@ -49,16 +50,16 @@ rtc::scoped_refptr CreateTestPCF( pcf_deps.task_queue_factory = CreateDefaultTaskQueueFactory(); pcf_deps.call_factory = CreateCallFactory(); pcf_deps.event_log_factory = - absl::make_unique(pcf_deps.task_queue_factory.get()); + std::make_unique(pcf_deps.task_queue_factory.get()); cricket::MediaEngineDependencies media_deps; media_deps.task_queue_factory = pcf_deps.task_queue_factory.get(); media_deps.adm = CreateJavaAudioDeviceModule(jni, GetAppContextForTest(jni).obj()); media_deps.video_encoder_factory = - absl::make_unique(); + std::make_unique(); media_deps.video_decoder_factory = - absl::make_unique(); + std::make_unique(); SetMediaEngineDefaults(&media_deps); pcf_deps.media_engine = cricket::CreateMediaEngine(std::move(media_deps)); RTC_LOG(LS_INFO) << "Media engine created: " << pcf_deps.media_engine.get(); diff --git a/sdk/android/native_unittests/stacktrace/stacktrace_unittest.cc b/sdk/android/native_unittests/stacktrace/stacktrace_unittest.cc index 917dbc972f..e3b5e78cdd 100644 --- a/sdk/android/native_unittests/stacktrace/stacktrace_unittest.cc +++ b/sdk/android/native_unittests/stacktrace/stacktrace_unittest.cc @@ -11,10 +11,11 @@ #include "sdk/android/native_api/stacktrace/stacktrace.h" #include + #include +#include #include -#include "absl/memory/memory.h" #include "rtc_base/critical_section.h" #include "rtc_base/event.h" #include "rtc_base/logging.h" @@ -117,7 +118,7 @@ class RtcEventDeadlock : public DeadlockInterface { class RtcCriticalSectionDeadlock : public DeadlockInterface { public: RtcCriticalSectionDeadlock() - : critscope_(absl::make_unique(&crit_)) {} + : critscope_(std::make_unique(&crit_)) {} private: void Deadlock() override { rtc::CritScope lock(&crit_); } @@ -230,11 +231,11 @@ TEST(Stacktrace, TestCurrentThread) { } TEST(Stacktrace, TestSpinLock) { - TestStacktrace(absl::make_unique()); + TestStacktrace(std::make_unique()); } TEST(Stacktrace, TestSleep) { - TestStacktrace(absl::make_unique()); + TestStacktrace(std::make_unique()); } // Stack traces originating from kernel space does not include user space stack @@ -242,11 +243,11 @@ TEST(Stacktrace, TestSleep) { #ifdef WEBRTC_ARCH_ARM64 TEST(Stacktrace, TestRtcEvent) { - TestStacktrace(absl::make_unique()); + TestStacktrace(std::make_unique()); } TEST(Stacktrace, TestRtcCriticalSection) { - TestStacktrace(absl::make_unique()); + TestStacktrace(std::make_unique()); } #endif diff --git a/sdk/android/src/jni/android_media_encoder.cc b/sdk/android/src/jni/android_media_encoder.cc index a035708cdb..78f313a1ad 100644 --- a/sdk/android/src/jni/android_media_encoder.cc +++ b/sdk/android/src/jni/android_media_encoder.cc @@ -989,7 +989,7 @@ bool MediaCodecVideoEncoder::DeliverPendingOutputs(JNIEnv* jni) { EncodedImageCallback::Result callback_result( EncodedImageCallback::Result::OK); if (callback_) { - auto image = absl::make_unique(); + auto image = std::make_unique(); // The corresponding (and deprecated) java classes are not prepared for // late calls to releaseOutputBuffer, so to keep things simple, make a // copy here, and call releaseOutputBuffer before returning. diff --git a/sdk/android/src/jni/audio_device/aaudio_player.cc b/sdk/android/src/jni/audio_device/aaudio_player.cc index 59697066df..8e1122d176 100644 --- a/sdk/android/src/jni/audio_device/aaudio_player.cc +++ b/sdk/android/src/jni/audio_device/aaudio_player.cc @@ -10,7 +10,8 @@ #include "sdk/android/src/jni/audio_device/aaudio_player.h" -#include "absl/memory/memory.h" +#include + #include "api/array_view.h" #include "modules/audio_device/fine_audio_buffer.h" #include "rtc_base/checks.h" @@ -124,7 +125,7 @@ void AAudioPlayer::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) { // Create a modified audio buffer class which allows us to ask for any number // of samples (and not only multiple of 10ms) to match the optimal buffer // size per callback used by AAudio. - fine_audio_buffer_ = absl::make_unique(audio_device_buffer_); + fine_audio_buffer_ = std::make_unique(audio_device_buffer_); } bool AAudioPlayer::SpeakerVolumeIsAvailable() { diff --git a/sdk/android/src/jni/audio_device/aaudio_recorder.cc b/sdk/android/src/jni/audio_device/aaudio_recorder.cc index 8daafcdfc7..b543645004 100644 --- a/sdk/android/src/jni/audio_device/aaudio_recorder.cc +++ b/sdk/android/src/jni/audio_device/aaudio_recorder.cc @@ -10,7 +10,8 @@ #include "sdk/android/src/jni/audio_device/aaudio_recorder.h" -#include "absl/memory/memory.h" +#include + #include "api/array_view.h" #include "modules/audio_device/fine_audio_buffer.h" #include "rtc_base/checks.h" @@ -120,7 +121,7 @@ void AAudioRecorder::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) { // Create a modified audio buffer class which allows us to deliver any number // of samples (and not only multiples of 10ms which WebRTC uses) to match the // native AAudio buffer size. - fine_audio_buffer_ = absl::make_unique(audio_device_buffer_); + fine_audio_buffer_ = std::make_unique(audio_device_buffer_); } bool AAudioRecorder::IsAcousticEchoCancelerSupported() const { diff --git a/sdk/android/src/jni/audio_device/audio_device_module.cc b/sdk/android/src/jni/audio_device/audio_device_module.cc index 0008e7ef9d..b4cb184177 100644 --- a/sdk/android/src/jni/audio_device/audio_device_module.cc +++ b/sdk/android/src/jni/audio_device/audio_device_module.cc @@ -10,9 +10,9 @@ #include "sdk/android/src/jni/audio_device/audio_device_module.h" +#include #include -#include "absl/memory/memory.h" #include "api/task_queue/default_task_queue_factory.h" #include "api/task_queue/task_queue_factory.h" #include "modules/audio_device/audio_device_buffer.h" @@ -92,7 +92,7 @@ class AndroidAudioDeviceModule : public AudioDeviceModule { RTC_LOG(INFO) << __FUNCTION__; RTC_DCHECK(thread_checker_.IsCurrent()); audio_device_buffer_ = - absl::make_unique(task_queue_factory_.get()); + std::make_unique(task_queue_factory_.get()); AttachAudioBuffer(); if (initialized_) { return 0; diff --git a/sdk/android/src/jni/audio_device/java_audio_device_module.cc b/sdk/android/src/jni/audio_device/java_audio_device_module.cc index 18d0891e03..1c3cbe4bbe 100644 --- a/sdk/android/src/jni/audio_device/java_audio_device_module.cc +++ b/sdk/android/src/jni/audio_device/java_audio_device_module.cc @@ -8,7 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "sdk/android/generated_java_audio_jni/JavaAudioDeviceModule_jni.h" #include "sdk/android/src/jni/audio_device/audio_record_jni.h" #include "sdk/android/src/jni/audio_device/audio_track_jni.h" @@ -33,11 +34,11 @@ static jlong JNI_JavaAudioDeviceModule_CreateAudioDeviceModule( output_sample_rate, j_use_stereo_input, j_use_stereo_output, &input_parameters, &output_parameters); - auto audio_input = absl::make_unique( + auto audio_input = std::make_unique( env, input_parameters, kHighLatencyModeDelayEstimateInMilliseconds, j_webrtc_audio_record); - auto audio_output = absl::make_unique(env, output_parameters, - j_webrtc_audio_track); + auto audio_output = std::make_unique(env, output_parameters, + j_webrtc_audio_track); return jlongFromPointer(CreateAudioDeviceModuleFromInputAndOutput( AudioDeviceModule::kAndroidJavaAudio, j_use_stereo_input, j_use_stereo_output, diff --git a/sdk/android/src/jni/audio_device/opensles_player.cc b/sdk/android/src/jni/audio_device/opensles_player.cc index 55030fcd28..5192accf16 100644 --- a/sdk/android/src/jni/audio_device/opensles_player.cc +++ b/sdk/android/src/jni/audio_device/opensles_player.cc @@ -12,7 +12,7 @@ #include -#include "absl/memory/memory.h" +#include #include "api/array_view.h" #include "modules/audio_device/fine_audio_buffer.h" #include "rtc_base/arraysize.h" @@ -226,7 +226,7 @@ void OpenSLESPlayer::AllocateDataBuffers() { ALOGD("native buffer size: %" RTC_PRIuS, buffer_size_in_samples); ALOGD("native buffer size in ms: %.2f", audio_parameters_.GetBufferSizeInMilliseconds()); - fine_audio_buffer_ = absl::make_unique(audio_device_buffer_); + fine_audio_buffer_ = std::make_unique(audio_device_buffer_); // Allocated memory for audio buffers. for (int i = 0; i < kNumOfOpenSLESBuffers; ++i) { audio_buffers_[i].reset(new SLint16[buffer_size_in_samples]); diff --git a/sdk/android/src/jni/audio_device/opensles_recorder.cc b/sdk/android/src/jni/audio_device/opensles_recorder.cc index ac0d71a0dd..d2eb2de9b0 100644 --- a/sdk/android/src/jni/audio_device/opensles_recorder.cc +++ b/sdk/android/src/jni/audio_device/opensles_recorder.cc @@ -12,7 +12,7 @@ #include -#include "absl/memory/memory.h" +#include #include "api/array_view.h" #include "modules/audio_device/fine_audio_buffer.h" #include "rtc_base/arraysize.h" @@ -353,7 +353,7 @@ void OpenSLESRecorder::AllocateDataBuffers() { audio_parameters_.GetBytesPerBuffer()); ALOGD("native sample rate: %d", audio_parameters_.sample_rate()); RTC_DCHECK(audio_device_buffer_); - fine_audio_buffer_ = absl::make_unique(audio_device_buffer_); + fine_audio_buffer_ = std::make_unique(audio_device_buffer_); // Allocate queue of audio buffers that stores recorded audio samples. const int buffer_size_samples = audio_parameters_.frames_per_buffer() * audio_parameters_.channels(); diff --git a/sdk/android/src/jni/pc/data_channel.cc b/sdk/android/src/jni/pc/data_channel.cc index 64410aafdf..3552974443 100644 --- a/sdk/android/src/jni/pc/data_channel.cc +++ b/sdk/android/src/jni/pc/data_channel.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "api/data_channel_interface.h" #include "rtc_base/logging.h" #include "sdk/android/generated_peerconnection_jni/DataChannel_jni.h" @@ -97,7 +96,7 @@ static jlong JNI_DataChannel_RegisterObserver( JNIEnv* jni, const JavaParamRef& j_dc, const JavaParamRef& j_observer) { - auto observer = absl::make_unique(jni, j_observer); + auto observer = std::make_unique(jni, j_observer); ExtractNativeDC(jni, j_dc)->RegisterObserver(observer.get()); return jlongFromPointer(observer.release()); } diff --git a/sdk/android/src/jni/pc/media_constraints.cc b/sdk/android/src/jni/pc/media_constraints.cc index 5b52fb1b21..4e1a3ba406 100644 --- a/sdk/android/src/jni/pc/media_constraints.cc +++ b/sdk/android/src/jni/pc/media_constraints.cc @@ -10,7 +10,8 @@ #include "sdk/android/src/jni/pc/media_constraints.h" -#include "absl/memory/memory.h" +#include + #include "sdk/android/generated_peerconnection_jni/MediaConstraints_jni.h" #include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/src/jni/jni_helpers.h" @@ -39,7 +40,7 @@ MediaConstraints::Constraints PopulateConstraintsFromJavaPairList( std::unique_ptr JavaToNativeMediaConstraints( JNIEnv* env, const JavaRef& j_constraints) { - return absl::make_unique( + return std::make_unique( PopulateConstraintsFromJavaPairList( env, Java_MediaConstraints_getMandatory(env, j_constraints)), PopulateConstraintsFromJavaPairList( diff --git a/sdk/android/src/jni/pc/media_stream.cc b/sdk/android/src/jni/pc/media_stream.cc index 6bbeaa78bb..47797939a2 100644 --- a/sdk/android/src/jni/pc/media_stream.cc +++ b/sdk/android/src/jni/pc/media_stream.cc @@ -10,7 +10,8 @@ #include "sdk/android/src/jni/pc/media_stream.h" -#include "absl/memory/memory.h" +#include + #include "sdk/android/generated_peerconnection_jni/MediaStream_jni.h" #include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/src/jni/jni_helpers.h" @@ -25,7 +26,7 @@ JavaMediaStream::JavaMediaStream( env, Java_MediaStream_Constructor(env, jlongFromPointer(media_stream.get()))), - observer_(absl::make_unique(media_stream)) { + observer_(std::make_unique(media_stream)) { for (rtc::scoped_refptr track : media_stream->GetAudioTracks()) { Java_MediaStream_addNativeAudioTrack(env, j_media_stream_, diff --git a/sdk/android/src/jni/pc/peer_connection.cc b/sdk/android/src/jni/pc/peer_connection.cc index 13f8301c0b..20804deb08 100644 --- a/sdk/android/src/jni/pc/peer_connection.cc +++ b/sdk/android/src/jni/pc/peer_connection.cc @@ -32,7 +32,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/peer_connection_interface.h" #include "api/rtc_event_log_output_file.h" #include "api/rtp_receiver_interface.h" @@ -786,7 +785,7 @@ static jboolean JNI_PeerConnection_StartRtcEventLog( return false; } return ExtractNativePC(jni, j_pc)->StartRtcEventLog( - absl::make_unique(f, max_size)); + std::make_unique(f, max_size)); } static void JNI_PeerConnection_StopRtcEventLog( diff --git a/sdk/android/src/jni/pc/peer_connection_factory.cc b/sdk/android/src/jni/pc/peer_connection_factory.cc index 1446576f62..4ae6fafe0a 100644 --- a/sdk/android/src/jni/pc/peer_connection_factory.cc +++ b/sdk/android/src/jni/pc/peer_connection_factory.cc @@ -204,7 +204,7 @@ static void JNI_PeerConnectionFactory_InitializeFieldTrials( field_trial::InitFieldTrialsFromString(nullptr); return; } - field_trials_init_string = absl::make_unique( + field_trials_init_string = std::make_unique( JavaToNativeString(jni, j_trials_init_string)); RTC_LOG(LS_INFO) << "initializeFieldTrials: " << *field_trials_init_string; field_trial::InitFieldTrialsFromString(field_trials_init_string->c_str()); @@ -302,7 +302,7 @@ ScopedJavaLocalRef CreatePeerConnectionFactoryForJava( dependencies.signaling_thread = signaling_thread.get(); dependencies.task_queue_factory = CreateDefaultTaskQueueFactory(); dependencies.call_factory = CreateCallFactory(); - dependencies.event_log_factory = absl::make_unique( + dependencies.event_log_factory = std::make_unique( dependencies.task_queue_factory.get()); dependencies.fec_controller_factory = std::move(fec_controller_factory); dependencies.network_controller_factory = @@ -476,7 +476,7 @@ static jlong JNI_PeerConnectionFactory_CreatePeerConnection( PeerConnectionDependencies peer_connection_dependencies(observer.get()); if (!j_sslCertificateVerifier.is_null()) { peer_connection_dependencies.tls_cert_verifier = - absl::make_unique( + std::make_unique( jni, j_sslCertificateVerifier); } @@ -531,7 +531,7 @@ static void JNI_PeerConnectionFactory_InjectLoggable( if (jni_log_sink) { rtc::LogMessage::RemoveLogToStream(jni_log_sink.get()); } - jni_log_sink = absl::make_unique(jni, j_logging); + jni_log_sink = std::make_unique(jni, j_logging); rtc::LogMessage::AddLogToStream( jni_log_sink.get(), static_cast(nativeSeverity)); rtc::LogMessage::LogToDebug(rtc::LS_NONE); diff --git a/sdk/objc/api/peerconnection/RTCFileLogger.mm b/sdk/objc/api/peerconnection/RTCFileLogger.mm index ef13023582..2532fcf36f 100644 --- a/sdk/objc/api/peerconnection/RTCFileLogger.mm +++ b/sdk/objc/api/peerconnection/RTCFileLogger.mm @@ -132,11 +132,11 @@ const char *kRTCFileLoggerRotatingLogPrefix = "rotating_log"; std::unique_ptr stream; switch(_rotationType) { case RTCFileLoggerTypeApp: - stream = absl::make_unique(_dirPath.UTF8String, - kRTCFileLoggerRotatingLogPrefix); + stream = std::make_unique(_dirPath.UTF8String, + kRTCFileLoggerRotatingLogPrefix); break; case RTCFileLoggerTypeCall: - stream = absl::make_unique(_dirPath.UTF8String); + stream = std::make_unique(_dirPath.UTF8String); break; } size_t bufferSize = stream->GetSize(); diff --git a/sdk/objc/api/peerconnection/RTCPeerConnection.mm b/sdk/objc/api/peerconnection/RTCPeerConnection.mm index 097eeb4e41..32a8a4baea 100644 --- a/sdk/objc/api/peerconnection/RTCPeerConnection.mm +++ b/sdk/objc/api/peerconnection/RTCPeerConnection.mm @@ -236,11 +236,11 @@ void PeerConnectionDelegateAdapter::OnIceCandidatesRemoved( void PeerConnectionDelegateAdapter::OnIceSelectedCandidatePairChanged( const cricket::CandidatePairChangeEvent &event) { const auto &selected_pair = event.selected_candidate_pair; - auto local_candidate_wrapper = absl::make_unique( + auto local_candidate_wrapper = std::make_unique( selected_pair.local_candidate().transport_name(), -1, selected_pair.local_candidate()); RTCIceCandidate *local_candidate = [[RTCIceCandidate alloc] initWithNativeCandidate:local_candidate_wrapper.release()]; - auto remote_candidate_wrapper = absl::make_unique( + auto remote_candidate_wrapper = std::make_unique( selected_pair.remote_candidate().transport_name(), -1, selected_pair.remote_candidate()); RTCIceCandidate *remote_candidate = [[RTCIceCandidate alloc] initWithNativeCandidate:remote_candidate_wrapper.release()]; @@ -563,7 +563,7 @@ void PeerConnectionDelegateAdapter::OnRemoveTrack( rtc::saturated_cast(maxSizeInBytes); _hasStartedRtcEventLog = _peerConnection->StartRtcEventLog( - absl::make_unique(f, max_size)); + std::make_unique(f, max_size)); return _hasStartedRtcEventLog; } diff --git a/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm b/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm index d63c08e1e5..4ac33d2436 100644 --- a/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm +++ b/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include + #import "RTCPeerConnectionFactory+Native.h" #import "RTCPeerConnectionFactory+Private.h" #import "RTCPeerConnectionFactoryOptions+Private.h" @@ -28,7 +30,6 @@ #import "components/video_codec/RTCVideoEncoderFactoryH264.h" // The no-media version PeerConnectionFactory doesn't depend on these files, but the gn check tool // is not smart enough to take the #ifdef into account. -#include "absl/memory/memory.h" #include "api/audio_codecs/builtin_audio_decoder_factory.h" // nogncheck #include "api/audio_codecs/builtin_audio_encoder_factory.h" // nogncheck #include "api/rtc_event_log/rtc_event_log_factory.h" @@ -51,7 +52,6 @@ // C++ target. // TODO(zhihuang): Remove nogncheck once MediaEngineInterface is moved to C++ // API layer. -#include "absl/memory/memory.h" #include "api/transport/media/media_transport_interface.h" #include "media/engine/webrtc_media_engine.h" // nogncheck @@ -231,7 +231,7 @@ dependencies.media_engine = cricket::CreateMediaEngine(std::move(media_deps)); dependencies.call_factory = webrtc::CreateCallFactory(); dependencies.event_log_factory = - absl::make_unique(dependencies.task_queue_factory.get()); + std::make_unique(dependencies.task_queue_factory.get()); dependencies.network_controller_factory = std::move(networkControllerFactory); dependencies.media_transport_factory = std::move(mediaTransportFactory); #endif diff --git a/sdk/objc/native/api/video_decoder_factory.mm b/sdk/objc/native/api/video_decoder_factory.mm index a4f9a20ebc..8d0e4ab4cb 100644 --- a/sdk/objc/native/api/video_decoder_factory.mm +++ b/sdk/objc/native/api/video_decoder_factory.mm @@ -10,14 +10,15 @@ #include "sdk/objc/native/api/video_decoder_factory.h" -#include "absl/memory/memory.h" +#include + #include "sdk/objc/native/src/objc_video_decoder_factory.h" namespace webrtc { std::unique_ptr ObjCToNativeVideoDecoderFactory( id objc_video_decoder_factory) { - return absl::make_unique(objc_video_decoder_factory); + return std::make_unique(objc_video_decoder_factory); } } // namespace webrtc diff --git a/sdk/objc/native/api/video_encoder_factory.mm b/sdk/objc/native/api/video_encoder_factory.mm index 0f4a57ce1c..b582deb108 100644 --- a/sdk/objc/native/api/video_encoder_factory.mm +++ b/sdk/objc/native/api/video_encoder_factory.mm @@ -10,14 +10,15 @@ #include "sdk/objc/native/api/video_encoder_factory.h" -#include "absl/memory/memory.h" +#include + #include "sdk/objc/native/src/objc_video_encoder_factory.h" namespace webrtc { std::unique_ptr ObjCToNativeVideoEncoderFactory( id objc_video_encoder_factory) { - return absl::make_unique(objc_video_encoder_factory); + return std::make_unique(objc_video_encoder_factory); } } // namespace webrtc diff --git a/sdk/objc/native/api/video_renderer.mm b/sdk/objc/native/api/video_renderer.mm index ce36c34dd7..66316856f4 100644 --- a/sdk/objc/native/api/video_renderer.mm +++ b/sdk/objc/native/api/video_renderer.mm @@ -10,14 +10,15 @@ #include "sdk/objc/native/api/video_renderer.h" -#include "absl/memory/memory.h" +#include + #include "sdk/objc/native/src/objc_video_renderer.h" namespace webrtc { std::unique_ptr> ObjCToNativeVideoRenderer( id objc_video_renderer) { - return absl::make_unique(objc_video_renderer); + return std::make_unique(objc_video_renderer); } } // namespace webrtc diff --git a/test/BUILD.gn b/test/BUILD.gn index 7f2fff973c..6cf95c6223 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -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", ] } diff --git a/test/audio_decoder_proxy_factory.h b/test/audio_decoder_proxy_factory.h index fa5795bd0e..821e6c6fb8 100644 --- a/test/audio_decoder_proxy_factory.h +++ b/test/audio_decoder_proxy_factory.h @@ -15,7 +15,6 @@ #include #include -#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 MakeAudioDecoder( const SdpAudioFormat& /* format */, absl::optional /* codec_pair_id */) override { - return absl::make_unique(decoder_); + return std::make_unique(decoder_); } private: diff --git a/test/call_test.cc b/test/call_test.cc index 20c8892de6..557c84264d 100644 --- a/test/call_test.cc +++ b/test/call_test.cc @@ -11,8 +11,8 @@ #include "test/call_test.h" #include +#include -#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()), - recv_event_log_(absl::make_unique()), + send_event_log_(std::make_unique()), + recv_event_log_(std::make_unique()), audio_send_config_(/*send_transport=*/nullptr, MediaTransportConfig()), audio_send_stream_(nullptr), frame_generator_capturer_(nullptr), fake_encoder_factory_([this]() { std::unique_ptr fake_encoder; if (video_encoder_configs_[0].codec_type == kVideoCodecVP8) { - fake_encoder = absl::make_unique(clock_); + fake_encoder = std::make_unique(clock_); } else { - fake_encoder = absl::make_unique(clock_); + fake_encoder = std::make_unique(clock_); } fake_encoder->SetMaxBitrate(fake_encoder_max_bitrate_); return fake_encoder; }), - fake_decoder_factory_([]() { return absl::make_unique(); }), + fake_decoder_factory_([]() { return std::make_unique(); }), 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( + std::make_unique( 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( + std::make_unique( 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( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(BuiltInNetworkBehaviorConfig()))); + std::make_unique(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( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(BuiltInNetworkBehaviorConfig()))); + std::make_unique(BuiltInNetworkBehaviorConfig()))); } size_t BaseTest::GetNumVideoStreams() const { diff --git a/test/fake_decoder.cc b/test/fake_decoder.cc index c5ba231bfb..e80c31cc40 100644 --- a/test/fake_decoder.cc +++ b/test/fake_decoder.cc @@ -12,7 +12,8 @@ #include -#include "absl/memory/memory.h" +#include + #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(task_queue_factory_->CreateTaskQueue( + std::make_unique(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 a1e9742544..8ee1e99a9b 100644 --- a/test/fake_encoder.cc +++ b/test/fake_encoder.cc @@ -17,7 +17,6 @@ #include #include -#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 FakeH264Encoder::EncodeHook( current_idr_counter = idr_counter_; ++idr_counter_; } - auto fragmentation = absl::make_unique(); + auto fragmentation = std::make_unique(); 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(this, input_image, frame_types)); + queue->PostTask(std::make_unique(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 796ccda6bb..454f9461c1 100644 --- a/test/fake_vp8_encoder_unittest.cc +++ b/test/fake_vp8_encoder_unittest.cc @@ -13,7 +13,6 @@ #include #include -#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 CreateSpecificSimulcastTestFixture() { std::unique_ptr encoder_factory = - absl::make_unique([]() { - return absl::make_unique(Clock::GetRealTimeClock()); + std::make_unique([]() { + return std::make_unique(Clock::GetRealTimeClock()); }); std::unique_ptr decoder_factory = - absl::make_unique( - []() { return absl::make_unique(); }); + std::make_unique( + []() { return std::make_unique(); }); 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 276069ec05..281102d1b2 100644 --- a/test/frame_generator.cc +++ b/test/frame_generator.cc @@ -15,7 +15,6 @@ #include #include -#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::Builder() - .set_video_frame_buffer(buffer) - .set_rotation(webrtc::kVideoRotation_0) - .set_timestamp_us(0) - .build()); + frame_ = + std::make_unique(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( + temp_frame_ = std::make_unique( 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::Builder() - .set_video_frame_buffer(buffer_) - .set_rotation(webrtc::kVideoRotation_0) - .set_timestamp_us(0) - .build()); + frame_ = + std::make_unique(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 ebf9ebb7ad..9eda4df260 100644 --- a/test/frame_generator_capturer.cc +++ b/test/frame_generator_capturer.cc @@ -13,10 +13,10 @@ #include #include #include +#include #include #include -#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::Create( Clock* clock, TaskQueueFactory& task_queue_factory, FrameGeneratorCapturerConfig::SquaresVideo config) { - return absl::make_unique( + return std::make_unique( clock, FrameGenerator::CreateSquareGenerator( config.width, config.height, config.pixel_format, config.num_squares), @@ -79,7 +79,7 @@ std::unique_ptr FrameGeneratorCapturer::Create( Clock* clock, TaskQueueFactory& task_queue_factory, FrameGeneratorCapturerConfig::SquareSlides config) { - return absl::make_unique( + return std::make_unique( clock, FrameGenerator::CreateSlideGenerator( config.width, config.height, @@ -92,7 +92,7 @@ std::unique_ptr FrameGeneratorCapturer::Create( TaskQueueFactory& task_queue_factory, FrameGeneratorCapturerConfig::VideoFile config) { RTC_CHECK(config.width && config.height); - return absl::make_unique( + return std::make_unique( clock, FrameGenerator::CreateFromYuvFile({TransformFilePath(config.name)}, config.width, config.height, @@ -126,7 +126,7 @@ std::unique_ptr FrameGeneratorCapturer::Create( /*frame_repeat_count*/ config.change_interval.seconds() * config.framerate); } - return absl::make_unique( + return std::make_unique( clock, std::move(slides_generator), config.framerate, task_queue_factory); } diff --git a/test/fuzzers/BUILD.gn b/test/fuzzers/BUILD.gn index 0a81bf3e2d..7d32c97c1a 100644 --- a/test/fuzzers/BUILD.gn +++ b/test/fuzzers/BUILD.gn @@ -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" } diff --git a/test/fuzzers/agc_fuzzer.cc b/test/fuzzers/agc_fuzzer.cc index a330c7b785..a40a21382f 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 + #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(data, size)); - auto gci = absl::make_unique(); + auto gci = std::make_unique(); FuzzGainController(&fuzz_data, gci.get()); } } // namespace webrtc diff --git a/test/fuzzers/mdns_parser_fuzzer.cc b/test/fuzzers/mdns_parser_fuzzer.cc index 294f683226..451742327f 100644 --- a/test/fuzzers/mdns_parser_fuzzer.cc +++ b/test/fuzzers/mdns_parser_fuzzer.cc @@ -11,7 +11,8 @@ #include #include -#include "absl/memory/memory.h" +#include + #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(data), size); - auto mdns_msg = absl::make_unique(); + auto mdns_msg = std::make_unique(); 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 e54b90d7f9..f2482fee8c 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 + #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( + auto frame = std::make_unique( 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 007c750b60..e821e2f137 100644 --- a/test/fuzzers/utils/BUILD.gn +++ b/test/fuzzers/utils/BUILD.gn @@ -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", ] } diff --git a/test/fuzzers/utils/rtp_replayer.cc b/test/fuzzers/utils/rtp_replayer.cc index 0656f4c8f6..4a9712ad67 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 +#include #include #include -#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(); + auto stream_state = std::make_unique(); std::vector 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* receive_stream_configs, StreamState* stream_state, Call* call) { - stream_state->decoder_factory = absl::make_unique(); + stream_state->decoder_factory = std::make_unique(); 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 2ba5cfeeb3..5b62d8b1d5 100644 --- a/test/fuzzers/vp8_replay_fuzzer.cc +++ b/test/fuzzers/vp8_replay_fuzzer.cc @@ -11,13 +11,14 @@ #include #include -#include "absl/memory/memory.h" +#include + #include "test/fuzzers/utils/rtp_replayer.h" namespace webrtc { void FuzzOneInput(const uint8_t* data, size_t size) { - auto stream_state = absl::make_unique(); + auto stream_state = std::make_unique(); 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 8e046f11ce..e36c78861b 100644 --- a/test/fuzzers/vp9_replay_fuzzer.cc +++ b/test/fuzzers/vp9_replay_fuzzer.cc @@ -11,13 +11,14 @@ #include #include -#include "absl/memory/memory.h" +#include + #include "test/fuzzers/utils/rtp_replayer.h" namespace webrtc { void FuzzOneInput(const uint8_t* data, size_t size) { - auto stream_state = absl::make_unique(); + auto stream_state = std::make_unique(); VideoReceiveStream::Config vp9_config(&(stream_state->transport)); VideoReceiveStream::Decoder vp9_decoder; diff --git a/test/logging/BUILD.gn b/test/logging/BUILD.gn index f5889252de..ee00d1ccec 100644 --- a/test/logging/BUILD.gn +++ b/test/logging/BUILD.gn @@ -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", ] } diff --git a/test/logging/file_log_writer.cc b/test/logging/file_log_writer.cc index ced81fee30..150f17344d 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 + #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 FileLogWriterFactory::Create( std::string filename) { - return absl::make_unique(base_path_ + filename); + return std::make_unique(base_path_ + filename); } } // namespace webrtc diff --git a/test/logging/memory_log_writer.cc b/test/logging/memory_log_writer.cc index 92945edf37..ee9befeb7c 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 + #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 Create(std::string filename) override { - return absl::make_unique(target_, filename); + return std::make_unique(target_, filename); } private: @@ -59,7 +61,7 @@ MemoryLogStorage::MemoryLogStorage() {} MemoryLogStorage::~MemoryLogStorage() {} std::unique_ptr MemoryLogStorage::CreateFactory() { - return absl::make_unique(&logs_); + return std::make_unique(&logs_); } // namespace webrtc_impl diff --git a/test/network/BUILD.gn b/test/network/BUILD.gn index 2470c008ab..ea6c386c7d 100644 --- a/test/network/BUILD.gn +++ b/test/network/BUILD.gn @@ -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", ] } diff --git a/test/network/network_emulation.cc b/test/network/network_emulation.cc index 7d3ed444db..2d4a057f93 100644 --- a/test/network/network_emulation.cc +++ b/test/network/network_emulation.cc @@ -14,7 +14,6 @@ #include #include -#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( + network_ = std::make_unique( 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(endpoint->network())); + std::make_unique(endpoint->network())); } } return networks; diff --git a/test/network/network_emulation_manager.cc b/test/network/network_emulation_manager.cc index e0366798c3..febcd61dff 100644 --- a/test/network/network_emulation_manager.cc +++ b/test/network/network_emulation_manager.cc @@ -13,7 +13,6 @@ #include #include -#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 std::unique_ptr CreateResourceOwningTask(T resource, Closure&& closure) { - return absl::make_unique>( + return std::make_unique>( std::forward(resource), std::forward(closure)); } } // namespace @@ -72,12 +71,12 @@ NetworkEmulationManagerImpl::~NetworkEmulationManagerImpl() = default; EmulatedNetworkNode* NetworkEmulationManagerImpl::CreateEmulatedNode( BuiltInNetworkBehaviorConfig config) { - return CreateEmulatedNode(absl::make_unique(config)); + return CreateEmulatedNode(std::make_unique(config)); } EmulatedNetworkNode* NetworkEmulationManagerImpl::CreateEmulatedNode( std::unique_ptr network_behavior) { - auto node = absl::make_unique( + auto node = std::make_unique( 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( + auto node = std::make_unique( 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 route = - absl::make_unique(from, std::move(via_nodes), to); + std::make_unique(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 traffic_route = - absl::make_unique(clock_, via_nodes[0], endpoint); + std::make_unique(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(config, traffic_route); + std::make_unique(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(config, traffic_route); + std::make_unique(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(config, send_route, ret_route); + std::make_unique(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& endpoints) { - auto endpoints_container = absl::make_unique(endpoints); - auto network_manager = absl::make_unique( + auto endpoints_container = std::make_unique(endpoints); + auto network_manager = std::make_unique( 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 6c83a9960c..c1582263d8 100644 --- a/test/network/network_emulation_pc_unittest.cc +++ b/test/network/network_emulation_pc_unittest.cc @@ -11,7 +11,6 @@ #include #include -#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 CreatePeerConnectionFactory( pcf_deps.task_queue_factory = CreateDefaultTaskQueueFactory(); pcf_deps.call_factory = CreateCallFactory(); pcf_deps.event_log_factory = - absl::make_unique(pcf_deps.task_queue_factory.get()); + std::make_unique(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 CreatePeerConnection( rtc::NetworkManager* network_manager) { PeerConnectionDependencies pc_deps(observer); auto port_allocator = - absl::make_unique(network_manager); + std::make_unique(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(BuiltInNetworkBehaviorConfig())); + std::make_unique(BuiltInNetworkBehaviorConfig())); EmulatedNetworkNode* bob_node = emulation.CreateEmulatedNode( - absl::make_unique(BuiltInNetworkBehaviorConfig())); + std::make_unique(BuiltInNetworkBehaviorConfig())); EmulatedEndpoint* alice_endpoint = emulation.CreateEndpoint(EmulatedEndpointConfig()); EmulatedEndpoint* bob_endpoint = @@ -122,12 +121,12 @@ TEST(NetworkEmulationManagerPCTest, Run) { rtc::scoped_refptr alice_pcf; rtc::scoped_refptr alice_pc; std::unique_ptr alice_observer = - absl::make_unique(); + std::make_unique(); rtc::scoped_refptr bob_pcf; rtc::scoped_refptr bob_pc; std::unique_ptr bob_observer = - absl::make_unique(); + std::make_unique(); signaling_thread->Invoke(RTC_FROM_HERE, [&]() { alice_pcf = CreatePeerConnectionFactory(signaling_thread.get(), @@ -142,11 +141,11 @@ TEST(NetworkEmulationManagerPCTest, Run) { }); std::unique_ptr alice = - absl::make_unique(alice_pcf, alice_pc, - std::move(alice_observer)); + std::make_unique(alice_pcf, alice_pc, + std::move(alice_observer)); std::unique_ptr bob = - absl::make_unique(bob_pcf, bob_pc, - std::move(bob_observer)); + std::make_unique(bob_pcf, bob_pc, + std::move(bob_observer)); signaling_thread->Invoke(RTC_FROM_HERE, [&]() { rtc::scoped_refptr source = diff --git a/test/network/network_emulation_unittest.cc b/test/network/network_emulation_unittest.cc index e38867f4ee..b119442a10 100644 --- a/test/network/network_emulation_unittest.cc +++ b/test/network/network_emulation_unittest.cc @@ -14,7 +14,6 @@ #include #include -#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(BuiltInNetworkBehaviorConfig())); + std::make_unique(BuiltInNetworkBehaviorConfig())); } } // namespace @@ -186,9 +185,9 @@ TEST(NetworkEmulationManagerTest, Run) { NetworkEmulationManagerImpl network_manager; EmulatedNetworkNode* alice_node = network_manager.CreateEmulatedNode( - absl::make_unique(BuiltInNetworkBehaviorConfig())); + std::make_unique(BuiltInNetworkBehaviorConfig())); EmulatedNetworkNode* bob_node = network_manager.CreateEmulatedNode( - absl::make_unique(BuiltInNetworkBehaviorConfig())); + std::make_unique(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(BuiltInNetworkBehaviorConfig())); + std::make_unique(BuiltInNetworkBehaviorConfig())); EmulatedNetworkNode* bob_node = network_manager.CreateEmulatedNode( - absl::make_unique(BuiltInNetworkBehaviorConfig())); + std::make_unique(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 e4c5d9091e..d85f2e6f3c 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 #include -#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(config_); + auto behavior = std::make_unique(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 b658c9ebad..2baf5a4662 100644 --- a/test/network/traffic_route.cc +++ b/test/network/traffic_route.cc @@ -11,9 +11,9 @@ #include "test/network/traffic_route.h" #include +#include #include -#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(); + null_receiver_ = std::make_unique(); absl::optional 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 action) { - auto action_receiver = absl::make_unique(action, endpoint_); + auto action_receiver = std::make_unique(action, endpoint_); absl::optional 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 497fbe274a..ef5ba43f7f 100644 --- a/test/pc/e2e/BUILD.gn +++ b/test/pc/e2e/BUILD.gn @@ -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", ] 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 60fd1fc11a..9e984aff83 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 +#include #include -#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( + auto thread = std::make_unique( &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 a2509100a5..b304beb0d7 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 #include +#include #include -#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(this); + analyzing_callback_ = std::make_unique(this); } QualityAnalyzingVideoDecoder::~QualityAnalyzingVideoDecoder() = default; @@ -242,7 +242,7 @@ std::unique_ptr QualityAnalyzingVideoDecoderFactory::CreateVideoDecoder( const SdpVideoFormat& format) { std::unique_ptr decoder = delegate_->CreateVideoDecoder(format); - return absl::make_unique( + return std::make_unique( id_generator_->GetNextId(), std::move(decoder), extractor_, analyzer_); } @@ -252,7 +252,7 @@ QualityAnalyzingVideoDecoderFactory::LegacyCreateVideoDecoder( const std::string& receive_stream_id) { std::unique_ptr decoder = delegate_->LegacyCreateVideoDecoder(format, receive_stream_id); - return absl::make_unique( + return std::make_unique( 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 633d6b1b59..af95790028 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 +#include #include -#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 QualityAnalyzingVideoEncoderFactory::CreateVideoEncoder( const SdpVideoFormat& format) { - return absl::make_unique( + return std::make_unique( 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 bc276bac62..b7d87b87fe 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 @@ VideoQualityAnalyzerInjectionHelper::VideoQualityAnalyzerInjectionHelper( : analyzer_(std::move(analyzer)), injector_(injector), extractor_(extractor), - encoding_entities_id_generator_(absl::make_unique(1)) { + encoding_entities_id_generator_(std::make_unique(1)) { RTC_DCHECK(injector_); RTC_DCHECK(extractor_); } @@ -128,7 +128,7 @@ VideoQualityAnalyzerInjectionHelper::WrapVideoEncoderFactory( double bitrate_multiplier, std::map> stream_required_spatial_index) const { - return absl::make_unique( + return std::make_unique( 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 VideoQualityAnalyzerInjectionHelper::WrapVideoDecoderFactory( std::unique_ptr delegate) const { - return absl::make_unique( + return std::make_unique( std::move(delegate), encoding_entities_id_generator_.get(), extractor_, analyzer_.get()); } @@ -149,14 +149,14 @@ VideoQualityAnalyzerInjectionHelper::WrapFrameGenerator( test::VideoFrameWriter* writer) const { std::vector>> sinks; if (writer) { - sinks.push_back(absl::make_unique(writer)); + sinks.push_back(std::make_unique(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( + return std::make_unique( 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>> sinks; if (writer) { - sinks.push_back(absl::make_unique(writer)); + sinks.push_back(std::make_unique(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(analyzer_.get(), - std::move(sinks)); + return std::make_unique(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 7263c412af..8765b2d299 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 #include -#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(BuiltInNetworkBehaviorConfig()); + std::make_unique(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( - BuiltInNetworkBehaviorConfig())); + std::make_unique(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 video_quality_analyzer = - absl::make_unique(); + std::make_unique(); // 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(alice_network, - bob_network)); + std::make_unique(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 cf1f095b4b..a631237718 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 +#include #include #include -#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(); + video_quality_analyzer = std::make_unique(); } encoded_image_id_controller_ = - absl::make_unique(); + std::make_unique(); video_quality_analyzer_injection_helper_ = - absl::make_unique( + std::make_unique( 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(); + audio_quality_analyzer = std::make_unique(); } audio_quality_analyzer_.swap(audio_quality_analyzer); } @@ -217,7 +217,7 @@ void PeerConnectionE2EQualityTest::AddPeer( rtc::NetworkManager* network_manager, rtc::FunctionView configurer) { peer_configurations_.push_back( - absl::make_unique(network_thread, network_manager)); + std::make_unique(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("pc_e2e_quality_test"); + task_queue_ = std::make_unique("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( + std::make_unique( [this, bob_video_configs]( rtc::scoped_refptr 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( + std::make_unique( [this, alice_video_configs]( rtc::scoped_refptr 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( + auto alice_rtc_event_log = std::make_unique( 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( + auto bob_rtc_event_log = std::make_unique( 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( + override_field_trials_ = std::make_unique( 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( + auto capturer = std::make_unique( 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( + auto video_writer = std::make_unique( 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 04cde84854..43a2f94647 100644 --- a/test/pc/e2e/peer_connection_quality_test.h +++ b/test/pc/e2e/peer_connection_quality_test.h @@ -15,7 +15,6 @@ #include #include -#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(network_thread, - network_manager)), - params_(absl::make_unique()) {} + : components_(std::make_unique(network_thread, + network_manager)), + params_(std::make_unique()) {} PeerConfigurer* SetTaskQueueFactory( std::unique_ptr 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 cb6add8731..765f5a8380 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 #include -#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()), + pcf_dependencies(std::make_unique()), pc_dependencies( - absl::make_unique(network_manager)) { + std::make_unique(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 335147d65d..3fa2e9fcd1 100644 --- a/test/pc/e2e/sdp/sdp_changer.cc +++ b/test/pc/e2e/sdp/sdp_changer.cc @@ -273,7 +273,7 @@ LocalAndRemoteSdp SignalingInterceptor::PatchVp8Offer( // Create patched offer. auto patched_offer = - absl::make_unique(SdpType::kOffer); + std::make_unique(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(SdpType::kAnswer); + std::make_unique(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 6cc1168c5f..ad7b58b574 100644 --- a/test/pc/e2e/test_peer.cc +++ b/test/pc/e2e/test_peer.cc @@ -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( + std::make_unique( 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( + capturer = std::make_unique( std::move(capturer), *echo_emulation_config_); - renderer = absl::make_unique( + renderer = std::make_unique( std::move(renderer), static_cast(capturer.get())); } // Setup input stream dumping if required. if (audio_config_opt_ && audio_config_opt_->input_dump_file_name) { - capturer = absl::make_unique( + capturer = std::make_unique( std::move(capturer), audio_config_opt_->input_dump_file_name.value()); } @@ -279,7 +279,7 @@ class TestPeerComponents { std::unique_ptr pc_dependencies) { PeerConnectionDependencies pc_deps(observer_); - auto port_allocator = absl::make_unique( + auto port_allocator = std::make_unique( 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 32c5892933..e35a24468e 100644 --- a/test/peer_scenario/BUILD.gn +++ b/test/peer_scenario/BUILD.gn @@ -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", ] } } diff --git a/test/peer_scenario/peer_scenario_client.cc b/test/peer_scenario/peer_scenario_client.cc index 64a7d518ba..f94d871885 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 +#include #include -#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(task_queue_factory_); + std::make_unique(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( - manager->network_manager()); + pc_deps.allocator = + std::make_unique(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 6394ac8607..6f5179989d 100644 --- a/test/peer_scenario/scenario_connection.cc +++ b/test/peer_scenario/scenario_connection.cc @@ -77,7 +77,7 @@ class ScenarioIceConnectionImpl : public ScenarioIceConnection, std::unique_ptr ScenarioIceConnection::Create( webrtc::test::NetworkEmulationManagerImpl* net, IceConnectionObserver* observer) { - return absl::make_unique(net, observer); + return std::make_unique(net, observer); } ScenarioIceConnectionImpl::ScenarioIceConnectionImpl( diff --git a/test/rtp_header_parser.cc b/test/rtp_header_parser.cc index 1a4ba42ff7..713e64d83c 100644 --- a/test/rtp_header_parser.cc +++ b/test/rtp_header_parser.cc @@ -11,7 +11,6 @@ #include -#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::CreateForTest() { - return absl::make_unique(); + return std::make_unique(); } RtpHeaderParserImpl::RtpHeaderParserImpl() {} diff --git a/test/scenario/BUILD.gn b/test/scenario/BUILD.gn index dce7775c47..af1059d875 100644 --- a/test/scenario/BUILD.gn +++ b/test/scenario/BUILD.gn @@ -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) { diff --git a/test/scenario/call_client.cc b/test/scenario/call_client.cc index 1654afc348..3d907f3b35 100644 --- a/test/scenario/call_client.cc +++ b/test/scenario/call_client.cc @@ -11,7 +11,7 @@ #include -#include "absl/memory/memory.h" +#include #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 CreateEventLog( TaskQueueFactory* task_queue_factory, LogWriterFactoryInterface* log_writer_factory) { if (!log_writer_factory) { - return absl::make_unique(); + return std::make_unique(); } auto event_log = RtcEventLogFactory(task_queue_factory) .CreateRtcEventLog(RtcEventLog::EncodingType::NewFormat); @@ -185,8 +185,8 @@ NetworkControlUpdate LoggingNetworkControllerFactory::GetUpdate() const { std::unique_ptr LoggingNetworkControllerFactory::Create(NetworkControllerConfig config) { - auto controller = absl::make_unique( - cc_factory_->Create(config)); + auto controller = + std::make_unique(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(clock_, call_.get()); + transport_ = std::make_unique(clock_, call_.get()); }); } diff --git a/test/scenario/network_node.cc b/test/scenario/network_node.cc index 650e26d4ad..b936fcb60d 100644 --- a/test/scenario/network_node.cc +++ b/test/scenario/network_node.cc @@ -12,7 +12,7 @@ #include #include -#include "absl/memory/memory.h" +#include #include "rtc_base/numerics/safe_minmax.h" namespace webrtc { @@ -41,7 +41,7 @@ SimulationNode::SimulationNode(NetworkSimulationConfig config, std::unique_ptr SimulationNode::CreateBehavior( NetworkSimulationConfig config) { SimulatedNetwork::Config sim_config = CreateSimulationConfig(config); - return absl::make_unique(sim_config); + return std::make_unique(sim_config); } void SimulationNode::UpdateConfig( diff --git a/test/scenario/scenario.cc b/test/scenario/scenario.cc index e4551db280..605d0e22cc 100644 --- a/test/scenario/scenario.cc +++ b/test/scenario/scenario.cc @@ -10,10 +10,10 @@ #include "test/scenario/scenario.h" #include +#include #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 GetScenarioLogManager( auto base_filename = output_root + file_name + "."; RTC_LOG(LS_INFO) << "Saving scenario logs to: " << base_filename; - return absl::make_unique(base_filename); + return std::make_unique(base_filename); } return nullptr; } std::unique_ptr CreateTimeController(bool real_time) { if (real_time) { - return absl::make_unique(); + return std::make_unique(); } else { - return absl::make_unique( - kSimulatedStartTime); + return std::make_unique(kSimulatedStartTime); } } } // namespace diff --git a/test/scenario/scenario.h b/test/scenario/scenario.h index fc4fcedb10..33cf029715 100644 --- a/test/scenario/scenario.h +++ b/test/scenario/scenario.h @@ -14,7 +14,6 @@ #include #include -#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( + return std::make_unique( log_writer_factory_.get(), name); } diff --git a/test/scenario/video_stream.cc b/test/scenario/video_stream.cc index a466162d27..b086a33f24 100644 --- a/test/scenario/video_stream.cc +++ b/test/scenario/video_stream.cc @@ -10,9 +10,9 @@ #include "test/scenario/video_stream.h" #include +#include #include -#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( + video_capturer_ = std::make_unique( 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([this]() { + std::make_unique([this]() { rtc::CritScope cs(&crit_); std::unique_ptr encoder; if (config_.encoder.codec == Codec::kVideoCodecVP8) { - encoder = - absl::make_unique(sender_->clock_); + encoder = std::make_unique(sender_->clock_); } else if (config_.encoder.codec == Codec::kVideoCodecGeneric) { - encoder = absl::make_unique(sender_->clock_); + encoder = std::make_unique(sender_->clock_); } else { RTC_NOTREACHED(); } @@ -412,7 +411,7 @@ SendVideoStream::SendVideoStream(CallClient* sender, } if (matcher->Active()) { - frame_tap_ = absl::make_unique( + frame_tap_ = std::make_unique( 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( - []() { return absl::make_unique(); }); + decoder_factory_ = std::make_unique( + []() { return std::make_unique(); }); } else { - decoder_factory_ = absl::make_unique(); + decoder_factory_ = std::make_unique(); } VideoReceiveStream::Decoder decoder = @@ -530,7 +529,7 @@ ReceiveVideoStream::ReceiveVideoStream(CallClient* receiver, rtc::VideoSinkInterface* renderer = &fake_renderer_; if (matcher->Active()) { render_taps_.emplace_back( - absl::make_unique(receiver_->clock_, matcher, i)); + std::make_unique(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 ed4feef536..24b9038ede 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 #include -#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(id, earliest_exec_time, task)); + tasks_.insert(it, std::make_unique(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 81eb4700cc..b945bc0d98 100644 --- a/test/single_threaded_task_queue_unittest.cc +++ b/test/single_threaded_task_queue_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "rtc_base/event.h" #include "test/gtest.h" @@ -61,7 +60,7 @@ TEST(DEPRECATED_SingleThreadedTaskQueueForTestingTest, std::vector> done_events; for (size_t i = 0; i < kCount; i++) { - done_events.emplace_back(absl::make_unique()); + done_events.emplace_back(std::make_unique()); } // 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( + std::make_unique( "task_queue"); std::atomic counter(0); diff --git a/test/test_main_lib.cc b/test/test_main_lib.cc index c9b45c6b42..bb41e6530f 100644 --- a/test/test_main_lib.cc +++ b/test/test_main_lib.cc @@ -11,11 +11,11 @@ #include "test/test_main_lib.h" #include +#include #include #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(); + winsock_init_ = std::make_unique(); #endif // Initialize SSL which are used by several tests. @@ -214,7 +214,7 @@ class TestMainImpl : public TestMain { } // namespace std::unique_ptr TestMain::Create() { - return absl::make_unique(); + return std::make_unique(); } } // namespace webrtc diff --git a/test/testsupport/copy_to_file_audio_capturer.cc b/test/testsupport/copy_to_file_audio_capturer.cc index 3c19da466a..6de8e7fd99 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 #include -#include "absl/memory/memory.h" - namespace webrtc { namespace test { @@ -21,9 +20,9 @@ CopyToFileAudioCapturer::CopyToFileAudioCapturer( std::unique_ptr delegate, std::string stream_dump_file_name) : delegate_(std::move(delegate)), - wav_writer_(absl::make_unique(std::move(stream_dump_file_name), - delegate_->SamplingFrequency(), - delegate_->NumChannels())) {} + wav_writer_(std::make_unique(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 6a4e194ea5..b82091aa6a 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 #include -#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 delegate = TestAudioDeviceModule::CreatePulsedNoiseCapturer(32000, 48000); - capturer_ = absl::make_unique(std::move(delegate), - temp_filename_); + capturer_ = std::make_unique(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 311f74ad40..c36ebdeed7 100644 --- a/test/testsupport/video_frame_writer.cc +++ b/test/testsupport/video_frame_writer.cc @@ -13,9 +13,9 @@ #include #include #include +#include #include -#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(std::move(output_file_name), - width_, - height_, - fps)) { + std::make_unique(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(std::move(output_file_name), - width_, - height_)) { + std::make_unique(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 c712a6e108..ea1afaa78b 100644 --- a/test/testsupport/video_frame_writer_unittest.cc +++ b/test/testsupport/video_frame_writer_unittest.cc @@ -17,7 +17,6 @@ #include #include -#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 CreateFrameWriter() override { - return absl::make_unique( + return std::make_unique( temp_filename_, kFrameWidth, kFrameHeight, kFrameRate); } }; @@ -118,8 +117,8 @@ class Y4mVideoFrameWriterTest : public VideoFrameWriterTest { class YuvVideoFrameWriterTest : public VideoFrameWriterTest { protected: std::unique_ptr CreateFrameWriter() override { - return absl::make_unique( - temp_filename_, kFrameWidth, kFrameHeight); + return std::make_unique(temp_filename_, + kFrameWidth, kFrameHeight); } }; @@ -140,8 +139,8 @@ TEST_F(Y4mVideoFrameWriterTest, WriteFrame) { GetFileSize(temp_filename_)); std::unique_ptr frame_reader = - absl::make_unique(temp_filename_, kFrameWidth, - kFrameHeight); + std::make_unique(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 frame_reader = - absl::make_unique(temp_filename_, kFrameWidth, - kFrameHeight); + std::make_unique(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 252dca956b..aa12477f0b 100644 --- a/test/time_controller/BUILD.gn +++ b/test/time_controller/BUILD.gn @@ -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", ] } } diff --git a/test/time_controller/simulated_time_controller.cc b/test/time_controller/simulated_time_controller.cc index 5e163cb6ab..05f86b4e97 100644 --- a/test/time_controller/simulated_time_controller.cc +++ b/test/time_controller/simulated_time_controller.cc @@ -13,11 +13,11 @@ #include #include #include +#include #include #include #include -#include "absl/memory/memory.h" #include "absl/strings/string_view.h" namespace webrtc { @@ -307,7 +307,7 @@ std::unique_ptr SimulatedTimeControllerImpl::CreateProcessThread( const char* thread_name) { rtc::CritScope lock(&lock_); auto process_thread = - absl::make_unique(this, thread_name); + std::make_unique(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 15155c14d0..7ff4288d2d 100644 --- a/test/time_controller/simulated_time_controller_unittest.cc +++ b/test/time_controller/simulated_time_controller_unittest.cc @@ -13,7 +13,6 @@ #include #include -#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(); + auto object = std::make_unique(); // 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 b58c399a86..7e0fcdb12a 100644 --- a/test/video_decoder_proxy_factory.h +++ b/test/video_decoder_proxy_factory.h @@ -14,7 +14,6 @@ #include #include -#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 CreateVideoDecoder( const SdpVideoFormat& format) override { - return absl::make_unique(decoder_); + return std::make_unique(decoder_); } private: diff --git a/test/video_encoder_proxy_factory.h b/test/video_encoder_proxy_factory.h index ac19e5238a..d56091105c 100644 --- a/test/video_encoder_proxy_factory.h +++ b/test/video_encoder_proxy_factory.h @@ -14,7 +14,6 @@ #include #include -#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(encoder_, this); + return std::make_unique(encoder_, this); } void SetIsHardwareAccelerated(bool is_hardware_accelerated) { diff --git a/video/BUILD.gn b/video/BUILD.gn index 09ea987ae5..48d67f7d67 100644 --- a/video/BUILD.gn +++ b/video/BUILD.gn @@ -147,7 +147,6 @@ rtc_source_set("video_stream_decoder_impl") { "../rtc_base:rtc_base_approved", "../rtc_base:rtc_task_queue", "../system_wrappers", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -169,7 +168,6 @@ rtc_source_set("frame_dumping_decoder") { "../modules/video_coding:video_coding_utility", "../rtc_base:rtc_base_approved", "../rtc_base/system:file_wrapper", - "//third_party/abseil-cpp/absl/memory", ] } @@ -229,7 +227,6 @@ rtc_source_set("video_stream_encoder_impl") { "../system_wrappers", "../system_wrappers:field_trial", "//third_party/abseil-cpp/absl/algorithm:container", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -310,7 +307,6 @@ if (rtc_include_tests) { "//third_party/abseil-cpp/absl/algorithm:container", "//third_party/abseil-cpp/absl/flags:flag", "//third_party/abseil-cpp/absl/flags:parse", - "//third_party/abseil-cpp/absl/memory", ] if (is_mac || is_ios) { @@ -342,7 +338,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", ] } @@ -366,7 +361,6 @@ if (rtc_include_tests) { "../test:fileutils", "../test:test_support", "../test/pc/e2e:network_quality_metrics_reporter", - "//third_party/abseil-cpp/absl/memory", ] } @@ -394,7 +388,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", ] } @@ -445,7 +438,6 @@ if (rtc_include_tests) { "../test:test_support", "//third_party/abseil-cpp/absl/flags:flag", "//third_party/abseil-cpp/absl/flags:parse", - "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -474,7 +466,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", ] } @@ -510,7 +501,6 @@ if (rtc_include_tests) { "../test:video_test_support", "//third_party/abseil-cpp/absl/flags:flag", "//third_party/abseil-cpp/absl/flags:parse", - "//third_party/abseil-cpp/absl/memory", ] } diff --git a/video/buffered_frame_decryptor_unittest.cc b/video/buffered_frame_decryptor_unittest.cc index f65261901d..effd8282de 100644 --- a/video/buffered_frame_decryptor_unittest.cc +++ b/video/buffered_frame_decryptor_unittest.cc @@ -14,7 +14,6 @@ #include #include -#include "absl/memory/memory.h" #include "api/test/mock_frame_decryptor.h" #include "modules/video_coding/packet_buffer.h" #include "rtc_base/ref_counted_object.h" @@ -115,7 +114,7 @@ class BufferedFrameDecryptorTest seq_num_ = 0; mock_frame_decryptor_ = new rtc::RefCountedObject(); buffered_frame_decryptor_ = - absl::make_unique(this, this); + std::make_unique(this, this); buffered_frame_decryptor_->SetFrameDecryptor(mock_frame_decryptor_.get()); } diff --git a/video/encoder_bitrate_adjuster.cc b/video/encoder_bitrate_adjuster.cc index 34921282a9..5fa7434acd 100644 --- a/video/encoder_bitrate_adjuster.cc +++ b/video/encoder_bitrate_adjuster.cc @@ -11,9 +11,9 @@ #include "video/encoder_bitrate_adjuster.h" #include +#include #include -#include "absl/memory/memory.h" #include "rtc_base/experiments/rate_control_settings.h" #include "rtc_base/logging.h" #include "rtc_base/time_utils.h" @@ -87,7 +87,7 @@ VideoBitrateAllocation EncoderBitrateAdjuster::AdjustRateAllocation( ++active_tls_[si]; if (!overshoot_detectors_[si][ti]) { overshoot_detectors_[si][ti] = - absl::make_unique(kWindowSizeMs); + std::make_unique(kWindowSizeMs); frames_since_layout_change_ = 0; } } else if (overshoot_detectors_[si][ti]) { diff --git a/video/encoder_bitrate_adjuster_unittest.cc b/video/encoder_bitrate_adjuster_unittest.cc index 7caf123172..b7cdfd35f2 100644 --- a/video/encoder_bitrate_adjuster_unittest.cc +++ b/video/encoder_bitrate_adjuster_unittest.cc @@ -10,9 +10,9 @@ #include "video/encoder_bitrate_adjuster.h" +#include #include -#include "absl/memory/memory.h" #include "api/units/data_rate.h" #include "rtc_base/fake_clock.h" #include "rtc_base/numerics/safe_conversions.h" @@ -80,7 +80,7 @@ class EncoderBitrateAdjusterTest : public ::testing::Test { } } - adjuster_ = absl::make_unique(codec_); + adjuster_ = std::make_unique(codec_); adjuster_->OnEncoderInfo(encoder_info_); current_adjusted_allocation_ = adjuster_->AdjustRateAllocation(VideoEncoder::RateControlParameters( diff --git a/video/end_to_end_tests/bandwidth_tests.cc b/video/end_to_end_tests/bandwidth_tests.cc index ecdc0e9074..b56ac7913b 100644 --- a/video/end_to_end_tests/bandwidth_tests.cc +++ b/video/end_to_end_tests/bandwidth_tests.cc @@ -8,7 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "api/test/simulated_network.h" #include "api/video/builtin_video_bitrate_allocator_factory.h" #include "api/video/video_bitrate_allocation.h" @@ -175,8 +176,8 @@ TEST_F(BandwidthEndToEndTest, RembWithSendSideBwe) { receive_transport_ = new test::PacketTransport( task_queue, nullptr, this, test::PacketTransport::kReceiver, payload_type_map_, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( + std::make_unique( + Clock::GetRealTimeClock(), std::make_unique( BuiltInNetworkBehaviorConfig()))); return receive_transport_; } diff --git a/video/end_to_end_tests/call_operation_tests.cc b/video/end_to_end_tests/call_operation_tests.cc index ad200d4e81..85cbaa8b48 100644 --- a/video/end_to_end_tests/call_operation_tests.cc +++ b/video/end_to_end_tests/call_operation_tests.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include #include "api/test/simulated_network.h" #include "call/fake_network_pipe.h" #include "call/simulated_network.h" @@ -97,17 +97,17 @@ TEST_F(CallOperationEndToEndTest, RendersSingleDelayedFrame) { &receiver_transport]() { CreateCalls(); - sender_transport = absl::make_unique( + sender_transport = std::make_unique( &task_queue_, - absl::make_unique(Clock::GetRealTimeClock(), - absl::make_unique( - BuiltInNetworkBehaviorConfig())), + std::make_unique( + Clock::GetRealTimeClock(), + std::make_unique(BuiltInNetworkBehaviorConfig())), sender_call_.get(), payload_type_map_); - receiver_transport = absl::make_unique( + receiver_transport = std::make_unique( &task_queue_, - absl::make_unique(Clock::GetRealTimeClock(), - absl::make_unique( - BuiltInNetworkBehaviorConfig())), + std::make_unique( + Clock::GetRealTimeClock(), + std::make_unique(BuiltInNetworkBehaviorConfig())), receiver_call_.get(), payload_type_map_); sender_transport->SetReceiver(receiver_call_->Receiver()); receiver_transport->SetReceiver(sender_call_->Receiver()); @@ -163,17 +163,17 @@ TEST_F(CallOperationEndToEndTest, TransmitsFirstFrame) { &sender_transport, &receiver_transport]() { CreateCalls(); - sender_transport = absl::make_unique( + sender_transport = std::make_unique( &task_queue_, - absl::make_unique(Clock::GetRealTimeClock(), - absl::make_unique( - BuiltInNetworkBehaviorConfig())), + std::make_unique( + Clock::GetRealTimeClock(), + std::make_unique(BuiltInNetworkBehaviorConfig())), sender_call_.get(), payload_type_map_); - receiver_transport = absl::make_unique( + receiver_transport = std::make_unique( &task_queue_, - absl::make_unique(Clock::GetRealTimeClock(), - absl::make_unique( - BuiltInNetworkBehaviorConfig())), + std::make_unique( + Clock::GetRealTimeClock(), + std::make_unique(BuiltInNetworkBehaviorConfig())), receiver_call_.get(), payload_type_map_); sender_transport->SetReceiver(receiver_call_->Receiver()); receiver_transport->SetReceiver(sender_call_->Receiver()); diff --git a/video/end_to_end_tests/codec_tests.cc b/video/end_to_end_tests/codec_tests.cc index 4149bef79b..b73b289ec8 100644 --- a/video/end_to_end_tests/codec_tests.cc +++ b/video/end_to_end_tests/codec_tests.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include #include "absl/types/optional.h" #include "api/test/video/function_video_encoder_factory.h" #include "api/video/color_space.h" @@ -197,12 +197,12 @@ TEST_P(CodecEndToEndTest, SendsAndReceivesMultiplex) { InternalDecoderFactory internal_decoder_factory; test::FunctionVideoEncoderFactory encoder_factory( [&internal_encoder_factory]() { - return absl::make_unique( + return std::make_unique( &internal_encoder_factory, SdpVideoFormat(cricket::kVp9CodecName)); }); test::FunctionVideoDecoderFactory decoder_factory( [&internal_decoder_factory]() { - return absl::make_unique( + return std::make_unique( &internal_decoder_factory, SdpVideoFormat(cricket::kVp9CodecName)); }); @@ -216,12 +216,12 @@ TEST_P(CodecEndToEndTest, SendsAndReceivesMultiplexVideoRotation90) { InternalDecoderFactory internal_decoder_factory; test::FunctionVideoEncoderFactory encoder_factory( [&internal_encoder_factory]() { - return absl::make_unique( + return std::make_unique( &internal_encoder_factory, SdpVideoFormat(cricket::kVp9CodecName)); }); test::FunctionVideoDecoderFactory decoder_factory( [&internal_decoder_factory]() { - return absl::make_unique( + return std::make_unique( &internal_decoder_factory, SdpVideoFormat(cricket::kVp9CodecName)); }); CodecObserver test(5, kVideoRotation_90, absl::nullopt, "multiplex", diff --git a/video/end_to_end_tests/extended_reports_tests.cc b/video/end_to_end_tests/extended_reports_tests.cc index 2b3b75d070..bdaa492ffa 100644 --- a/video/end_to_end_tests/extended_reports_tests.cc +++ b/video/end_to_end_tests/extended_reports_tests.cc @@ -16,7 +16,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/rtp_headers.h" #include "api/test/simulated_network.h" @@ -163,13 +162,13 @@ class RtcpXrObserver : public test::EndToEndTest { test::DEPRECATED_SingleThreadedTaskQueueForTesting* task_queue, Call* sender_call) { auto network = - absl::make_unique(forward_transport_config_); + std::make_unique(forward_transport_config_); send_simulated_network_ = network.get(); return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, test::CallTest::payload_type_map_, - absl::make_unique(Clock::GetRealTimeClock(), - std::move(network))); + std::make_unique(Clock::GetRealTimeClock(), + std::move(network))); } void ModifyVideoConfigs( diff --git a/video/end_to_end_tests/fec_tests.cc b/video/end_to_end_tests/fec_tests.cc index de666eecfa..e08fc88ef4 100644 --- a/video/end_to_end_tests/fec_tests.cc +++ b/video/end_to_end_tests/fec_tests.cc @@ -8,7 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "api/test/simulated_network.h" #include "api/test/video/function_video_encoder_factory.h" #include "call/fake_network_pipe.h" @@ -255,9 +256,9 @@ class FlexfecRenderObserver : public test::EndToEndTest, return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, test::CallTest::payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(config))); + std::make_unique(config))); } void OnFrame(const VideoFrame& video_frame) override { @@ -441,9 +442,9 @@ TEST_F(FecEndToEndTest, ReceivedUlpfecPacketsNotNacked) { return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(config))); + std::make_unique(config))); } // TODO(holmer): Investigate why we don't send FEC packets when the bitrate diff --git a/video/end_to_end_tests/multi_codec_receive_tests.cc b/video/end_to_end_tests/multi_codec_receive_tests.cc index bbb22187b0..94cea628e6 100644 --- a/video/end_to_end_tests/multi_codec_receive_tests.cc +++ b/video/end_to_end_tests/multi_codec_receive_tests.cc @@ -8,7 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "api/test/simulated_network.h" #include "api/test/video/function_video_encoder_factory.h" #include "call/fake_network_pipe.h" @@ -131,16 +132,16 @@ class MultiCodecReceiveTest : public test::CallTest { send_transport_.reset(new test::PacketTransport( &task_queue_, sender_call_.get(), &observer_, test::PacketTransport::kSender, kPayloadTypeMap, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( + std::make_unique( + Clock::GetRealTimeClock(), std::make_unique( BuiltInNetworkBehaviorConfig())))); send_transport_->SetReceiver(receiver_call_->Receiver()); receive_transport_.reset(new test::PacketTransport( &task_queue_, receiver_call_.get(), &observer_, test::PacketTransport::kReceiver, kPayloadTypeMap, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( + std::make_unique( + Clock::GetRealTimeClock(), std::make_unique( BuiltInNetworkBehaviorConfig())))); receive_transport_->SetReceiver(sender_call_->Receiver()); }); diff --git a/video/end_to_end_tests/multi_stream_tester.cc b/video/end_to_end_tests/multi_stream_tester.cc index fad6688f2e..97b0cb9ffa 100644 --- a/video/end_to_end_tests/multi_stream_tester.cc +++ b/video/end_to_end_tests/multi_stream_tester.cc @@ -156,9 +156,9 @@ test::DirectTransport* MultiStreamTester::CreateSendTransport( Call* sender_call) { return new test::DirectTransport( task_queue, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(BuiltInNetworkBehaviorConfig())), + std::make_unique(BuiltInNetworkBehaviorConfig())), sender_call, payload_type_map_); } @@ -167,9 +167,9 @@ test::DirectTransport* MultiStreamTester::CreateReceiveTransport( Call* receiver_call) { return new test::DirectTransport( task_queue, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(BuiltInNetworkBehaviorConfig())), + std::make_unique(BuiltInNetworkBehaviorConfig())), receiver_call, payload_type_map_); } } // namespace webrtc diff --git a/video/end_to_end_tests/network_state_tests.cc b/video/end_to_end_tests/network_state_tests.cc index f7cbd9313c..df7c98049f 100644 --- a/video/end_to_end_tests/network_state_tests.cc +++ b/video/end_to_end_tests/network_state_tests.cc @@ -8,7 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "api/test/simulated_network.h" #include "api/video_codecs/video_encoder.h" #include "call/fake_network_pipe.h" @@ -118,11 +119,11 @@ void NetworkStateEndToEndTest::VerifyNewVideoReceiveStreamsRespectNetworkState( transport]() { CreateCalls(); receiver_call_->SignalChannelNetworkState(network_to_bring_up, kNetworkUp); - sender_transport = absl::make_unique( + sender_transport = std::make_unique( &task_queue_, - absl::make_unique(Clock::GetRealTimeClock(), - absl::make_unique( - BuiltInNetworkBehaviorConfig())), + std::make_unique( + Clock::GetRealTimeClock(), + std::make_unique(BuiltInNetworkBehaviorConfig())), sender_call_.get(), payload_type_map_); sender_transport->SetReceiver(receiver_call_->Receiver()); CreateSendConfig(1, 0, 0, sender_transport.get()); diff --git a/video/end_to_end_tests/probing_tests.cc b/video/end_to_end_tests/probing_tests.cc index b92ce6b1e3..402db913a4 100644 --- a/video/end_to_end_tests/probing_tests.cc +++ b/video/end_to_end_tests/probing_tests.cc @@ -8,7 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "api/test/simulated_network.h" #include "call/fake_network_pipe.h" #include "call/simulated_network.h" @@ -223,13 +224,13 @@ TEST_F(ProbingEndToEndTest, ProbeOnVideoEncoderReconfiguration) { test::DEPRECATED_SingleThreadedTaskQueueForTesting* task_queue, Call* sender_call) override { auto network = - absl::make_unique(BuiltInNetworkBehaviorConfig()); + std::make_unique(BuiltInNetworkBehaviorConfig()); send_simulated_network_ = network.get(); return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, CallTest::payload_type_map_, - absl::make_unique(Clock::GetRealTimeClock(), - std::move(network))); + std::make_unique(Clock::GetRealTimeClock(), + std::move(network))); } void PerformTest() override { diff --git a/video/end_to_end_tests/retransmission_tests.cc b/video/end_to_end_tests/retransmission_tests.cc index abf2f3440e..a75b9eb7f8 100644 --- a/video/end_to_end_tests/retransmission_tests.cc +++ b/video/end_to_end_tests/retransmission_tests.cc @@ -8,8 +8,9 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include + #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/test/simulated_network.h" #include "api/test/video/function_video_encoder_factory.h" #include "call/fake_network_pipe.h" @@ -142,8 +143,8 @@ TEST_F(RetransmissionEndToEndTest, ReceivesNackAndRetransmitsAudio) { test::PacketTransport* receive_transport = new test::PacketTransport( task_queue, nullptr, this, test::PacketTransport::kReceiver, payload_type_map_, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( + std::make_unique( + Clock::GetRealTimeClock(), std::make_unique( BuiltInNetworkBehaviorConfig()))); receive_transport_ = receive_transport; return receive_transport; diff --git a/video/end_to_end_tests/rtp_rtcp_tests.cc b/video/end_to_end_tests/rtp_rtcp_tests.cc index d89a02464e..a22badae93 100644 --- a/video/end_to_end_tests/rtp_rtcp_tests.cc +++ b/video/end_to_end_tests/rtp_rtcp_tests.cc @@ -8,7 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "api/test/simulated_network.h" #include "call/fake_network_pipe.h" #include "call/simulated_network.h" @@ -283,18 +284,18 @@ void RtpRtcpEndToEndTest::TestRtpStatePreservation( &one_stream, use_rtx]() { CreateCalls(); - send_transport = absl::make_unique( + send_transport = std::make_unique( &task_queue_, sender_call_.get(), &observer, test::PacketTransport::kSender, payload_type_map_, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( - BuiltInNetworkBehaviorConfig()))); - receive_transport = absl::make_unique( + std::make_unique(Clock::GetRealTimeClock(), + std::make_unique( + BuiltInNetworkBehaviorConfig()))); + receive_transport = std::make_unique( &task_queue_, nullptr, &observer, test::PacketTransport::kReceiver, payload_type_map_, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( - BuiltInNetworkBehaviorConfig()))); + std::make_unique(Clock::GetRealTimeClock(), + std::make_unique( + BuiltInNetworkBehaviorConfig()))); send_transport->SetReceiver(receiver_call_->Receiver()); receive_transport->SetReceiver(sender_call_->Receiver()); @@ -482,21 +483,21 @@ TEST_F(RtpRtcpEndToEndTest, DISABLED_TestFlexfecRtpStatePreservation) { lossy_delayed_link.loss_percent = 2; lossy_delayed_link.queue_delay_ms = 50; - send_transport = absl::make_unique( + send_transport = std::make_unique( &task_queue_, sender_call_.get(), &observer, test::PacketTransport::kSender, payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(lossy_delayed_link))); + std::make_unique(lossy_delayed_link))); send_transport->SetReceiver(receiver_call_->Receiver()); BuiltInNetworkBehaviorConfig flawless_link; - receive_transport = absl::make_unique( + receive_transport = std::make_unique( &task_queue_, nullptr, &observer, test::PacketTransport::kReceiver, payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(flawless_link))); + std::make_unique(flawless_link))); receive_transport->SetReceiver(sender_call_->Receiver()); // For reduced flakyness, we use a real VP8 encoder together with NACK diff --git a/video/end_to_end_tests/ssrc_tests.cc b/video/end_to_end_tests/ssrc_tests.cc index 4d81a57e5d..07fafe6aed 100644 --- a/video/end_to_end_tests/ssrc_tests.cc +++ b/video/end_to_end_tests/ssrc_tests.cc @@ -8,7 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "api/test/simulated_network.h" #include "call/fake_network_pipe.h" #include "call/simulated_network.h" @@ -81,20 +82,20 @@ TEST_F(SsrcEndToEndTest, UnknownRtpPacketGivesUnknownSsrcReturnCode) { [this, &send_transport, &receive_transport, &input_observer]() { CreateCalls(); - send_transport = absl::make_unique( + send_transport = std::make_unique( &task_queue_, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( + std::make_unique( + Clock::GetRealTimeClock(), std::make_unique( BuiltInNetworkBehaviorConfig())), sender_call_.get(), payload_type_map_); - receive_transport = absl::make_unique( + receive_transport = std::make_unique( &task_queue_, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( + std::make_unique( + Clock::GetRealTimeClock(), std::make_unique( BuiltInNetworkBehaviorConfig())), receiver_call_.get(), payload_type_map_); input_observer = - absl::make_unique(receiver_call_->Receiver()); + std::make_unique(receiver_call_->Receiver()); send_transport->SetReceiver(input_observer.get()); receive_transport->SetReceiver(sender_call_->Receiver()); diff --git a/video/end_to_end_tests/stats_tests.cc b/video/end_to_end_tests/stats_tests.cc index 56acb96a4b..2a8d903ab2 100644 --- a/video/end_to_end_tests/stats_tests.cc +++ b/video/end_to_end_tests/stats_tests.cc @@ -8,8 +8,9 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include + #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/test/simulated_network.h" #include "api/test/video/function_video_encoder_factory.h" #include "call/fake_network_pipe.h" @@ -56,7 +57,7 @@ TEST_F(StatsEndToEndTest, GetStats) { StatsObserver() : EndToEndTest(kLongTimeoutMs), encoder_factory_([]() { - return absl::make_unique( + return std::make_unique( Clock::GetRealTimeClock(), 10); }), send_stream_(nullptr), @@ -239,9 +240,9 @@ TEST_F(StatsEndToEndTest, GetStats) { return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(network_config))); + std::make_unique(network_config))); } void ModifySenderBitrateConfig( BitrateConstraints* bitrate_config) override { @@ -719,18 +720,18 @@ TEST_F(StatsEndToEndTest, CallReportsRttForSender) { BuiltInNetworkBehaviorConfig config; config.queue_delay_ms = kSendDelayMs; CreateCalls(); - sender_transport = absl::make_unique( + sender_transport = std::make_unique( &task_queue_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(config)), + std::make_unique(config)), sender_call_.get(), payload_type_map_); config.queue_delay_ms = kReceiveDelayMs; - receiver_transport = absl::make_unique( + receiver_transport = std::make_unique( &task_queue_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(config)), + std::make_unique(config)), receiver_call_.get(), payload_type_map_); sender_transport->SetReceiver(receiver_call_->Receiver()); receiver_transport->SetReceiver(sender_call_->Receiver()); diff --git a/video/end_to_end_tests/transport_feedback_tests.cc b/video/end_to_end_tests/transport_feedback_tests.cc index c49f02eda2..1cefb167c1 100644 --- a/video/end_to_end_tests/transport_feedback_tests.cc +++ b/video/end_to_end_tests/transport_feedback_tests.cc @@ -8,7 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "call/call.h" #include "call/fake_network_pipe.h" #include "call/simulated_network.h" @@ -44,9 +45,9 @@ TEST_F(TransportFeedbackEndToEndTest, AssignsTransportSequenceNumbers) { const std::map& ssrc_map, const std::map& payload_type_map) : DirectTransport(task_queue, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique( + std::make_unique( BuiltInNetworkBehaviorConfig())), sender_call, payload_type_map), diff --git a/video/frame_dumping_decoder.cc b/video/frame_dumping_decoder.cc index 31d024cf99..4ccb333081 100644 --- a/video/frame_dumping_decoder.cc +++ b/video/frame_dumping_decoder.cc @@ -10,9 +10,9 @@ #include "video/frame_dumping_decoder.h" +#include #include -#include "absl/memory/memory.h" #include "modules/video_coding/include/video_codec_interface.h" #include "modules/video_coding/utility/ivf_file_writer.h" @@ -86,8 +86,8 @@ const char* FrameDumpingDecoder::ImplementationName() const { std::unique_ptr CreateFrameDumpingDecoderWrapper( std::unique_ptr decoder, FileWrapper file) { - return absl::make_unique(std::move(decoder), - std::move(file)); + return std::make_unique(std::move(decoder), + std::move(file)); } } // namespace webrtc diff --git a/video/frame_encode_metadata_writer.cc b/video/frame_encode_metadata_writer.cc index 4ed90dbcb1..a0a16c2b4e 100644 --- a/video/frame_encode_metadata_writer.cc +++ b/video/frame_encode_metadata_writer.cc @@ -11,9 +11,9 @@ #include "video/frame_encode_metadata_writer.h" #include +#include #include -#include "absl/memory/memory.h" #include "common_video/h264/sps_vui_rewriter.h" #include "modules/include/module_common_types_public.h" #include "modules/video_coding/include/video_coding_defines.h" @@ -217,7 +217,7 @@ FrameEncodeMetadataWriter::UpdateBitstream( rtc::Buffer modified_buffer; std::unique_ptr modified_fragmentation = - absl::make_unique(); + std::make_unique(); modified_fragmentation->CopyFrom(*fragmentation); // Make sure that the data is not copied if owned by EncodedImage. diff --git a/video/full_stack_tests.cc b/video/full_stack_tests.cc index 07d1510734..823137b973 100644 --- a/video/full_stack_tests.cc +++ b/video/full_stack_tests.cc @@ -14,7 +14,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/test/simulated_network.h" #include "api/test/test_dependency_factory.h" @@ -68,7 +67,7 @@ CreateVideoQualityTestFixture() { // The components will normally be nullptr (= use defaults), but it's possible // for external test runners to override the list of injected components. auto components = TestDependencyFactory::GetInstance().CreateComponents(); - return absl::make_unique(std::move(components)); + return std::make_unique(std::move(components)); } // Takes the current active field trials set, and appends some new trials. diff --git a/video/overuse_frame_detector.cc b/video/overuse_frame_detector.cc index 182ff54fbf..429dbc4f32 100644 --- a/video/overuse_frame_detector.cc +++ b/video/overuse_frame_detector.cc @@ -16,10 +16,10 @@ #include #include #include +#include #include #include -#include "absl/memory/memory.h" #include "api/video/video_frame.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" @@ -487,9 +487,9 @@ std::unique_ptr OveruseFrameDetector::CreateProcessingUsage(const CpuOveruseOptions& options) { std::unique_ptr instance; if (options.filter_time_ms > 0) { - instance = absl::make_unique(options); + instance = std::make_unique(options); } else { - instance = absl::make_unique(options); + instance = std::make_unique(options); } std::string toggling_interval = field_trial::FindFullName("WebRTC-ForceSimulatedOveruseIntervalMs"); @@ -501,7 +501,7 @@ OveruseFrameDetector::CreateProcessingUsage(const CpuOveruseOptions& options) { &overuse_period_ms, &underuse_period_ms) == 3) { if (normal_period_ms > 0 && overuse_period_ms > 0 && underuse_period_ms > 0) { - instance = absl::make_unique( + instance = std::make_unique( std::move(instance), normal_period_ms, overuse_period_ms, underuse_period_ms); } else { diff --git a/video/overuse_frame_detector_unittest.cc b/video/overuse_frame_detector_unittest.cc index 3a1c97c3a9..fac56b9d1d 100644 --- a/video/overuse_frame_detector_unittest.cc +++ b/video/overuse_frame_detector_unittest.cc @@ -12,7 +12,6 @@ #include -#include "absl/memory/memory.h" #include "api/video/encoded_image.h" #include "api/video/i420_buffer.h" #include "modules/video_coding/utility/quality_scaler.h" @@ -77,7 +76,7 @@ class OveruseFrameDetectorTest : public ::testing::Test, void SetUp() override { observer_ = &mock_observer_; options_.min_process_count = 0; - overuse_detector_ = absl::make_unique(this); + overuse_detector_ = std::make_unique(this); // Unfortunately, we can't call SetOptions here, since that would break // single-threading requirements in the RunOnTqNormalUsage test. } diff --git a/video/pc_full_stack_tests.cc b/video/pc_full_stack_tests.cc index 05348744d8..751eebed72 100644 --- a/video/pc_full_stack_tests.cc +++ b/video/pc_full_stack_tests.cc @@ -12,7 +12,6 @@ #include #include -#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" @@ -53,7 +52,7 @@ EmulatedNetworkNode* CreateEmulatedNodeWithConfig( NetworkEmulationManager* emulation, const BuiltInNetworkBehaviorConfig& config) { return emulation->CreateEmulatedNode( - absl::make_unique(config)); + std::make_unique(config)); } std::pair @@ -88,7 +87,7 @@ CreateTestFixture(const std::string& test_case_name, fixture->AddPeer(network_links.second->network_thread(), network_links.second->network_manager(), bob_configurer); fixture->AddQualityMetricsReporter( - absl::make_unique( + std::make_unique( network_links.first, network_links.second)); return fixture; } diff --git a/video/picture_id_tests.cc b/video/picture_id_tests.cc index c007877627..e76edc92a6 100644 --- a/video/picture_id_tests.cc +++ b/video/picture_id_tests.cc @@ -8,7 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "absl/memory/memory.h" +#include + #include "api/test/simulated_network.h" #include "api/test/video/function_video_encoder_factory.h" #include "call/fake_network_pipe.h" @@ -256,8 +257,8 @@ void PictureIdTest::SetupEncoder(VideoEncoderFactory* encoder_factory, send_transport_.reset(new test::PacketTransport( &task_queue_, sender_call_.get(), observer_.get(), test::PacketTransport::kSender, payload_type_map_, - absl::make_unique( - Clock::GetRealTimeClock(), absl::make_unique( + std::make_unique( + Clock::GetRealTimeClock(), std::make_unique( BuiltInNetworkBehaviorConfig())))); CreateSendConfig(kNumSimulcastStreams, 0, 0, send_transport_.get()); @@ -389,7 +390,7 @@ TEST_P(PictureIdTest, ContinuousAfterReconfigureSimulcastEncoderAdapter) { InternalEncoderFactory internal_encoder_factory; test::FunctionVideoEncoderFactory encoder_factory( [&internal_encoder_factory]() { - return absl::make_unique( + return std::make_unique( &internal_encoder_factory, SdpVideoFormat("VP8")); }); SetupEncoder(&encoder_factory, "VP8"); @@ -400,7 +401,7 @@ TEST_P(PictureIdTest, IncreasingAfterRecreateStreamSimulcastEncoderAdapter) { InternalEncoderFactory internal_encoder_factory; test::FunctionVideoEncoderFactory encoder_factory( [&internal_encoder_factory]() { - return absl::make_unique( + return std::make_unique( &internal_encoder_factory, SdpVideoFormat("VP8")); }); SetupEncoder(&encoder_factory, "VP8"); @@ -411,7 +412,7 @@ TEST_P(PictureIdTest, ContinuousAfterStreamCountChangeSimulcastEncoderAdapter) { InternalEncoderFactory internal_encoder_factory; test::FunctionVideoEncoderFactory encoder_factory( [&internal_encoder_factory]() { - return absl::make_unique( + return std::make_unique( &internal_encoder_factory, SdpVideoFormat("VP8")); }); // Make sure that the picture id is not reset if the stream count goes diff --git a/video/rtp_video_stream_receiver.cc b/video/rtp_video_stream_receiver.cc index 5e076b3d77..9ff089b287 100644 --- a/video/rtp_video_stream_receiver.cc +++ b/video/rtp_video_stream_receiver.cc @@ -232,13 +232,13 @@ RtpVideoStreamReceiver::RtpVideoStreamReceiver( if (config_.rtp.lntf.enabled) { loss_notification_controller_ = - absl::make_unique(&rtcp_feedback_buffer_, - &rtcp_feedback_buffer_); + std::make_unique(&rtcp_feedback_buffer_, + &rtcp_feedback_buffer_); } if (config_.rtp.nack.rtp_history_ms != 0) { - nack_module_ = absl::make_unique(clock_, &rtcp_feedback_buffer_, - &rtcp_feedback_buffer_); + nack_module_ = std::make_unique(clock_, &rtcp_feedback_buffer_, + &rtcp_feedback_buffer_); process_thread_->RegisterModule(nack_module_.get(), RTC_FROM_HERE); } @@ -259,12 +259,12 @@ RtpVideoStreamReceiver::RtpVideoStreamReceiver( packet_buffer_ = video_coding::PacketBuffer::Create( clock_, kPacketBufferStartSize, packet_buffer_max_size, this); reference_finder_ = - absl::make_unique(this); + std::make_unique(this); // Only construct the encrypted receiver if frame encryption is enabled. if (config_.crypto_options.sframe.require_frame_encryption) { buffered_frame_decryptor_ = - absl::make_unique(this, this); + std::make_unique(this, this); if (frame_decryptor != nullptr) { buffered_frame_decryptor_->SetFrameDecryptor(std::move(frame_decryptor)); } @@ -569,7 +569,7 @@ void RtpVideoStreamReceiver::SetFrameDecryptor( RTC_DCHECK_RUN_ON(&network_tc_); if (buffered_frame_decryptor_ == nullptr) { buffered_frame_decryptor_ = - absl::make_unique(this, this); + std::make_unique(this, this); } buffered_frame_decryptor_->SetFrameDecryptor(std::move(frame_decryptor)); } diff --git a/video/rtp_video_stream_receiver_unittest.cc b/video/rtp_video_stream_receiver_unittest.cc index 4cebc4e004..c1850e2a85 100644 --- a/video/rtp_video_stream_receiver_unittest.cc +++ b/video/rtp_video_stream_receiver_unittest.cc @@ -10,7 +10,8 @@ #include "video/rtp_video_stream_receiver.h" -#include "absl/memory/memory.h" +#include + #include "api/video/video_codec_type.h" #include "api/video/video_frame_type.h" #include "common_video/h264/h264_common.h" @@ -116,7 +117,7 @@ constexpr uint16_t kSequenceNumber = 222; std::unique_ptr CreateRtpPacketReceived( uint32_t ssrc = kSsrc, uint16_t sequence_number = kSequenceNumber) { - auto packet = absl::make_unique(); + auto packet = std::make_unique(); packet->SetSsrc(ssrc); packet->SetSequenceNumber(sequence_number); return packet; @@ -140,7 +141,7 @@ class RtpVideoStreamReceiverTest : public ::testing::Test { void SetUp() { rtp_receive_statistics_ = ReceiveStatistics::Create(Clock::GetRealTimeClock()); - rtp_video_stream_receiver_ = absl::make_unique( + rtp_video_stream_receiver_ = std::make_unique( Clock::GetRealTimeClock(), &mock_transport_, nullptr, nullptr, &config_, rtp_receive_statistics_.get(), nullptr, process_thread_.get(), &mock_nack_sender_, &mock_key_frame_request_sender_, diff --git a/video/screenshare_loopback.cc b/video/screenshare_loopback.cc index ed14b30d5f..e5625a9aa2 100644 --- a/video/screenshare_loopback.cc +++ b/video/screenshare_loopback.cc @@ -16,7 +16,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/bitrate_constraints.h" #include "api/test/simulated_network.h" @@ -367,7 +366,7 @@ void Loopback() { ¶ms, 0, stream_descriptors, NumStreams(), SelectedStream(), NumSpatialLayers(), SelectedSL(), InterLayerPred(), SL_descriptors); - auto fixture = absl::make_unique(nullptr); + auto fixture = std::make_unique(nullptr); if (DurationSecs()) { fixture->RunWithAnalyzer(params); } else { diff --git a/video/sv_loopback.cc b/video/sv_loopback.cc index d27e0cc203..c13a958a4b 100644 --- a/video/sv_loopback.cc +++ b/video/sv_loopback.cc @@ -16,7 +16,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/bitrate_constraints.h" #include "api/test/simulated_network.h" @@ -689,7 +688,7 @@ void Loopback() { VideoSelectedStream(), VideoNumSpatialLayers(), VideoSelectedSL(), VideoInterLayerPred(), SL_descriptors); - auto fixture = absl::make_unique(nullptr); + auto fixture = std::make_unique(nullptr); if (DurationSecs()) { fixture->RunWithAnalyzer(params); } else { diff --git a/video/video_loopback.cc b/video/video_loopback.cc index 4270ba96d7..7d6f5358e1 100644 --- a/video/video_loopback.cc +++ b/video/video_loopback.cc @@ -17,7 +17,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/bitrate_constraints.h" #include "api/test/simulated_network.h" @@ -421,7 +420,7 @@ void Loopback() { ¶ms, 0, stream_descriptors, NumStreams(), SelectedStream(), NumSpatialLayers(), SelectedSL(), InterLayerPred(), SL_descriptors); - auto fixture = absl::make_unique(nullptr); + auto fixture = std::make_unique(nullptr); if (DurationSecs()) { fixture->RunWithAnalyzer(params); } else { diff --git a/video/video_quality_test.cc b/video/video_quality_test.cc index 15112542fe..e1927312a3 100644 --- a/video/video_quality_test.cc +++ b/video/video_quality_test.cc @@ -14,10 +14,10 @@ #include #include #include +#include #include #include -#include "absl/memory/memory.h" #include "api/fec_controller_override.h" #include "api/rtc_event_log_output_file.h" #include "api/task_queue/default_task_queue_factory.h" @@ -274,7 +274,7 @@ std::unique_ptr VideoQualityTest::CreateVideoDecoder( const SdpVideoFormat& format) { std::unique_ptr decoder; if (format.name == "multiplex") { - decoder = absl::make_unique( + decoder = std::make_unique( decoder_factory_.get(), SdpVideoFormat(cricket::kVp9CodecName)); } else if (format.name == "FakeCodec") { decoder = webrtc::FakeVideoDecoderFactory::CreateVideoDecoder(); @@ -297,10 +297,10 @@ std::unique_ptr VideoQualityTest::CreateVideoEncoder( VideoAnalyzer* analyzer) { std::unique_ptr encoder; if (format.name == "VP8") { - encoder = absl::make_unique(encoder_factory_.get(), - format); + encoder = + std::make_unique(encoder_factory_.get(), format); } else if (format.name == "multiplex") { - encoder = absl::make_unique( + encoder = std::make_unique( encoder_factory_.get(), SdpVideoFormat(cricket::kVp9CodecName)); } else if (format.name == "FakeCodec") { encoder = webrtc::FakeVideoEncoderFactory::CreateVideoEncoder(); @@ -340,7 +340,7 @@ std::unique_ptr VideoQualityTest::CreateVideoEncoder( } if (analyzer || !encoded_frame_dump_files.empty() || overshoot_factor > 1.0) { - encoder = absl::make_unique( + encoder = std::make_unique( std::move(encoder), analyzer, std::move(encoded_frame_dump_files), overshoot_factor); } @@ -370,17 +370,17 @@ VideoQualityTest::VideoQualityTest( injection_components_(std::move(injection_components)), num_video_streams_(0) { if (injection_components_ == nullptr) { - injection_components_ = absl::make_unique(); + injection_components_ = std::make_unique(); } if (injection_components_->video_decoder_factory != nullptr) { decoder_factory_ = std::move(injection_components_->video_decoder_factory); } else { - decoder_factory_ = absl::make_unique(); + decoder_factory_ = std::make_unique(); } if (injection_components_->video_encoder_factory != nullptr) { encoder_factory_ = std::move(injection_components_->video_encoder_factory); } else { - encoder_factory_ = absl::make_unique(); + encoder_factory_ = std::make_unique(); } payload_type_map_ = test::CallTest::payload_type_map_; @@ -480,7 +480,7 @@ std::string VideoQualityTest::GenerateGraphTitle() const { void VideoQualityTest::CheckParamsAndInjectionComponents() { if (injection_components_ == nullptr) { - injection_components_ = absl::make_unique(); + injection_components_ = std::make_unique(); } if (!params_.config && injection_components_->sender_network == nullptr && injection_components_->receiver_network == nullptr) { @@ -1046,7 +1046,7 @@ void VideoQualityTest::SetupThumbnailCapturers(size_t num_thumbnail_streams) { VideoStream thumbnail = DefaultThumbnailStream(); for (size_t i = 0; i < num_thumbnail_streams; ++i) { auto frame_generator_capturer = - absl::make_unique( + std::make_unique( clock_, test::FrameGenerator::CreateSquareGenerator( static_cast(thumbnail.width), @@ -1150,7 +1150,7 @@ void VideoQualityTest::CreateCapturers() { } ASSERT_TRUE(frame_generator); auto frame_generator_capturer = - absl::make_unique( + std::make_unique( clock_, std::move(frame_generator), params_.video[video_idx].fps, *task_queue_factory_); EXPECT_TRUE(frame_generator_capturer->Init()); @@ -1182,13 +1182,13 @@ std::unique_ptr VideoQualityTest::CreateSendTransport() { std::unique_ptr network_behavior = nullptr; if (injection_components_->sender_network == nullptr) { - network_behavior = absl::make_unique(*params_.config); + network_behavior = std::make_unique(*params_.config); } else { network_behavior = std::move(injection_components_->sender_network); } - return absl::make_unique( + return std::make_unique( &task_queue_, - absl::make_unique(clock_, std::move(network_behavior)), + std::make_unique(clock_, std::move(network_behavior)), sender_call_.get(), kPayloadTypeVP8, kPayloadTypeVP9, params_.video[0].selected_tl, params_.ss[0].selected_sl, payload_type_map_, kVideoSendSsrcs[0], @@ -1200,13 +1200,13 @@ std::unique_ptr VideoQualityTest::CreateReceiveTransport() { std::unique_ptr network_behavior = nullptr; if (injection_components_->receiver_network == nullptr) { - network_behavior = absl::make_unique(*params_.config); + network_behavior = std::make_unique(*params_.config); } else { network_behavior = std::move(injection_components_->receiver_network); } - return absl::make_unique( + return std::make_unique( &task_queue_, - absl::make_unique(clock_, std::move(network_behavior)), + std::make_unique(clock_, std::move(network_behavior)), receiver_call_.get(), payload_type_map_); } @@ -1235,11 +1235,11 @@ void VideoQualityTest::RunWithAnalyzer(const Params& params) { recv_event_log_ = rtc_event_log_factory_.CreateRtcEventLog( RtcEventLog::EncodingType::Legacy); std::unique_ptr send_output( - absl::make_unique( + std::make_unique( params.logging.rtc_event_log_name + "_send", RtcEventLog::kUnlimitedOutput)); std::unique_ptr recv_output( - absl::make_unique( + std::make_unique( params.logging.rtc_event_log_name + "_recv", RtcEventLog::kUnlimitedOutput)); bool event_log_started = @@ -1249,8 +1249,8 @@ void VideoQualityTest::RunWithAnalyzer(const Params& params) { RtcEventLog::kImmediateOutput); RTC_DCHECK(event_log_started); } else { - send_event_log_ = absl::make_unique(); - recv_event_log_ = absl::make_unique(); + send_event_log_ = std::make_unique(); + recv_event_log_ = std::make_unique(); } task_queue_.SendTask([this, ¶ms, &send_transport, &recv_transport]() { @@ -1271,7 +1271,7 @@ void VideoQualityTest::RunWithAnalyzer(const Params& params) { if (graph_title.empty()) graph_title = VideoQualityTest::GenerateGraphTitle(); bool is_quick_test_enabled = field_trial::IsEnabled("WebRTC-QuickPerfTest"); - analyzer_ = absl::make_unique( + analyzer_ = std::make_unique( send_transport.get(), params_.analyzer.test_label, params_.analyzer.avg_psnr_threshold, params_.analyzer.avg_ssim_threshold, is_quick_test_enabled @@ -1358,7 +1358,7 @@ rtc::scoped_refptr VideoQualityTest::CreateAudioDevice() { // CO_E_NOTINITIALIZED otherwise. The legacy ADM for Windows used internal // COM initialization but the new ADM requires COM to be initialized // externally. - com_initializer_ = absl::make_unique( + com_initializer_ = std::make_unique( webrtc_win::ScopedCOMInitializer::kMTA); RTC_CHECK(com_initializer_->Succeeded()); RTC_CHECK(webrtc_win::core_audio_utility::IsSupported()); @@ -1457,11 +1457,11 @@ void VideoQualityTest::RunWithRenderers(const Params& params) { recv_event_log_ = rtc_event_log_factory_.CreateRtcEventLog( RtcEventLog::EncodingType::Legacy); std::unique_ptr send_output( - absl::make_unique( + std::make_unique( params.logging.rtc_event_log_name + "_send", RtcEventLog::kUnlimitedOutput)); std::unique_ptr recv_output( - absl::make_unique( + std::make_unique( params.logging.rtc_event_log_name + "_recv", RtcEventLog::kUnlimitedOutput)); bool event_log_started = @@ -1471,8 +1471,8 @@ void VideoQualityTest::RunWithRenderers(const Params& params) { /*output_period_ms=*/5000); RTC_DCHECK(event_log_started); } else { - send_event_log_ = absl::make_unique(); - recv_event_log_ = absl::make_unique(); + send_event_log_ = std::make_unique(); + recv_event_log_ = std::make_unique(); } task_queue_.SendTask([&]() { diff --git a/video/video_receive_stream.cc b/video/video_receive_stream.cc index bfc6d2a241..f32d087fcc 100644 --- a/video/video_receive_stream.cc +++ b/video/video_receive_stream.cc @@ -14,12 +14,12 @@ #include #include +#include #include #include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/array_view.h" #include "api/crypto/frame_decryptor_interface.h" @@ -246,7 +246,7 @@ VideoReceiveStream::VideoReceiveStream( media_receiver_ = receiver_controller->CreateReceiver( config_.rtp.remote_ssrc, &rtp_video_stream_receiver_); if (config_.rtp.rtx_ssrc) { - rtx_receive_stream_ = absl::make_unique( + rtx_receive_stream_ = std::make_unique( &rtp_video_stream_receiver_, config.rtp.rtx_associated_payload_types, config_.rtp.remote_ssrc, rtp_receive_statistics_.get()); rtx_receiver_ = receiver_controller->CreateReceiver( @@ -338,7 +338,7 @@ void VideoReceiveStream::Start() { // old decoder factory interface doesn't have a way to query supported // codecs. if (!video_decoder) { - video_decoder = absl::make_unique(); + video_decoder = std::make_unique(); } std::string decoded_output_file = @@ -573,7 +573,7 @@ void VideoReceiveStream::OnCompleteFrame( void VideoReceiveStream::OnData(uint64_t channel_id, MediaTransportEncodedVideoFrame frame) { OnCompleteFrame( - absl::make_unique(std::move(frame))); + std::make_unique(std::move(frame))); } void VideoReceiveStream::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { diff --git a/video/video_receive_stream_unittest.cc b/video/video_receive_stream_unittest.cc index 6d88f67e92..c9d0ad13b0 100644 --- a/video/video_receive_stream_unittest.cc +++ b/video/video_receive_stream_unittest.cc @@ -11,10 +11,10 @@ #include "video/video_receive_stream.h" #include +#include #include #include -#include "absl/memory/memory.h" #include "api/task_queue/default_task_queue_factory.h" #include "api/test/video/function_video_decoder_factory.h" #include "api/video_codecs/video_decoder.h" @@ -115,7 +115,7 @@ class VideoReceiveStreamTest : public ::testing::Test { timing_ = new VCMTiming(clock_); video_receive_stream_ = - absl::make_unique( + std::make_unique( task_queue_factory_.get(), &rtp_stream_receiver_controller_, kDefaultNumCpuCores, &packet_router_, config_.Copy(), process_thread_.get(), &call_stats_, clock_, timing_); @@ -232,7 +232,7 @@ class VideoReceiveStreamTestWithFakeDecoder : public ::testing::Test { public: VideoReceiveStreamTestWithFakeDecoder() : fake_decoder_factory_( - []() { return absl::make_unique(); }), + []() { return std::make_unique(); }), process_thread_(ProcessThread::Create("TestThread")), task_queue_factory_(CreateDefaultTaskQueueFactory()), config_(&mock_transport_), @@ -274,7 +274,7 @@ class VideoReceiveStreamTestWithFakeDecoder : public ::testing::Test { TEST_F(VideoReceiveStreamTestWithFakeDecoder, PassesNtpTime) { const int64_t kNtpTimestamp = 12345; - auto test_frame = absl::make_unique(); + auto test_frame = std::make_unique(); test_frame->SetPayloadType(99); test_frame->id.picture_id = 0; test_frame->SetNtpTime(kNtpTimestamp); @@ -287,7 +287,7 @@ TEST_F(VideoReceiveStreamTestWithFakeDecoder, PassesNtpTime) { TEST_F(VideoReceiveStreamTestWithFakeDecoder, PassesRotation) { const webrtc::VideoRotation kRotation = webrtc::kVideoRotation_180; - auto test_frame = absl::make_unique(); + auto test_frame = std::make_unique(); test_frame->SetPayloadType(99); test_frame->id.picture_id = 0; test_frame->SetRotation(kRotation); @@ -300,7 +300,7 @@ TEST_F(VideoReceiveStreamTestWithFakeDecoder, PassesRotation) { } TEST_F(VideoReceiveStreamTestWithFakeDecoder, PassesPacketInfos) { - auto test_frame = absl::make_unique(); + auto test_frame = std::make_unique(); test_frame->SetPayloadType(99); test_frame->id.picture_id = 0; RtpPacketInfos packet_infos = CreatePacketInfos(3); @@ -319,7 +319,7 @@ TEST_F(VideoReceiveStreamTestWithFakeDecoder, RenderedFrameUpdatesGetSources) { constexpr uint32_t kRtpTimestamp = 12345; // Prepare one video frame with per-packet information. - auto test_frame = absl::make_unique(); + auto test_frame = std::make_unique(); test_frame->SetPayloadType(99); test_frame->id.picture_id = 0; RtpPacketInfos packet_infos; diff --git a/video/video_replay.cc b/video/video_replay.cc index f6dd1507e1..6562f423f0 100644 --- a/video/video_replay.cc +++ b/video/video_replay.cc @@ -16,7 +16,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include "absl/memory/memory.h" #include "api/rtc_event_log/rtc_event_log.h" #include "api/task_queue/default_task_queue_factory.h" #include "api/test/video/function_video_decoder_factory.h" @@ -310,7 +309,7 @@ class RtpReplayer final { static std::unique_ptr ConfigureFromFile( const std::string& config_path, Call* call) { - auto stream_state = absl::make_unique(); + auto stream_state = std::make_unique(); // Parse the configuration file. std::ifstream config_file(config_path); std::stringstream raw_json_buffer; @@ -324,7 +323,7 @@ class RtpReplayer final { return nullptr; } - stream_state->decoder_factory = absl::make_unique(); + stream_state->decoder_factory = std::make_unique(); size_t config_count = 0; for (const auto& json : json_configs) { // Create the configuration and parse the JSON into the config. @@ -353,14 +352,14 @@ class RtpReplayer final { static std::unique_ptr ConfigureFromFlags( const std::string& rtp_dump_path, Call* call) { - auto stream_state = absl::make_unique(); + auto stream_state = std::make_unique(); // Create the video renderers. We must add both to the stream state to keep // them from deallocating. std::stringstream window_title; window_title << "Playback Video (" << rtp_dump_path << ")"; std::unique_ptr playback_video( test::VideoRenderer::Create(window_title.str().c_str(), 640, 480)); - auto file_passthrough = absl::make_unique( + auto file_passthrough = std::make_unique( OutBase(), playback_video.get()); stream_state->sinks.push_back(std::move(playback_video)); stream_state->sinks.push_back(std::move(file_passthrough)); @@ -391,13 +390,13 @@ class RtpReplayer final { decoder = test::CreateMatchingDecoder(MediaPayloadType(), Codec()); if (DecoderBitstreamFilename().empty()) { stream_state->decoder_factory = - absl::make_unique(); + std::make_unique(); } else { // Replace decoder with file writer if we're writing the bitstream to a // file instead. stream_state->decoder_factory = - absl::make_unique([]() { - return absl::make_unique( + std::make_unique([]() { + return std::make_unique( DecoderBitstreamFilename().c_str()); }); } diff --git a/video/video_send_stream_impl_unittest.cc b/video/video_send_stream_impl_unittest.cc index b56cf433ef..5c19a18b9e 100644 --- a/video/video_send_stream_impl_unittest.cc +++ b/video/video_send_stream_impl_unittest.cc @@ -10,9 +10,9 @@ #include "video/video_send_stream_impl.h" +#include #include -#include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/rtc_event_log/rtc_event_log.h" #include "call/rtp_video_sender.h" @@ -123,13 +123,13 @@ class VideoSendStreamImplTest : public ::testing::Test { .WillOnce(Return(123000)); std::map suspended_ssrcs; std::map suspended_payload_states; - return absl::make_unique( + return std::make_unique( &clock_, &stats_proxy_, &test_queue_, &call_stats_, &transport_controller_, &bitrate_allocator_, &send_delay_stats_, &video_stream_encoder_, &event_log_, &config_, initial_encoder_max_bitrate, initial_encoder_bitrate_priority, suspended_ssrcs, suspended_payload_states, content_type, - absl::make_unique(&clock_), + std::make_unique(&clock_), /*media_transport=*/nullptr); } diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc index f300038fb6..ae56f9b8e1 100644 --- a/video/video_send_stream_tests.cc +++ b/video/video_send_stream_tests.cc @@ -12,7 +12,6 @@ #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/task_queue/default_task_queue_factory.h" #include "api/test/simulated_network.h" #include "api/video/builtin_video_bitrate_allocator_factory.h" @@ -229,7 +228,7 @@ TEST_F(VideoSendStreamTest, SupportsTransmissionTimeOffset) { public: TransmissionTimeOffsetObserver() : SendTest(kDefaultTimeoutMs), encoder_factory_([]() { - return absl::make_unique( + return std::make_unique( Clock::GetRealTimeClock(), kEncodeDelayMs); }) { EXPECT_TRUE(parser_->RegisterRtpHeaderExtension( @@ -276,7 +275,7 @@ TEST_F(VideoSendStreamTest, SupportsTransportWideSequenceNumbers) { public: TransportWideSequenceNumberObserver() : SendTest(kDefaultTimeoutMs), encoder_factory_([]() { - return absl::make_unique( + return std::make_unique( Clock::GetRealTimeClock()); }) { EXPECT_TRUE(parser_->RegisterRtpHeaderExtension( @@ -567,9 +566,9 @@ class UlpfecObserver : public test::EndToEndTest { return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, VideoSendStreamTest::payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(config))); + std::make_unique(config))); } void ModifyVideoConfigs( @@ -652,7 +651,7 @@ TEST_F(VideoSendStreamWithoutUlpfecTest, NoUlpfecIfDisabledThroughFieldTrial) { // that the received state is actually decodable. TEST_F(VideoSendStreamTest, DoesNotUtilizeUlpfecForH264WithNackEnabled) { test::FunctionVideoEncoderFactory encoder_factory([]() { - return absl::make_unique(Clock::GetRealTimeClock()); + return std::make_unique(Clock::GetRealTimeClock()); }); UlpfecObserver test(false, true, false, false, "H264", &encoder_factory); RunBaseTest(&test); @@ -661,7 +660,7 @@ TEST_F(VideoSendStreamTest, DoesNotUtilizeUlpfecForH264WithNackEnabled) { // Without retransmissions FEC for H264 is fine. TEST_F(VideoSendStreamTest, DoesUtilizeUlpfecForH264WithoutNackEnabled) { test::FunctionVideoEncoderFactory encoder_factory([]() { - return absl::make_unique(Clock::GetRealTimeClock()); + return std::make_unique(Clock::GetRealTimeClock()); }); UlpfecObserver test(false, false, true, true, "H264", &encoder_factory); RunBaseTest(&test); @@ -687,7 +686,7 @@ TEST_F(VideoSendStreamTest, SupportsUlpfecWithMultithreadedH264) { std::unique_ptr task_queue_factory = CreateDefaultTaskQueueFactory(); test::FunctionVideoEncoderFactory encoder_factory([&]() { - return absl::make_unique( + return std::make_unique( Clock::GetRealTimeClock(), task_queue_factory.get()); }); UlpfecObserver test(false, false, true, true, "H264", &encoder_factory); @@ -764,9 +763,9 @@ class FlexfecObserver : public test::EndToEndTest { return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, VideoSendStreamTest::payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(config))); + std::make_unique(config))); } void ModifyVideoConfigs( @@ -852,7 +851,7 @@ TEST_F(VideoSendStreamTest, SupportsFlexfecWithNackVp9) { TEST_F(VideoSendStreamTest, SupportsFlexfecH264) { test::FunctionVideoEncoderFactory encoder_factory([]() { - return absl::make_unique(Clock::GetRealTimeClock()); + return std::make_unique(Clock::GetRealTimeClock()); }); FlexfecObserver test(false, false, "H264", &encoder_factory, 1); RunBaseTest(&test); @@ -860,7 +859,7 @@ TEST_F(VideoSendStreamTest, SupportsFlexfecH264) { TEST_F(VideoSendStreamTest, SupportsFlexfecWithNackH264) { test::FunctionVideoEncoderFactory encoder_factory([]() { - return absl::make_unique(Clock::GetRealTimeClock()); + return std::make_unique(Clock::GetRealTimeClock()); }); FlexfecObserver test(false, true, "H264", &encoder_factory, 1); RunBaseTest(&test); @@ -870,7 +869,7 @@ TEST_F(VideoSendStreamTest, SupportsFlexfecWithMultithreadedH264) { std::unique_ptr task_queue_factory = CreateDefaultTaskQueueFactory(); test::FunctionVideoEncoderFactory encoder_factory([&]() { - return absl::make_unique( + return std::make_unique( Clock::GetRealTimeClock(), task_queue_factory.get()); }); @@ -1543,9 +1542,9 @@ TEST_F(VideoSendStreamTest, PaddingIsPrimarilyRetransmissions) { return new test::PacketTransport( task_queue, sender_call, this, test::PacketTransport::kSender, payload_type_map_, - absl::make_unique( + std::make_unique( Clock::GetRealTimeClock(), - absl::make_unique(config))); + std::make_unique(config))); } void ModifyVideoConfigs( diff --git a/video/video_stream_decoder_impl.cc b/video/video_stream_decoder_impl.cc index 48733ecca4..0477be0c54 100644 --- a/video/video_stream_decoder_impl.cc +++ b/video/video_stream_decoder_impl.cc @@ -10,7 +10,8 @@ #include "video/video_stream_decoder_impl.h" -#include "absl/memory/memory.h" +#include + #include "api/task_queue/queued_task.h" #include "rtc_base/logging.h" #include "rtc_base/numerics/mod_ops.h" @@ -64,7 +65,7 @@ void VideoStreamDecoderImpl::OnFrame( }; bookkeeping_queue_.PostTask( - absl::make_unique(std::move(frame), this)); + std::make_unique(std::move(frame), this)); return; } diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc index 9257f93ad3..5bdfa72539 100644 --- a/video/video_stream_encoder.cc +++ b/video/video_stream_encoder.cc @@ -13,11 +13,11 @@ #include #include #include +#include #include #include #include "absl/algorithm/container.h" -#include "absl/memory/memory.h" #include "api/video/encoded_image.h" #include "api/video/i420_buffer.h" #include "api/video/video_bitrate_allocator_factory.h" @@ -938,7 +938,7 @@ void VideoStreamEncoder::ReconfigureEncoder() { VideoEncoder::EncoderInfo info = encoder_->GetEncoderInfo(); if (rate_control_settings_.UseEncoderBitrateAdjuster()) { - bitrate_adjuster_ = absl::make_unique(codec); + bitrate_adjuster_ = std::make_unique(codec); bitrate_adjuster_->OnEncoderInfo(info); } @@ -989,10 +989,10 @@ void VideoStreamEncoder::ConfigureQualityScaler( experimental_thresholds = QualityScalingExperiment::GetQpThresholds( encoder_config_.codec_type); } - // Since the interface is non-public, absl::make_unique can't do this + // Since the interface is non-public, std::make_unique can't do this // upcast. AdaptationObserverInterface* observer = this; - quality_scaler_ = absl::make_unique( + quality_scaler_ = std::make_unique( &encoder_queue_, observer, experimental_thresholds ? *experimental_thresholds : *(scaling_settings.thresholds)); @@ -1627,7 +1627,7 @@ EncodedImageCallback::Result VideoStreamEncoder::OnEncodedImage( if (codec_specific_info && codec_specific_info->generic_frame_info) { codec_info_copy = - absl::make_unique(*codec_specific_info); + std::make_unique(*codec_specific_info); GenericFrameInfo& generic_info = *codec_info_copy->generic_frame_info; generic_info.frame_id = next_frame_id_++;