Use std::make_unique instead of absl::make_unique.

WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
This commit is contained in:
Mirko Bonadei 2019-09-17 17:06:18 +02:00 committed by Commit Bot
parent 809198edff
commit 317a1f09ed
477 changed files with 1796 additions and 2074 deletions

View file

@ -59,7 +59,6 @@ if (!build_with_chromium) {
"audio_codecs:audio_codecs_api", "audio_codecs:audio_codecs_api",
"task_queue:default_task_queue_factory", "task_queue:default_task_queue_factory",
"video_codecs:video_codecs_api", "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", ":video_quality_test_fixture_api",
"../rtc_base:checks", "../rtc_base:checks",
"../rtc_base:thread_checker", "../rtc_base:thread_checker",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
@ -390,7 +388,6 @@ if (rtc_include_tests) {
":scoped_refptr", ":scoped_refptr",
":video_quality_test_fixture_api", ":video_quality_test_fixture_api",
"../video:video_quality_test", "../video:video_quality_test",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
@ -404,7 +401,6 @@ if (rtc_include_tests) {
deps = [ deps = [
":network_emulation_manager_api", ":network_emulation_manager_api",
"../test/network:emulated_network", "../test/network:emulated_network",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
@ -421,7 +417,6 @@ if (rtc_include_tests) {
":peer_connection_quality_test_fixture_api", ":peer_connection_quality_test_fixture_api",
":video_quality_analyzer_api", ":video_quality_analyzer_api",
"../test/pc/e2e:peerconnection_quality_test", "../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",
"../rtc_base/system:rtc_export", "../rtc_base/system:rtc_export",
"rtc_event_log:rtc_event_log", "rtc_event_log:rtc_event_log",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
@ -633,7 +627,6 @@ if (rtc_include_tests) {
"../rtc_base:checks", "../rtc_base:checks",
"//third_party/abseil-cpp/absl/flags:flag", "//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/flags:parse", "//third_party/abseil-cpp/absl/flags:parse",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
] ]
} }
@ -659,7 +652,6 @@ if (rtc_include_tests) {
"../modules/video_coding:simulcast_test_fixture_impl", "../modules/video_coding:simulcast_test_fixture_impl",
"../rtc_base:rtc_base_approved", "../rtc_base:rtc_base_approved",
"video_codecs:video_codecs_api", "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", "../modules/video_coding:videocodec_test_impl",
"../rtc_base:rtc_base_approved", "../rtc_base:rtc_base_approved",
"video_codecs:video_codecs_api", "video_codecs:video_codecs_api",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
@ -901,7 +892,6 @@ if (rtc_include_tests) {
"transport:datagram_transport_interface", "transport:datagram_transport_interface",
"transport/media:media_transport_interface", "transport/media:media_transport_interface",
"//third_party/abseil-cpp/absl/algorithm:container", "//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:datagram_transport_interface",
"transport/media:media_transport_interface", "transport/media:media_transport_interface",
"//third_party/abseil-cpp/absl/algorithm:container", "//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", "task_queue:task_queue_default_factory_unittests",
"units:units_unittests", "units:units_unittests",
"video:video_unittests", "video:video_unittests",
"//third_party/abseil-cpp/absl/memory",
] ]
} }

View file

@ -80,7 +80,6 @@ rtc_source_set("aec3_factory") {
"../../modules/audio_processing/aec3", "../../modules/audio_processing/aec3",
"../../rtc_base:rtc_base_approved", "../../rtc_base:rtc_base_approved",
"../../rtc_base/system:rtc_export", "../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
] ]
} }

View file

@ -11,7 +11,6 @@
#include <memory> #include <memory>
#include "absl/memory/memory.h"
#include "modules/audio_processing/aec3/echo_canceller3.h" #include "modules/audio_processing/aec3/echo_canceller3.h"
namespace webrtc { namespace webrtc {
@ -22,9 +21,9 @@ EchoCanceller3Factory::EchoCanceller3Factory(const EchoCanceller3Config& config)
: config_(config) {} : config_(config) {}
std::unique_ptr<EchoControl> EchoCanceller3Factory::Create(int sample_rate_hz) { std::unique_ptr<EchoControl> EchoCanceller3Factory::Create(int sample_rate_hz) {
return absl::make_unique<EchoCanceller3>(config_, sample_rate_hz, return std::make_unique<EchoCanceller3>(config_, sample_rate_hz,
/*num_render_channels=*/1, /*num_render_channels=*/1,
/*num_capture_channels=*/1); /*num_capture_channels=*/1);
} }
} // namespace webrtc } // namespace webrtc

View file

@ -25,7 +25,6 @@ rtc_static_library("audio_encoder_L16") {
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base:safe_minmax", "../../../rtc_base:safe_minmax",
"../../../rtc_base/system:rtc_export", "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
@ -43,7 +42,6 @@ rtc_static_library("audio_decoder_L16") {
"../../../modules/audio_coding:pcm16b", "../../../modules/audio_coding:pcm16b",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base/system:rtc_export", "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]

View file

@ -10,7 +10,8 @@
#include "api/audio_codecs/L16/audio_decoder_L16.h" #include "api/audio_codecs/L16/audio_decoder_L16.h"
#include "absl/memory/memory.h" #include <memory>
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h" #include "modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h"
#include "modules/audio_coding/codecs/pcm16b/pcm16b_common.h" #include "modules/audio_coding/codecs/pcm16b/pcm16b_common.h"
@ -36,7 +37,7 @@ void AudioDecoderL16::AppendSupportedDecoders(
std::unique_ptr<AudioDecoder> AudioDecoderL16::MakeAudioDecoder( std::unique_ptr<AudioDecoder> AudioDecoderL16::MakeAudioDecoder(
const Config& config, const Config& config,
absl::optional<AudioCodecPairId> /*codec_pair_id*/) { absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
return config.IsOk() ? absl::make_unique<AudioDecoderPcm16B>( return config.IsOk() ? std::make_unique<AudioDecoderPcm16B>(
config.sample_rate_hz, config.num_channels) config.sample_rate_hz, config.num_channels)
: nullptr; : nullptr;
} }

View file

@ -10,7 +10,8 @@
#include "api/audio_codecs/L16/audio_encoder_L16.h" #include "api/audio_codecs/L16/audio_encoder_L16.h"
#include "absl/memory/memory.h" #include <memory>
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h" #include "modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h"
#include "modules/audio_coding/codecs/pcm16b/pcm16b_common.h" #include "modules/audio_coding/codecs/pcm16b/pcm16b_common.h"
@ -63,7 +64,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderL16::MakeAudioEncoder(
c.num_channels = config.num_channels; c.num_channels = config.num_channels;
c.frame_size_ms = config.frame_size_ms; c.frame_size_ms = config.frame_size_ms;
c.payload_type = payload_type; c.payload_type = payload_type;
return absl::make_unique<AudioEncoderPcm16B>(c); return std::make_unique<AudioEncoderPcm16B>(c);
} }
} // namespace webrtc } // namespace webrtc

View file

@ -25,7 +25,6 @@ rtc_static_library("audio_encoder_g711") {
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base:safe_minmax", "../../../rtc_base:safe_minmax",
"../../../rtc_base/system:rtc_export", "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
@ -43,7 +42,6 @@ rtc_static_library("audio_decoder_g711") {
"../../../modules/audio_coding:g711", "../../../modules/audio_coding:g711",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base/system:rtc_export", "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/g711/audio_decoder_pcm.h" #include "modules/audio_coding/codecs/g711/audio_decoder_pcm.h"
#include "rtc_base/numerics/safe_conversions.h" #include "rtc_base/numerics/safe_conversions.h"
@ -49,9 +48,9 @@ std::unique_ptr<AudioDecoder> AudioDecoderG711::MakeAudioDecoder(
RTC_DCHECK(config.IsOk()); RTC_DCHECK(config.IsOk());
switch (config.type) { switch (config.type) {
case Config::Type::kPcmU: case Config::Type::kPcmU:
return absl::make_unique<AudioDecoderPcmU>(config.num_channels); return std::make_unique<AudioDecoderPcmU>(config.num_channels);
case Config::Type::kPcmA: case Config::Type::kPcmA:
return absl::make_unique<AudioDecoderPcmA>(config.num_channels); return std::make_unique<AudioDecoderPcmA>(config.num_channels);
default: default:
return nullptr; return nullptr;
} }

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/g711/audio_encoder_pcm.h" #include "modules/audio_coding/codecs/g711/audio_encoder_pcm.h"
#include "rtc_base/numerics/safe_conversions.h" #include "rtc_base/numerics/safe_conversions.h"
@ -70,14 +69,14 @@ std::unique_ptr<AudioEncoder> AudioEncoderG711::MakeAudioEncoder(
impl_config.num_channels = config.num_channels; impl_config.num_channels = config.num_channels;
impl_config.frame_size_ms = config.frame_size_ms; impl_config.frame_size_ms = config.frame_size_ms;
impl_config.payload_type = payload_type; impl_config.payload_type = payload_type;
return absl::make_unique<AudioEncoderPcmU>(impl_config); return std::make_unique<AudioEncoderPcmU>(impl_config);
} }
case Config::Type::kPcmA: { case Config::Type::kPcmA: {
AudioEncoderPcmA::Config impl_config; AudioEncoderPcmA::Config impl_config;
impl_config.num_channels = config.num_channels; impl_config.num_channels = config.num_channels;
impl_config.frame_size_ms = config.frame_size_ms; impl_config.frame_size_ms = config.frame_size_ms;
impl_config.payload_type = payload_type; impl_config.payload_type = payload_type;
return absl::make_unique<AudioEncoderPcmA>(impl_config); return std::make_unique<AudioEncoderPcmA>(impl_config);
} }
default: { default: {
return nullptr; return nullptr;

View file

@ -33,7 +33,6 @@ rtc_static_library("audio_encoder_g722") {
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base:safe_minmax", "../../../rtc_base:safe_minmax",
"../../../rtc_base/system:rtc_export", "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
@ -51,7 +50,6 @@ rtc_static_library("audio_decoder_g722") {
"../../../modules/audio_coding:g722", "../../../modules/audio_coding:g722",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base/system:rtc_export", "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/g722/audio_decoder_g722.h" #include "modules/audio_coding/codecs/g722/audio_decoder_g722.h"
#include "rtc_base/numerics/safe_conversions.h" #include "rtc_base/numerics/safe_conversions.h"
@ -40,9 +39,9 @@ std::unique_ptr<AudioDecoder> AudioDecoderG722::MakeAudioDecoder(
absl::optional<AudioCodecPairId> /*codec_pair_id*/) { absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
switch (config.num_channels) { switch (config.num_channels) {
case 1: case 1:
return absl::make_unique<AudioDecoderG722Impl>(); return std::make_unique<AudioDecoderG722Impl>();
case 2: case 2:
return absl::make_unique<AudioDecoderG722StereoImpl>(); return std::make_unique<AudioDecoderG722StereoImpl>();
default: default:
return nullptr; return nullptr;
} }

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/g722/audio_encoder_g722.h" #include "modules/audio_coding/codecs/g722/audio_encoder_g722.h"
#include "rtc_base/numerics/safe_conversions.h" #include "rtc_base/numerics/safe_conversions.h"
@ -62,7 +61,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderG722::MakeAudioEncoder(
int payload_type, int payload_type,
absl::optional<AudioCodecPairId> /*codec_pair_id*/) { absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
RTC_DCHECK(config.IsOk()); RTC_DCHECK(config.IsOk());
return absl::make_unique<AudioEncoderG722Impl>(config, payload_type); return std::make_unique<AudioEncoderG722Impl>(config, payload_type);
} }
} // namespace webrtc } // namespace webrtc

View file

@ -32,7 +32,6 @@ rtc_static_library("audio_encoder_ilbc") {
"../../../modules/audio_coding:ilbc", "../../../modules/audio_coding:ilbc",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base:safe_minmax", "../../../rtc_base:safe_minmax",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
@ -49,7 +48,6 @@ rtc_static_library("audio_decoder_ilbc") {
"..:audio_codecs_api", "..:audio_codecs_api",
"../../../modules/audio_coding:ilbc", "../../../modules/audio_coding:ilbc",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h" #include "modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h"
@ -35,7 +34,7 @@ void AudioDecoderIlbc::AppendSupportedDecoders(
std::unique_ptr<AudioDecoder> AudioDecoderIlbc::MakeAudioDecoder( std::unique_ptr<AudioDecoder> AudioDecoderIlbc::MakeAudioDecoder(
Config config, Config config,
absl::optional<AudioCodecPairId> /*codec_pair_id*/) { absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
return absl::make_unique<AudioDecoderIlbcImpl>(); return std::make_unique<AudioDecoderIlbcImpl>();
} }
} // namespace webrtc } // namespace webrtc

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h" #include "modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h"
#include "rtc_base/numerics/safe_conversions.h" #include "rtc_base/numerics/safe_conversions.h"
@ -76,7 +75,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderIlbc::MakeAudioEncoder(
int payload_type, int payload_type,
absl::optional<AudioCodecPairId> /*codec_pair_id*/) { absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
RTC_DCHECK(config.IsOk()); RTC_DCHECK(config.IsOk());
return absl::make_unique<AudioEncoderIlbcImpl>(config, payload_type); return std::make_unique<AudioEncoderIlbcImpl>(config, payload_type);
} }
} // namespace webrtc } // namespace webrtc

View file

@ -79,7 +79,6 @@ rtc_static_library("audio_encoder_isac_fix") {
"..:audio_codecs_api", "..:audio_codecs_api",
"../../../modules/audio_coding:isac_fix", "../../../modules/audio_coding:isac_fix",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
@ -96,7 +95,6 @@ rtc_static_library("audio_decoder_isac_fix") {
"..:audio_codecs_api", "..:audio_codecs_api",
"../../../modules/audio_coding:isac_fix", "../../../modules/audio_coding:isac_fix",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
@ -114,7 +112,6 @@ rtc_static_library("audio_encoder_isac_float") {
"../../../modules/audio_coding:isac", "../../../modules/audio_coding:isac",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base/system:rtc_export", "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
@ -132,7 +129,6 @@ rtc_static_library("audio_decoder_isac_float") {
"../../../modules/audio_coding:isac", "../../../modules/audio_coding:isac",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base/system:rtc_export", "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]

View file

@ -10,7 +10,8 @@
#include "api/audio_codecs/isac/audio_decoder_isac_fix.h" #include "api/audio_codecs/isac/audio_decoder_isac_fix.h"
#include "absl/memory/memory.h" #include <memory>
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/isac/fix/include/audio_decoder_isacfix.h" #include "modules/audio_coding/codecs/isac/fix/include/audio_decoder_isacfix.h"
@ -34,7 +35,7 @@ std::unique_ptr<AudioDecoder> AudioDecoderIsacFix::MakeAudioDecoder(
absl::optional<AudioCodecPairId> /*codec_pair_id*/) { absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
AudioDecoderIsacFixImpl::Config c; AudioDecoderIsacFixImpl::Config c;
c.sample_rate_hz = 16000; c.sample_rate_hz = 16000;
return absl::make_unique<AudioDecoderIsacFixImpl>(c); return std::make_unique<AudioDecoderIsacFixImpl>(c);
} }
} // namespace webrtc } // namespace webrtc

View file

@ -10,7 +10,8 @@
#include "api/audio_codecs/isac/audio_decoder_isac_float.h" #include "api/audio_codecs/isac/audio_decoder_isac_float.h"
#include "absl/memory/memory.h" #include <memory>
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/isac/main/include/audio_decoder_isac.h" #include "modules/audio_coding/codecs/isac/main/include/audio_decoder_isac.h"
@ -41,7 +42,7 @@ std::unique_ptr<AudioDecoder> AudioDecoderIsacFloat::MakeAudioDecoder(
RTC_DCHECK(config.IsOk()); RTC_DCHECK(config.IsOk());
AudioDecoderIsacFloatImpl::Config c; AudioDecoderIsacFloatImpl::Config c;
c.sample_rate_hz = config.sample_rate_hz; c.sample_rate_hz = config.sample_rate_hz;
return absl::make_unique<AudioDecoderIsacFloatImpl>(c); return std::make_unique<AudioDecoderIsacFloatImpl>(c);
} }
} // namespace webrtc } // namespace webrtc

View file

@ -10,7 +10,8 @@
#include "api/audio_codecs/isac/audio_encoder_isac_fix.h" #include "api/audio_codecs/isac/audio_encoder_isac_fix.h"
#include "absl/memory/memory.h" #include <memory>
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/isac/fix/include/audio_encoder_isacfix.h" #include "modules/audio_coding/codecs/isac/fix/include/audio_encoder_isacfix.h"
#include "rtc_base/string_to_number.h" #include "rtc_base/string_to_number.h"
@ -56,7 +57,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderIsacFix::MakeAudioEncoder(
AudioEncoderIsacFixImpl::Config c; AudioEncoderIsacFixImpl::Config c;
c.frame_size_ms = config.frame_size_ms; c.frame_size_ms = config.frame_size_ms;
c.payload_type = payload_type; c.payload_type = payload_type;
return absl::make_unique<AudioEncoderIsacFixImpl>(c); return std::make_unique<AudioEncoderIsacFixImpl>(c);
} }
} // namespace webrtc } // namespace webrtc

View file

@ -10,7 +10,8 @@
#include "api/audio_codecs/isac/audio_encoder_isac_float.h" #include "api/audio_codecs/isac/audio_encoder_isac_float.h"
#include "absl/memory/memory.h" #include <memory>
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h" #include "modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h"
#include "rtc_base/string_to_number.h" #include "rtc_base/string_to_number.h"
@ -70,7 +71,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderIsacFloat::MakeAudioEncoder(
c.sample_rate_hz = config.sample_rate_hz; c.sample_rate_hz = config.sample_rate_hz;
c.frame_size_ms = config.frame_size_ms; c.frame_size_ms = config.frame_size_ms;
c.bit_rate = config.bit_rate; c.bit_rate = config.bit_rate;
return absl::make_unique<AudioEncoderIsacFloatImpl>(c); return std::make_unique<AudioEncoderIsacFloatImpl>(c);
} }
} // namespace webrtc } // namespace webrtc

View file

@ -72,7 +72,6 @@ rtc_static_library("audio_decoder_opus") {
"../../../modules/audio_coding:webrtc_opus", "../../../modules/audio_coding:webrtc_opus",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base/system:rtc_export", "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]

View file

@ -14,7 +14,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "modules/audio_coding/codecs/opus/audio_decoder_opus.h" #include "modules/audio_coding/codecs/opus/audio_decoder_opus.h"
@ -73,8 +72,8 @@ std::unique_ptr<AudioDecoder> AudioDecoderOpus::MakeAudioDecoder(
Config config, Config config,
absl::optional<AudioCodecPairId> /*codec_pair_id*/) { absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
RTC_DCHECK(config.IsOk()); RTC_DCHECK(config.IsOk());
return absl::make_unique<AudioDecoderOpusImpl>(config.num_channels, return std::make_unique<AudioDecoderOpusImpl>(config.num_channels,
config.sample_rate_hz); config.sample_rate_hz);
} }
} // namespace webrtc } // namespace webrtc

View file

@ -38,7 +38,6 @@ if (rtc_include_tests) {
"../isac:audio_encoder_isac_float", "../isac:audio_encoder_isac_float",
"../opus:audio_decoder_opus", "../opus:audio_decoder_opus",
"../opus:audio_encoder_opus", "../opus:audio_encoder_opus",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
} }

View file

@ -10,7 +10,8 @@
#include "api/audio_codecs/audio_decoder_factory_template.h" #include "api/audio_codecs/audio_decoder_factory_template.h"
#include "absl/memory/memory.h" #include <memory>
#include "api/audio_codecs/L16/audio_decoder_L16.h" #include "api/audio_codecs/L16/audio_decoder_L16.h"
#include "api/audio_codecs/g711/audio_decoder_g711.h" #include "api/audio_codecs/g711/audio_decoder_g711.h"
#include "api/audio_codecs/g722/audio_decoder_g722.h" #include "api/audio_codecs/g722/audio_decoder_g722.h"
@ -65,7 +66,7 @@ struct AudioDecoderFakeApi {
static std::unique_ptr<AudioDecoder> MakeAudioDecoder( static std::unique_ptr<AudioDecoder> MakeAudioDecoder(
const Config&, const Config&,
absl::optional<AudioCodecPairId> /*codec_pair_id*/ = absl::nullopt) { absl::optional<AudioCodecPairId> /*codec_pair_id*/ = absl::nullopt) {
auto dec = absl::make_unique<testing::StrictMock<MockAudioDecoder>>(); auto dec = std::make_unique<testing::StrictMock<MockAudioDecoder>>();
EXPECT_CALL(*dec, SampleRateHz()) EXPECT_CALL(*dec, SampleRateHz())
.WillOnce(::testing::Return(Params::CodecInfo().sample_rate_hz)); .WillOnce(::testing::Return(Params::CodecInfo().sample_rate_hz));
EXPECT_CALL(*dec, Die()); EXPECT_CALL(*dec, Die());

View file

@ -10,7 +10,8 @@
#include "api/audio_codecs/audio_encoder_factory_template.h" #include "api/audio_codecs/audio_encoder_factory_template.h"
#include "absl/memory/memory.h" #include <memory>
#include "api/audio_codecs/L16/audio_encoder_L16.h" #include "api/audio_codecs/L16/audio_encoder_L16.h"
#include "api/audio_codecs/g711/audio_encoder_g711.h" #include "api/audio_codecs/g711/audio_encoder_g711.h"
#include "api/audio_codecs/g722/audio_encoder_g722.h" #include "api/audio_codecs/g722/audio_encoder_g722.h"
@ -66,7 +67,7 @@ struct AudioEncoderFakeApi {
const Config&, const Config&,
int payload_type, int payload_type,
absl::optional<AudioCodecPairId> /*codec_pair_id*/ = absl::nullopt) { absl::optional<AudioCodecPairId> /*codec_pair_id*/ = absl::nullopt) {
auto enc = absl::make_unique<testing::StrictMock<MockAudioEncoder>>(); auto enc = std::make_unique<testing::StrictMock<MockAudioEncoder>>();
EXPECT_CALL(*enc, SampleRateHz()) EXPECT_CALL(*enc, SampleRateHz())
.WillOnce(::testing::Return(Params::CodecInfo().sample_rate_hz)); .WillOnce(::testing::Return(Params::CodecInfo().sample_rate_hz));
return std::move(enc); return std::move(enc);

View file

@ -10,9 +10,9 @@
#include "api/create_peerconnection_factory.h" #include "api/create_peerconnection_factory.h"
#include <memory>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "api/call/call_factory_interface.h" #include "api/call/call_factory_interface.h"
#include "api/peer_connection_interface.h" #include "api/peer_connection_interface.h"
#include "api/rtc_event_log/rtc_event_log_factory.h" #include "api/rtc_event_log/rtc_event_log_factory.h"
@ -43,7 +43,7 @@ rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
dependencies.signaling_thread = signaling_thread; dependencies.signaling_thread = signaling_thread;
dependencies.task_queue_factory = CreateDefaultTaskQueueFactory(); dependencies.task_queue_factory = CreateDefaultTaskQueueFactory();
dependencies.call_factory = CreateCallFactory(); dependencies.call_factory = CreateCallFactory();
dependencies.event_log_factory = absl::make_unique<RtcEventLogFactory>( dependencies.event_log_factory = std::make_unique<RtcEventLogFactory>(
dependencies.task_queue_factory.get()); dependencies.task_queue_factory.get());
cricket::MediaEngineDependencies media_dependencies; cricket::MediaEngineDependencies media_dependencies;

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "p2p/base/ice_transport_internal.h" #include "p2p/base/ice_transport_internal.h"
#include "p2p/base/p2p_transport_channel.h" #include "p2p/base/p2p_transport_channel.h"
#include "p2p/base/port_allocator.h" #include "p2p/base/port_allocator.h"
@ -59,7 +58,7 @@ rtc::scoped_refptr<IceTransportInterface> CreateIceTransport(
rtc::scoped_refptr<IceTransportInterface> CreateIceTransport( rtc::scoped_refptr<IceTransportInterface> CreateIceTransport(
IceTransportInit init) { IceTransportInit init) {
return new rtc::RefCountedObject<IceTransportWithTransportChannel>( return new rtc::RefCountedObject<IceTransportWithTransportChannel>(
absl::make_unique<cricket::P2PTransportChannel>( std::make_unique<cricket::P2PTransportChannel>(
"", 0, init.port_allocator(), init.async_resolver_factory(), "", 0, init.port_allocator(), init.async_resolver_factory(),
init.event_log())); init.event_log()));
} }

View file

@ -37,7 +37,6 @@ rtc_source_set("rtc_event_log_factory") {
":rtc_event_log", ":rtc_event_log",
"../../rtc_base:checks", "../../rtc_base:checks",
"../task_queue", "../task_queue",
"//third_party/abseil-cpp/absl/memory",
] ]
if (rtc_enable_protobuf) { if (rtc_enable_protobuf) {

View file

@ -10,9 +10,9 @@
#include "api/rtc_event_log/rtc_event_log_factory.h" #include "api/rtc_event_log/rtc_event_log_factory.h"
#include <memory>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
#ifdef ENABLE_RTC_EVENT_LOG #ifdef ENABLE_RTC_EVENT_LOG
@ -29,9 +29,9 @@ RtcEventLogFactory::RtcEventLogFactory(TaskQueueFactory* task_queue_factory)
std::unique_ptr<RtcEventLog> RtcEventLogFactory::CreateRtcEventLog( std::unique_ptr<RtcEventLog> RtcEventLogFactory::CreateRtcEventLog(
RtcEventLog::EncodingType encoding_type) { RtcEventLog::EncodingType encoding_type) {
#ifdef ENABLE_RTC_EVENT_LOG #ifdef ENABLE_RTC_EVENT_LOG
return absl::make_unique<RtcEventLogImpl>(encoding_type, task_queue_factory_); return std::make_unique<RtcEventLogImpl>(encoding_type, task_queue_factory_);
#else #else
return absl::make_unique<RtcEventLogNull>(); return std::make_unique<RtcEventLogNull>();
#endif #endif
} }

View file

@ -15,7 +15,6 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "absl/memory/memory.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
#include "test/gtest.h" #include "test/gtest.h"
#include "test/testsupport/file_utils.h" #include "test/testsupport/file_utils.h"
@ -52,14 +51,13 @@ class RtcEventLogOutputFileTest : public ::testing::Test {
}; };
TEST_F(RtcEventLogOutputFileTest, NonDefectiveOutputsStartOutActive) { TEST_F(RtcEventLogOutputFileTest, NonDefectiveOutputsStartOutActive) {
auto output_file = auto output_file = std::make_unique<RtcEventLogOutputFile>(output_file_name_);
absl::make_unique<RtcEventLogOutputFile>(output_file_name_);
EXPECT_TRUE(output_file->IsActive()); EXPECT_TRUE(output_file->IsActive());
} }
TEST_F(RtcEventLogOutputFileTest, DefectiveOutputsStartOutInactive) { TEST_F(RtcEventLogOutputFileTest, DefectiveOutputsStartOutInactive) {
const std::string illegal_filename = "/////////"; const std::string illegal_filename = "/////////";
auto output_file = absl::make_unique<RtcEventLogOutputFile>(illegal_filename); auto output_file = std::make_unique<RtcEventLogOutputFile>(illegal_filename);
EXPECT_FALSE(output_file->IsActive()); EXPECT_FALSE(output_file->IsActive());
} }
@ -67,8 +65,7 @@ TEST_F(RtcEventLogOutputFileTest, DefectiveOutputsStartOutInactive) {
TEST_F(RtcEventLogOutputFileTest, UnlimitedOutputFile) { TEST_F(RtcEventLogOutputFileTest, UnlimitedOutputFile) {
const std::string output_str = "one two three"; const std::string output_str = "one two three";
auto output_file = auto output_file = std::make_unique<RtcEventLogOutputFile>(output_file_name_);
absl::make_unique<RtcEventLogOutputFile>(output_file_name_);
output_file->Write(output_str); output_file->Write(output_str);
output_file.reset(); // Closing the file flushes the buffer to disk. output_file.reset(); // Closing the file flushes the buffer to disk.
@ -79,7 +76,7 @@ TEST_F(RtcEventLogOutputFileTest, UnlimitedOutputFile) {
TEST_F(RtcEventLogOutputFileTest, LimitedOutputFileCappedToCapacity) { TEST_F(RtcEventLogOutputFileTest, LimitedOutputFileCappedToCapacity) {
// Fit two bytes, then the third should be rejected. // Fit two bytes, then the third should be rejected.
auto output_file = auto output_file =
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, 2); std::make_unique<RtcEventLogOutputFile>(output_file_name_, 2);
output_file->Write("1"); output_file->Write("1");
output_file->Write("2"); 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. // 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; const size_t size_limit = output_str_1.length() + output_str_2.length() - 1;
auto output_file = auto output_file =
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, size_limit); std::make_unique<RtcEventLogOutputFile>(output_file_name_, size_limit);
output_file->Write(output_str_1); output_file->Write(output_str_1);
output_file->Write(output_str_2); output_file->Write(output_str_2);
@ -110,20 +107,20 @@ TEST_F(RtcEventLogOutputFileTest, DoNotWritePartialLines) {
TEST_F(RtcEventLogOutputFileTest, UnsuccessfulWriteReturnsFalse) { TEST_F(RtcEventLogOutputFileTest, UnsuccessfulWriteReturnsFalse) {
auto output_file = auto output_file =
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, 2); std::make_unique<RtcEventLogOutputFile>(output_file_name_, 2);
EXPECT_FALSE(output_file->Write("abc")); EXPECT_FALSE(output_file->Write("abc"));
} }
TEST_F(RtcEventLogOutputFileTest, SuccessfulWriteReturnsTrue) { TEST_F(RtcEventLogOutputFileTest, SuccessfulWriteReturnsTrue) {
auto output_file = auto output_file =
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, 3); std::make_unique<RtcEventLogOutputFile>(output_file_name_, 3);
EXPECT_TRUE(output_file->Write("abc")); EXPECT_TRUE(output_file->Write("abc"));
} }
// Even if capacity is reached, a successful write leaves the output active. // Even if capacity is reached, a successful write leaves the output active.
TEST_F(RtcEventLogOutputFileTest, FileStillActiveAfterSuccessfulWrite) { TEST_F(RtcEventLogOutputFileTest, FileStillActiveAfterSuccessfulWrite) {
auto output_file = auto output_file =
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, 3); std::make_unique<RtcEventLogOutputFile>(output_file_name_, 3);
ASSERT_TRUE(output_file->Write("abc")); ASSERT_TRUE(output_file->Write("abc"));
EXPECT_TRUE(output_file->IsActive()); EXPECT_TRUE(output_file->IsActive());
} }
@ -132,13 +129,13 @@ TEST_F(RtcEventLogOutputFileTest, FileStillActiveAfterSuccessfulWrite) {
// not yet been reached. // not yet been reached.
TEST_F(RtcEventLogOutputFileTest, FileInactiveAfterUnsuccessfulWrite) { TEST_F(RtcEventLogOutputFileTest, FileInactiveAfterUnsuccessfulWrite) {
auto output_file = auto output_file =
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, 2); std::make_unique<RtcEventLogOutputFile>(output_file_name_, 2);
ASSERT_FALSE(output_file->Write("abc")); ASSERT_FALSE(output_file->Write("abc"));
EXPECT_FALSE(output_file->IsActive()); EXPECT_FALSE(output_file->IsActive());
} }
TEST_F(RtcEventLogOutputFileTest, AllowReasonableFileSizeLimits) { TEST_F(RtcEventLogOutputFileTest, AllowReasonableFileSizeLimits) {
auto output_file = absl::make_unique<RtcEventLogOutputFile>( auto output_file = std::make_unique<RtcEventLogOutputFile>(
output_file_name_, RtcEventLogOutputFile::kMaxReasonableFileSize); output_file_name_, RtcEventLogOutputFile::kMaxReasonableFileSize);
EXPECT_TRUE(output_file->IsActive()); EXPECT_TRUE(output_file->IsActive());
} }
@ -158,8 +155,8 @@ TEST_F(RtcEventLogOutputFileTest, DisallowUnreasonableFileSizeLimits) {
auto create_output_file = [&] { auto create_output_file = [&] {
const size_t unreasonable_size = const size_t unreasonable_size =
RtcEventLogOutputFile::kMaxReasonableFileSize + 1; RtcEventLogOutputFile::kMaxReasonableFileSize + 1;
output_file = absl::make_unique<RtcEventLogOutputFile>(output_file_name_, output_file = std::make_unique<RtcEventLogOutputFile>(output_file_name_,
unreasonable_size); unreasonable_size);
}; };
EXPECT_DEATH(create_output_file(), ""); EXPECT_DEATH(create_output_file(), "");
} }

View file

@ -182,7 +182,7 @@ TEST_P(TaskQueueTest, PostAndReuse) {
}; };
auto task = auto task =
absl::make_unique<ReusedTask>(&call_count, reply_queue.get(), &event); std::make_unique<ReusedTask>(&call_count, reply_queue.get(), &event);
post_queue->PostTask(std::move(task)); post_queue->PostTask(std::move(task));
EXPECT_TRUE(event.Wait(1000)); EXPECT_TRUE(event.Wait(1000));
} }

View file

@ -11,13 +11,14 @@
#include "api/test/create_network_emulation_manager.h" #include "api/test/create_network_emulation_manager.h"
#include "absl/memory/memory.h" #include <memory>
#include "test/network/network_emulation_manager.h" #include "test/network/network_emulation_manager.h"
namespace webrtc { namespace webrtc {
std::unique_ptr<NetworkEmulationManager> CreateNetworkEmulationManager() { std::unique_ptr<NetworkEmulationManager> CreateNetworkEmulationManager() {
return absl::make_unique<test::NetworkEmulationManagerImpl>(); return std::make_unique<test::NetworkEmulationManagerImpl>();
} }
} // namespace webrtc } // namespace webrtc

View file

@ -10,9 +10,9 @@
#include "api/test/create_peerconnection_quality_test_fixture.h" #include "api/test/create_peerconnection_quality_test_fixture.h"
#include <memory>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "test/pc/e2e/peer_connection_quality_test.h" #include "test/pc/e2e/peer_connection_quality_test.h"
namespace webrtc { namespace webrtc {
@ -23,7 +23,7 @@ CreatePeerConnectionE2EQualityTestFixture(
std::string test_case_name, std::string test_case_name,
std::unique_ptr<AudioQualityAnalyzerInterface> audio_quality_analyzer, std::unique_ptr<AudioQualityAnalyzerInterface> audio_quality_analyzer,
std::unique_ptr<VideoQualityAnalyzerInterface> video_quality_analyzer) { std::unique_ptr<VideoQualityAnalyzerInterface> video_quality_analyzer) {
return absl::make_unique<PeerConnectionE2EQualityTest>( return std::make_unique<PeerConnectionE2EQualityTest>(
std::move(test_case_name), std::move(audio_quality_analyzer), std::move(test_case_name), std::move(audio_quality_analyzer),
std::move(video_quality_analyzer)); std::move(video_quality_analyzer));
} }

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "api/test/simulcast_test_fixture.h" #include "api/test/simulcast_test_fixture.h"
#include "modules/video_coding/utility/simulcast_test_fixture_impl.h" #include "modules/video_coding/utility/simulcast_test_fixture_impl.h"
@ -24,7 +23,7 @@ std::unique_ptr<SimulcastTestFixture> CreateSimulcastTestFixture(
std::unique_ptr<VideoEncoderFactory> encoder_factory, std::unique_ptr<VideoEncoderFactory> encoder_factory,
std::unique_ptr<VideoDecoderFactory> decoder_factory, std::unique_ptr<VideoDecoderFactory> decoder_factory,
SdpVideoFormat video_format) { SdpVideoFormat video_format) {
return absl::make_unique<SimulcastTestFixtureImpl>( return std::make_unique<SimulcastTestFixtureImpl>(
std::move(encoder_factory), std::move(decoder_factory), video_format); std::move(encoder_factory), std::move(decoder_factory), video_format);
} }

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "video/video_quality_test.h" #include "video/video_quality_test.h"
namespace webrtc { namespace webrtc {
@ -21,21 +20,21 @@ namespace webrtc {
std::unique_ptr<VideoQualityTestFixtureInterface> std::unique_ptr<VideoQualityTestFixtureInterface>
CreateVideoQualityTestFixture() { CreateVideoQualityTestFixture() {
// By default, we don't override the FEC module, so pass an empty factory. // By default, we don't override the FEC module, so pass an empty factory.
return absl::make_unique<VideoQualityTest>(nullptr); return std::make_unique<VideoQualityTest>(nullptr);
} }
std::unique_ptr<VideoQualityTestFixtureInterface> CreateVideoQualityTestFixture( std::unique_ptr<VideoQualityTestFixtureInterface> CreateVideoQualityTestFixture(
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory) { std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory) {
auto components = absl::make_unique< auto components =
VideoQualityTestFixtureInterface::InjectionComponents>(); std::make_unique<VideoQualityTestFixtureInterface::InjectionComponents>();
components->fec_controller_factory = std::move(fec_controller_factory); components->fec_controller_factory = std::move(fec_controller_factory);
return absl::make_unique<VideoQualityTest>(std::move(components)); return std::make_unique<VideoQualityTest>(std::move(components));
} }
std::unique_ptr<VideoQualityTestFixtureInterface> CreateVideoQualityTestFixture( std::unique_ptr<VideoQualityTestFixtureInterface> CreateVideoQualityTestFixture(
std::unique_ptr<VideoQualityTestFixtureInterface::InjectionComponents> std::unique_ptr<VideoQualityTestFixtureInterface::InjectionComponents>
components) { components) {
return absl::make_unique<VideoQualityTest>(std::move(components)); return std::make_unique<VideoQualityTest>(std::move(components));
} }
} // namespace webrtc } // namespace webrtc

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "api/test/videocodec_test_fixture.h" #include "api/test/videocodec_test_fixture.h"
#include "modules/video_coding/codecs/test/videocodec_test_fixture_impl.h" #include "modules/video_coding/codecs/test/videocodec_test_fixture_impl.h"
@ -24,14 +23,14 @@ using Config = VideoCodecTestFixture::Config;
std::unique_ptr<VideoCodecTestFixture> CreateVideoCodecTestFixture( std::unique_ptr<VideoCodecTestFixture> CreateVideoCodecTestFixture(
const Config& config) { const Config& config) {
return absl::make_unique<VideoCodecTestFixtureImpl>(config); return std::make_unique<VideoCodecTestFixtureImpl>(config);
} }
std::unique_ptr<VideoCodecTestFixture> CreateVideoCodecTestFixture( std::unique_ptr<VideoCodecTestFixture> CreateVideoCodecTestFixture(
const Config& config, const Config& config,
std::unique_ptr<VideoDecoderFactory> decoder_factory, std::unique_ptr<VideoDecoderFactory> decoder_factory,
std::unique_ptr<VideoEncoderFactory> encoder_factory) { std::unique_ptr<VideoEncoderFactory> encoder_factory) {
return absl::make_unique<VideoCodecTestFixtureImpl>( return std::make_unique<VideoCodecTestFixtureImpl>(
config, std::move(decoder_factory), std::move(encoder_factory)); config, std::move(decoder_factory), std::move(encoder_factory));
} }

View file

@ -17,7 +17,6 @@
#include <vector> #include <vector>
#include "absl/algorithm/container.h" #include "absl/algorithm/container.h"
#include "absl/memory/memory.h"
#include "api/test/fake_datagram_transport.h" #include "api/test/fake_datagram_transport.h"
#include "api/transport/media/media_transport_interface.h" #include "api/transport/media/media_transport_interface.h"
@ -165,7 +164,7 @@ class FakeMediaTransportFactory : public MediaTransportFactory {
rtc::Thread* network_thread, rtc::Thread* network_thread,
const MediaTransportSettings& settings) override { const MediaTransportSettings& settings) override {
std::unique_ptr<MediaTransportInterface> media_transport = std::unique_ptr<MediaTransportInterface> media_transport =
absl::make_unique<FakeMediaTransport>(settings, transport_offer_); std::make_unique<FakeMediaTransport>(settings, transport_offer_);
media_transport->Connect(packet_transport); media_transport->Connect(packet_transport);
return std::move(media_transport); return std::move(media_transport);
} }
@ -174,7 +173,7 @@ class FakeMediaTransportFactory : public MediaTransportFactory {
rtc::Thread* network_thread, rtc::Thread* network_thread,
const MediaTransportSettings& settings) override { const MediaTransportSettings& settings) override {
std::unique_ptr<MediaTransportInterface> media_transport = std::unique_ptr<MediaTransportInterface> media_transport =
absl::make_unique<FakeMediaTransport>( std::make_unique<FakeMediaTransport>(
settings, transport_offer_, settings.remote_transport_parameters); settings, transport_offer_, settings.remote_transport_parameters);
return std::move(media_transport); return std::move(media_transport);
} }

View file

@ -10,8 +10,9 @@
#include "api/test/loopback_media_transport.h" #include "api/test/loopback_media_transport.h"
#include <memory>
#include "absl/algorithm/container.h" #include "absl/algorithm/container.h"
#include "absl/memory/memory.h"
#include "rtc_base/time_utils.h" #include "rtc_base/time_utils.h"
namespace webrtc { namespace webrtc {
@ -182,7 +183,7 @@ WrapperMediaTransportFactory::CreateMediaTransport(
return wrapped_factory_->CreateMediaTransport(packet_transport, return wrapped_factory_->CreateMediaTransport(packet_transport,
network_thread, settings); network_thread, settings);
} }
return {absl::make_unique<WrapperMediaTransport>(wrapped_media_transport_)}; return {std::make_unique<WrapperMediaTransport>(wrapped_media_transport_)};
} }
RTCErrorOr<std::unique_ptr<DatagramTransportInterface>> RTCErrorOr<std::unique_ptr<DatagramTransportInterface>>
@ -194,7 +195,7 @@ WrapperMediaTransportFactory::CreateDatagramTransport(
return wrapped_factory_->CreateDatagramTransport(network_thread, settings); return wrapped_factory_->CreateDatagramTransport(network_thread, settings);
} }
return { return {
absl::make_unique<WrapperDatagramTransport>(wrapped_datagram_transport_)}; std::make_unique<WrapperDatagramTransport>(wrapped_datagram_transport_)};
} }
std::string WrapperMediaTransportFactory::GetTransportName() const { std::string WrapperMediaTransportFactory::GetTransportName() const {
@ -216,7 +217,7 @@ WrapperMediaTransportFactory::CreateMediaTransport(
if (wrapped_factory_) { if (wrapped_factory_) {
return wrapped_factory_->CreateMediaTransport(network_thread, settings); return wrapped_factory_->CreateMediaTransport(network_thread, settings);
} }
return {absl::make_unique<WrapperMediaTransport>(wrapped_media_transport_)}; return {std::make_unique<WrapperMediaTransport>(wrapped_media_transport_)};
} }
MediaTransportPair::MediaTransportPair(rtc::Thread* thread) MediaTransportPair::MediaTransportPair(rtc::Thread* thread)

View file

@ -16,7 +16,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "api/transport/datagram_transport_interface.h" #include "api/transport/datagram_transport_interface.h"
#include "api/transport/media/media_transport_interface.h" #include "api/transport/media/media_transport_interface.h"
#include "rtc_base/async_invoker.h" #include "rtc_base/async_invoker.h"
@ -98,11 +97,11 @@ class MediaTransportPair {
} }
std::unique_ptr<MediaTransportFactory> first_factory() { std::unique_ptr<MediaTransportFactory> first_factory() {
return absl::make_unique<WrapperMediaTransportFactory>(&first_factory_); return std::make_unique<WrapperMediaTransportFactory>(&first_factory_);
} }
std::unique_ptr<MediaTransportFactory> second_factory() { std::unique_ptr<MediaTransportFactory> second_factory() {
return absl::make_unique<WrapperMediaTransportFactory>(&second_factory_); return std::make_unique<WrapperMediaTransportFactory>(&second_factory_);
} }
void SetState(MediaTransportState state) { void SetState(MediaTransportState state) {

View file

@ -10,12 +10,12 @@
#include "api/test/neteq_simulator_factory.h" #include "api/test/neteq_simulator_factory.h"
#include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include "absl/flags/flag.h" #include "absl/flags/flag.h"
#include "absl/flags/parse.h" #include "absl/flags/parse.h"
#include "absl/memory/memory.h"
#include "modules/audio_coding/neteq/tools/neteq_test_factory.h" #include "modules/audio_coding/neteq/tools/neteq_test_factory.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
@ -33,7 +33,7 @@ namespace webrtc {
namespace test { namespace test {
NetEqSimulatorFactory::NetEqSimulatorFactory() NetEqSimulatorFactory::NetEqSimulatorFactory()
: factory_(absl::make_unique<NetEqTestFactory>()) {} : factory_(std::make_unique<NetEqTestFactory>()) {}
NetEqSimulatorFactory::~NetEqSimulatorFactory() = default; NetEqSimulatorFactory::~NetEqSimulatorFactory() = default;

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
#include "rtc_base/thread_checker.h" #include "rtc_base/thread_checker.h"
@ -32,7 +31,7 @@ std::unique_ptr<TestDependencyFactory> TestDependencyFactory::instance_ =
const TestDependencyFactory& TestDependencyFactory::GetInstance() { const TestDependencyFactory& TestDependencyFactory::GetInstance() {
RTC_DCHECK(GetThreadChecker()->IsCurrent()); RTC_DCHECK(GetThreadChecker()->IsCurrent());
if (instance_ == nullptr) { if (instance_ == nullptr) {
instance_ = absl::make_unique<TestDependencyFactory>(); instance_ = std::make_unique<TestDependencyFactory>();
} }
return *instance_; return *instance_;
} }

View file

@ -19,6 +19,5 @@ rtc_source_set("function_video_factory") {
deps = [ deps = [
"../../../rtc_base:checks", "../../../rtc_base:checks",
"../../video_codecs:video_codecs_api", "../../video_codecs:video_codecs_api",
"//third_party/abseil-cpp/absl/memory",
] ]
} }

View file

@ -99,7 +99,6 @@ rtc_static_library("goog_cc") {
"..:network_state_predictor_api", "..:network_state_predictor_api",
"../../modules/congestion_controller/goog_cc", "../../modules/congestion_controller/goog_cc",
"../../rtc_base:deprecation", "../../rtc_base:deprecation",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
@ -125,7 +124,6 @@ if (rtc_include_tests) {
":network_control", ":network_control",
":test_feedback_generator_interface", ":test_feedback_generator_interface",
"../../test/network:feedback_generator", "../../test/network:feedback_generator",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
} }

View file

@ -10,9 +10,9 @@
#include "api/transport/goog_cc_factory.h" #include "api/transport/goog_cc_factory.h"
#include <memory>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "modules/congestion_controller/goog_cc/goog_cc_network_control.h" #include "modules/congestion_controller/goog_cc/goog_cc_network_control.h"
namespace webrtc { namespace webrtc {
@ -47,8 +47,8 @@ GoogCcNetworkControllerFactory::Create(NetworkControllerConfig config) {
factory_config_.network_state_predictor_factory factory_config_.network_state_predictor_factory
->CreateNetworkStatePredictor(); ->CreateNetworkStatePredictor();
} }
return absl::make_unique<GoogCcNetworkController>(config, return std::make_unique<GoogCcNetworkController>(config,
std::move(goog_cc_config)); std::move(goog_cc_config));
} }
TimeDelta GoogCcNetworkControllerFactory::GetProcessInterval() const { TimeDelta GoogCcNetworkControllerFactory::GetProcessInterval() const {

View file

@ -9,14 +9,15 @@
*/ */
#include "api/transport/test/create_feedback_generator.h" #include "api/transport/test/create_feedback_generator.h"
#include "absl/memory/memory.h" #include <memory>
#include "test/network/feedback_generator.h" #include "test/network/feedback_generator.h"
namespace webrtc { namespace webrtc {
std::unique_ptr<FeedbackGenerator> CreateFeedbackGenerator( std::unique_ptr<FeedbackGenerator> CreateFeedbackGenerator(
FeedbackGenerator::Config confg) { FeedbackGenerator::Config confg) {
return absl::make_unique<FeedbackGeneratorImpl>(confg); return std::make_unique<FeedbackGeneratorImpl>(confg);
} }
} // namespace webrtc } // namespace webrtc

View file

@ -209,7 +209,6 @@ rtc_source_set("video_stream_decoder_create") {
"../../video:video_stream_decoder_impl", "../../video:video_stream_decoder_impl",
"../task_queue", "../task_queue",
"../video_codecs:video_codecs_api", "../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", "../../video:video_stream_encoder_impl",
"../task_queue", "../task_queue",
"../video_codecs:video_codecs_api", "../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", "../../modules/video_coding:webrtc_vp9_helpers",
"../../rtc_base/system:fallthrough", "../../rtc_base/system:fallthrough",
"../video_codecs:video_codecs_api", "../video_codecs:video_codecs_api",
"//third_party/abseil-cpp/absl/memory",
] ]
} }

View file

@ -10,7 +10,8 @@
#include "api/video/builtin_video_bitrate_allocator_factory.h" #include "api/video/builtin_video_bitrate_allocator_factory.h"
#include "absl/memory/memory.h" #include <memory>
#include "api/video/video_bitrate_allocator.h" #include "api/video/video_bitrate_allocator.h"
#include "api/video_codecs/video_codec.h" #include "api/video_codecs/video_codec.h"
#include "modules/video_coding/codecs/vp9/svc_rate_allocator.h" #include "modules/video_coding/codecs/vp9/svc_rate_allocator.h"
@ -51,7 +52,7 @@ class BuiltinVideoBitrateAllocatorFactory
std::unique_ptr<VideoBitrateAllocatorFactory> std::unique_ptr<VideoBitrateAllocatorFactory>
CreateBuiltinVideoBitrateAllocatorFactory() { CreateBuiltinVideoBitrateAllocatorFactory() {
return absl::make_unique<BuiltinVideoBitrateAllocatorFactory>(); return std::make_unique<BuiltinVideoBitrateAllocatorFactory>();
} }
} // namespace webrtc } // namespace webrtc

View file

@ -10,7 +10,8 @@
#include "api/video/video_stream_decoder_create.h" #include "api/video/video_stream_decoder_create.h"
#include "absl/memory/memory.h" #include <memory>
#include "video/video_stream_decoder_impl.h" #include "video/video_stream_decoder_impl.h"
namespace webrtc { namespace webrtc {
@ -20,9 +21,9 @@ std::unique_ptr<VideoStreamDecoderInterface> CreateVideoStreamDecoder(
VideoDecoderFactory* decoder_factory, VideoDecoderFactory* decoder_factory,
TaskQueueFactory* task_queue_factory, TaskQueueFactory* task_queue_factory,
std::map<int, std::pair<SdpVideoFormat, int>> decoder_settings) { std::map<int, std::pair<SdpVideoFormat, int>> decoder_settings) {
return absl::make_unique<VideoStreamDecoderImpl>(callbacks, decoder_factory, return std::make_unique<VideoStreamDecoderImpl>(callbacks, decoder_factory,
task_queue_factory, task_queue_factory,
std::move(decoder_settings)); std::move(decoder_settings));
} }
} // namespace webrtc } // namespace webrtc

View file

@ -10,7 +10,8 @@
#include "api/video/video_stream_encoder_create.h" #include "api/video/video_stream_encoder_create.h"
#include "absl/memory/memory.h" #include <memory>
#include "video/overuse_frame_detector.h" #include "video/overuse_frame_detector.h"
#include "video/video_stream_encoder.h" #include "video/video_stream_encoder.h"
@ -22,9 +23,9 @@ std::unique_ptr<VideoStreamEncoderInterface> CreateVideoStreamEncoder(
uint32_t number_of_cores, uint32_t number_of_cores,
VideoStreamEncoderObserver* encoder_stats_observer, VideoStreamEncoderObserver* encoder_stats_observer,
const VideoStreamEncoderSettings& settings) { const VideoStreamEncoderSettings& settings) {
return absl::make_unique<VideoStreamEncoder>( return std::make_unique<VideoStreamEncoder>(
clock, number_of_cores, encoder_stats_observer, settings, clock, number_of_cores, encoder_stats_observer, settings,
absl::make_unique<OveruseFrameDetector>(encoder_stats_observer), std::make_unique<OveruseFrameDetector>(encoder_stats_observer),
task_queue_factory); task_queue_factory);
} }

View file

@ -82,7 +82,6 @@ rtc_static_library("builtin_video_decoder_factory") {
"../../api:scoped_refptr", "../../api:scoped_refptr",
"../../media:rtc_internal_video_codecs", "../../media:rtc_internal_video_codecs",
"../../rtc_base/system:rtc_export", "../../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", "../../media:rtc_media_base",
"../../rtc_base:checks", "../../rtc_base:checks",
"../../rtc_base/system:rtc_export", "../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings", "//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:video_coding_utility",
"../../modules/video_coding:webrtc_vp8_temporal_layers", "../../modules/video_coding:webrtc_vp8_temporal_layers",
"../../rtc_base:checks", "../../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_bitrate_allocation",
"../video:video_frame", "../video:video_frame",
"../video:video_rtp_headers", "../video:video_rtp_headers",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
} }

View file

@ -10,13 +10,14 @@
#include "api/video_codecs/builtin_video_decoder_factory.h" #include "api/video_codecs/builtin_video_decoder_factory.h"
#include "absl/memory/memory.h" #include <memory>
#include "media/engine/internal_decoder_factory.h" #include "media/engine/internal_decoder_factory.h"
namespace webrtc { namespace webrtc {
std::unique_ptr<VideoDecoderFactory> CreateBuiltinVideoDecoderFactory() { std::unique_ptr<VideoDecoderFactory> CreateBuiltinVideoDecoderFactory() {
return absl::make_unique<InternalDecoderFactory>(); return std::make_unique<InternalDecoderFactory>();
} }
} // namespace webrtc } // namespace webrtc

View file

@ -10,9 +10,9 @@
#include "api/video_codecs/builtin_video_encoder_factory.h" #include "api/video_codecs/builtin_video_encoder_factory.h"
#include <memory>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "api/video_codecs/sdp_video_format.h" #include "api/video_codecs/sdp_video_format.h"
#include "api/video_codecs/video_encoder.h" #include "api/video_codecs/video_encoder.h"
@ -61,7 +61,7 @@ class BuiltinVideoEncoderFactory : public VideoEncoderFactory {
std::unique_ptr<VideoEncoder> internal_encoder; std::unique_ptr<VideoEncoder> internal_encoder;
if (IsFormatSupported(internal_encoder_factory_->GetSupportedFormats(), if (IsFormatSupported(internal_encoder_factory_->GetSupportedFormats(),
format)) { format)) {
internal_encoder = absl::make_unique<EncoderSimulcastProxy>( internal_encoder = std::make_unique<EncoderSimulcastProxy>(
internal_encoder_factory_.get(), format); internal_encoder_factory_.get(), format);
} }
@ -79,7 +79,7 @@ class BuiltinVideoEncoderFactory : public VideoEncoderFactory {
} // namespace } // namespace
std::unique_ptr<VideoEncoderFactory> CreateBuiltinVideoEncoderFactory() { std::unique_ptr<VideoEncoderFactory> CreateBuiltinVideoEncoderFactory() {
return absl::make_unique<BuiltinVideoEncoderFactory>(); return std::make_unique<BuiltinVideoEncoderFactory>();
} }
} // namespace webrtc } // namespace webrtc

View file

@ -38,7 +38,6 @@ if (rtc_include_tests) {
"../../video:video_frame_i420", "../../video:video_frame_i420",
"../../video:video_rtp_headers", "../../video:video_rtp_headers",
"//testing/gtest", "//testing/gtest",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
} }

View file

@ -17,7 +17,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "api/fec_controller_override.h" #include "api/fec_controller_override.h"
#include "api/scoped_refptr.h" #include "api/scoped_refptr.h"
@ -193,11 +192,11 @@ void VideoEncoderSoftwareFallbackWrapperTest::EncodeFrame(int expected_ret) {
std::vector<VideoFrameType> types(1, VideoFrameType::kVideoFrameKey); std::vector<VideoFrameType> types(1, VideoFrameType::kVideoFrameKey);
frame_ = frame_ =
absl::make_unique<VideoFrame>(VideoFrame::Builder() std::make_unique<VideoFrame>(VideoFrame::Builder()
.set_video_frame_buffer(buffer) .set_video_frame_buffer(buffer)
.set_rotation(webrtc::kVideoRotation_0) .set_rotation(webrtc::kVideoRotation_0)
.set_timestamp_us(0) .set_timestamp_us(0)
.build()); .build());
EXPECT_EQ(expected_ret, fallback_wrapper_->Encode(*frame_, &types)); EXPECT_EQ(expected_ret, fallback_wrapper_->Encode(*frame_, &types));
} }

View file

@ -12,10 +12,10 @@
#include <stdint.h> #include <stdint.h>
#include <memory>
#include <string> #include <string>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "api/video/encoded_image.h" #include "api/video/encoded_image.h"
#include "api/video_codecs/video_codec.h" #include "api/video_codecs/video_codec.h"
#include "modules/video_coding/include/video_error_codes.h" #include "modules/video_coding/include/video_error_codes.h"
@ -225,7 +225,7 @@ VideoDecoder& VideoDecoderSoftwareFallbackWrapper::active_decoder() const {
std::unique_ptr<VideoDecoder> CreateVideoDecoderSoftwareFallbackWrapper( std::unique_ptr<VideoDecoder> CreateVideoDecoderSoftwareFallbackWrapper(
std::unique_ptr<VideoDecoder> sw_fallback_decoder, std::unique_ptr<VideoDecoder> sw_fallback_decoder,
std::unique_ptr<VideoDecoder> hw_decoder) { std::unique_ptr<VideoDecoder> hw_decoder) {
return absl::make_unique<VideoDecoderSoftwareFallbackWrapper>( return std::make_unique<VideoDecoderSoftwareFallbackWrapper>(
std::move(sw_fallback_decoder), std::move(hw_decoder)); std::move(sw_fallback_decoder), std::move(hw_decoder));
} }

View file

@ -13,11 +13,11 @@
#include <stdint.h> #include <stdint.h>
#include <cstdio> #include <cstdio>
#include <memory>
#include <string> #include <string>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "api/fec_controller_override.h" #include "api/fec_controller_override.h"
#include "api/video/video_bitrate_allocation.h" #include "api/video/video_bitrate_allocation.h"
@ -395,7 +395,7 @@ void VideoEncoderSoftwareFallbackWrapper::ValidateSettingsForForcedFallback() {
std::unique_ptr<VideoEncoder> CreateVideoEncoderSoftwareFallbackWrapper( std::unique_ptr<VideoEncoder> CreateVideoEncoderSoftwareFallbackWrapper(
std::unique_ptr<VideoEncoder> sw_fallback_encoder, std::unique_ptr<VideoEncoder> sw_fallback_encoder,
std::unique_ptr<VideoEncoder> hw_encoder) { std::unique_ptr<VideoEncoder> hw_encoder) {
return absl::make_unique<VideoEncoderSoftwareFallbackWrapper>( return std::make_unique<VideoEncoderSoftwareFallbackWrapper>(
std::move(sw_fallback_encoder), std::move(hw_encoder)); std::move(sw_fallback_encoder), std::move(hw_encoder));
} }

View file

@ -11,10 +11,10 @@
#include "api/video_codecs/vp8_temporal_layers_factory.h" #include "api/video_codecs/vp8_temporal_layers_factory.h"
#include <algorithm> #include <algorithm>
#include <memory>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "api/fec_controller_override.h" #include "api/fec_controller_override.h"
#include "modules/video_coding/codecs/vp8/default_temporal_layers.h" #include "modules/video_coding/codecs/vp8/default_temporal_layers.h"
#include "modules/video_coding/codecs/vp8/screenshare_layers.h" #include "modules/video_coding/codecs/vp8/screenshare_layers.h"
@ -39,20 +39,20 @@ std::unique_ptr<Vp8FrameBufferController> Vp8TemporalLayersFactory::Create(
// Legacy screenshare layers supports max 2 layers. // Legacy screenshare layers supports max 2 layers.
num_temporal_layers = std::max(2, num_temporal_layers); num_temporal_layers = std::max(2, num_temporal_layers);
controllers.push_back( controllers.push_back(
absl::make_unique<ScreenshareLayers>(num_temporal_layers)); std::make_unique<ScreenshareLayers>(num_temporal_layers));
} else { } else {
controllers.push_back( controllers.push_back(
absl::make_unique<DefaultTemporalLayers>(num_temporal_layers)); std::make_unique<DefaultTemporalLayers>(num_temporal_layers));
} }
} }
return absl::make_unique<Vp8TemporalLayers>(std::move(controllers), return std::make_unique<Vp8TemporalLayers>(std::move(controllers),
fec_controller_override); fec_controller_override);
} }
std::unique_ptr<Vp8FrameBufferControllerFactory> std::unique_ptr<Vp8FrameBufferControllerFactory>
Vp8TemporalLayersFactory::Clone() const { Vp8TemporalLayersFactory::Clone() const {
return absl::make_unique<Vp8TemporalLayersFactory>(); return std::make_unique<Vp8TemporalLayersFactory>();
} }
} // namespace webrtc } // namespace webrtc

View file

@ -108,7 +108,6 @@ if (rtc_include_tests) {
"../system_wrappers", "../system_wrappers",
"../test:test_common", "../test:test_common",
"../test:test_support", "../test:test_support",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
@ -174,7 +173,6 @@ if (rtc_include_tests) {
"../test:test_support", "../test:test_support",
"utility:utility_tests", "utility:utility_tests",
"//testing/gtest", "//testing/gtest",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
@ -206,7 +204,6 @@ if (rtc_include_tests) {
"../test/pc/e2e:network_quality_metrics_reporter", "../test/pc/e2e:network_quality_metrics_reporter",
"//testing/gtest", "//testing/gtest",
"//third_party/abseil-cpp/absl/flags:flag", "//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/memory",
] ]
if (is_android) { if (is_android) {
deps += [ "//testing/android/native_test:native_test_native_code" ] deps += [ "//testing/android/native_test:native_test_native_code" ]
@ -281,7 +278,6 @@ if (rtc_include_tests) {
"../test:test_main", "../test:test_main",
"../test:test_support", "../test:test_support",
"//testing/gtest", "//testing/gtest",
"//third_party/abseil-cpp/absl/memory",
] ]
data = [ data = [

View file

@ -10,11 +10,11 @@
#include "audio/audio_send_stream.h" #include "audio/audio_send_stream.h"
#include <memory>
#include <string> #include <string>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "api/audio_codecs/audio_encoder.h" #include "api/audio_codecs/audio_encoder.h"
#include "api/audio_codecs/audio_encoder_factory.h" #include "api/audio_codecs/audio_encoder_factory.h"
#include "api/audio_codecs/audio_format.h" #include "api/audio_codecs/audio_format.h"
@ -69,14 +69,14 @@ void UpdateEventLogStreamConfig(RtcEventLog* event_log,
return; return;
} }
auto rtclog_config = absl::make_unique<rtclog::StreamConfig>(); auto rtclog_config = std::make_unique<rtclog::StreamConfig>();
rtclog_config->local_ssrc = config.rtp.ssrc; rtclog_config->local_ssrc = config.rtp.ssrc;
rtclog_config->rtp_extensions = config.rtp.extensions; rtclog_config->rtp_extensions = config.rtp.extensions;
if (config.send_codec_spec) { if (config.send_codec_spec) {
rtclog_config->codecs.emplace_back(config.send_codec_spec->format.name, rtclog_config->codecs.emplace_back(config.send_codec_spec->format.name,
config.send_codec_spec->payload_type, 0); config.send_codec_spec->payload_type, 0);
} }
event_log->Log(absl::make_unique<RtcEventAudioSendStreamConfig>( event_log->Log(std::make_unique<RtcEventAudioSendStreamConfig>(
std::move(rtclog_config))); std::move(rtclog_config)));
} }

View file

@ -10,12 +10,12 @@
#include "audio/audio_send_stream.h" #include "audio/audio_send_stream.h"
#include <memory>
#include <string> #include <string>
#include <thread> #include <thread>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "api/task_queue/default_task_queue_factory.h" #include "api/task_queue/default_task_queue_factory.h"
#include "api/test/mock_frame_encryptor.h" #include "api/test/mock_frame_encryptor.h"
#include "audio/audio_state.h" #include "audio/audio_state.h"
@ -331,7 +331,7 @@ std::unique_ptr<AudioFrame> CreateAudioFrame1kHzSineWave(int16_t audio_level,
size_t num_channels) { size_t num_channels) {
size_t samples_per_channel = sample_rate_hz / (1000 / duration_ms); size_t samples_per_channel = sample_rate_hz / (1000 / duration_ms);
std::vector<int16_t> audio_data(samples_per_channel * num_channels, 0); std::vector<int16_t> audio_data(samples_per_channel * num_channels, 0);
std::unique_ptr<AudioFrame> audio_frame = absl::make_unique<AudioFrame>(); std::unique_ptr<AudioFrame> audio_frame = std::make_unique<AudioFrame>();
audio_frame->UpdateFrame(0 /* RTP timestamp */, &audio_data[0], audio_frame->UpdateFrame(0 /* RTP timestamp */, &audio_data[0],
samples_per_channel, sample_rate_hz, samples_per_channel, sample_rate_hz,
AudioFrame::SpeechType::kNormalSpeech, AudioFrame::SpeechType::kNormalSpeech,

View file

@ -11,10 +11,10 @@
#include "audio/audio_state.h" #include "audio/audio_state.h"
#include <algorithm> #include <algorithm>
#include <memory>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "audio/audio_receive_stream.h" #include "audio/audio_receive_stream.h"
#include "modules/audio_device/include/audio_device.h" #include "modules/audio_device/include/audio_device.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
@ -130,8 +130,7 @@ void AudioState::SetPlayout(bool enabled) {
} }
} else { } else {
config_.audio_device_module->StopPlayout(); config_.audio_device_module->StopPlayout();
null_audio_poller_ = null_audio_poller_ = std::make_unique<NullAudioPoller>(&audio_transport_);
absl::make_unique<NullAudioPoller>(&audio_transport_);
} }
} }
} }

View file

@ -17,7 +17,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "api/crypto/frame_decryptor_interface.h" #include "api/crypto/frame_decryptor_interface.h"
#include "api/rtc_event_log/rtc_event_log.h" #include "api/rtc_event_log/rtc_event_log.h"
#include "audio/audio_level.h" #include "audio/audio_level.h"
@ -339,7 +338,7 @@ AudioMixer::Source::AudioFrameInfo ChannelReceive::GetAudioFrameWithInfo(
RTC_DCHECK_RUNS_SERIALIZED(&audio_thread_race_checker_); RTC_DCHECK_RUNS_SERIALIZED(&audio_thread_race_checker_);
audio_frame->sample_rate_hz_ = sample_rate_hz; audio_frame->sample_rate_hz_ = sample_rate_hz;
event_log_->Log(absl::make_unique<RtcEventAudioPlayout>(remote_ssrc_)); event_log_->Log(std::make_unique<RtcEventAudioPlayout>(remote_ssrc_));
// Get 10ms raw PCM data from the ACM (mixer limits output frequency) // Get 10ms raw PCM data from the ACM (mixer limits output frequency)
bool muted; bool muted;
@ -949,7 +948,7 @@ std::unique_ptr<ChannelReceiveInterface> CreateChannelReceive(
absl::optional<AudioCodecPairId> codec_pair_id, absl::optional<AudioCodecPairId> codec_pair_id,
rtc::scoped_refptr<FrameDecryptorInterface> frame_decryptor, rtc::scoped_refptr<FrameDecryptorInterface> frame_decryptor,
const webrtc::CryptoOptions& crypto_options) { const webrtc::CryptoOptions& crypto_options) {
return absl::make_unique<ChannelReceive>( return std::make_unique<ChannelReceive>(
clock, module_process_thread, audio_device_module, media_transport_config, clock, module_process_thread, audio_device_module, media_transport_config,
rtcp_send_transport, rtc_event_log, local_ssrc, remote_ssrc, rtcp_send_transport, rtc_event_log, local_ssrc, remote_ssrc,
jitter_buffer_max_packets, jitter_buffer_fast_playout, jitter_buffer_max_packets, jitter_buffer_fast_playout,

View file

@ -17,7 +17,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "api/array_view.h" #include "api/array_view.h"
#include "api/call/transport.h" #include "api/call/transport.h"
#include "api/crypto/frame_encryptor_interface.h" #include "api/crypto/frame_encryptor_interface.h"
@ -662,7 +661,7 @@ ChannelSend::ChannelSend(Clock* clock,
_rtpRtcpModule = RtpRtcp::Create(configuration); _rtpRtcpModule = RtpRtcp::Create(configuration);
_rtpRtcpModule->SetSendingMediaStatus(false); _rtpRtcpModule->SetSendingMediaStatus(false);
rtp_sender_audio_ = absl::make_unique<RTPSenderAudio>( rtp_sender_audio_ = std::make_unique<RTPSenderAudio>(
configuration.clock, _rtpRtcpModule->RtpSender()); configuration.clock, _rtpRtcpModule->RtpSender());
// We want to invoke the 'TargetRateObserver' and |OnOverheadChanged| // We want to invoke the 'TargetRateObserver' and |OnOverheadChanged|
@ -1204,7 +1203,7 @@ std::unique_ptr<ChannelSendInterface> CreateChannelSend(
bool extmap_allow_mixed, bool extmap_allow_mixed,
int rtcp_report_interval_ms, int rtcp_report_interval_ms,
uint32_t ssrc) { uint32_t ssrc) {
return absl::make_unique<ChannelSend>( return std::make_unique<ChannelSend>(
clock, task_queue_factory, module_process_thread, media_transport_config, clock, task_queue_factory, module_process_thread, media_transport_config,
overhead_observer, rtp_transport, rtcp_rtt_stats, rtc_event_log, overhead_observer, rtp_transport, rtcp_rtt_stats, rtc_event_log,
frame_encryptor, crypto_options, extmap_allow_mixed, frame_encryptor, crypto_options, extmap_allow_mixed,

View file

@ -10,7 +10,8 @@
#include "audio/test/audio_bwe_integration_test.h" #include "audio/test/audio_bwe_integration_test.h"
#include "absl/memory/memory.h" #include <memory>
#include "api/task_queue/queued_task.h" #include "api/task_queue/queued_task.h"
#include "api/task_queue/task_queue_base.h" #include "api/task_queue/task_queue_base.h"
#include "call/fake_network_pipe.h" #include "call/fake_network_pipe.h"
@ -63,9 +64,9 @@ test::PacketTransport* AudioBweTest::CreateSendTransport(
return new test::PacketTransport( return new test::PacketTransport(
task_queue, sender_call, this, test::PacketTransport::kSender, task_queue, sender_call, this, test::PacketTransport::kSender,
test::CallTest::payload_type_map_, test::CallTest::payload_type_map_,
absl::make_unique<FakeNetworkPipe>( std::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), Clock::GetRealTimeClock(),
absl::make_unique<SimulatedNetwork>(GetNetworkPipeConfig()))); std::make_unique<SimulatedNetwork>(GetNetworkPipeConfig())));
} }
test::PacketTransport* AudioBweTest::CreateReceiveTransport( test::PacketTransport* AudioBweTest::CreateReceiveTransport(
@ -73,9 +74,9 @@ test::PacketTransport* AudioBweTest::CreateReceiveTransport(
return new test::PacketTransport( return new test::PacketTransport(
task_queue, nullptr, this, test::PacketTransport::kReceiver, task_queue, nullptr, this, test::PacketTransport::kReceiver,
test::CallTest::payload_type_map_, test::CallTest::payload_type_map_,
absl::make_unique<FakeNetworkPipe>( std::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), Clock::GetRealTimeClock(),
absl::make_unique<SimulatedNetwork>(GetNetworkPipeConfig()))); std::make_unique<SimulatedNetwork>(GetNetworkPipeConfig())));
} }
void AudioBweTest::PerformTest() { void AudioBweTest::PerformTest() {
@ -143,8 +144,8 @@ class NoBandwidthDropAfterDtx : public AudioBweTest {
} }
void PerformTest() override { void PerformTest() override {
stats_poller_.PostDelayedTask( stats_poller_.PostDelayedTask(std::make_unique<StatsPollTask>(sender_call_),
absl::make_unique<StatsPollTask>(sender_call_), 100); 100);
sender_call_->OnAudioTransportOverheadChanged(0); sender_call_->OnAudioTransportOverheadChanged(0);
AudioBweTest::PerformTest(); AudioBweTest::PerformTest();
} }

View file

@ -11,8 +11,8 @@
#include "audio/test/audio_end_to_end_test.h" #include "audio/test/audio_end_to_end_test.h"
#include <algorithm> #include <algorithm>
#include <memory>
#include "absl/memory/memory.h"
#include "call/fake_network_pipe.h" #include "call/fake_network_pipe.h"
#include "call/simulated_network.h" #include "call/simulated_network.h"
#include "system_wrappers/include/sleep.h" #include "system_wrappers/include/sleep.h"
@ -68,9 +68,9 @@ test::PacketTransport* AudioEndToEndTest::CreateSendTransport(
return new test::PacketTransport( return new test::PacketTransport(
task_queue, sender_call, this, test::PacketTransport::kSender, task_queue, sender_call, this, test::PacketTransport::kSender,
test::CallTest::payload_type_map_, test::CallTest::payload_type_map_,
absl::make_unique<FakeNetworkPipe>( std::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), Clock::GetRealTimeClock(),
absl::make_unique<SimulatedNetwork>(GetNetworkPipeConfig()))); std::make_unique<SimulatedNetwork>(GetNetworkPipeConfig())));
} }
test::PacketTransport* AudioEndToEndTest::CreateReceiveTransport( test::PacketTransport* AudioEndToEndTest::CreateReceiveTransport(
@ -78,9 +78,9 @@ test::PacketTransport* AudioEndToEndTest::CreateReceiveTransport(
return new test::PacketTransport( return new test::PacketTransport(
task_queue, nullptr, this, test::PacketTransport::kReceiver, task_queue, nullptr, this, test::PacketTransport::kReceiver,
test::CallTest::payload_type_map_, test::CallTest::payload_type_map_,
absl::make_unique<FakeNetworkPipe>( std::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), Clock::GetRealTimeClock(),
absl::make_unique<SimulatedNetwork>(GetNetworkPipeConfig()))); std::make_unique<SimulatedNetwork>(GetNetworkPipeConfig())));
} }
void AudioEndToEndTest::ModifyAudioConfigs( void AudioEndToEndTest::ModifyAudioConfigs(

View file

@ -8,7 +8,8 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "absl/memory/memory.h" #include <memory>
#include "api/audio_codecs/audio_decoder_factory_template.h" #include "api/audio_codecs/audio_decoder_factory_template.h"
#include "api/audio_codecs/audio_encoder_factory_template.h" #include "api/audio_codecs/audio_encoder_factory_template.h"
#include "api/audio_codecs/opus/audio_decoder_opus.h" #include "api/audio_codecs/opus/audio_decoder_opus.h"
@ -85,8 +86,8 @@ TEST(AudioWithMediaTransport, DeliversAudio) {
task_queue_factory.get(), task_queue_factory.get(),
TestAudioDeviceModule::CreatePulsedNoiseCapturer( TestAudioDeviceModule::CreatePulsedNoiseCapturer(
/* max_amplitude= */ 10000, kSamplingFrequency, kNumChannels), /* max_amplitude= */ 10000, kSamplingFrequency, kNumChannels),
absl::make_unique<TestRenderer>(kSamplingFrequency, kNumChannels, std::make_unique<TestRenderer>(kSamplingFrequency, kNumChannels,
kWantedSamples)); kWantedSamples));
AudioState::Config audio_config; AudioState::Config audio_config;
audio_config.audio_mixer = AudioMixerImpl::Create(); audio_config.audio_mixer = AudioMixerImpl::Create();

View file

@ -8,8 +8,9 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include <memory>
#include "absl/flags/flag.h" #include "absl/flags/flag.h"
#include "absl/memory/memory.h"
#include "api/test/create_network_emulation_manager.h" #include "api/test/create_network_emulation_manager.h"
#include "api/test/create_peerconnection_quality_test_fixture.h" #include "api/test/create_peerconnection_quality_test_fixture.h"
#include "api/test/network_emulation_manager.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(), fixture->AddPeer(network_links.second->network_thread(),
network_links.second->network_manager(), bob_configurer); network_links.second->network_manager(), bob_configurer);
fixture->AddQualityMetricsReporter( fixture->AddQualityMetricsReporter(
absl::make_unique<webrtc_pc_e2e::NetworkQualityMetricsReporter>( std::make_unique<webrtc_pc_e2e::NetworkQualityMetricsReporter>(
network_links.first, network_links.second)); network_links.first, network_links.second));
return fixture; return fixture;
} }

View file

@ -117,7 +117,6 @@ rtc_source_set("rtp_receiver") {
"../modules/rtp_rtcp:rtp_rtcp_format", "../modules/rtp_rtcp:rtp_rtcp_format",
"../rtc_base:checks", "../rtc_base:checks",
"../rtc_base:rtc_base_approved", "../rtc_base:rtc_base_approved",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
} }
@ -170,7 +169,6 @@ rtc_source_set("rtp_sender") {
"../system_wrappers:field_trial", "../system_wrappers:field_trial",
"//third_party/abseil-cpp/absl/algorithm:container", "//third_party/abseil-cpp/absl/algorithm:container",
"//third_party/abseil-cpp/absl/container:inlined_vector", "//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:optional",
"//third_party/abseil-cpp/absl/types:variant", "//third_party/abseil-cpp/absl/types:variant",
] ]
@ -269,7 +267,6 @@ rtc_static_library("call") {
"../system_wrappers:field_trial", "../system_wrappers:field_trial",
"../system_wrappers:metrics", "../system_wrappers:metrics",
"../video", "../video",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
} }
@ -317,7 +314,6 @@ rtc_source_set("simulated_network") {
"../rtc_base:checks", "../rtc_base:checks",
"../rtc_base:rtc_base_approved", "../rtc_base:rtc_base_approved",
"../rtc_base/synchronization:sequence_checker", "../rtc_base/synchronization:sequence_checker",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
} }
@ -349,7 +345,6 @@ rtc_source_set("fake_network") {
"../rtc_base:rtc_base_approved", "../rtc_base:rtc_base_approved",
"../rtc_base/synchronization:sequence_checker", "../rtc_base/synchronization:sequence_checker",
"../system_wrappers", "../system_wrappers",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
@ -475,7 +470,6 @@ if (rtc_include_tests) {
"../video", "../video",
"//testing/gtest", "//testing/gtest",
"//third_party/abseil-cpp/absl/flags:flag", "//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
@ -537,7 +531,6 @@ if (rtc_include_tests) {
"../test:test_support", "../test:test_support",
"//testing/gtest", "//testing/gtest",
"//third_party/abseil-cpp/absl/algorithm:container", "//third_party/abseil-cpp/absl/algorithm:container",
"//third_party/abseil-cpp/absl/memory",
] ]
} }
} }

View file

@ -12,7 +12,6 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "absl/memory/memory.h"
#include "call/call.h" #include "call/call.h"
#include "call/fake_network_pipe.h" #include "call/fake_network_pipe.h"
#include "call/simulated_network.h" #include "call/simulated_network.h"
@ -108,15 +107,15 @@ class BitrateEstimatorTest : public test::CallTest {
send_transport_.reset(new test::DirectTransport( send_transport_.reset(new test::DirectTransport(
&task_queue_, &task_queue_,
absl::make_unique<FakeNetworkPipe>( std::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>( Clock::GetRealTimeClock(), std::make_unique<SimulatedNetwork>(
BuiltInNetworkBehaviorConfig())), BuiltInNetworkBehaviorConfig())),
sender_call_.get(), payload_type_map_)); sender_call_.get(), payload_type_map_));
send_transport_->SetReceiver(receiver_call_->Receiver()); send_transport_->SetReceiver(receiver_call_->Receiver());
receive_transport_.reset(new test::DirectTransport( receive_transport_.reset(new test::DirectTransport(
&task_queue_, &task_queue_,
absl::make_unique<FakeNetworkPipe>( std::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>( Clock::GetRealTimeClock(), std::make_unique<SimulatedNetwork>(
BuiltInNetworkBehaviorConfig())), BuiltInNetworkBehaviorConfig())),
receiver_call_.get(), payload_type_map_)); receiver_call_.get(), payload_type_map_));
receive_transport_->SetReceiver(sender_call_->Receiver()); receive_transport_->SetReceiver(sender_call_->Receiver());
@ -171,14 +170,14 @@ class BitrateEstimatorTest : public test::CallTest {
send_stream_(nullptr), send_stream_(nullptr),
frame_generator_capturer_(), frame_generator_capturer_(),
decoder_factory_( decoder_factory_(
[]() { return absl::make_unique<test::FakeDecoder>(); }) { []() { return std::make_unique<test::FakeDecoder>(); }) {
test_->GetVideoSendConfig()->rtp.ssrcs[0]++; test_->GetVideoSendConfig()->rtp.ssrcs[0]++;
send_stream_ = test_->sender_call_->CreateVideoSendStream( send_stream_ = test_->sender_call_->CreateVideoSendStream(
test_->GetVideoSendConfig()->Copy(), test_->GetVideoSendConfig()->Copy(),
test_->GetVideoEncoderConfig()->Copy()); test_->GetVideoEncoderConfig()->Copy());
RTC_DCHECK_EQ(1, test_->GetVideoEncoderConfig()->number_of_streams); RTC_DCHECK_EQ(1, test_->GetVideoEncoderConfig()->number_of_streams);
frame_generator_capturer_ = frame_generator_capturer_ =
absl::make_unique<test::FrameGeneratorCapturer>( std::make_unique<test::FrameGeneratorCapturer>(
test->clock_, test->clock_,
test::FrameGenerator::CreateSquareGenerator( test::FrameGenerator::CreateSquareGenerator(
kDefaultWidth, kDefaultHeight, absl::nullopt, absl::nullopt), kDefaultWidth, kDefaultHeight, absl::nullopt, absl::nullopt),

View file

@ -19,7 +19,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "api/rtc_event_log/rtc_event_log.h" #include "api/rtc_event_log/rtc_event_log.h"
#include "api/transport/network_control.h" #include "api/transport/network_control.h"
@ -112,7 +111,7 @@ const int* FindKeyByValue(const std::map<int, int>& m, int v) {
std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig( std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
const VideoReceiveStream::Config& config) { const VideoReceiveStream::Config& config) {
auto rtclog_config = absl::make_unique<rtclog::StreamConfig>(); auto rtclog_config = std::make_unique<rtclog::StreamConfig>();
rtclog_config->remote_ssrc = config.rtp.remote_ssrc; rtclog_config->remote_ssrc = config.rtp.remote_ssrc;
rtclog_config->local_ssrc = config.rtp.local_ssrc; rtclog_config->local_ssrc = config.rtp.local_ssrc;
rtclog_config->rtx_ssrc = config.rtp.rtx_ssrc; rtclog_config->rtx_ssrc = config.rtp.rtx_ssrc;
@ -131,7 +130,7 @@ std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig( std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
const VideoSendStream::Config& config, const VideoSendStream::Config& config,
size_t ssrc_index) { size_t ssrc_index) {
auto rtclog_config = absl::make_unique<rtclog::StreamConfig>(); auto rtclog_config = std::make_unique<rtclog::StreamConfig>();
rtclog_config->local_ssrc = config.rtp.ssrcs[ssrc_index]; rtclog_config->local_ssrc = config.rtp.ssrcs[ssrc_index];
if (ssrc_index < config.rtp.rtx.ssrcs.size()) { if (ssrc_index < config.rtp.rtx.ssrcs.size()) {
rtclog_config->rtx_ssrc = config.rtp.rtx.ssrcs[ssrc_index]; rtclog_config->rtx_ssrc = config.rtp.rtx.ssrcs[ssrc_index];
@ -147,7 +146,7 @@ std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig( std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
const AudioReceiveStream::Config& config) { const AudioReceiveStream::Config& config) {
auto rtclog_config = absl::make_unique<rtclog::StreamConfig>(); auto rtclog_config = std::make_unique<rtclog::StreamConfig>();
rtclog_config->remote_ssrc = config.rtp.remote_ssrc; rtclog_config->remote_ssrc = config.rtp.remote_ssrc;
rtclog_config->local_ssrc = config.rtp.local_ssrc; rtclog_config->local_ssrc = config.rtp.local_ssrc;
rtclog_config->rtp_extensions = config.rtp.extensions; rtclog_config->rtp_extensions = config.rtp.extensions;
@ -416,7 +415,7 @@ Call* Call::Create(const Call::Config& config,
RTC_DCHECK(config.task_queue_factory); RTC_DCHECK(config.task_queue_factory);
return new internal::Call( return new internal::Call(
clock, config, clock, config,
absl::make_unique<RtpTransportControllerSend>( std::make_unique<RtpTransportControllerSend>(
clock, config.event_log, config.network_state_predictor_factory, clock, config.event_log, config.network_state_predictor_factory,
config.network_controller_factory, config.bitrate_config, config.network_controller_factory, config.bitrate_config,
std::move(pacer_thread), config.task_queue_factory), std::move(pacer_thread), config.task_queue_factory),
@ -684,7 +683,7 @@ webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream(
TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream"); TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream");
RTC_DCHECK_RUN_ON(&configuration_sequence_checker_); RTC_DCHECK_RUN_ON(&configuration_sequence_checker_);
RegisterRateObserver(); RegisterRateObserver();
event_log_->Log(absl::make_unique<RtcEventAudioReceiveStreamConfig>( event_log_->Log(std::make_unique<RtcEventAudioReceiveStreamConfig>(
CreateRtcLogStreamConfig(config))); CreateRtcLogStreamConfig(config)));
AudioReceiveStream* receive_stream = new AudioReceiveStream( AudioReceiveStream* receive_stream = new AudioReceiveStream(
clock_, &audio_receiver_controller_, transport_send_ptr_->packet_router(), clock_, &audio_receiver_controller_, transport_send_ptr_->packet_router(),
@ -748,7 +747,7 @@ webrtc::VideoSendStream* Call::CreateVideoSendStream(
video_send_delay_stats_->AddSsrcs(config); video_send_delay_stats_->AddSsrcs(config);
for (size_t ssrc_index = 0; ssrc_index < config.rtp.ssrcs.size(); for (size_t ssrc_index = 0; ssrc_index < config.rtp.ssrcs.size();
++ssrc_index) { ++ssrc_index) {
event_log_->Log(absl::make_unique<RtcEventVideoSendStreamConfig>( event_log_->Log(std::make_unique<RtcEventVideoSendStreamConfig>(
CreateRtcLogStreamConfig(config, ssrc_index))); CreateRtcLogStreamConfig(config, ssrc_index)));
} }
@ -786,7 +785,7 @@ webrtc::VideoSendStream* Call::CreateVideoSendStream(
std::unique_ptr<FecController> fec_controller = std::unique_ptr<FecController> fec_controller =
config_.fec_controller_factory config_.fec_controller_factory
? config_.fec_controller_factory->CreateFecController() ? config_.fec_controller_factory->CreateFecController()
: absl::make_unique<FecControllerDefault>(clock_); : std::make_unique<FecControllerDefault>(clock_);
return CreateVideoSendStream(std::move(config), std::move(encoder_config), return CreateVideoSendStream(std::move(config), std::move(encoder_config),
std::move(fec_controller)); std::move(fec_controller));
} }
@ -862,7 +861,7 @@ webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream(
} }
receive_stream->SignalNetworkState(video_network_state_); receive_stream->SignalNetworkState(video_network_state_);
UpdateAggregateNetworkState(); UpdateAggregateNetworkState();
event_log_->Log(absl::make_unique<RtcEventVideoReceiveStreamConfig>( event_log_->Log(std::make_unique<RtcEventVideoReceiveStreamConfig>(
CreateRtcLogStreamConfig(config))); CreateRtcLogStreamConfig(config)));
return receive_stream; return receive_stream;
} }
@ -1222,7 +1221,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtcp(MediaType media_type,
} }
if (rtcp_delivered) { if (rtcp_delivered) {
event_log_->Log(absl::make_unique<RtcEventRtcpPacketIncoming>( event_log_->Log(std::make_unique<RtcEventRtcpPacketIncoming>(
rtc::MakeArrayView(packet, length))); rtc::MakeArrayView(packet, length)));
} }
@ -1284,7 +1283,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type,
received_bytes_per_second_counter_.Add(length); received_bytes_per_second_counter_.Add(length);
received_audio_bytes_per_second_counter_.Add(length); received_audio_bytes_per_second_counter_.Add(length);
event_log_->Log( event_log_->Log(
absl::make_unique<RtcEventRtpPacketIncoming>(parsed_packet)); std::make_unique<RtcEventRtpPacketIncoming>(parsed_packet));
const int64_t arrival_time_ms = parsed_packet.arrival_time_ms(); const int64_t arrival_time_ms = parsed_packet.arrival_time_ms();
if (!first_received_rtp_audio_ms_) { if (!first_received_rtp_audio_ms_) {
first_received_rtp_audio_ms_.emplace(arrival_time_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_bytes_per_second_counter_.Add(length);
received_video_bytes_per_second_counter_.Add(length); received_video_bytes_per_second_counter_.Add(length);
event_log_->Log( event_log_->Log(
absl::make_unique<RtcEventRtpPacketIncoming>(parsed_packet)); std::make_unique<RtcEventRtpPacketIncoming>(parsed_packet));
const int64_t arrival_time_ms = parsed_packet.arrival_time_ms(); const int64_t arrival_time_ms = parsed_packet.arrival_time_ms();
if (!first_received_rtp_video_ms_) { if (!first_received_rtp_video_ms_) {
first_received_rtp_video_ms_.emplace(arrival_time_ms); first_received_rtp_video_ms_.emplace(arrival_time_ms);

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "absl/memory/memory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/rtc_event_log/rtc_event_log.h" #include "api/rtc_event_log/rtc_event_log.h"
#include "api/test/simulated_network.h" #include "api/test/simulated_network.h"
@ -217,28 +216,28 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
return pair.second == MediaType::VIDEO; return pair.second == MediaType::VIDEO;
}); });
audio_send_transport = absl::make_unique<test::PacketTransport>( audio_send_transport = std::make_unique<test::PacketTransport>(
&task_queue_, sender_call_.get(), &observer, &task_queue_, sender_call_.get(), &observer,
test::PacketTransport::kSender, audio_pt_map, test::PacketTransport::kSender, audio_pt_map,
absl::make_unique<FakeNetworkPipe>( std::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), Clock::GetRealTimeClock(),
absl::make_unique<SimulatedNetwork>(audio_net_config))); std::make_unique<SimulatedNetwork>(audio_net_config)));
audio_send_transport->SetReceiver(receiver_call_->Receiver()); audio_send_transport->SetReceiver(receiver_call_->Receiver());
video_send_transport = absl::make_unique<test::PacketTransport>( video_send_transport = std::make_unique<test::PacketTransport>(
&task_queue_, sender_call_.get(), &observer, &task_queue_, sender_call_.get(), &observer,
test::PacketTransport::kSender, video_pt_map, test::PacketTransport::kSender, video_pt_map,
absl::make_unique<FakeNetworkPipe>( std::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>( std::make_unique<SimulatedNetwork>(
BuiltInNetworkBehaviorConfig()))); BuiltInNetworkBehaviorConfig())));
video_send_transport->SetReceiver(receiver_call_->Receiver()); video_send_transport->SetReceiver(receiver_call_->Receiver());
receive_transport = absl::make_unique<test::PacketTransport>( receive_transport = std::make_unique<test::PacketTransport>(
&task_queue_, receiver_call_.get(), &observer, &task_queue_, receiver_call_.get(), &observer,
test::PacketTransport::kReceiver, payload_type_map_, test::PacketTransport::kReceiver, payload_type_map_,
absl::make_unique<FakeNetworkPipe>( std::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
Clock::GetRealTimeClock(), absl::make_unique<SimulatedNetwork>( std::make_unique<SimulatedNetwork>(
BuiltInNetworkBehaviorConfig()))); BuiltInNetworkBehaviorConfig())));
receive_transport->SetReceiver(sender_call_->Receiver()); receive_transport->SetReceiver(sender_call_->Receiver());
CreateSendConfig(1, 0, 0, video_send_transport.get()); CreateSendConfig(1, 0, 0, video_send_transport.get());
@ -283,7 +282,7 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
} }
EXPECT_EQ(1u, video_receive_streams_.size()); EXPECT_EQ(1u, video_receive_streams_.size());
observer.set_receive_stream(video_receive_streams_[0]); observer.set_receive_stream(video_receive_streams_[0]);
drifting_clock = absl::make_unique<DriftingClock>(clock_, video_ntp_speed); drifting_clock = std::make_unique<DriftingClock>(clock_, video_ntp_speed);
CreateFrameGeneratorCapturerWithDrift(drifting_clock.get(), video_rtp_speed, CreateFrameGeneratorCapturerWithDrift(drifting_clock.get(), video_rtp_speed,
kDefaultFramerate, kDefaultWidth, kDefaultFramerate, kDefaultWidth,
kDefaultHeight); kDefaultHeight);
@ -383,9 +382,9 @@ void CallPerfTest::TestCaptureNtpTime(
return new test::PacketTransport( return new test::PacketTransport(
task_queue, sender_call, this, test::PacketTransport::kSender, task_queue, sender_call, this, test::PacketTransport::kSender,
payload_type_map_, payload_type_map_,
absl::make_unique<FakeNetworkPipe>( std::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), Clock::GetRealTimeClock(),
absl::make_unique<SimulatedNetwork>(net_config_))); std::make_unique<SimulatedNetwork>(net_config_)));
} }
test::PacketTransport* CreateReceiveTransport( test::PacketTransport* CreateReceiveTransport(
@ -394,9 +393,9 @@ void CallPerfTest::TestCaptureNtpTime(
return new test::PacketTransport( return new test::PacketTransport(
task_queue, nullptr, this, test::PacketTransport::kReceiver, task_queue, nullptr, this, test::PacketTransport::kReceiver,
payload_type_map_, payload_type_map_,
absl::make_unique<FakeNetworkPipe>( std::make_unique<FakeNetworkPipe>(
Clock::GetRealTimeClock(), Clock::GetRealTimeClock(),
absl::make_unique<SimulatedNetwork>(net_config_))); std::make_unique<SimulatedNetwork>(net_config_)));
} }
void OnFrame(const VideoFrame& video_frame) override { void OnFrame(const VideoFrame& video_frame) override {
@ -890,26 +889,26 @@ void CallPerfTest::TestMinAudioVideoBitrate(int test_bitrate_from,
test::DEPRECATED_SingleThreadedTaskQueueForTesting* task_queue, test::DEPRECATED_SingleThreadedTaskQueueForTesting* task_queue,
Call* sender_call) override { Call* sender_call) override {
auto network = auto network =
absl::make_unique<SimulatedNetwork>(GetFakeNetworkPipeConfig()); std::make_unique<SimulatedNetwork>(GetFakeNetworkPipeConfig());
send_simulated_network_ = network.get(); send_simulated_network_ = network.get();
return new test::PacketTransport( return new test::PacketTransport(
task_queue, sender_call, this, test::PacketTransport::kSender, task_queue, sender_call, this, test::PacketTransport::kSender,
test::CallTest::payload_type_map_, test::CallTest::payload_type_map_,
absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(), std::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
std::move(network))); std::move(network)));
} }
test::PacketTransport* CreateReceiveTransport( test::PacketTransport* CreateReceiveTransport(
test::DEPRECATED_SingleThreadedTaskQueueForTesting* task_queue) test::DEPRECATED_SingleThreadedTaskQueueForTesting* task_queue)
override { override {
auto network = auto network =
absl::make_unique<SimulatedNetwork>(GetFakeNetworkPipeConfig()); std::make_unique<SimulatedNetwork>(GetFakeNetworkPipeConfig());
receive_simulated_network_ = network.get(); receive_simulated_network_ = network.get();
return new test::PacketTransport( return new test::PacketTransport(
task_queue, nullptr, this, test::PacketTransport::kReceiver, task_queue, nullptr, this, test::PacketTransport::kReceiver,
test::CallTest::payload_type_map_, test::CallTest::payload_type_map_,
absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(), std::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
std::move(network))); std::move(network)));
} }
void PerformTest() override { void PerformTest() override {

View file

@ -10,9 +10,9 @@
#include "call/degraded_call.h" #include "call/degraded_call.h"
#include <memory>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "rtc_base/location.h" #include "rtc_base/location.h"
namespace webrtc { namespace webrtc {
@ -137,16 +137,16 @@ DegradedCall::DegradedCall(
send_simulated_network_(nullptr), send_simulated_network_(nullptr),
receive_config_(receive_config) { receive_config_(receive_config) {
if (receive_config_) { if (receive_config_) {
auto network = absl::make_unique<SimulatedNetwork>(*receive_config_); auto network = std::make_unique<SimulatedNetwork>(*receive_config_);
receive_simulated_network_ = network.get(); receive_simulated_network_ = network.get();
receive_pipe_ = receive_pipe_ =
absl::make_unique<webrtc::FakeNetworkPipe>(clock_, std::move(network)); std::make_unique<webrtc::FakeNetworkPipe>(clock_, std::move(network));
receive_pipe_->SetReceiver(call_->Receiver()); receive_pipe_->SetReceiver(call_->Receiver());
} }
if (send_config_) { if (send_config_) {
auto network = absl::make_unique<SimulatedNetwork>(*send_config_); auto network = std::make_unique<SimulatedNetwork>(*send_config_);
send_simulated_network_ = network.get(); send_simulated_network_ = network.get();
send_pipe_ = absl::make_unique<FakeNetworkPipeOnTaskQueue>( send_pipe_ = std::make_unique<FakeNetworkPipeOnTaskQueue>(
task_queue_factory_, clock_, std::move(network)); task_queue_factory_, clock_, std::move(network));
} }
} }
@ -156,7 +156,7 @@ DegradedCall::~DegradedCall() = default;
AudioSendStream* DegradedCall::CreateAudioSendStream( AudioSendStream* DegradedCall::CreateAudioSendStream(
const AudioSendStream::Config& config) { const AudioSendStream::Config& config) {
if (send_config_) { if (send_config_) {
auto transport_adapter = absl::make_unique<FakeNetworkPipeTransportAdapter>( auto transport_adapter = std::make_unique<FakeNetworkPipeTransportAdapter>(
send_pipe_.get(), call_.get(), clock_, config.send_transport); send_pipe_.get(), call_.get(), clock_, config.send_transport);
AudioSendStream::Config degrade_config = config; AudioSendStream::Config degrade_config = config;
degrade_config.send_transport = transport_adapter.get(); degrade_config.send_transport = transport_adapter.get();
@ -190,7 +190,7 @@ VideoSendStream* DegradedCall::CreateVideoSendStream(
VideoEncoderConfig encoder_config) { VideoEncoderConfig encoder_config) {
std::unique_ptr<FakeNetworkPipeTransportAdapter> transport_adapter; std::unique_ptr<FakeNetworkPipeTransportAdapter> transport_adapter;
if (send_config_) { if (send_config_) {
transport_adapter = absl::make_unique<FakeNetworkPipeTransportAdapter>( transport_adapter = std::make_unique<FakeNetworkPipeTransportAdapter>(
send_pipe_.get(), call_.get(), clock_, config.send_transport); send_pipe_.get(), call_.get(), clock_, config.send_transport);
config.send_transport = transport_adapter.get(); config.send_transport = transport_adapter.get();
} }
@ -208,7 +208,7 @@ VideoSendStream* DegradedCall::CreateVideoSendStream(
std::unique_ptr<FecController> fec_controller) { std::unique_ptr<FecController> fec_controller) {
std::unique_ptr<FakeNetworkPipeTransportAdapter> transport_adapter; std::unique_ptr<FakeNetworkPipeTransportAdapter> transport_adapter;
if (send_config_) { if (send_config_) {
transport_adapter = absl::make_unique<FakeNetworkPipeTransportAdapter>( transport_adapter = std::make_unique<FakeNetworkPipeTransportAdapter>(
send_pipe_.get(), call_.get(), clock_, config.send_transport); send_pipe_.get(), call_.get(), clock_, config.send_transport);
config.send_transport = transport_adapter.get(); config.send_transport = transport_adapter.get();
} }

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "absl/memory/memory.h"
#include "call/simulated_network.h" #include "call/simulated_network.h"
#include "system_wrappers/include/clock.h" #include "system_wrappers/include/clock.h"
#include "test/gmock.h" #include "test/gmock.h"
@ -74,7 +73,7 @@ TEST_F(FakeNetworkPipeTest, CapacityTest) {
config.queue_length_packets = 20; config.queue_length_packets = 20;
config.link_capacity_kbps = 80; config.link_capacity_kbps = 80;
MockReceiver receiver; MockReceiver receiver;
auto simulated_network = absl::make_unique<SimulatedNetwork>(config); auto simulated_network = std::make_unique<SimulatedNetwork>(config);
std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe( std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(
&fake_clock_, std::move(simulated_network), &receiver)); &fake_clock_, std::move(simulated_network), &receiver));
@ -115,7 +114,7 @@ TEST_F(FakeNetworkPipeTest, ExtraDelayTest) {
config.queue_delay_ms = 100; config.queue_delay_ms = 100;
config.link_capacity_kbps = 80; config.link_capacity_kbps = 80;
MockReceiver receiver; MockReceiver receiver;
auto simulated_network = absl::make_unique<SimulatedNetwork>(config); auto simulated_network = std::make_unique<SimulatedNetwork>(config);
std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe( std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(
&fake_clock_, std::move(simulated_network), &receiver)); &fake_clock_, std::move(simulated_network), &receiver));
@ -150,7 +149,7 @@ TEST_F(FakeNetworkPipeTest, QueueLengthTest) {
config.queue_length_packets = 2; config.queue_length_packets = 2;
config.link_capacity_kbps = 80; config.link_capacity_kbps = 80;
MockReceiver receiver; MockReceiver receiver;
auto simulated_network = absl::make_unique<SimulatedNetwork>(config); auto simulated_network = std::make_unique<SimulatedNetwork>(config);
std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe( std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(
&fake_clock_, std::move(simulated_network), &receiver)); &fake_clock_, std::move(simulated_network), &receiver));
@ -175,7 +174,7 @@ TEST_F(FakeNetworkPipeTest, StatisticsTest) {
config.queue_delay_ms = 20; config.queue_delay_ms = 20;
config.link_capacity_kbps = 80; config.link_capacity_kbps = 80;
MockReceiver receiver; MockReceiver receiver;
auto simulated_network = absl::make_unique<SimulatedNetwork>(config); auto simulated_network = std::make_unique<SimulatedNetwork>(config);
std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe( std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(
&fake_clock_, std::move(simulated_network), &receiver)); &fake_clock_, std::move(simulated_network), &receiver));
@ -370,7 +369,7 @@ TEST_F(FakeNetworkPipeTest, BurstLoss) {
config.loss_percent = kLossPercent; config.loss_percent = kLossPercent;
config.avg_burst_loss_length = kAvgBurstLength; config.avg_burst_loss_length = kAvgBurstLength;
ReorderTestReceiver receiver; ReorderTestReceiver receiver;
auto simulated_network = absl::make_unique<SimulatedNetwork>(config); auto simulated_network = std::make_unique<SimulatedNetwork>(config);
std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe( std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(
&fake_clock_, std::move(simulated_network), &receiver)); &fake_clock_, std::move(simulated_network), &receiver));
@ -403,7 +402,7 @@ TEST_F(FakeNetworkPipeTest, SetReceiver) {
BuiltInNetworkBehaviorConfig config; BuiltInNetworkBehaviorConfig config;
config.link_capacity_kbps = 800; config.link_capacity_kbps = 800;
MockReceiver receiver; MockReceiver receiver;
auto simulated_network = absl::make_unique<SimulatedNetwork>(config); auto simulated_network = std::make_unique<SimulatedNetwork>(config);
std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe( std::unique_ptr<FakeNetworkPipe> pipe(new FakeNetworkPipe(
&fake_clock_, std::move(simulated_network), &receiver)); &fake_clock_, std::move(simulated_network), &receiver));

View file

@ -14,7 +14,6 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "api/array_view.h" #include "api/array_view.h"
#include "api/call/transport.h" #include "api/call/transport.h"
#include "api/rtp_headers.h" #include "api/rtp_headers.h"
@ -89,7 +88,7 @@ class FlexfecReceiveStreamTest : public ::testing::Test {
FlexfecReceiveStreamTest() FlexfecReceiveStreamTest()
: config_(CreateDefaultConfig(&rtcp_send_transport_)) { : config_(CreateDefaultConfig(&rtcp_send_transport_)) {
EXPECT_CALL(process_thread_, RegisterModule(_, _)).Times(1); EXPECT_CALL(process_thread_, RegisterModule(_, _)).Times(1);
receive_stream_ = absl::make_unique<FlexfecReceiveStreamImpl>( receive_stream_ = std::make_unique<FlexfecReceiveStreamImpl>(
Clock::GetRealTimeClock(), &rtp_stream_receiver_controller_, config_, Clock::GetRealTimeClock(), &rtp_stream_receiver_controller_, config_,
&recovered_packet_receiver_, &rtt_stats_, &process_thread_); &recovered_packet_receiver_, &rtt_stats_, &process_thread_);
} }

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include "absl/flags/flag.h" #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/rtc_event_log_factory.h"
#include "api/rtc_event_log_output_file.h" #include "api/rtc_event_log_output_file.h"
#include "api/task_queue/default_task_queue_factory.h" #include "api/task_queue/default_task_queue_factory.h"
@ -120,13 +119,13 @@ void RampUpTester::OnVideoStreamsCreated(
test::PacketTransport* RampUpTester::CreateSendTransport( test::PacketTransport* RampUpTester::CreateSendTransport(
test::DEPRECATED_SingleThreadedTaskQueueForTesting* task_queue, test::DEPRECATED_SingleThreadedTaskQueueForTesting* task_queue,
Call* sender_call) { Call* sender_call) {
auto network = absl::make_unique<SimulatedNetwork>(forward_transport_config_); auto network = std::make_unique<SimulatedNetwork>(forward_transport_config_);
send_simulated_network_ = network.get(); send_simulated_network_ = network.get();
send_transport_ = new test::PacketTransport( send_transport_ = new test::PacketTransport(
task_queue, sender_call, this, test::PacketTransport::kSender, task_queue, sender_call, this, test::PacketTransport::kSender,
test::CallTest::payload_type_map_, test::CallTest::payload_type_map_,
absl::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(), std::make_unique<FakeNetworkPipe>(Clock::GetRealTimeClock(),
std::move(network))); std::move(network)));
return send_transport_; return send_transport_;
} }
@ -641,11 +640,11 @@ class RampUpTest : public test::CallTest {
RtcEventLog::EncodingType::Legacy); RtcEventLog::EncodingType::Legacy);
bool event_log_started = bool event_log_started =
send_event_log_->StartLogging( send_event_log_->StartLogging(
absl::make_unique<RtcEventLogOutputFile>( std::make_unique<RtcEventLogOutputFile>(
dump_name + ".send.rtc.dat", RtcEventLog::kUnlimitedOutput), dump_name + ".send.rtc.dat", RtcEventLog::kUnlimitedOutput),
RtcEventLog::kImmediateOutput) && RtcEventLog::kImmediateOutput) &&
recv_event_log_->StartLogging( recv_event_log_->StartLogging(
absl::make_unique<RtcEventLogOutputFile>( std::make_unique<RtcEventLogOutputFile>(
dump_name + ".recv.rtc.dat", RtcEventLog::kUnlimitedOutput), dump_name + ".recv.rtc.dat", RtcEventLog::kUnlimitedOutput),
RtcEventLog::kImmediateOutput); RtcEventLog::kImmediateOutput);
RTC_DCHECK(event_log_started); RTC_DCHECK(event_log_started);

View file

@ -10,10 +10,10 @@
#include "call/receive_time_calculator.h" #include "call/receive_time_calculator.h"
#include <memory>
#include <string> #include <string>
#include <type_traits> #include <type_traits>
#include "absl/memory/memory.h"
#include "rtc_base/experiments/field_trial_parser.h" #include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/numerics/safe_minmax.h" #include "rtc_base/numerics/safe_minmax.h"
#include "system_wrappers/include/field_trial.h" #include "system_wrappers/include/field_trial.h"
@ -47,7 +47,7 @@ std::unique_ptr<ReceiveTimeCalculator>
ReceiveTimeCalculator::CreateFromFieldTrial() { ReceiveTimeCalculator::CreateFromFieldTrial() {
if (!IsEnabled(kBweReceiveTimeCorrection)) if (!IsEnabled(kBweReceiveTimeCorrection))
return nullptr; return nullptr;
return absl::make_unique<ReceiveTimeCalculator>(); return std::make_unique<ReceiveTimeCalculator>();
} }
int64_t ReceiveTimeCalculator::ReconcileReceiveTimes(int64_t packet_time_us, int64_t ReceiveTimeCalculator::ReconcileReceiveTimes(int64_t packet_time_us,

View file

@ -14,7 +14,6 @@
#include <set> #include <set>
#include <string> #include <string>
#include "absl/memory/memory.h"
#include "call/ssrc_binding_observer.h" #include "call/ssrc_binding_observer.h"
#include "call/test/mock_rtp_packet_sink_interface.h" #include "call/test/mock_rtp_packet_sink_interface.h"
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h" #include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
@ -134,7 +133,7 @@ class RtpDemuxerTest : public ::testing::Test {
std::unique_ptr<RtpPacketReceived> CreatePacket( std::unique_ptr<RtpPacketReceived> CreatePacket(
uint32_t ssrc, uint32_t ssrc,
RtpPacketReceived::ExtensionManager* extension_manager) { RtpPacketReceived::ExtensionManager* extension_manager) {
auto packet = absl::make_unique<RtpPacketReceived>(extension_manager); auto packet = std::make_unique<RtpPacketReceived>(extension_manager);
packet->SetSsrc(ssrc); packet->SetSsrc(ssrc);
packet->SetSequenceNumber(next_sequence_number_++); packet->SetSequenceNumber(next_sequence_number_++);
return packet; return packet;

View file

@ -10,7 +10,8 @@
#include "call/rtp_stream_receiver_controller.h" #include "call/rtp_stream_receiver_controller.h"
#include "absl/memory/memory.h" #include <memory>
#include "rtc_base/logging.h" #include "rtc_base/logging.h"
namespace webrtc { namespace webrtc {
@ -46,7 +47,7 @@ RtpStreamReceiverController::~RtpStreamReceiverController() = default;
std::unique_ptr<RtpStreamReceiverInterface> std::unique_ptr<RtpStreamReceiverInterface>
RtpStreamReceiverController::CreateReceiver(uint32_t ssrc, RtpStreamReceiverController::CreateReceiver(uint32_t ssrc,
RtpPacketSinkInterface* sink) { RtpPacketSinkInterface* sink) {
return absl::make_unique<Receiver>(this, ssrc, sink); return std::make_unique<Receiver>(this, ssrc, sink);
} }
bool RtpStreamReceiverController::OnRtpPacket(const RtpPacketReceived& packet) { bool RtpStreamReceiverController::OnRtpPacket(const RtpPacketReceived& packet) {

View file

@ -9,10 +9,10 @@
*/ */
#include "call/rtp_transport_controller_send.h" #include "call/rtp_transport_controller_send.h"
#include <memory>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "api/transport/goog_cc_factory.h" #include "api/transport/goog_cc_factory.h"
#include "api/transport/network_types.h" #include "api/transport/network_types.h"
@ -72,7 +72,7 @@ RtpTransportControllerSend::RtpTransportControllerSend(
observer_(nullptr), observer_(nullptr),
controller_factory_override_(controller_factory), controller_factory_override_(controller_factory),
controller_factory_fallback_( controller_factory_fallback_(
absl::make_unique<GoogCcNetworkControllerFactory>(predictor_factory)), std::make_unique<GoogCcNetworkControllerFactory>(predictor_factory)),
process_interval_(controller_factory_fallback_->GetProcessInterval()), process_interval_(controller_factory_fallback_->GetProcessInterval()),
last_report_block_time_(Timestamp::ms(clock_->TimeInMilliseconds())), last_report_block_time_(Timestamp::ms(clock_->TimeInMilliseconds())),
reset_feedback_on_route_change_( reset_feedback_on_route_change_(
@ -112,7 +112,7 @@ RtpVideoSenderInterface* RtpTransportControllerSend::CreateRtpVideoSender(
RtcEventLog* event_log, RtcEventLog* event_log,
std::unique_ptr<FecController> fec_controller, std::unique_ptr<FecController> fec_controller,
const RtpSenderFrameEncryptionConfig& frame_encryption_config) { const RtpSenderFrameEncryptionConfig& frame_encryption_config) {
video_rtp_senders_.push_back(absl::make_unique<RtpVideoSender>( video_rtp_senders_.push_back(std::make_unique<RtpVideoSender>(
clock_, suspended_ssrcs, states, rtp_config, rtcp_report_interval_ms, clock_, suspended_ssrcs, states, rtp_config, rtcp_report_interval_ms,
send_transport, observers, send_transport, observers,
// TODO(holmer): Remove this circular dependency by injecting // TODO(holmer): Remove this circular dependency by injecting
@ -265,7 +265,7 @@ void RtpTransportControllerSend::OnNetworkRouteChanged(
transport_overhead_bytes_per_packet_ = network_route.packet_overhead; transport_overhead_bytes_per_packet_ = network_route.packet_overhead;
if (event_log_) { if (event_log_) {
event_log_->Log(absl::make_unique<RtcEventRouteChange>( event_log_->Log(std::make_unique<RtcEventRouteChange>(
network_route.connected, network_route.packet_overhead)); network_route.connected, network_route.packet_overhead));
} }
NetworkRouteChange msg; NetworkRouteChange msg;
@ -490,7 +490,7 @@ void RtpTransportControllerSend::MaybeCreateControllers() {
if (!network_available_ || !observer_) if (!network_available_ || !observer_)
return; return;
control_handler_ = absl::make_unique<CongestionControlHandler>(); control_handler_ = std::make_unique<CongestionControlHandler>();
initial_config_.constraints.at_time = initial_config_.constraints.at_time =
Timestamp::ms(clock_->TimeInMilliseconds()); Timestamp::ms(clock_->TimeInMilliseconds());

View file

@ -16,7 +16,6 @@
#include <utility> #include <utility>
#include "absl/algorithm/container.h" #include "absl/algorithm/container.h"
#include "absl/memory/memory.h"
#include "api/array_view.h" #include "api/array_view.h"
#include "api/transport/field_trial_based_config.h" #include "api/transport/field_trial_based_config.h"
#include "call/rtp_transport_controller_send_interface.h" #include "call/rtp_transport_controller_send_interface.h"
@ -118,7 +117,7 @@ std::vector<RtpStreamSender> CreateRtpStreamSenders(
*configuration.local_media_ssrc) != *configuration.local_media_ssrc) !=
flexfec_protected_ssrcs.end(); flexfec_protected_ssrcs.end();
configuration.flexfec_sender = enable_flexfec ? flexfec_sender : nullptr; configuration.flexfec_sender = enable_flexfec ? flexfec_sender : nullptr;
auto playout_delay_oracle = absl::make_unique<PlayoutDelayOracle>(); auto playout_delay_oracle = std::make_unique<PlayoutDelayOracle>();
configuration.ack_observer = playout_delay_oracle.get(); configuration.ack_observer = playout_delay_oracle.get();
if (rtp_config.rtx.ssrcs.size() > i) { if (rtp_config.rtx.ssrcs.size() > i) {
@ -130,7 +129,7 @@ std::vector<RtpStreamSender> CreateRtpStreamSenders(
rtp_rtcp->SetSendingMediaStatus(false); rtp_rtcp->SetSendingMediaStatus(false);
rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound);
auto sender_video = absl::make_unique<RTPSenderVideo>( auto sender_video = std::make_unique<RTPSenderVideo>(
configuration.clock, rtp_rtcp->RtpSender(), configuration.clock, rtp_rtcp->RtpSender(),
configuration.flexfec_sender, playout_delay_oracle.get(), configuration.flexfec_sender, playout_delay_oracle.get(),
frame_encryptor, crypto_options.sframe.require_frame_encryption, frame_encryptor, crypto_options.sframe.require_frame_encryption,
@ -192,7 +191,7 @@ std::unique_ptr<FlexfecSender> MaybeCreateFlexfecSender(
} }
RTC_DCHECK_EQ(1U, rtp.flexfec.protected_media_ssrcs.size()); RTC_DCHECK_EQ(1U, rtp.flexfec.protected_media_ssrcs.size());
return absl::make_unique<FlexfecSender>( return std::make_unique<FlexfecSender>(
rtp.flexfec.payload_type, rtp.flexfec.ssrc, rtp.flexfec.payload_type, rtp.flexfec.ssrc,
rtp.flexfec.protected_media_ssrcs[0], rtp.mid, rtp.extensions, rtp.flexfec.protected_media_ssrcs[0], rtp.mid, rtp.extensions,
RTPSender::FecExtensionSizes(), rtp_state, clock); RTPSender::FecExtensionSizes(), rtp_state, clock);

View file

@ -13,7 +13,6 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "absl/memory/memory.h"
#include "api/task_queue/default_task_queue_factory.h" #include "api/task_queue/default_task_queue_factory.h"
#include "call/rtp_transport_controller_send.h" #include "call/rtp_transport_controller_send.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
@ -137,7 +136,7 @@ class RtpVideoSenderTestFixture {
VideoEncoderConfig::ContentType::kRealtimeVideo), VideoEncoderConfig::ContentType::kRealtimeVideo),
retransmission_rate_limiter_(&clock_, kRetransmitWindowSizeMs) { retransmission_rate_limiter_(&clock_, kRetransmitWindowSizeMs) {
std::map<uint32_t, RtpState> suspended_ssrcs; std::map<uint32_t, RtpState> suspended_ssrcs;
router_ = absl::make_unique<RtpVideoSender>( router_ = std::make_unique<RtpVideoSender>(
&clock_, suspended_ssrcs, suspended_payload_states, config_.rtp, &clock_, suspended_ssrcs, suspended_payload_states, config_.rtp,
config_.rtcp_report_interval_ms, &transport_, config_.rtcp_report_interval_ms, &transport_,
CreateObservers(&call_stats_, &encoder_feedback_, &stats_proxy_, CreateObservers(&call_stats_, &encoder_feedback_, &stats_proxy_,
@ -145,7 +144,7 @@ class RtpVideoSenderTestFixture {
frame_count_observer, &stats_proxy_, &stats_proxy_, frame_count_observer, &stats_proxy_, &stats_proxy_,
&send_delay_stats_), &send_delay_stats_),
&transport_controller_, &event_log_, &retransmission_rate_limiter_, &transport_controller_, &event_log_, &retransmission_rate_limiter_,
absl::make_unique<FecControllerDefault>(&clock_), nullptr, std::make_unique<FecControllerDefault>(&clock_), nullptr,
CryptoOptions{}); CryptoOptions{});
} }
RtpVideoSenderTestFixture( RtpVideoSenderTestFixture(

View file

@ -59,7 +59,6 @@ rtc_static_library("common_audio") {
"../system_wrappers:cpu_features_api", "../system_wrappers:cpu_features_api",
"third_party/fft4g", "third_party/fft4g",
"//third_party/abseil-cpp/absl/container:inlined_vector", "//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:optional",
] ]

View file

@ -13,8 +13,9 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <memory>
#include "absl/container/inlined_vector.h" #include "absl/container/inlined_vector.h"
#include "absl/memory/memory.h"
#include "common_audio/include/audio_util.h" #include "common_audio/include/audio_util.h"
#include "common_audio/resampler/push_sinc_resampler.h" #include "common_audio/resampler/push_sinc_resampler.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
@ -93,7 +94,7 @@ int PushResampler<T>::InitializeIfNeeded(int src_sample_rate_hz,
for (size_t i = 0; i < num_channels; ++i) { for (size_t i = 0; i < num_channels; ++i) {
channel_resamplers_.push_back(ChannelResampler()); channel_resamplers_.push_back(ChannelResampler());
auto channel_resampler = channel_resamplers_.rbegin(); auto channel_resampler = channel_resamplers_.rbegin();
channel_resampler->resampler = absl::make_unique<PushSincResampler>( channel_resampler->resampler = std::make_unique<PushSincResampler>(
src_size_10ms_mono, dst_size_10ms_mono); src_size_10ms_mono, dst_size_10ms_mono);
channel_resampler->source.resize(src_size_10ms_mono); channel_resampler->source.resize(src_size_10ms_mono);
channel_resampler->destination.resize(dst_size_10ms_mono); channel_resampler->destination.resize(dst_size_10ms_mono);

View file

@ -113,7 +113,6 @@ if (rtc_include_tests) {
"../test:test_support", "../test:test_support",
"../test:video_test_common", "../test:video_test_common",
"//testing/gtest", "//testing/gtest",
"//third_party/abseil-cpp/absl/memory",
"//third_party/libyuv", "//third_party/libyuv",
] ]

View file

@ -15,7 +15,6 @@
#include <memory> #include <memory>
#include "absl/memory/memory.h"
#include "api/video/i420_buffer.h" #include "api/video/i420_buffer.h"
#include "api/video/video_frame.h" #include "api/video/video_frame.h"
#include "common_video/libyuv/include/webrtc_libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
@ -69,11 +68,11 @@ void TestLibYuv::SetUp() {
test::ReadI420Buffer(width_, height_, source_file_)); test::ReadI420Buffer(width_, height_, source_file_));
orig_frame_ = orig_frame_ =
absl::make_unique<VideoFrame>(VideoFrame::Builder() std::make_unique<VideoFrame>(VideoFrame::Builder()
.set_video_frame_buffer(buffer) .set_video_frame_buffer(buffer)
.set_rotation(webrtc::kVideoRotation_0) .set_rotation(webrtc::kVideoRotation_0)
.set_timestamp_us(0) .set_timestamp_us(0)
.build()); .build());
} }
void TestLibYuv::TearDown() { void TestLibYuv::TearDown() {

View file

@ -483,7 +483,6 @@ if (is_ios || (is_mac && target_cpu != "x86")) {
"../sdk:ui_objc", "../sdk:ui_objc",
"../sdk:videocapture_objc", "../sdk:videocapture_objc",
"../sdk:videotoolbox_objc", "../sdk:videotoolbox_objc",
"//third_party/abseil-cpp/absl/memory",
] ]
if (current_cpu == "arm64") { if (current_cpu == "arm64") {

View file

@ -62,7 +62,6 @@ if (is_android) {
"//sdk/android:native_api_base", "//sdk/android:native_api_base",
"//sdk/android:native_api_jni", "//sdk/android:native_api_jni",
"//sdk/android:native_api_video", "//sdk/android:native_api_video",
"//third_party/abseil-cpp/absl/memory",
] ]
} }

View file

@ -12,7 +12,8 @@
#include <utility> #include <utility>
#include "absl/memory/memory.h" #include <memory>
#include "api/peer_connection_interface.h" #include "api/peer_connection_interface.h"
#include "api/rtc_event_log/rtc_event_log_factory.h" #include "api/rtc_event_log/rtc_event_log_factory.h"
#include "api/task_queue/default_task_queue_factory.h" #include "api/task_queue/default_task_queue_factory.h"
@ -75,7 +76,7 @@ class SetLocalSessionDescriptionObserver
} // namespace } // namespace
AndroidCallClient::AndroidCallClient() AndroidCallClient::AndroidCallClient()
: call_started_(false), pc_observer_(absl::make_unique<PCObserver>(this)) { : call_started_(false), pc_observer_(std::make_unique<PCObserver>(this)) {
thread_checker_.Detach(); thread_checker_.Detach();
CreatePeerConnectionFactory(); CreatePeerConnectionFactory();
} }
@ -155,15 +156,15 @@ void AndroidCallClient::CreatePeerConnectionFactory() {
pcf_deps.signaling_thread = signaling_thread_.get(); pcf_deps.signaling_thread = signaling_thread_.get();
pcf_deps.task_queue_factory = webrtc::CreateDefaultTaskQueueFactory(); pcf_deps.task_queue_factory = webrtc::CreateDefaultTaskQueueFactory();
pcf_deps.call_factory = webrtc::CreateCallFactory(); pcf_deps.call_factory = webrtc::CreateCallFactory();
pcf_deps.event_log_factory = absl::make_unique<webrtc::RtcEventLogFactory>( pcf_deps.event_log_factory = std::make_unique<webrtc::RtcEventLogFactory>(
pcf_deps.task_queue_factory.get()); pcf_deps.task_queue_factory.get());
cricket::MediaEngineDependencies media_deps; cricket::MediaEngineDependencies media_deps;
media_deps.task_queue_factory = pcf_deps.task_queue_factory.get(); media_deps.task_queue_factory = pcf_deps.task_queue_factory.get();
media_deps.video_encoder_factory = media_deps.video_encoder_factory =
absl::make_unique<webrtc::InternalEncoderFactory>(); std::make_unique<webrtc::InternalEncoderFactory>();
media_deps.video_decoder_factory = media_deps.video_decoder_factory =
absl::make_unique<webrtc::InternalDecoderFactory>(); std::make_unique<webrtc::InternalDecoderFactory>();
webrtc::SetMediaEngineDefaults(&media_deps); webrtc::SetMediaEngineDefaults(&media_deps);
pcf_deps.media_engine = cricket::CreateMediaEngine(std::move(media_deps)); pcf_deps.media_engine = cricket::CreateMediaEngine(std::move(media_deps));
RTC_LOG(LS_INFO) << "Media engine created: " << pcf_deps.media_engine.get(); RTC_LOG(LS_INFO) << "Media engine created: " << pcf_deps.media_engine.get();

View file

@ -10,6 +10,7 @@
#include "examples/objcnativeapi/objc/objc_call_client.h" #include "examples/objcnativeapi/objc/objc_call_client.h"
#include <memory>
#include <utility> #include <utility>
#import "sdk/objc/base/RTCVideoRenderer.h" #import "sdk/objc/base/RTCVideoRenderer.h"
@ -17,7 +18,6 @@
#import "sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.h" #import "sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.h"
#import "sdk/objc/helpers/RTCCameraPreviewView.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_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/peer_connection_interface.h" #include "api/peer_connection_interface.h"
@ -59,7 +59,7 @@ class SetLocalSessionDescriptionObserver : public webrtc::SetSessionDescriptionO
} // namespace } // namespace
ObjCCallClient::ObjCCallClient() ObjCCallClient::ObjCCallClient()
: call_started_(false), pc_observer_(absl::make_unique<PCObserver>(this)) { : call_started_(false), pc_observer_(std::make_unique<PCObserver>(this)) {
thread_checker_.Detach(); thread_checker_.Detach();
CreatePeerConnectionFactory(); CreatePeerConnectionFactory();
} }
@ -131,7 +131,7 @@ void ObjCCallClient::CreatePeerConnectionFactory() {
RTC_LOG(LS_INFO) << "Media engine created: " << dependencies.media_engine.get(); RTC_LOG(LS_INFO) << "Media engine created: " << dependencies.media_engine.get();
dependencies.call_factory = webrtc::CreateCallFactory(); dependencies.call_factory = webrtc::CreateCallFactory();
dependencies.event_log_factory = dependencies.event_log_factory =
absl::make_unique<webrtc::RtcEventLogFactory>(dependencies.task_queue_factory.get()); std::make_unique<webrtc::RtcEventLogFactory>(dependencies.task_queue_factory.get());
pcf_ = webrtc::CreateModularPeerConnectionFactory(std::move(dependencies)); pcf_ = webrtc::CreateModularPeerConnectionFactory(std::move(dependencies));
RTC_LOG(LS_INFO) << "PeerConnectionFactory created: " << pcf_; RTC_LOG(LS_INFO) << "PeerConnectionFactory created: " << pcf_;
} }

View file

@ -133,10 +133,10 @@ bool SimplePeerConnection::InitializePeerConnection(const char** turn_urls,
webrtc::CreateBuiltinAudioDecoderFactory(), webrtc::CreateBuiltinAudioDecoderFactory(),
std::unique_ptr<webrtc::VideoEncoderFactory>( std::unique_ptr<webrtc::VideoEncoderFactory>(
new webrtc::MultiplexEncoderFactory( new webrtc::MultiplexEncoderFactory(
absl::make_unique<webrtc::InternalEncoderFactory>())), std::make_unique<webrtc::InternalEncoderFactory>())),
std::unique_ptr<webrtc::VideoDecoderFactory>( std::unique_ptr<webrtc::VideoDecoderFactory>(
new webrtc::MultiplexDecoderFactory( new webrtc::MultiplexDecoderFactory(
absl::make_unique<webrtc::InternalDecoderFactory>())), std::make_unique<webrtc::InternalDecoderFactory>())),
nullptr, nullptr); nullptr, nullptr);
} }
if (!g_peer_connection_factory.get()) { if (!g_peer_connection_factory.get()) {

View file

@ -250,7 +250,6 @@ if (rtc_enable_protobuf) {
"../rtc_base:rtc_task_queue", "../rtc_base:rtc_task_queue",
"../rtc_base:safe_minmax", "../rtc_base:safe_minmax",
"../rtc_base/synchronization:sequence_checker", "../rtc_base/synchronization:sequence_checker",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
} }

View file

@ -447,7 +447,7 @@ FixedLengthDeltaEncoder::FixedLengthDeltaEncoder(
: params_(params), base_(base), values_(values) { : params_(params), base_(base), values_(values) {
RTC_DCHECK(!values_.empty()); RTC_DCHECK(!values_.empty());
writer_ = writer_ =
absl::make_unique<BitWriter>(OutputLengthBytes(existent_values_count)); std::make_unique<BitWriter>(OutputLengthBytes(existent_values_count));
} }
std::string FixedLengthDeltaEncoder::Encode() { std::string FixedLengthDeltaEncoder::Encode() {
@ -723,7 +723,7 @@ std::unique_ptr<FixedLengthDeltaDecoder> FixedLengthDeltaDecoder::Create(
return nullptr; return nullptr;
} }
auto reader = absl::make_unique<rtc::BitBuffer>( auto reader = std::make_unique<rtc::BitBuffer>(
reinterpret_cast<const uint8_t*>(&input[0]), input.length()); reinterpret_cast<const uint8_t*>(&input[0]), input.length());
// Encoding type // Encoding type

View file

@ -10,10 +10,10 @@
#include <deque> #include <deque>
#include <limits> #include <limits>
#include <memory>
#include <string> #include <string>
#include <tuple> #include <tuple>
#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_legacy.h"
#include "logging/rtc_event_log/encoder/rtc_event_log_encoder_new_format.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" #include "logging/rtc_event_log/events/rtc_event_alr_state.h"
@ -55,9 +55,9 @@ class RtcEventLogEncoderTest
verifier_(new_encoding_ ? RtcEventLog::EncodingType::NewFormat verifier_(new_encoding_ ? RtcEventLog::EncodingType::NewFormat
: RtcEventLog::EncodingType::Legacy) { : RtcEventLog::EncodingType::Legacy) {
if (new_encoding_) if (new_encoding_)
encoder_ = absl::make_unique<RtcEventLogEncoderNewFormat>(); encoder_ = std::make_unique<RtcEventLogEncoderNewFormat>();
else else
encoder_ = absl::make_unique<RtcEventLogEncoderLegacy>(); encoder_ = std::make_unique<RtcEventLogEncoderLegacy>();
} }
~RtcEventLogEncoderTest() override = default; ~RtcEventLogEncoderTest() override = default;
@ -244,11 +244,11 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationBitrate) {
event_count_); event_count_);
for (size_t i = 0; i < event_count_; ++i) { for (size_t i = 0; i < event_count_; ++i) {
if (i == 0 || !force_repeated_fields_) { if (i == 0 || !force_repeated_fields_) {
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>(); auto runtime_config = std::make_unique<AudioEncoderRuntimeConfig>();
const int bitrate_bps = rtc::checked_cast<int>( const int bitrate_bps = rtc::checked_cast<int>(
prng_.Rand(0, std::numeric_limits<int32_t>::max())); prng_.Rand(0, std::numeric_limits<int32_t>::max()));
runtime_config->bitrate_bps = bitrate_bps; runtime_config->bitrate_bps = bitrate_bps;
events[i] = absl::make_unique<RtcEventAudioNetworkAdaptation>( events[i] = std::make_unique<RtcEventAudioNetworkAdaptation>(
std::move(runtime_config)); std::move(runtime_config));
} else { } else {
events[i] = events[0]->Copy(); events[i] = events[0]->Copy();
@ -262,10 +262,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationFrameLength) {
event_count_); event_count_);
for (size_t i = 0; i < event_count_; ++i) { for (size_t i = 0; i < event_count_; ++i) {
if (i == 0 || !force_repeated_fields_) { if (i == 0 || !force_repeated_fields_) {
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>(); auto runtime_config = std::make_unique<AudioEncoderRuntimeConfig>();
const int frame_length_ms = prng_.Rand(1, 1000); const int frame_length_ms = prng_.Rand(1, 1000);
runtime_config->frame_length_ms = frame_length_ms; runtime_config->frame_length_ms = frame_length_ms;
events[i] = absl::make_unique<RtcEventAudioNetworkAdaptation>( events[i] = std::make_unique<RtcEventAudioNetworkAdaptation>(
std::move(runtime_config)); std::move(runtime_config));
} else { } else {
events[i] = events[0]->Copy(); events[i] = events[0]->Copy();
@ -281,9 +281,9 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationPacketLoss) {
if (i == 0 || !force_repeated_fields_) { if (i == 0 || !force_repeated_fields_) {
// To simplify the test, we just check powers of two. // To simplify the test, we just check powers of two.
const float plr = std::pow(0.5f, prng_.Rand(1, 8)); const float plr = std::pow(0.5f, prng_.Rand(1, 8));
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>(); auto runtime_config = std::make_unique<AudioEncoderRuntimeConfig>();
runtime_config->uplink_packet_loss_fraction = plr; runtime_config->uplink_packet_loss_fraction = plr;
events[i] = absl::make_unique<RtcEventAudioNetworkAdaptation>( events[i] = std::make_unique<RtcEventAudioNetworkAdaptation>(
std::move(runtime_config)); std::move(runtime_config));
} else { } else {
events[i] = events[0]->Copy(); events[i] = events[0]->Copy();
@ -297,9 +297,9 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationFec) {
event_count_); event_count_);
for (size_t i = 0; i < event_count_; ++i) { for (size_t i = 0; i < event_count_; ++i) {
if (i == 0 || !force_repeated_fields_) { if (i == 0 || !force_repeated_fields_) {
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>(); auto runtime_config = std::make_unique<AudioEncoderRuntimeConfig>();
runtime_config->enable_fec = prng_.Rand<bool>(); runtime_config->enable_fec = prng_.Rand<bool>();
events[i] = absl::make_unique<RtcEventAudioNetworkAdaptation>( events[i] = std::make_unique<RtcEventAudioNetworkAdaptation>(
std::move(runtime_config)); std::move(runtime_config));
} else { } else {
events[i] = events[0]->Copy(); events[i] = events[0]->Copy();
@ -313,9 +313,9 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationDtx) {
event_count_); event_count_);
for (size_t i = 0; i < event_count_; ++i) { for (size_t i = 0; i < event_count_; ++i) {
if (i == 0 || !force_repeated_fields_) { if (i == 0 || !force_repeated_fields_) {
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>(); auto runtime_config = std::make_unique<AudioEncoderRuntimeConfig>();
runtime_config->enable_dtx = prng_.Rand<bool>(); runtime_config->enable_dtx = prng_.Rand<bool>();
events[i] = absl::make_unique<RtcEventAudioNetworkAdaptation>( events[i] = std::make_unique<RtcEventAudioNetworkAdaptation>(
std::move(runtime_config)); std::move(runtime_config));
} else { } else {
events[i] = events[0]->Copy(); events[i] = events[0]->Copy();
@ -329,9 +329,9 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationChannels) {
event_count_); event_count_);
for (size_t i = 0; i < event_count_; ++i) { for (size_t i = 0; i < event_count_; ++i) {
if (i == 0 || !force_repeated_fields_) { if (i == 0 || !force_repeated_fields_) {
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>(); auto runtime_config = std::make_unique<AudioEncoderRuntimeConfig>();
runtime_config->num_channels = prng_.Rand(1, 2); runtime_config->num_channels = prng_.Rand(1, 2);
events[i] = absl::make_unique<RtcEventAudioNetworkAdaptation>( events[i] = std::make_unique<RtcEventAudioNetworkAdaptation>(
std::move(runtime_config)); std::move(runtime_config));
} else { } else {
events[i] = events[0]->Copy(); events[i] = events[0]->Copy();
@ -345,7 +345,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationAll) {
event_count_); event_count_);
for (size_t i = 0; i < event_count_; ++i) { for (size_t i = 0; i < event_count_; ++i) {
if (i == 0 || !force_repeated_fields_) { if (i == 0 || !force_repeated_fields_) {
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>(); auto runtime_config = std::make_unique<AudioEncoderRuntimeConfig>();
runtime_config->bitrate_bps = rtc::checked_cast<int>( runtime_config->bitrate_bps = rtc::checked_cast<int>(
prng_.Rand(0, std::numeric_limits<int32_t>::max())); prng_.Rand(0, std::numeric_limits<int32_t>::max()));
runtime_config->frame_length_ms = prng_.Rand(1, 1000); runtime_config->frame_length_ms = prng_.Rand(1, 1000);
@ -354,7 +354,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationAll) {
runtime_config->enable_fec = prng_.Rand<bool>(); runtime_config->enable_fec = prng_.Rand<bool>();
runtime_config->enable_dtx = prng_.Rand<bool>(); runtime_config->enable_dtx = prng_.Rand<bool>();
runtime_config->num_channels = prng_.Rand(1, 2); runtime_config->num_channels = prng_.Rand(1, 2);
events[i] = absl::make_unique<RtcEventAudioNetworkAdaptation>( events[i] = std::make_unique<RtcEventAudioNetworkAdaptation>(
std::move(runtime_config)); std::move(runtime_config));
} else { } else {
events[i] = events[0]->Copy(); events[i] = events[0]->Copy();
@ -773,10 +773,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpReceiverReport) {
rtc::Buffer buffer = events[i].Build(); rtc::Buffer buffer = events[i].Build();
if (direction == kIncomingPacket) { if (direction == kIncomingPacket) {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketIncoming>(buffer)); std::make_unique<RtcEventRtcpPacketIncoming>(buffer));
} else { } else {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer)); std::make_unique<RtcEventRtcpPacketOutgoing>(buffer));
} }
fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000)));
} }
@ -812,10 +812,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpSenderReport) {
rtc::Buffer buffer = events[i].Build(); rtc::Buffer buffer = events[i].Build();
if (direction == kIncomingPacket) { if (direction == kIncomingPacket) {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketIncoming>(buffer)); std::make_unique<RtcEventRtcpPacketIncoming>(buffer));
} else { } else {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer)); std::make_unique<RtcEventRtcpPacketOutgoing>(buffer));
} }
fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000)));
} }
@ -851,10 +851,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpExtendedReports) {
rtc::Buffer buffer = events[i].Build(); rtc::Buffer buffer = events[i].Build();
if (direction == kIncomingPacket) { if (direction == kIncomingPacket) {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketIncoming>(buffer)); std::make_unique<RtcEventRtcpPacketIncoming>(buffer));
} else { } else {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer)); std::make_unique<RtcEventRtcpPacketOutgoing>(buffer));
} }
fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000)));
} }
@ -890,10 +890,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpFir) {
rtc::Buffer buffer = events[i].Build(); rtc::Buffer buffer = events[i].Build();
if (direction == kIncomingPacket) { if (direction == kIncomingPacket) {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketIncoming>(buffer)); std::make_unique<RtcEventRtcpPacketIncoming>(buffer));
} else { } else {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer)); std::make_unique<RtcEventRtcpPacketOutgoing>(buffer));
} }
fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000)));
} }
@ -928,10 +928,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpPli) {
rtc::Buffer buffer = events[i].Build(); rtc::Buffer buffer = events[i].Build();
if (direction == kIncomingPacket) { if (direction == kIncomingPacket) {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketIncoming>(buffer)); std::make_unique<RtcEventRtcpPacketIncoming>(buffer));
} else { } else {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer)); std::make_unique<RtcEventRtcpPacketOutgoing>(buffer));
} }
fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000)));
} }
@ -966,10 +966,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpNack) {
rtc::Buffer buffer = events[i].Build(); rtc::Buffer buffer = events[i].Build();
if (direction == kIncomingPacket) { if (direction == kIncomingPacket) {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketIncoming>(buffer)); std::make_unique<RtcEventRtcpPacketIncoming>(buffer));
} else { } else {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer)); std::make_unique<RtcEventRtcpPacketOutgoing>(buffer));
} }
fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000)));
} }
@ -1004,10 +1004,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpRemb) {
rtc::Buffer buffer = events[i].Build(); rtc::Buffer buffer = events[i].Build();
if (direction == kIncomingPacket) { if (direction == kIncomingPacket) {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketIncoming>(buffer)); std::make_unique<RtcEventRtcpPacketIncoming>(buffer));
} else { } else {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer)); std::make_unique<RtcEventRtcpPacketOutgoing>(buffer));
} }
fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000)));
} }
@ -1043,10 +1043,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpTransportFeedback) {
rtc::Buffer buffer = events[i].Build(); rtc::Buffer buffer = events[i].Build();
if (direction == kIncomingPacket) { if (direction == kIncomingPacket) {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketIncoming>(buffer)); std::make_unique<RtcEventRtcpPacketIncoming>(buffer));
} else { } else {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer)); std::make_unique<RtcEventRtcpPacketOutgoing>(buffer));
} }
fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000)));
} }
@ -1084,10 +1084,10 @@ TEST_P(RtcEventLogEncoderTest, RtcEventRtcpLossNotification) {
rtc::Buffer buffer = events[i].Build(); rtc::Buffer buffer = events[i].Build();
if (direction == kIncomingPacket) { if (direction == kIncomingPacket) {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketIncoming>(buffer)); std::make_unique<RtcEventRtcpPacketIncoming>(buffer));
} else { } else {
history_.push_back( history_.push_back(
absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer)); std::make_unique<RtcEventRtcpPacketOutgoing>(buffer));
} }
fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000))); fake_clock.AdvanceTime(TimeDelta::ms(prng_.Rand(0, 1000)));
} }

View file

@ -27,7 +27,7 @@ RtcEventAudioNetworkAdaptation::RtcEventAudioNetworkAdaptation(
RtcEventAudioNetworkAdaptation::RtcEventAudioNetworkAdaptation( RtcEventAudioNetworkAdaptation::RtcEventAudioNetworkAdaptation(
const RtcEventAudioNetworkAdaptation& other) const RtcEventAudioNetworkAdaptation& other)
: RtcEvent(other.timestamp_us_), : RtcEvent(other.timestamp_us_),
config_(absl::make_unique<AudioEncoderRuntimeConfig>(*other.config_)) {} config_(std::make_unique<AudioEncoderRuntimeConfig>(*other.config_)) {}
RtcEventAudioNetworkAdaptation::~RtcEventAudioNetworkAdaptation() = default; RtcEventAudioNetworkAdaptation::~RtcEventAudioNetworkAdaptation() = default;

View file

@ -27,7 +27,7 @@ RtcEventAudioReceiveStreamConfig::RtcEventAudioReceiveStreamConfig(
RtcEventAudioReceiveStreamConfig::RtcEventAudioReceiveStreamConfig( RtcEventAudioReceiveStreamConfig::RtcEventAudioReceiveStreamConfig(
const RtcEventAudioReceiveStreamConfig& other) const RtcEventAudioReceiveStreamConfig& other)
: RtcEvent(other.timestamp_us_), : RtcEvent(other.timestamp_us_),
config_(absl::make_unique<rtclog::StreamConfig>(*other.config_)) {} config_(std::make_unique<rtclog::StreamConfig>(*other.config_)) {}
RtcEventAudioReceiveStreamConfig::~RtcEventAudioReceiveStreamConfig() = default; RtcEventAudioReceiveStreamConfig::~RtcEventAudioReceiveStreamConfig() = default;

View file

@ -27,7 +27,7 @@ RtcEventAudioSendStreamConfig::RtcEventAudioSendStreamConfig(
RtcEventAudioSendStreamConfig::RtcEventAudioSendStreamConfig( RtcEventAudioSendStreamConfig::RtcEventAudioSendStreamConfig(
const RtcEventAudioSendStreamConfig& other) const RtcEventAudioSendStreamConfig& other)
: RtcEvent(other.timestamp_us_), : RtcEvent(other.timestamp_us_),
config_(absl::make_unique<rtclog::StreamConfig>(*other.config_)) {} config_(std::make_unique<rtclog::StreamConfig>(*other.config_)) {}
RtcEventAudioSendStreamConfig::~RtcEventAudioSendStreamConfig() = default; RtcEventAudioSendStreamConfig::~RtcEventAudioSendStreamConfig() = default;

View file

@ -26,7 +26,7 @@ RtcEventVideoReceiveStreamConfig::RtcEventVideoReceiveStreamConfig(
RtcEventVideoReceiveStreamConfig::RtcEventVideoReceiveStreamConfig( RtcEventVideoReceiveStreamConfig::RtcEventVideoReceiveStreamConfig(
const RtcEventVideoReceiveStreamConfig& other) const RtcEventVideoReceiveStreamConfig& other)
: RtcEvent(other.timestamp_us_), : RtcEvent(other.timestamp_us_),
config_(absl::make_unique<rtclog::StreamConfig>(*other.config_)) {} config_(std::make_unique<rtclog::StreamConfig>(*other.config_)) {}
RtcEventVideoReceiveStreamConfig::~RtcEventVideoReceiveStreamConfig() = default; RtcEventVideoReceiveStreamConfig::~RtcEventVideoReceiveStreamConfig() = default;

View file

@ -23,7 +23,7 @@ RtcEventVideoSendStreamConfig::RtcEventVideoSendStreamConfig(
RtcEventVideoSendStreamConfig::RtcEventVideoSendStreamConfig( RtcEventVideoSendStreamConfig::RtcEventVideoSendStreamConfig(
const RtcEventVideoSendStreamConfig& other) const RtcEventVideoSendStreamConfig& other)
: RtcEvent(other.timestamp_us_), : RtcEvent(other.timestamp_us_),
config_(absl::make_unique<rtclog::StreamConfig>(*other.config_)) {} config_(std::make_unique<rtclog::StreamConfig>(*other.config_)) {}
RtcEventVideoSendStreamConfig::~RtcEventVideoSendStreamConfig() = default; RtcEventVideoSendStreamConfig::~RtcEventVideoSendStreamConfig() = default;

View file

@ -10,7 +10,8 @@
#include "logging/rtc_event_log/ice_logger.h" #include "logging/rtc_event_log/ice_logger.h"
#include "absl/memory/memory.h" #include <memory>
#include "api/rtc_event_log/rtc_event_log.h" #include "api/rtc_event_log/rtc_event_log.h"
namespace webrtc { namespace webrtc {
@ -26,7 +27,7 @@ void IceEventLog::LogCandidatePairConfig(
return; return;
} }
candidate_pair_desc_by_id_[candidate_pair_id] = candidate_pair_desc; candidate_pair_desc_by_id_[candidate_pair_id] = candidate_pair_desc;
event_log_->Log(absl::make_unique<RtcEventIceCandidatePairConfig>( event_log_->Log(std::make_unique<RtcEventIceCandidatePairConfig>(
type, candidate_pair_id, candidate_pair_desc)); type, candidate_pair_id, candidate_pair_desc));
} }
@ -36,13 +37,13 @@ void IceEventLog::LogCandidatePairEvent(IceCandidatePairEventType type,
if (event_log_ == nullptr) { if (event_log_ == nullptr) {
return; return;
} }
event_log_->Log(absl::make_unique<RtcEventIceCandidatePair>( event_log_->Log(std::make_unique<RtcEventIceCandidatePair>(
type, candidate_pair_id, transaction_id)); type, candidate_pair_id, transaction_id));
} }
void IceEventLog::DumpCandidatePairDescriptionToMemoryAsConfigEvents() const { void IceEventLog::DumpCandidatePairDescriptionToMemoryAsConfigEvents() const {
for (const auto& desc_id_pair : candidate_pair_desc_by_id_) { for (const auto& desc_id_pair : candidate_pair_desc_by_id_) {
event_log_->Log(absl::make_unique<RtcEventIceCandidatePairConfig>( event_log_->Log(std::make_unique<RtcEventIceCandidatePairConfig>(
IceCandidatePairConfigType::kUpdated, desc_id_pair.first, IceCandidatePairConfigType::kUpdated, desc_id_pair.first,
desc_id_pair.second)); desc_id_pair.second));
} }

View file

@ -12,10 +12,10 @@
#include <functional> #include <functional>
#include <limits> #include <limits>
#include <memory>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/memory/memory.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "api/task_queue/queued_task.h" #include "api/task_queue/queued_task.h"
#include "api/task_queue/task_queue_base.h" #include "api/task_queue/task_queue_base.h"
@ -61,10 +61,10 @@ std::unique_ptr<RtcEventLogEncoder> CreateEncoder(
switch (type) { switch (type) {
case RtcEventLog::EncodingType::Legacy: case RtcEventLog::EncodingType::Legacy:
RTC_LOG(LS_INFO) << "Creating legacy encoder for RTC event log."; RTC_LOG(LS_INFO) << "Creating legacy encoder for RTC event log.";
return absl::make_unique<RtcEventLogEncoderLegacy>(); return std::make_unique<RtcEventLogEncoderLegacy>();
case RtcEventLog::EncodingType::NewFormat: case RtcEventLog::EncodingType::NewFormat:
RTC_LOG(LS_INFO) << "Creating new format encoder for RTC event log."; RTC_LOG(LS_INFO) << "Creating new format encoder for RTC event log.";
return absl::make_unique<RtcEventLogEncoderNewFormat>(); return std::make_unique<RtcEventLogEncoderNewFormat>();
default: default:
RTC_LOG(LS_ERROR) << "Unknown RtcEventLog encoder type (" << int(type) RTC_LOG(LS_ERROR) << "Unknown RtcEventLog encoder type (" << int(type)
<< ")"; << ")";
@ -82,7 +82,7 @@ RtcEventLogImpl::RtcEventLogImpl(RtcEventLog::EncodingType encoding_type,
output_scheduled_(false), output_scheduled_(false),
logging_state_started_(false), logging_state_started_(false),
task_queue_( task_queue_(
absl::make_unique<rtc::TaskQueue>(task_queue_factory->CreateTaskQueue( std::make_unique<rtc::TaskQueue>(task_queue_factory->CreateTaskQueue(
"rtc_event_log", "rtc_event_log",
TaskQueueFactory::Priority::NORMAL))) {} TaskQueueFactory::Priority::NORMAL))) {}
@ -128,9 +128,8 @@ bool RtcEventLogImpl::StartLogging(std::unique_ptr<RtcEventLogOutput> output,
RTC_DCHECK_RUN_ON(&logging_state_checker_); RTC_DCHECK_RUN_ON(&logging_state_checker_);
logging_state_started_ = true; logging_state_started_ = true;
task_queue_->PostTask( task_queue_->PostTask(std::make_unique<ResourceOwningTask<RtcEventLogOutput>>(
absl::make_unique<ResourceOwningTask<RtcEventLogOutput>>( std::move(output), start));
std::move(output), start));
return true; return true;
} }
@ -176,7 +175,7 @@ void RtcEventLogImpl::Log(std::unique_ptr<RtcEvent> event) {
ScheduleOutput(); ScheduleOutput();
}; };
task_queue_->PostTask(absl::make_unique<ResourceOwningTask<RtcEvent>>( task_queue_->PostTask(std::make_unique<ResourceOwningTask<RtcEvent>>(
std::move(event), event_handler)); std::move(event), event_handler));
} }

Some files were not shown because too many files have changed in this diff Show more