Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.
This CL was generated by the following script:
git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
git cl format
Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.
Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
This commit is contained in:
parent
431f14ef69
commit
918f50c5d1
@ -165,6 +165,7 @@ if (rtc_include_tests) {
|
||||
":video_quality_test_fixture_api",
|
||||
"../rtc_base:ptr_util",
|
||||
"../video:video_quality_test",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
@ -357,6 +358,7 @@ if (rtc_include_tests) {
|
||||
"../modules/video_coding:simulcast_test_fixture_impl",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"video_codecs:video_codecs_api",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
@ -392,6 +394,7 @@ if (rtc_include_tests) {
|
||||
"../modules/video_coding:videocodec_test_impl",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"video_codecs:video_codecs_api",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
|
||||
@ -55,6 +55,7 @@ rtc_source_set("aec3_factory") {
|
||||
":echo_control",
|
||||
"../../modules/audio_processing/aec3",
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "modules/audio_processing/aec3/echo_canceller3.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -22,6 +22,6 @@ EchoCanceller3Factory::EchoCanceller3Factory(const EchoCanceller3Config& config)
|
||||
: config_(config) {}
|
||||
|
||||
std::unique_ptr<EchoControl> EchoCanceller3Factory::Create(int sample_rate_hz) {
|
||||
return rtc::MakeUnique<EchoCanceller3>(config_, sample_rate_hz, true);
|
||||
return absl::make_unique<EchoCanceller3>(config_, sample_rate_hz, true);
|
||||
}
|
||||
} // namespace webrtc
|
||||
|
||||
@ -24,6 +24,7 @@ rtc_static_library("audio_encoder_L16") {
|
||||
"../../..:webrtc_common",
|
||||
"../../../modules/audio_coding:pcm16b",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
@ -40,6 +41,7 @@ rtc_static_library("audio_decoder_L16") {
|
||||
"../../..:webrtc_common",
|
||||
"../../../modules/audio_coding:pcm16b",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
|
||||
@ -10,11 +10,11 @@
|
||||
|
||||
#include "api/audio_codecs/L16/audio_decoder_L16.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h"
|
||||
#include "modules/audio_coding/codecs/pcm16b/pcm16b_common.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -36,7 +36,7 @@ void AudioDecoderL16::AppendSupportedDecoders(
|
||||
std::unique_ptr<AudioDecoder> AudioDecoderL16::MakeAudioDecoder(
|
||||
const Config& config,
|
||||
absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
|
||||
return config.IsOk() ? rtc::MakeUnique<AudioDecoderPcm16B>(
|
||||
return config.IsOk() ? absl::make_unique<AudioDecoderPcm16B>(
|
||||
config.sample_rate_hz, config.num_channels)
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
@ -10,11 +10,11 @@
|
||||
|
||||
#include "api/audio_codecs/L16/audio_encoder_L16.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h"
|
||||
#include "modules/audio_coding/codecs/pcm16b/pcm16b_common.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -54,7 +54,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderL16::MakeAudioEncoder(
|
||||
c.num_channels = config.num_channels;
|
||||
c.frame_size_ms = config.frame_size_ms;
|
||||
c.payload_type = payload_type;
|
||||
return rtc::MakeUnique<AudioEncoderPcm16B>(c);
|
||||
return absl::make_unique<AudioEncoderPcm16B>(c);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -25,6 +25,7 @@ rtc_static_library("audio_encoder_g711") {
|
||||
"../../../modules/audio_coding:g711",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"../../../rtc_base:safe_minmax",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
@ -41,6 +42,7 @@ rtc_static_library("audio_decoder_g711") {
|
||||
"../../..:webrtc_common",
|
||||
"../../../modules/audio_coding:g711",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
|
||||
@ -13,10 +13,10 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/g711/audio_decoder_pcm.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -49,9 +49,9 @@ std::unique_ptr<AudioDecoder> AudioDecoderG711::MakeAudioDecoder(
|
||||
RTC_DCHECK(config.IsOk());
|
||||
switch (config.type) {
|
||||
case Config::Type::kPcmU:
|
||||
return rtc::MakeUnique<AudioDecoderPcmU>(config.num_channels);
|
||||
return absl::make_unique<AudioDecoderPcmU>(config.num_channels);
|
||||
case Config::Type::kPcmA:
|
||||
return rtc::MakeUnique<AudioDecoderPcmA>(config.num_channels);
|
||||
return absl::make_unique<AudioDecoderPcmA>(config.num_channels);
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -13,11 +13,11 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/g711/audio_encoder_pcm.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/numerics/safe_minmax.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/string_to_number.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -70,14 +70,14 @@ std::unique_ptr<AudioEncoder> AudioEncoderG711::MakeAudioEncoder(
|
||||
impl_config.num_channels = config.num_channels;
|
||||
impl_config.frame_size_ms = config.frame_size_ms;
|
||||
impl_config.payload_type = payload_type;
|
||||
return rtc::MakeUnique<AudioEncoderPcmU>(impl_config);
|
||||
return absl::make_unique<AudioEncoderPcmU>(impl_config);
|
||||
}
|
||||
case Config::Type::kPcmA: {
|
||||
AudioEncoderPcmA::Config impl_config;
|
||||
impl_config.num_channels = config.num_channels;
|
||||
impl_config.frame_size_ms = config.frame_size_ms;
|
||||
impl_config.payload_type = payload_type;
|
||||
return rtc::MakeUnique<AudioEncoderPcmA>(impl_config);
|
||||
return absl::make_unique<AudioEncoderPcmA>(impl_config);
|
||||
}
|
||||
default: { return nullptr; }
|
||||
}
|
||||
|
||||
@ -33,6 +33,7 @@ rtc_static_library("audio_encoder_g722") {
|
||||
"../../../modules/audio_coding:g722",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"../../../rtc_base:safe_minmax",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
@ -49,6 +50,7 @@ rtc_static_library("audio_decoder_g722") {
|
||||
"../../..:webrtc_common",
|
||||
"../../../modules/audio_coding:g722",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
|
||||
@ -13,10 +13,10 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/g722/audio_decoder_g722.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -40,9 +40,9 @@ std::unique_ptr<AudioDecoder> AudioDecoderG722::MakeAudioDecoder(
|
||||
absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
|
||||
switch (config.num_channels) {
|
||||
case 1:
|
||||
return rtc::MakeUnique<AudioDecoderG722Impl>();
|
||||
return absl::make_unique<AudioDecoderG722Impl>();
|
||||
case 2:
|
||||
return rtc::MakeUnique<AudioDecoderG722StereoImpl>();
|
||||
return absl::make_unique<AudioDecoderG722StereoImpl>();
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -13,11 +13,11 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/g722/audio_encoder_g722.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/numerics/safe_minmax.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/string_to_number.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -62,7 +62,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderG722::MakeAudioEncoder(
|
||||
int payload_type,
|
||||
absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
|
||||
RTC_DCHECK(config.IsOk());
|
||||
return rtc::MakeUnique<AudioEncoderG722Impl>(config, payload_type);
|
||||
return absl::make_unique<AudioEncoderG722Impl>(config, payload_type);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -33,6 +33,7 @@ rtc_static_library("audio_encoder_ilbc") {
|
||||
"../../../modules/audio_coding:ilbc",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"../../../rtc_base:safe_minmax",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
@ -49,6 +50,7 @@ rtc_static_library("audio_decoder_ilbc") {
|
||||
"../../..:webrtc_common",
|
||||
"../../../modules/audio_coding:ilbc",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
|
||||
@ -13,9 +13,9 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -35,7 +35,7 @@ void AudioDecoderIlbc::AppendSupportedDecoders(
|
||||
std::unique_ptr<AudioDecoder> AudioDecoderIlbc::MakeAudioDecoder(
|
||||
Config config,
|
||||
absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
|
||||
return rtc::MakeUnique<AudioDecoderIlbcImpl>();
|
||||
return absl::make_unique<AudioDecoderIlbcImpl>();
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -13,11 +13,11 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/numerics/safe_minmax.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/string_to_number.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -76,7 +76,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderIlbc::MakeAudioEncoder(
|
||||
int payload_type,
|
||||
absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
|
||||
RTC_DCHECK(config.IsOk());
|
||||
return rtc::MakeUnique<AudioEncoderIlbcImpl>(config, payload_type);
|
||||
return absl::make_unique<AudioEncoderIlbcImpl>(config, payload_type);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -80,6 +80,7 @@ rtc_static_library("audio_encoder_isac_fix") {
|
||||
"../../..:webrtc_common",
|
||||
"../../../modules/audio_coding:isac_fix",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
@ -96,6 +97,7 @@ rtc_static_library("audio_decoder_isac_fix") {
|
||||
"../../..:webrtc_common",
|
||||
"../../../modules/audio_coding:isac_fix",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
@ -112,6 +114,7 @@ rtc_static_library("audio_encoder_isac_float") {
|
||||
"../../..:webrtc_common",
|
||||
"../../../modules/audio_coding:isac",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
@ -128,6 +131,7 @@ rtc_static_library("audio_decoder_isac_float") {
|
||||
"../../..:webrtc_common",
|
||||
"../../../modules/audio_coding:isac",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
#include "api/audio_codecs/isac/audio_decoder_isac_fix.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/isac/fix/include/audio_decoder_isacfix.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -32,7 +32,7 @@ void AudioDecoderIsacFix::AppendSupportedDecoders(
|
||||
std::unique_ptr<AudioDecoder> AudioDecoderIsacFix::MakeAudioDecoder(
|
||||
Config config,
|
||||
absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
|
||||
return rtc::MakeUnique<AudioDecoderIsacFixImpl>(16000);
|
||||
return absl::make_unique<AudioDecoderIsacFixImpl>(16000);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
#include "api/audio_codecs/isac/audio_decoder_isac_float.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/isac/main/include/audio_decoder_isac.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -39,7 +39,7 @@ std::unique_ptr<AudioDecoder> AudioDecoderIsacFloat::MakeAudioDecoder(
|
||||
Config config,
|
||||
absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
|
||||
RTC_DCHECK(config.IsOk());
|
||||
return rtc::MakeUnique<AudioDecoderIsacFloatImpl>(config.sample_rate_hz);
|
||||
return absl::make_unique<AudioDecoderIsacFloatImpl>(config.sample_rate_hz);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
#include "api/audio_codecs/isac/audio_encoder_isac_fix.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/isac/fix/include/audio_encoder_isacfix.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/string_to_number.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -56,7 +56,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderIsacFix::MakeAudioEncoder(
|
||||
AudioEncoderIsacFixImpl::Config c;
|
||||
c.frame_size_ms = config.frame_size_ms;
|
||||
c.payload_type = payload_type;
|
||||
return rtc::MakeUnique<AudioEncoderIsacFixImpl>(c);
|
||||
return absl::make_unique<AudioEncoderIsacFixImpl>(c);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
#include "api/audio_codecs/isac/audio_encoder_isac_float.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/string_to_number.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -68,7 +68,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderIsacFloat::MakeAudioEncoder(
|
||||
c.sample_rate_hz = config.sample_rate_hz;
|
||||
c.frame_size_ms = config.frame_size_ms;
|
||||
c.payload_type = payload_type;
|
||||
return rtc::MakeUnique<AudioEncoderIsacFloatImpl>(c);
|
||||
return absl::make_unique<AudioEncoderIsacFloatImpl>(c);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -60,6 +60,7 @@ rtc_static_library("audio_decoder_opus") {
|
||||
"../../..:webrtc_common",
|
||||
"../../../modules/audio_coding:webrtc_opus",
|
||||
"../../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
|
||||
@ -14,9 +14,9 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/codecs/opus/audio_decoder_opus.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -57,7 +57,7 @@ void AudioDecoderOpus::AppendSupportedDecoders(
|
||||
std::unique_ptr<AudioDecoder> AudioDecoderOpus::MakeAudioDecoder(
|
||||
Config config,
|
||||
absl::optional<AudioCodecPairId> /*codec_pair_id*/) {
|
||||
return rtc::MakeUnique<AudioDecoderOpusImpl>(config.num_channels);
|
||||
return absl::make_unique<AudioDecoderOpusImpl>(config.num_channels);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -38,6 +38,7 @@ if (rtc_include_tests) {
|
||||
"../isac:audio_encoder_isac_float",
|
||||
"../opus:audio_decoder_opus",
|
||||
"../opus:audio_encoder_opus",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include "api/audio_codecs/audio_decoder_factory_template.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/audio_codecs/L16/audio_decoder_L16.h"
|
||||
#include "api/audio_codecs/g711/audio_decoder_g711.h"
|
||||
#include "api/audio_codecs/g722/audio_decoder_g722.h"
|
||||
@ -16,7 +17,6 @@
|
||||
#include "api/audio_codecs/isac/audio_decoder_isac_fix.h"
|
||||
#include "api/audio_codecs/isac/audio_decoder_isac_float.h"
|
||||
#include "api/audio_codecs/opus/audio_decoder_opus.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/mock_audio_decoder.h"
|
||||
@ -64,7 +64,7 @@ struct AudioDecoderFakeApi {
|
||||
static std::unique_ptr<AudioDecoder> MakeAudioDecoder(
|
||||
const Config&,
|
||||
absl::optional<AudioCodecPairId> /*codec_pair_id*/ = absl::nullopt) {
|
||||
auto dec = rtc::MakeUnique<testing::StrictMock<MockAudioDecoder>>();
|
||||
auto dec = absl::make_unique<testing::StrictMock<MockAudioDecoder>>();
|
||||
EXPECT_CALL(*dec, SampleRateHz())
|
||||
.WillOnce(testing::Return(Params::CodecInfo().sample_rate_hz));
|
||||
EXPECT_CALL(*dec, Die());
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include "api/audio_codecs/audio_encoder_factory_template.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/audio_codecs/L16/audio_encoder_L16.h"
|
||||
#include "api/audio_codecs/g711/audio_encoder_g711.h"
|
||||
#include "api/audio_codecs/g722/audio_encoder_g722.h"
|
||||
@ -16,7 +17,6 @@
|
||||
#include "api/audio_codecs/isac/audio_encoder_isac_fix.h"
|
||||
#include "api/audio_codecs/isac/audio_encoder_isac_float.h"
|
||||
#include "api/audio_codecs/opus/audio_encoder_opus.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/mock_audio_encoder.h"
|
||||
@ -65,7 +65,7 @@ struct AudioEncoderFakeApi {
|
||||
const Config&,
|
||||
int payload_type,
|
||||
absl::optional<AudioCodecPairId> /*codec_pair_id*/ = absl::nullopt) {
|
||||
auto enc = rtc::MakeUnique<testing::StrictMock<MockAudioEncoder>>();
|
||||
auto enc = absl::make_unique<testing::StrictMock<MockAudioEncoder>>();
|
||||
EXPECT_CALL(*enc, SampleRateHz())
|
||||
.WillOnce(testing::Return(Params::CodecInfo().sample_rate_hz));
|
||||
return std::move(enc);
|
||||
|
||||
@ -13,9 +13,9 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/test/simulcast_test_fixture.h"
|
||||
#include "modules/video_coding/utility/simulcast_test_fixture_impl.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -24,9 +24,8 @@ std::unique_ptr<SimulcastTestFixture> CreateSimulcastTestFixture(
|
||||
std::unique_ptr<VideoEncoderFactory> encoder_factory,
|
||||
std::unique_ptr<VideoDecoderFactory> decoder_factory,
|
||||
SdpVideoFormat video_format) {
|
||||
return rtc::MakeUnique<SimulcastTestFixtureImpl>(std::move(encoder_factory),
|
||||
std::move(decoder_factory),
|
||||
video_format);
|
||||
return absl::make_unique<SimulcastTestFixtureImpl>(
|
||||
std::move(encoder_factory), std::move(decoder_factory), video_format);
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
|
||||
@ -11,22 +11,22 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/test/create_video_quality_test_fixture.h"
|
||||
#include "video/video_quality_test.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
std::unique_ptr<VideoQualityTestFixtureInterface>
|
||||
CreateVideoQualityTestFixture() {
|
||||
// By default, we don't override the FEC module, so pass an empty factory.
|
||||
return rtc::MakeUnique<VideoQualityTest>(nullptr);
|
||||
return absl::make_unique<VideoQualityTest>(nullptr);
|
||||
}
|
||||
|
||||
std::unique_ptr<VideoQualityTestFixtureInterface>
|
||||
CreateVideoQualityTestFixture(
|
||||
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory) {
|
||||
return rtc::MakeUnique<VideoQualityTest>(std::move(fec_controller_factory));
|
||||
return absl::make_unique<VideoQualityTest>(std::move(fec_controller_factory));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -13,9 +13,9 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/test/videocodec_test_fixture.h"
|
||||
#include "modules/video_coding/codecs/test/videocodec_test_fixture_impl.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -24,14 +24,14 @@ using Config = VideoCodecTestFixture::Config;
|
||||
|
||||
std::unique_ptr<VideoCodecTestFixture> CreateVideoCodecTestFixture(
|
||||
const Config& config) {
|
||||
return rtc::MakeUnique<VideoCodecTestFixtureImpl>(config);
|
||||
return absl::make_unique<VideoCodecTestFixtureImpl>(config);
|
||||
}
|
||||
|
||||
std::unique_ptr<VideoCodecTestFixture> CreateVideoCodecTestFixture(
|
||||
const Config& config,
|
||||
std::unique_ptr<VideoDecoderFactory> decoder_factory,
|
||||
std::unique_ptr<VideoEncoderFactory> encoder_factory) {
|
||||
return rtc::MakeUnique<VideoCodecTestFixtureImpl>(
|
||||
return absl::make_unique<VideoCodecTestFixtureImpl>(
|
||||
config, std::move(decoder_factory), std::move(encoder_factory));
|
||||
}
|
||||
|
||||
|
||||
@ -115,6 +115,7 @@ rtc_source_set("video_stream_decoder_create") {
|
||||
":video_stream_decoder",
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"../../video:video_stream_decoder_impl",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "api/video/video_stream_decoder_create.h"
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "video/video_stream_decoder_impl.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -18,7 +18,7 @@ std::unique_ptr<VideoStreamDecoder> CreateVideoStreamDecoder(
|
||||
VideoStreamDecoder::Callbacks* callbacks,
|
||||
VideoDecoderFactory* decoder_factory,
|
||||
std::map<int, std::pair<SdpVideoFormat, int>> decoder_settings) {
|
||||
return rtc::MakeUnique<VideoStreamDecoderImpl>(callbacks, decoder_factory,
|
||||
std::move(decoder_settings));
|
||||
return absl::make_unique<VideoStreamDecoderImpl>(callbacks, decoder_factory,
|
||||
std::move(decoder_settings));
|
||||
}
|
||||
} // namespace webrtc
|
||||
|
||||
@ -55,6 +55,7 @@ rtc_static_library("builtin_video_decoder_factory") {
|
||||
":video_codecs_api",
|
||||
"../../media:rtc_internal_video_codecs",
|
||||
"../../rtc_base:ptr_util",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -74,6 +75,7 @@ rtc_static_library("builtin_video_encoder_factory") {
|
||||
"../../media:rtc_internal_video_codecs",
|
||||
"../../media:rtc_media_base",
|
||||
"../../rtc_base:ptr_util",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -102,5 +104,6 @@ rtc_static_library("rtc_software_fallback_wrappers") {
|
||||
"../../rtc_base/system:fallthrough",
|
||||
"../../system_wrappers:field_trial_api",
|
||||
"../video:video_bitrate_allocation",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -10,13 +10,13 @@
|
||||
|
||||
#include "api/video_codecs/builtin_video_decoder_factory.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "media/engine/internaldecoderfactory.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
std::unique_ptr<VideoDecoderFactory> CreateBuiltinVideoDecoderFactory() {
|
||||
return rtc::MakeUnique<InternalDecoderFactory>();
|
||||
return absl::make_unique<InternalDecoderFactory>();
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -12,12 +12,12 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/video_codecs/sdp_video_format.h"
|
||||
#include "media/base/codec.h"
|
||||
#include "media/base/mediaconstants.h"
|
||||
#include "media/engine/internalencoderfactory.h"
|
||||
#include "media/engine/vp8_encoder_simulcast_proxy.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -60,7 +60,7 @@ class BuiltinVideoEncoderFactory : public VideoEncoderFactory {
|
||||
format)) {
|
||||
internal_encoder =
|
||||
cricket::CodecNamesEq(format.name.c_str(), cricket::kVp8CodecName)
|
||||
? rtc::MakeUnique<VP8EncoderSimulcastProxy>(
|
||||
? absl::make_unique<VP8EncoderSimulcastProxy>(
|
||||
internal_encoder_factory_.get(), format)
|
||||
: internal_encoder_factory_->CreateVideoEncoder(format);
|
||||
}
|
||||
@ -79,7 +79,7 @@ class BuiltinVideoEncoderFactory : public VideoEncoderFactory {
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<VideoEncoderFactory> CreateBuiltinVideoEncoderFactory() {
|
||||
return rtc::MakeUnique<BuiltinVideoEncoderFactory>();
|
||||
return absl::make_unique<BuiltinVideoEncoderFactory>();
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -13,10 +13,10 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "modules/video_coding/include/video_error_codes.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/system/fallthrough.h"
|
||||
#include "rtc_base/trace_event.h"
|
||||
|
||||
@ -217,7 +217,7 @@ VideoDecoder& VideoDecoderSoftwareFallbackWrapper::active_decoder() const {
|
||||
std::unique_ptr<VideoDecoder> CreateVideoDecoderSoftwareFallbackWrapper(
|
||||
std::unique_ptr<VideoDecoder> sw_fallback_decoder,
|
||||
std::unique_ptr<VideoDecoder> hw_decoder) {
|
||||
return rtc::MakeUnique<VideoDecoderSoftwareFallbackWrapper>(
|
||||
return absl::make_unique<VideoDecoderSoftwareFallbackWrapper>(
|
||||
std::move(sw_fallback_decoder), std::move(hw_decoder));
|
||||
}
|
||||
|
||||
|
||||
@ -15,12 +15,12 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "media/base/codec.h"
|
||||
#include "media/base/h264_profile_level_id.h"
|
||||
#include "modules/video_coding/include/video_error_codes.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/timeutils.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
|
||||
@ -380,7 +380,7 @@ void VideoEncoderSoftwareFallbackWrapper::ValidateSettingsForForcedFallback() {
|
||||
std::unique_ptr<VideoEncoder> CreateVideoEncoderSoftwareFallbackWrapper(
|
||||
std::unique_ptr<VideoEncoder> sw_fallback_encoder,
|
||||
std::unique_ptr<VideoEncoder> hw_encoder) {
|
||||
return rtc::MakeUnique<VideoEncoderSoftwareFallbackWrapper>(
|
||||
return absl::make_unique<VideoEncoderSoftwareFallbackWrapper>(
|
||||
std::move(sw_fallback_encoder), std::move(hw_encoder));
|
||||
}
|
||||
|
||||
|
||||
@ -86,6 +86,7 @@ rtc_static_library("audio") {
|
||||
"../system_wrappers:field_trial_api",
|
||||
"../system_wrappers:metrics_api",
|
||||
"utility:audio_frame_operations",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
@ -155,6 +156,7 @@ if (rtc_include_tests) {
|
||||
"../test:test_support",
|
||||
"utility:utility_tests",
|
||||
"//testing/gtest",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
|
||||
if (!rtc_use_memcheck) {
|
||||
@ -258,6 +260,7 @@ if (rtc_include_tests) {
|
||||
"../test:test_common",
|
||||
"../test:test_main",
|
||||
"//testing/gtest",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
|
||||
data = [
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "audio/audio_send_stream.h"
|
||||
#include "audio/audio_state.h"
|
||||
@ -27,7 +28,6 @@
|
||||
#include "modules/rtp_rtcp/mocks/mock_rtcp_rtt_stats.h"
|
||||
#include "modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
|
||||
#include "rtc_base/fakeclock.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/task_queue.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/mock_audio_encoder.h"
|
||||
|
||||
@ -14,12 +14,12 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "audio/audio_receive_stream.h"
|
||||
#include "modules/audio_device/include/audio_device.h"
|
||||
#include "rtc_base/atomicops.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/thread.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -121,7 +121,8 @@ void AudioState::SetPlayout(bool enabled) {
|
||||
}
|
||||
} else {
|
||||
config_.audio_device_module->StopPlayout();
|
||||
null_audio_poller_ = rtc::MakeUnique<NullAudioPoller>(&audio_transport_);
|
||||
null_audio_poller_ =
|
||||
absl::make_unique<NullAudioPoller>(&audio_transport_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/array_view.h"
|
||||
#include "audio/utility/audio_frame_operations.h"
|
||||
#include "call/rtp_transport_controller_send_interface.h"
|
||||
@ -38,7 +39,6 @@
|
||||
#include "rtc_base/format_macros.h"
|
||||
#include "rtc_base/location.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/rate_limiter.h"
|
||||
#include "rtc_base/task_queue.h"
|
||||
#include "rtc_base/thread_checker.h"
|
||||
@ -393,7 +393,7 @@ AudioMixer::Source::AudioFrameInfo Channel::GetAudioFrameWithInfo(
|
||||
|
||||
unsigned int ssrc;
|
||||
RTC_CHECK_EQ(GetRemoteSSRC(ssrc), 0);
|
||||
event_log_proxy_->Log(rtc::MakeUnique<RtcEventAudioPlayout>(ssrc));
|
||||
event_log_proxy_->Log(absl::make_unique<RtcEventAudioPlayout>(ssrc));
|
||||
// Get 10ms raw PCM data from the ACM (mixer limits output frequency)
|
||||
bool muted;
|
||||
if (audio_coding_->PlayoutData10Ms(audio_frame->sample_rate_hz_, audio_frame,
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
|
||||
#include "audio/test/audio_bwe_integration_test.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_audio/wav_file.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "system_wrappers/include/sleep.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
|
||||
@ -91,6 +91,7 @@ rtc_source_set("rtp_receiver") {
|
||||
"../modules/rtp_rtcp:rtp_rtcp_format",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
@ -113,6 +114,7 @@ rtc_source_set("rtp_sender") {
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base:rtc_task_queue",
|
||||
"../system_wrappers:field_trial_api",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -204,6 +206,7 @@ rtc_static_library("call") {
|
||||
"../system_wrappers:field_trial_api",
|
||||
"../system_wrappers:metrics_api",
|
||||
"../video",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
@ -247,6 +250,7 @@ rtc_source_set("fake_network") {
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base:sequenced_task_checker",
|
||||
"../system_wrappers",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
|
||||
if (!build_with_chromium && is_clang) {
|
||||
@ -309,6 +313,7 @@ if (rtc_include_tests) {
|
||||
"../test:test_support",
|
||||
"../test:video_test_common",
|
||||
"//testing/gtest",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
@ -351,6 +356,7 @@ if (rtc_include_tests) {
|
||||
"../test:video_test_common",
|
||||
"../video",
|
||||
"//testing/gtest",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
|
||||
28
call/call.cc
28
call/call.cc
@ -16,6 +16,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/transport/network_control.h"
|
||||
#include "audio/audio_receive_stream.h"
|
||||
@ -50,7 +51,6 @@
|
||||
#include "rtc_base/location.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/numerics/safe_minmax.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/rate_limiter.h"
|
||||
#include "rtc_base/sequenced_task_checker.h"
|
||||
#include "rtc_base/strings/string_builder.h"
|
||||
@ -106,7 +106,7 @@ const int* FindKeyByValue(const std::map<int, int>& m, int v) {
|
||||
|
||||
std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
|
||||
const VideoReceiveStream::Config& config) {
|
||||
auto rtclog_config = rtc::MakeUnique<rtclog::StreamConfig>();
|
||||
auto rtclog_config = absl::make_unique<rtclog::StreamConfig>();
|
||||
rtclog_config->remote_ssrc = config.rtp.remote_ssrc;
|
||||
rtclog_config->local_ssrc = config.rtp.local_ssrc;
|
||||
rtclog_config->rtx_ssrc = config.rtp.rtx_ssrc;
|
||||
@ -126,7 +126,7 @@ std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
|
||||
std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
|
||||
const VideoSendStream::Config& config,
|
||||
size_t ssrc_index) {
|
||||
auto rtclog_config = rtc::MakeUnique<rtclog::StreamConfig>();
|
||||
auto rtclog_config = absl::make_unique<rtclog::StreamConfig>();
|
||||
rtclog_config->local_ssrc = config.rtp.ssrcs[ssrc_index];
|
||||
if (ssrc_index < config.rtp.rtx.ssrcs.size()) {
|
||||
rtclog_config->rtx_ssrc = config.rtp.rtx.ssrcs[ssrc_index];
|
||||
@ -142,7 +142,7 @@ std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
|
||||
|
||||
std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
|
||||
const AudioReceiveStream::Config& config) {
|
||||
auto rtclog_config = rtc::MakeUnique<rtclog::StreamConfig>();
|
||||
auto rtclog_config = absl::make_unique<rtclog::StreamConfig>();
|
||||
rtclog_config->remote_ssrc = config.rtp.remote_ssrc;
|
||||
rtclog_config->local_ssrc = config.rtp.local_ssrc;
|
||||
rtclog_config->rtp_extensions = config.rtp.extensions;
|
||||
@ -151,7 +151,7 @@ std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
|
||||
|
||||
std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
|
||||
const AudioSendStream::Config& config) {
|
||||
auto rtclog_config = rtc::MakeUnique<rtclog::StreamConfig>();
|
||||
auto rtclog_config = absl::make_unique<rtclog::StreamConfig>();
|
||||
rtclog_config->local_ssrc = config.rtp.ssrc;
|
||||
rtclog_config->rtp_extensions = config.rtp.extensions;
|
||||
if (config.send_codec_spec) {
|
||||
@ -396,7 +396,7 @@ std::string Call::Stats::ToString(int64_t time_ms) const {
|
||||
|
||||
Call* Call::Create(const Call::Config& config) {
|
||||
return new internal::Call(
|
||||
config, rtc::MakeUnique<RtpTransportControllerSend>(
|
||||
config, absl::make_unique<RtpTransportControllerSend>(
|
||||
Clock::GetRealTimeClock(), config.event_log,
|
||||
config.network_controller_factory, config.bitrate_config));
|
||||
}
|
||||
@ -582,7 +582,7 @@ webrtc::AudioSendStream* Call::CreateAudioSendStream(
|
||||
const webrtc::AudioSendStream::Config& config) {
|
||||
TRACE_EVENT0("webrtc", "Call::CreateAudioSendStream");
|
||||
RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
|
||||
event_log_->Log(rtc::MakeUnique<RtcEventAudioSendStreamConfig>(
|
||||
event_log_->Log(absl::make_unique<RtcEventAudioSendStreamConfig>(
|
||||
CreateRtcLogStreamConfig(config)));
|
||||
|
||||
absl::optional<RtpState> suspended_rtp_state;
|
||||
@ -652,7 +652,7 @@ webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream(
|
||||
const webrtc::AudioReceiveStream::Config& config) {
|
||||
TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream");
|
||||
RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
|
||||
event_log_->Log(rtc::MakeUnique<RtcEventAudioReceiveStreamConfig>(
|
||||
event_log_->Log(absl::make_unique<RtcEventAudioReceiveStreamConfig>(
|
||||
CreateRtcLogStreamConfig(config)));
|
||||
AudioReceiveStream* receive_stream = new AudioReceiveStream(
|
||||
&audio_receiver_controller_, transport_send_ptr_->packet_router(),
|
||||
@ -715,7 +715,7 @@ webrtc::VideoSendStream* Call::CreateVideoSendStream(
|
||||
video_send_delay_stats_->AddSsrcs(config);
|
||||
for (size_t ssrc_index = 0; ssrc_index < config.rtp.ssrcs.size();
|
||||
++ssrc_index) {
|
||||
event_log_->Log(rtc::MakeUnique<RtcEventVideoSendStreamConfig>(
|
||||
event_log_->Log(absl::make_unique<RtcEventVideoSendStreamConfig>(
|
||||
CreateRtcLogStreamConfig(config, ssrc_index)));
|
||||
}
|
||||
|
||||
@ -758,7 +758,7 @@ webrtc::VideoSendStream* Call::CreateVideoSendStream(
|
||||
std::unique_ptr<FecController> fec_controller =
|
||||
config_.fec_controller_factory
|
||||
? config_.fec_controller_factory->CreateFecController()
|
||||
: rtc::MakeUnique<FecControllerDefault>(Clock::GetRealTimeClock());
|
||||
: absl::make_unique<FecControllerDefault>(Clock::GetRealTimeClock());
|
||||
return CreateVideoSendStream(std::move(config), std::move(encoder_config),
|
||||
std::move(fec_controller));
|
||||
}
|
||||
@ -829,7 +829,7 @@ webrtc::VideoReceiveStream* Call::CreateVideoReceiveStream(
|
||||
}
|
||||
receive_stream->SignalNetworkState(video_network_state_);
|
||||
UpdateAggregateNetworkState();
|
||||
event_log_->Log(rtc::MakeUnique<RtcEventVideoReceiveStreamConfig>(
|
||||
event_log_->Log(absl::make_unique<RtcEventVideoReceiveStreamConfig>(
|
||||
CreateRtcLogStreamConfig(config)));
|
||||
return receive_stream;
|
||||
}
|
||||
@ -1220,7 +1220,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtcp(MediaType media_type,
|
||||
}
|
||||
|
||||
if (rtcp_delivered) {
|
||||
event_log_->Log(rtc::MakeUnique<RtcEventRtcpPacketIncoming>(
|
||||
event_log_->Log(absl::make_unique<RtcEventRtcpPacketIncoming>(
|
||||
rtc::MakeArrayView(packet, length)));
|
||||
}
|
||||
|
||||
@ -1280,7 +1280,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type,
|
||||
received_bytes_per_second_counter_.Add(length);
|
||||
received_audio_bytes_per_second_counter_.Add(length);
|
||||
event_log_->Log(
|
||||
rtc::MakeUnique<RtcEventRtpPacketIncoming>(parsed_packet));
|
||||
absl::make_unique<RtcEventRtpPacketIncoming>(parsed_packet));
|
||||
const int64_t arrival_time_ms = parsed_packet.arrival_time_ms();
|
||||
if (!first_received_rtp_audio_ms_) {
|
||||
first_received_rtp_audio_ms_.emplace(arrival_time_ms);
|
||||
@ -1293,7 +1293,7 @@ PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type,
|
||||
received_bytes_per_second_counter_.Add(length);
|
||||
received_video_bytes_per_second_counter_.Add(length);
|
||||
event_log_->Log(
|
||||
rtc::MakeUnique<RtcEventRtpPacketIncoming>(parsed_packet));
|
||||
absl::make_unique<RtcEventRtpPacketIncoming>(parsed_packet));
|
||||
const int64_t arrival_time_ms = parsed_packet.arrival_time_ms();
|
||||
if (!first_received_rtp_video_ms_) {
|
||||
first_received_rtp_video_ms_.emplace(arrival_time_ms);
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||
#include "api/video/video_bitrate_allocation.h"
|
||||
#include "api/video_codecs/video_encoder_config.h"
|
||||
@ -24,7 +25,6 @@
|
||||
#include "modules/rtp_rtcp/include/rtp_header_parser.h"
|
||||
#include "rtc_base/bitrateallocationstrategy.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
#include "system_wrappers/include/metrics_default.h"
|
||||
#include "test/call_test.h"
|
||||
@ -199,18 +199,18 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
|
||||
return pair.second == MediaType::VIDEO;
|
||||
});
|
||||
|
||||
audio_send_transport = rtc::MakeUnique<test::PacketTransport>(
|
||||
audio_send_transport = absl::make_unique<test::PacketTransport>(
|
||||
&task_queue_, sender_call_.get(), &observer,
|
||||
test::PacketTransport::kSender, audio_pt_map, audio_net_config);
|
||||
audio_send_transport->SetReceiver(receiver_call_->Receiver());
|
||||
|
||||
video_send_transport = rtc::MakeUnique<test::PacketTransport>(
|
||||
video_send_transport = absl::make_unique<test::PacketTransport>(
|
||||
&task_queue_, sender_call_.get(), &observer,
|
||||
test::PacketTransport::kSender, video_pt_map,
|
||||
FakeNetworkPipe::Config());
|
||||
video_send_transport->SetReceiver(receiver_call_->Receiver());
|
||||
|
||||
receive_transport = rtc::MakeUnique<test::PacketTransport>(
|
||||
receive_transport = absl::make_unique<test::PacketTransport>(
|
||||
&task_queue_, receiver_call_.get(), &observer,
|
||||
test::PacketTransport::kReceiver, payload_type_map_,
|
||||
FakeNetworkPipe::Config());
|
||||
@ -256,7 +256,7 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
|
||||
}
|
||||
EXPECT_EQ(1u, video_receive_streams_.size());
|
||||
observer.set_receive_stream(video_receive_streams_[0]);
|
||||
drifting_clock = rtc::MakeUnique<DriftingClock>(clock_, video_ntp_speed);
|
||||
drifting_clock = absl::make_unique<DriftingClock>(clock_, video_ntp_speed);
|
||||
CreateFrameGeneratorCapturerWithDrift(drifting_clock.get(), video_rtp_speed,
|
||||
kDefaultFramerate, kDefaultWidth,
|
||||
kDefaultHeight);
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||
#include "api/test/mock_audio_mixer.h"
|
||||
#include "audio/audio_receive_stream.h"
|
||||
@ -24,7 +25,6 @@
|
||||
#include "modules/audio_processing/include/mock_audio_processing.h"
|
||||
#include "modules/pacing/mock/mock_paced_sender.h"
|
||||
#include "modules/rtp_rtcp/include/rtp_rtcp.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "test/fake_encoder.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/mock_audio_decoder_factory.h"
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
#include "call/degraded_call.h"
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
DegradedCall::DegradedCall(
|
||||
@ -28,7 +28,7 @@ DegradedCall::DegradedCall(
|
||||
receive_config_(receive_config) {
|
||||
if (receive_config_) {
|
||||
receive_pipe_ =
|
||||
rtc::MakeUnique<webrtc::FakeNetworkPipe>(clock_, *receive_config_);
|
||||
absl::make_unique<webrtc::FakeNetworkPipe>(clock_, *receive_config_);
|
||||
receive_pipe_->SetReceiver(call_->Receiver());
|
||||
}
|
||||
if (send_process_thread_) {
|
||||
@ -68,8 +68,8 @@ VideoSendStream* DegradedCall::CreateVideoSendStream(
|
||||
VideoSendStream::Config config,
|
||||
VideoEncoderConfig encoder_config) {
|
||||
if (send_config_ && !send_pipe_) {
|
||||
send_pipe_ = rtc::MakeUnique<FakeNetworkPipe>(clock_, *send_config_,
|
||||
config.send_transport);
|
||||
send_pipe_ = absl::make_unique<FakeNetworkPipe>(clock_, *send_config_,
|
||||
config.send_transport);
|
||||
config.send_transport = this;
|
||||
send_process_thread_->RegisterModule(send_pipe_.get(), RTC_FROM_HERE);
|
||||
}
|
||||
@ -83,8 +83,8 @@ VideoSendStream* DegradedCall::CreateVideoSendStream(
|
||||
VideoEncoderConfig encoder_config,
|
||||
std::unique_ptr<FecController> fec_controller) {
|
||||
if (send_config_ && !send_pipe_) {
|
||||
send_pipe_ = rtc::MakeUnique<FakeNetworkPipe>(clock_, *send_config_,
|
||||
config.send_transport);
|
||||
send_pipe_ = absl::make_unique<FakeNetworkPipe>(clock_, *send_config_,
|
||||
config.send_transport);
|
||||
config.send_transport = this;
|
||||
send_process_thread_->RegisterModule(send_pipe_.get(), RTC_FROM_HERE);
|
||||
}
|
||||
|
||||
@ -16,10 +16,10 @@
|
||||
#include <cmath>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "call/call.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "system_wrappers/include/clock.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -79,7 +79,7 @@ FakeNetworkPipe::FakeNetworkPipe(Clock* clock,
|
||||
PacketReceiver* receiver,
|
||||
uint64_t seed)
|
||||
: clock_(clock),
|
||||
network_simulation_(rtc::MakeUnique<SimulatedNetwork>(config, seed)),
|
||||
network_simulation_(absl::make_unique<SimulatedNetwork>(config, seed)),
|
||||
receiver_(receiver),
|
||||
transport_(nullptr),
|
||||
clock_offset_ms_(0),
|
||||
@ -93,7 +93,7 @@ FakeNetworkPipe::FakeNetworkPipe(Clock* clock,
|
||||
const FakeNetworkPipe::Config& config,
|
||||
Transport* transport)
|
||||
: clock_(clock),
|
||||
network_simulation_(rtc::MakeUnique<SimulatedNetwork>(config, 1)),
|
||||
network_simulation_(absl::make_unique<SimulatedNetwork>(config, 1)),
|
||||
receiver_(nullptr),
|
||||
transport_(transport),
|
||||
clock_offset_ms_(0),
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include <stdint.h>
|
||||
#include <memory>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/array_view.h"
|
||||
#include "call/rtp_stream_receiver_controller.h"
|
||||
#include "modules/pacing/packet_router.h"
|
||||
@ -22,7 +23,6 @@
|
||||
#include "modules/rtp_rtcp/source/byte_io.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
|
||||
#include "modules/utility/include/mock/mock_process_thread.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/mock_transport.h"
|
||||
@ -84,7 +84,7 @@ class FlexfecReceiveStreamTest : public ::testing::Test {
|
||||
FlexfecReceiveStreamTest()
|
||||
: config_(CreateDefaultConfig(&rtcp_send_transport_)) {
|
||||
EXPECT_CALL(process_thread_, RegisterModule(_, _)).Times(1);
|
||||
receive_stream_ = rtc::MakeUnique<FlexfecReceiveStreamImpl>(
|
||||
receive_stream_ = absl::make_unique<FlexfecReceiveStreamImpl>(
|
||||
&rtp_stream_receiver_controller_, config_, &recovered_packet_receiver_,
|
||||
&rtt_stats_, &process_thread_);
|
||||
}
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
#include "call/receive_time_calculator.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -36,7 +36,7 @@ ReceiveTimeCalculator::CreateFromFieldTrial() {
|
||||
RTC_LOG(LS_WARNING) << "Invalid number of parameters provided.";
|
||||
return nullptr;
|
||||
}
|
||||
return rtc::MakeUnique<ReceiveTimeCalculator>(min, max);
|
||||
return absl::make_unique<ReceiveTimeCalculator>(min, max);
|
||||
}
|
||||
|
||||
int64_t ReceiveTimeCalculator::ReconcileReceiveTimes(int64_t packet_time_us_,
|
||||
|
||||
@ -13,13 +13,13 @@
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/rtp_headers.h"
|
||||
#include "call/rtcp_packet_sink_interface.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/rtp_rtcp/source/rtcp_packet/bye.h"
|
||||
#include "rtc_base/arraysize.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "call/ssrc_binding_observer.h"
|
||||
#include "call/test/mock_rtp_packet_sink_interface.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
@ -23,7 +24,6 @@
|
||||
#include "rtc_base/arraysize.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
|
||||
@ -135,7 +135,7 @@ class RtpDemuxerTest : public testing::Test {
|
||||
std::unique_ptr<RtpPacketReceived> CreatePacket(
|
||||
uint32_t ssrc,
|
||||
RtpPacketReceived::ExtensionManager* extension_manager) {
|
||||
auto packet = rtc::MakeUnique<RtpPacketReceived>(extension_manager);
|
||||
auto packet = absl::make_unique<RtpPacketReceived>(extension_manager);
|
||||
packet->SetSsrc(ssrc);
|
||||
packet->SetSequenceNumber(next_sequence_number_++);
|
||||
return packet;
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
|
||||
#include "call/rtp_stream_receiver_controller.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -46,7 +46,7 @@ RtpStreamReceiverController::~RtpStreamReceiverController() = default;
|
||||
std::unique_ptr<RtpStreamReceiverInterface>
|
||||
RtpStreamReceiverController::CreateReceiver(uint32_t ssrc,
|
||||
RtpPacketSinkInterface* sink) {
|
||||
return rtc::MakeUnique<Receiver>(this, ssrc, sink);
|
||||
return absl::make_unique<Receiver>(this, ssrc, sink);
|
||||
}
|
||||
|
||||
bool RtpStreamReceiverController::OnRtpPacket(const RtpPacketReceived& packet) {
|
||||
|
||||
@ -9,12 +9,12 @@
|
||||
*/
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "call/rtp_transport_controller_send.h"
|
||||
#include "modules/congestion_controller/include/send_side_congestion_controller.h"
|
||||
#include "modules/congestion_controller/rtp/include/send_side_congestion_controller.h"
|
||||
#include "rtc_base/location.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -37,13 +37,13 @@ std::unique_ptr<SendSideCongestionControllerInterface> CreateController(
|
||||
NetworkControllerFactoryInterface* controller_factory) {
|
||||
if (task_queue_controller) {
|
||||
RTC_LOG(LS_INFO) << "Using TaskQueue based SSCC";
|
||||
return rtc::MakeUnique<webrtc::webrtc_cc::SendSideCongestionController>(
|
||||
return absl::make_unique<webrtc::webrtc_cc::SendSideCongestionController>(
|
||||
clock, task_queue, event_log, pacer, bitrate_config.start_bitrate_bps,
|
||||
bitrate_config.min_bitrate_bps, bitrate_config.max_bitrate_bps,
|
||||
controller_factory);
|
||||
}
|
||||
RTC_LOG(LS_INFO) << "Using Legacy SSCC";
|
||||
auto cc = rtc::MakeUnique<webrtc::SendSideCongestionController>(
|
||||
auto cc = absl::make_unique<webrtc::SendSideCongestionController>(
|
||||
clock, nullptr /* observer */, event_log, pacer);
|
||||
cc->SignalNetworkState(kNetworkDown);
|
||||
cc->SetBweBitrates(bitrate_config.min_bitrate_bps,
|
||||
|
||||
@ -901,6 +901,7 @@ if (is_win || is_android) {
|
||||
"../system_wrappers:field_trial_default",
|
||||
"../system_wrappers:metrics_default",
|
||||
"../system_wrappers:runtime_enabled_features_default",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
if (is_android) {
|
||||
deps += [
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||
#include "api/peerconnectioninterface.h"
|
||||
@ -20,7 +21,6 @@
|
||||
#include "media/engine/internalencoderfactory.h"
|
||||
#include "media/engine/webrtcmediaengine.h"
|
||||
#include "modules/audio_processing/include/audio_processing.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "sdk/android/native_api/jni/java_types.h"
|
||||
#include "sdk/android/native_api/video/wrapper.h"
|
||||
|
||||
@ -75,7 +75,7 @@ class SetLocalSessionDescriptionObserver
|
||||
} // namespace
|
||||
|
||||
AndroidCallClient::AndroidCallClient()
|
||||
: call_started_(false), pc_observer_(rtc::MakeUnique<PCObserver>(this)) {
|
||||
: call_started_(false), pc_observer_(absl::make_unique<PCObserver>(this)) {
|
||||
thread_checker_.DetachFromThread();
|
||||
CreatePeerConnectionFactory();
|
||||
}
|
||||
@ -155,8 +155,8 @@ void AndroidCallClient::CreatePeerConnectionFactory() {
|
||||
cricket::WebRtcMediaEngineFactory::Create(
|
||||
nullptr /* adm */, webrtc::CreateBuiltinAudioEncoderFactory(),
|
||||
webrtc::CreateBuiltinAudioDecoderFactory(),
|
||||
rtc::MakeUnique<webrtc::InternalEncoderFactory>(),
|
||||
rtc::MakeUnique<webrtc::InternalDecoderFactory>(),
|
||||
absl::make_unique<webrtc::InternalEncoderFactory>(),
|
||||
absl::make_unique<webrtc::InternalDecoderFactory>(),
|
||||
nullptr /* audio_mixer */, webrtc::AudioProcessingBuilder().Create());
|
||||
RTC_LOG(LS_INFO) << "Media engine created: " << media_engine.get();
|
||||
|
||||
|
||||
@ -16,12 +16,12 @@
|
||||
#import <WebRTC/RTCVideoCodecFactory.h>
|
||||
#import <WebRTC/RTCVideoRenderer.h>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||
#include "api/peerconnectioninterface.h"
|
||||
#include "media/engine/webrtcmediaengine.h"
|
||||
#include "modules/audio_processing/include/audio_processing.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "sdk/objc/Framework/Native/api/video_capturer.h"
|
||||
#include "sdk/objc/Framework/Native/api/video_decoder_factory.h"
|
||||
#include "sdk/objc/Framework/Native/api/video_encoder_factory.h"
|
||||
@ -56,7 +56,7 @@ class SetLocalSessionDescriptionObserver : public webrtc::SetSessionDescriptionO
|
||||
} // namespace
|
||||
|
||||
ObjCCallClient::ObjCCallClient()
|
||||
: call_started_(false), pc_observer_(rtc::MakeUnique<PCObserver>(this)) {
|
||||
: call_started_(false), pc_observer_(absl::make_unique<PCObserver>(this)) {
|
||||
thread_checker_.DetachFromThread();
|
||||
CreatePeerConnectionFactory();
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||
#include "api/test/fakeconstraints.h"
|
||||
@ -25,7 +26,6 @@
|
||||
#include "modules/audio_device/include/audio_device.h"
|
||||
#include "modules/audio_processing/include/audio_processing.h"
|
||||
#include "modules/video_capture/video_capture_factory.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
#include "examples/unityplugin/classreferenceholder.h"
|
||||
@ -107,10 +107,10 @@ bool SimplePeerConnection::InitializePeerConnection(const char** turn_urls,
|
||||
webrtc::CreateBuiltinAudioDecoderFactory(),
|
||||
std::unique_ptr<webrtc::VideoEncoderFactory>(
|
||||
new webrtc::MultiplexEncoderFactory(
|
||||
rtc::MakeUnique<webrtc::InternalEncoderFactory>())),
|
||||
absl::make_unique<webrtc::InternalEncoderFactory>())),
|
||||
std::unique_ptr<webrtc::VideoDecoderFactory>(
|
||||
new webrtc::MultiplexDecoderFactory(
|
||||
rtc::MakeUnique<webrtc::InternalDecoderFactory>())),
|
||||
absl::make_unique<webrtc::InternalDecoderFactory>())),
|
||||
nullptr, nullptr);
|
||||
}
|
||||
if (!g_peer_connection_factory.get()) {
|
||||
|
||||
@ -68,6 +68,7 @@ rtc_source_set("rtc_event_pacing") {
|
||||
":rtc_event_log_api",
|
||||
"../:typedefs",
|
||||
"../rtc_base:ptr_util",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -88,6 +89,7 @@ rtc_source_set("rtc_event_audio") {
|
||||
":rtc_stream_config",
|
||||
"../modules/audio_coding:audio_network_adaptor_config",
|
||||
"../rtc_base:ptr_util",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -109,6 +111,7 @@ rtc_source_set("rtc_event_bwe") {
|
||||
":rtc_event_log_api",
|
||||
"../modules/remote_bitrate_estimator:remote_bitrate_estimator",
|
||||
"../rtc_base:ptr_util",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -130,6 +133,7 @@ rtc_source_set("rtc_event_rtp_rtcp") {
|
||||
"../modules/rtp_rtcp:rtp_rtcp_format",
|
||||
"../rtc_base:ptr_util",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -145,6 +149,7 @@ rtc_source_set("rtc_event_video") {
|
||||
":rtc_event_log_api",
|
||||
":rtc_stream_config",
|
||||
"../rtc_base:ptr_util",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -225,6 +230,7 @@ rtc_static_library("rtc_event_log_impl_base") {
|
||||
"../rtc_base:rtc_task_queue",
|
||||
"../rtc_base:safe_minmax",
|
||||
"../rtc_base:sequenced_task_checker",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
|
||||
if (rtc_enable_protobuf) {
|
||||
@ -296,6 +302,7 @@ if (rtc_enable_protobuf) {
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:protobuf_utils",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
|
||||
if (!build_with_chromium && is_clang) {
|
||||
@ -345,6 +352,7 @@ if (rtc_enable_protobuf) {
|
||||
"../test:fileutils",
|
||||
"../test:test_support",
|
||||
"//testing/gtest",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
@ -437,6 +445,7 @@ rtc_source_set("ice_log") {
|
||||
":rtc_event_log_api",
|
||||
"../api:libjingle_logging_api",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
|
||||
if (!build_with_chromium && is_clang) {
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.h"
|
||||
#include "logging/rtc_event_log/events/rtc_event_alr_state.h"
|
||||
#include "logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h"
|
||||
@ -34,7 +35,6 @@
|
||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
||||
#include "modules/remote_bitrate_estimator/include/bwe_defines.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/random.h"
|
||||
#include "test/gtest.h"
|
||||
|
||||
@ -83,7 +83,7 @@ void RtcEventLogEncoderTest::TestRtcEventAudioNetworkAdaptation(
|
||||
// This function is called repeatedly. Clear state between calls.
|
||||
history_.clear();
|
||||
auto original_runtime_config = *runtime_config;
|
||||
auto event = rtc::MakeUnique<RtcEventAudioNetworkAdaptation>(
|
||||
auto event = absl::make_unique<RtcEventAudioNetworkAdaptation>(
|
||||
std::move(runtime_config));
|
||||
const int64_t timestamp_us = event->timestamp_us_;
|
||||
history_.push_back(std::move(event));
|
||||
@ -98,7 +98,7 @@ void RtcEventLogEncoderTest::TestRtcEventAudioNetworkAdaptation(
|
||||
}
|
||||
|
||||
TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationBitrate) {
|
||||
auto runtime_config = rtc::MakeUnique<AudioEncoderRuntimeConfig>();
|
||||
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>();
|
||||
const int bitrate_bps = rtc::checked_cast<int>(
|
||||
prng_.Rand(0, std::numeric_limits<int32_t>::max()));
|
||||
runtime_config->bitrate_bps = bitrate_bps;
|
||||
@ -106,7 +106,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationBitrate) {
|
||||
}
|
||||
|
||||
TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationFrameLength) {
|
||||
auto runtime_config = rtc::MakeUnique<AudioEncoderRuntimeConfig>();
|
||||
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>();
|
||||
const int frame_length_ms = prng_.Rand(1, 1000);
|
||||
runtime_config->frame_length_ms = frame_length_ms;
|
||||
TestRtcEventAudioNetworkAdaptation(std::move(runtime_config));
|
||||
@ -115,7 +115,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationFrameLength) {
|
||||
TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationPacketLoss) {
|
||||
// To simplify the test, we just check powers of two.
|
||||
const float plr = std::pow(0.5f, prng_.Rand(1, 8));
|
||||
auto runtime_config = rtc::MakeUnique<AudioEncoderRuntimeConfig>();
|
||||
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>();
|
||||
runtime_config->uplink_packet_loss_fraction = plr;
|
||||
TestRtcEventAudioNetworkAdaptation(std::move(runtime_config));
|
||||
}
|
||||
@ -124,7 +124,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationFec) {
|
||||
// The test might be trivially passing for one of the two boolean values, so
|
||||
// for safety's sake, we test both.
|
||||
for (bool fec_enabled : {false, true}) {
|
||||
auto runtime_config = rtc::MakeUnique<AudioEncoderRuntimeConfig>();
|
||||
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>();
|
||||
runtime_config->enable_fec = fec_enabled;
|
||||
TestRtcEventAudioNetworkAdaptation(std::move(runtime_config));
|
||||
}
|
||||
@ -134,7 +134,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationDtx) {
|
||||
// The test might be trivially passing for one of the two boolean values, so
|
||||
// for safety's sake, we test both.
|
||||
for (bool dtx_enabled : {false, true}) {
|
||||
auto runtime_config = rtc::MakeUnique<AudioEncoderRuntimeConfig>();
|
||||
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>();
|
||||
runtime_config->enable_dtx = dtx_enabled;
|
||||
TestRtcEventAudioNetworkAdaptation(std::move(runtime_config));
|
||||
}
|
||||
@ -144,7 +144,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationChannels) {
|
||||
// The test might be trivially passing for one of the two possible values, so
|
||||
// for safety's sake, we test both.
|
||||
for (size_t channels : {1, 2}) {
|
||||
auto runtime_config = rtc::MakeUnique<AudioEncoderRuntimeConfig>();
|
||||
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>();
|
||||
runtime_config->num_channels = channels;
|
||||
TestRtcEventAudioNetworkAdaptation(std::move(runtime_config));
|
||||
}
|
||||
@ -158,7 +158,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventAudioNetworkAdaptationAll) {
|
||||
for (bool fec_enabled : {false, true}) {
|
||||
for (bool dtx_enabled : {false, true}) {
|
||||
for (size_t channels : {1, 2}) {
|
||||
auto runtime_config = rtc::MakeUnique<AudioEncoderRuntimeConfig>();
|
||||
auto runtime_config = absl::make_unique<AudioEncoderRuntimeConfig>();
|
||||
runtime_config->bitrate_bps = bitrate_bps;
|
||||
runtime_config->frame_length_ms = frame_length_ms;
|
||||
runtime_config->uplink_packet_loss_fraction = plr;
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_alr_state.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -29,7 +29,7 @@ bool RtcEventAlrState::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventAlrState::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventAlrState(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventAlrState(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -24,7 +24,7 @@ RtcEventAudioNetworkAdaptation::RtcEventAudioNetworkAdaptation(
|
||||
RtcEventAudioNetworkAdaptation::RtcEventAudioNetworkAdaptation(
|
||||
const RtcEventAudioNetworkAdaptation& other)
|
||||
: RtcEvent(other.timestamp_us_),
|
||||
config_(rtc::MakeUnique<AudioEncoderRuntimeConfig>(*other.config_)) {}
|
||||
config_(absl::make_unique<AudioEncoderRuntimeConfig>(*other.config_)) {}
|
||||
|
||||
RtcEventAudioNetworkAdaptation::~RtcEventAudioNetworkAdaptation() = default;
|
||||
|
||||
@ -37,7 +37,7 @@ bool RtcEventAudioNetworkAdaptation::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventAudioNetworkAdaptation::Copy() const {
|
||||
return rtc::WrapUnique(new RtcEventAudioNetworkAdaptation(*this));
|
||||
return absl::WrapUnique(new RtcEventAudioNetworkAdaptation(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_audio_playout.h"
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -28,7 +28,7 @@ bool RtcEventAudioPlayout::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventAudioPlayout::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventAudioPlayout(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventAudioPlayout(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "logging/rtc_event_log/rtc_stream_config.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -24,7 +24,7 @@ RtcEventAudioReceiveStreamConfig::RtcEventAudioReceiveStreamConfig(
|
||||
RtcEventAudioReceiveStreamConfig::RtcEventAudioReceiveStreamConfig(
|
||||
const RtcEventAudioReceiveStreamConfig& other)
|
||||
: RtcEvent(other.timestamp_us_),
|
||||
config_(rtc::MakeUnique<rtclog::StreamConfig>(*other.config_)) {}
|
||||
config_(absl::make_unique<rtclog::StreamConfig>(*other.config_)) {}
|
||||
|
||||
RtcEventAudioReceiveStreamConfig::~RtcEventAudioReceiveStreamConfig() = default;
|
||||
|
||||
@ -37,8 +37,9 @@ bool RtcEventAudioReceiveStreamConfig::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventAudioReceiveStreamConfig::Copy() const {
|
||||
auto config_copy = rtc::MakeUnique<rtclog::StreamConfig>(*config_);
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventAudioReceiveStreamConfig(*this));
|
||||
auto config_copy = absl::make_unique<rtclog::StreamConfig>(*config_);
|
||||
return absl::WrapUnique<RtcEvent>(
|
||||
new RtcEventAudioReceiveStreamConfig(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "logging/rtc_event_log/rtc_stream_config.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -24,7 +24,7 @@ RtcEventAudioSendStreamConfig::RtcEventAudioSendStreamConfig(
|
||||
RtcEventAudioSendStreamConfig::RtcEventAudioSendStreamConfig(
|
||||
const RtcEventAudioSendStreamConfig& other)
|
||||
: RtcEvent(other.timestamp_us_),
|
||||
config_(rtc::MakeUnique<rtclog::StreamConfig>(*other.config_)) {}
|
||||
config_(absl::make_unique<rtclog::StreamConfig>(*other.config_)) {}
|
||||
|
||||
RtcEventAudioSendStreamConfig::~RtcEventAudioSendStreamConfig() = default;
|
||||
|
||||
@ -37,8 +37,8 @@ bool RtcEventAudioSendStreamConfig::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventAudioSendStreamConfig::Copy() const {
|
||||
auto config_copy = rtc::MakeUnique<rtclog::StreamConfig>(*config_);
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventAudioSendStreamConfig(*this));
|
||||
auto config_copy = absl::make_unique<rtclog::StreamConfig>(*config_);
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventAudioSendStreamConfig(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_bwe_update_delay_based.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "modules/remote_bitrate_estimator/include/bwe_defines.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -37,7 +37,7 @@ bool RtcEventBweUpdateDelayBased::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventBweUpdateDelayBased::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventBweUpdateDelayBased(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventBweUpdateDelayBased(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_bwe_update_loss_based.h"
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -39,7 +39,7 @@ bool RtcEventBweUpdateLossBased::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventBweUpdateLossBased::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventBweUpdateLossBased(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventBweUpdateLossBased(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h"
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -36,7 +36,7 @@ bool RtcEventIceCandidatePair::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventIceCandidatePair::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventIceCandidatePair(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventIceCandidatePair(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h"
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -65,7 +65,7 @@ bool RtcEventIceCandidatePairConfig::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventIceCandidatePairConfig::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventIceCandidatePairConfig(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventIceCandidatePairConfig(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_probe_cluster_created.h"
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -40,7 +40,7 @@ bool RtcEventProbeClusterCreated::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventProbeClusterCreated::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventProbeClusterCreated(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventProbeClusterCreated(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_probe_result_failure.h"
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -34,7 +34,7 @@ bool RtcEventProbeResultFailure::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventProbeResultFailure::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventProbeResultFailure(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventProbeResultFailure(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_probe_result_success.h"
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -33,7 +33,7 @@ bool RtcEventProbeResultSuccess::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventProbeResultSuccess::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventProbeResultSuccess(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventProbeResultSuccess(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_rtcp_packet_incoming.h"
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -34,7 +34,7 @@ bool RtcEventRtcpPacketIncoming::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventRtcpPacketIncoming::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventRtcpPacketIncoming(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventRtcpPacketIncoming(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_rtcp_packet_outgoing.h"
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -34,7 +34,7 @@ bool RtcEventRtcpPacketOutgoing::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventRtcpPacketOutgoing::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventRtcpPacketOutgoing(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventRtcpPacketOutgoing(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_rtp_packet_incoming.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -38,7 +38,7 @@ bool RtcEventRtpPacketIncoming::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventRtpPacketIncoming::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventRtpPacketIncoming(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventRtpPacketIncoming(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
|
||||
#include "logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -41,7 +41,7 @@ bool RtcEventRtpPacketOutgoing::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventRtpPacketOutgoing::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventRtpPacketOutgoing(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventRtpPacketOutgoing(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -23,7 +23,7 @@ RtcEventVideoReceiveStreamConfig::RtcEventVideoReceiveStreamConfig(
|
||||
RtcEventVideoReceiveStreamConfig::RtcEventVideoReceiveStreamConfig(
|
||||
const RtcEventVideoReceiveStreamConfig& other)
|
||||
: RtcEvent(other.timestamp_us_),
|
||||
config_(rtc::MakeUnique<rtclog::StreamConfig>(*other.config_)) {}
|
||||
config_(absl::make_unique<rtclog::StreamConfig>(*other.config_)) {}
|
||||
|
||||
RtcEventVideoReceiveStreamConfig::~RtcEventVideoReceiveStreamConfig() = default;
|
||||
|
||||
@ -36,7 +36,8 @@ bool RtcEventVideoReceiveStreamConfig::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventVideoReceiveStreamConfig::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventVideoReceiveStreamConfig(*this));
|
||||
return absl::WrapUnique<RtcEvent>(
|
||||
new RtcEventVideoReceiveStreamConfig(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -23,7 +23,7 @@ RtcEventVideoSendStreamConfig::RtcEventVideoSendStreamConfig(
|
||||
RtcEventVideoSendStreamConfig::RtcEventVideoSendStreamConfig(
|
||||
const RtcEventVideoSendStreamConfig& other)
|
||||
: RtcEvent(other.timestamp_us_),
|
||||
config_(rtc::MakeUnique<rtclog::StreamConfig>(*other.config_)) {}
|
||||
config_(absl::make_unique<rtclog::StreamConfig>(*other.config_)) {}
|
||||
|
||||
RtcEventVideoSendStreamConfig::~RtcEventVideoSendStreamConfig() = default;
|
||||
|
||||
@ -36,7 +36,7 @@ bool RtcEventVideoSendStreamConfig::IsConfigEvent() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEvent> RtcEventVideoSendStreamConfig::Copy() const {
|
||||
return rtc::WrapUnique<RtcEvent>(new RtcEventVideoSendStreamConfig(*this));
|
||||
return absl::WrapUnique<RtcEvent>(new RtcEventVideoSendStreamConfig(*this));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
|
||||
#include "logging/rtc_event_log/icelogger.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "logging/rtc_event_log/rtc_event_log.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -26,7 +26,7 @@ void IceEventLog::LogCandidatePairConfig(
|
||||
return;
|
||||
}
|
||||
candidate_pair_desc_by_id_[candidate_pair_id] = candidate_pair_desc;
|
||||
event_log_->Log(rtc::MakeUnique<RtcEventIceCandidatePairConfig>(
|
||||
event_log_->Log(absl::make_unique<RtcEventIceCandidatePairConfig>(
|
||||
type, candidate_pair_id, candidate_pair_desc));
|
||||
}
|
||||
|
||||
@ -36,12 +36,12 @@ void IceEventLog::LogCandidatePairEvent(IceCandidatePairEventType type,
|
||||
return;
|
||||
}
|
||||
event_log_->Log(
|
||||
rtc::MakeUnique<RtcEventIceCandidatePair>(type, candidate_pair_id));
|
||||
absl::make_unique<RtcEventIceCandidatePair>(type, candidate_pair_id));
|
||||
}
|
||||
|
||||
void IceEventLog::DumpCandidatePairDescriptionToMemoryAsConfigEvents() const {
|
||||
for (const auto& desc_id_pair : candidate_pair_desc_by_id_) {
|
||||
event_log_->Log(rtc::MakeUnique<RtcEventIceCandidatePairConfig>(
|
||||
event_log_->Log(absl::make_unique<RtcEventIceCandidatePairConfig>(
|
||||
IceCandidatePairConfigType::kUpdated, desc_id_pair.first,
|
||||
desc_id_pair.second));
|
||||
}
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/testsupport/fileutils.h"
|
||||
|
||||
@ -51,13 +51,14 @@ class RtcEventLogOutputFileTest : public ::testing::Test {
|
||||
};
|
||||
|
||||
TEST_F(RtcEventLogOutputFileTest, NonDefectiveOutputsStartOutActive) {
|
||||
auto output_file = rtc::MakeUnique<RtcEventLogOutputFile>(output_file_name_);
|
||||
auto output_file =
|
||||
absl::make_unique<RtcEventLogOutputFile>(output_file_name_);
|
||||
EXPECT_TRUE(output_file->IsActive());
|
||||
}
|
||||
|
||||
TEST_F(RtcEventLogOutputFileTest, DefectiveOutputsStartOutInactive) {
|
||||
const std::string illegal_filename = "/////////";
|
||||
auto output_file = rtc::MakeUnique<RtcEventLogOutputFile>(illegal_filename);
|
||||
auto output_file = absl::make_unique<RtcEventLogOutputFile>(illegal_filename);
|
||||
EXPECT_FALSE(output_file->IsActive());
|
||||
}
|
||||
|
||||
@ -65,7 +66,8 @@ TEST_F(RtcEventLogOutputFileTest, DefectiveOutputsStartOutInactive) {
|
||||
TEST_F(RtcEventLogOutputFileTest, UnlimitedOutputFile) {
|
||||
const std::string output_str = "one two three";
|
||||
|
||||
auto output_file = rtc::MakeUnique<RtcEventLogOutputFile>(output_file_name_);
|
||||
auto output_file =
|
||||
absl::make_unique<RtcEventLogOutputFile>(output_file_name_);
|
||||
output_file->Write(output_str);
|
||||
output_file.reset(); // Closing the file flushes the buffer to disk.
|
||||
|
||||
@ -76,7 +78,7 @@ TEST_F(RtcEventLogOutputFileTest, UnlimitedOutputFile) {
|
||||
TEST_F(RtcEventLogOutputFileTest, LimitedOutputFileCappedToCapacity) {
|
||||
// Fit two bytes, then the third should be rejected.
|
||||
auto output_file =
|
||||
rtc::MakeUnique<RtcEventLogOutputFile>(output_file_name_, 2);
|
||||
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, 2);
|
||||
|
||||
output_file->Write("1");
|
||||
output_file->Write("2");
|
||||
@ -96,7 +98,7 @@ TEST_F(RtcEventLogOutputFileTest, DoNotWritePartialLines) {
|
||||
// Set a file size limit just shy of fitting the entire second line.
|
||||
const size_t size_limit = output_str_1.length() + output_str_2.length() - 1;
|
||||
auto output_file =
|
||||
rtc::MakeUnique<RtcEventLogOutputFile>(output_file_name_, size_limit);
|
||||
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, size_limit);
|
||||
|
||||
output_file->Write(output_str_1);
|
||||
output_file->Write(output_str_2);
|
||||
@ -107,20 +109,20 @@ TEST_F(RtcEventLogOutputFileTest, DoNotWritePartialLines) {
|
||||
|
||||
TEST_F(RtcEventLogOutputFileTest, UnsuccessfulWriteReturnsFalse) {
|
||||
auto output_file =
|
||||
rtc::MakeUnique<RtcEventLogOutputFile>(output_file_name_, 2);
|
||||
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, 2);
|
||||
EXPECT_FALSE(output_file->Write("abc"));
|
||||
}
|
||||
|
||||
TEST_F(RtcEventLogOutputFileTest, SuccessfulWriteReturnsTrue) {
|
||||
auto output_file =
|
||||
rtc::MakeUnique<RtcEventLogOutputFile>(output_file_name_, 3);
|
||||
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, 3);
|
||||
EXPECT_TRUE(output_file->Write("abc"));
|
||||
}
|
||||
|
||||
// Even if capacity is reached, a successful write leaves the output active.
|
||||
TEST_F(RtcEventLogOutputFileTest, FileStillActiveAfterSuccessfulWrite) {
|
||||
auto output_file =
|
||||
rtc::MakeUnique<RtcEventLogOutputFile>(output_file_name_, 3);
|
||||
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, 3);
|
||||
ASSERT_TRUE(output_file->Write("abc"));
|
||||
EXPECT_TRUE(output_file->IsActive());
|
||||
}
|
||||
@ -129,13 +131,13 @@ TEST_F(RtcEventLogOutputFileTest, FileStillActiveAfterSuccessfulWrite) {
|
||||
// not yet been reached.
|
||||
TEST_F(RtcEventLogOutputFileTest, FileInactiveAfterUnsuccessfulWrite) {
|
||||
auto output_file =
|
||||
rtc::MakeUnique<RtcEventLogOutputFile>(output_file_name_, 2);
|
||||
absl::make_unique<RtcEventLogOutputFile>(output_file_name_, 2);
|
||||
ASSERT_FALSE(output_file->Write("abc"));
|
||||
EXPECT_FALSE(output_file->IsActive());
|
||||
}
|
||||
|
||||
TEST_F(RtcEventLogOutputFileTest, AllowReasonableFileSizeLimits) {
|
||||
auto output_file = rtc::MakeUnique<RtcEventLogOutputFile>(
|
||||
auto output_file = absl::make_unique<RtcEventLogOutputFile>(
|
||||
output_file_name_, RtcEventLogOutputFile::kMaxReasonableFileSize);
|
||||
EXPECT_TRUE(output_file->IsActive());
|
||||
}
|
||||
@ -156,8 +158,8 @@ TEST_F(RtcEventLogOutputFileTest, DisallowUnreasonableFileSizeLimits) {
|
||||
auto create_output_file = [&] {
|
||||
const size_t unreasonable_size =
|
||||
RtcEventLogOutputFile::kMaxReasonableFileSize + 1;
|
||||
output_file = rtc::MakeUnique<RtcEventLogOutputFile>(output_file_name_,
|
||||
unreasonable_size);
|
||||
output_file = absl::make_unique<RtcEventLogOutputFile>(output_file_name_,
|
||||
unreasonable_size);
|
||||
};
|
||||
EXPECT_DEATH(create_output_file(), "");
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.h"
|
||||
#include "logging/rtc_event_log/output/rtc_event_log_output_file.h"
|
||||
#include "rtc_base/checks.h"
|
||||
@ -25,7 +26,6 @@
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/numerics/safe_minmax.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/sequenced_task_checker.h"
|
||||
#include "rtc_base/task_queue.h"
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
@ -64,7 +64,7 @@ std::unique_ptr<RtcEventLogEncoder> CreateEncoder(
|
||||
RtcEventLog::EncodingType type) {
|
||||
switch (type) {
|
||||
case RtcEventLog::EncodingType::Legacy:
|
||||
return rtc::MakeUnique<RtcEventLogEncoderLegacy>();
|
||||
return absl::make_unique<RtcEventLogEncoderLegacy>();
|
||||
default:
|
||||
RTC_LOG(LS_ERROR) << "Unknown RtcEventLog encoder type (" << int(type)
|
||||
<< ")";
|
||||
@ -182,8 +182,9 @@ bool RtcEventLogImpl::StartLogging(std::unique_ptr<RtcEventLogOutput> output,
|
||||
LogEventsFromMemoryToOutput();
|
||||
};
|
||||
|
||||
task_queue_->PostTask(rtc::MakeUnique<ResourceOwningTask<RtcEventLogOutput>>(
|
||||
std::move(output), start));
|
||||
task_queue_->PostTask(
|
||||
absl::make_unique<ResourceOwningTask<RtcEventLogOutput>>(
|
||||
std::move(output), start));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -222,7 +223,7 @@ void RtcEventLogImpl::Log(std::unique_ptr<RtcEvent> event) {
|
||||
ScheduleOutput();
|
||||
};
|
||||
|
||||
task_queue_->PostTask(rtc::MakeUnique<ResourceOwningTask<RtcEvent>>(
|
||||
task_queue_->PostTask(absl::make_unique<ResourceOwningTask<RtcEvent>>(
|
||||
std::move(event), event_handler));
|
||||
}
|
||||
|
||||
@ -354,15 +355,15 @@ void RtcEventLogImpl::WriteToOutput(const std::string& output_string) {
|
||||
// RtcEventLog member functions.
|
||||
std::unique_ptr<RtcEventLog> RtcEventLog::Create(EncodingType encoding_type) {
|
||||
return Create(encoding_type,
|
||||
rtc::MakeUnique<rtc::TaskQueue>("rtc_event_log"));
|
||||
absl::make_unique<rtc::TaskQueue>("rtc_event_log"));
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventLog> RtcEventLog::Create(
|
||||
EncodingType encoding_type,
|
||||
std::unique_ptr<rtc::TaskQueue> task_queue) {
|
||||
#ifdef ENABLE_RTC_EVENT_LOG
|
||||
return rtc::MakeUnique<RtcEventLogImpl>(CreateEncoder(encoding_type),
|
||||
std::move(task_queue));
|
||||
return absl::make_unique<RtcEventLogImpl>(CreateEncoder(encoding_type),
|
||||
std::move(task_queue));
|
||||
#else
|
||||
return CreateNull();
|
||||
#endif // ENABLE_RTC_EVENT_LOG
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/rtp_headers.h"
|
||||
#include "api/rtpparameters.h"
|
||||
#include "logging/rtc_event_log/rtc_event_log.h"
|
||||
@ -32,7 +33,6 @@
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/protobuf_utils.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h"
|
||||
#include "logging/rtc_event_log/events/rtc_event_audio_playout.h"
|
||||
#include "logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.h"
|
||||
@ -40,7 +41,6 @@
|
||||
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/fakeclock.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/random.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/testsupport/fileutils.h"
|
||||
@ -303,7 +303,7 @@ void RtcEventLogSession::WriteLog(EventCounts count,
|
||||
if (remaining_events == remaining_events_at_start) {
|
||||
clock_.AdvanceTimeMicros(prng_.Rand(20) * 1000);
|
||||
event_log->StartLogging(
|
||||
rtc::MakeUnique<RtcEventLogOutputFile>(temp_filename_, 10000000),
|
||||
absl::make_unique<RtcEventLogOutputFile>(temp_filename_, 10000000),
|
||||
output_period_ms_);
|
||||
start_time_us_ = rtc::TimeMicros();
|
||||
}
|
||||
@ -694,7 +694,7 @@ TEST(RtcEventLogTest, CircularBufferKeepsMostRecentEvents) {
|
||||
const std::string temp_filename = test::OutputPath() + test_name;
|
||||
|
||||
std::unique_ptr<rtc::ScopedFakeClock> fake_clock =
|
||||
rtc::MakeUnique<rtc::ScopedFakeClock>();
|
||||
absl::make_unique<rtc::ScopedFakeClock>();
|
||||
fake_clock->SetTimeMicros(kStartTime);
|
||||
|
||||
// When log_dumper goes out of scope, it causes the log file to be flushed
|
||||
@ -709,13 +709,13 @@ TEST(RtcEventLogTest, CircularBufferKeepsMostRecentEvents) {
|
||||
// simplicity.
|
||||
// We base the various values on the index. We use this for some basic
|
||||
// consistency checks when we read back.
|
||||
log_dumper->Log(rtc::MakeUnique<RtcEventProbeResultSuccess>(
|
||||
log_dumper->Log(absl::make_unique<RtcEventProbeResultSuccess>(
|
||||
i, kStartBitrate + i * 1000));
|
||||
fake_clock->AdvanceTimeMicros(10000);
|
||||
}
|
||||
int64_t start_time_us = rtc::TimeMicros();
|
||||
log_dumper->StartLogging(
|
||||
rtc::MakeUnique<RtcEventLogOutputFile>(temp_filename, 10000000),
|
||||
absl::make_unique<RtcEventLogOutputFile>(temp_filename, 10000000),
|
||||
RtcEventLog::kImmediateOutput);
|
||||
fake_clock->AdvanceTimeMicros(10000);
|
||||
int64_t stop_time_us = rtc::TimeMicros();
|
||||
@ -748,7 +748,7 @@ TEST(RtcEventLogTest, CircularBufferKeepsMostRecentEvents) {
|
||||
// recreate the clock. However we must ensure that the old fake_clock is
|
||||
// destroyed before the new one is created, so we have to reset() first.
|
||||
fake_clock.reset();
|
||||
fake_clock = rtc::MakeUnique<rtc::ScopedFakeClock>();
|
||||
fake_clock = absl::make_unique<rtc::ScopedFakeClock>();
|
||||
fake_clock->SetTimeMicros(first_timestamp_us);
|
||||
for (size_t i = 1; i < probe_success_events.size(); i++) {
|
||||
fake_clock->AdvanceTimeMicros(10000);
|
||||
|
||||
@ -65,18 +65,18 @@ void ShuffleInPlace(Random* prng, rtc::ArrayView<T> array) {
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<RtcEventAlrState> EventGenerator::NewAlrState() {
|
||||
return rtc::MakeUnique<RtcEventAlrState>(prng_.Rand<bool>());
|
||||
return absl::make_unique<RtcEventAlrState>(prng_.Rand<bool>());
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventAudioPlayout> EventGenerator::NewAudioPlayout(
|
||||
uint32_t ssrc) {
|
||||
return rtc::MakeUnique<RtcEventAudioPlayout>(ssrc);
|
||||
return absl::make_unique<RtcEventAudioPlayout>(ssrc);
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventAudioNetworkAdaptation>
|
||||
EventGenerator::NewAudioNetworkAdaptation() {
|
||||
std::unique_ptr<AudioEncoderRuntimeConfig> config =
|
||||
rtc::MakeUnique<AudioEncoderRuntimeConfig>();
|
||||
absl::make_unique<AudioEncoderRuntimeConfig>();
|
||||
|
||||
config->bitrate_bps = prng_.Rand(0, 3000000);
|
||||
config->enable_fec = prng_.Rand<bool>();
|
||||
@ -85,7 +85,7 @@ EventGenerator::NewAudioNetworkAdaptation() {
|
||||
config->num_channels = prng_.Rand(1, 2);
|
||||
config->uplink_packet_loss_fraction = prng_.Rand<float>();
|
||||
|
||||
return rtc::MakeUnique<RtcEventAudioNetworkAdaptation>(std::move(config));
|
||||
return absl::make_unique<RtcEventAudioNetworkAdaptation>(std::move(config));
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventBweUpdateDelayBased>
|
||||
@ -94,7 +94,7 @@ EventGenerator::NewBweUpdateDelayBased() {
|
||||
int32_t bitrate_bps = prng_.Rand(0, kMaxBweBps);
|
||||
BandwidthUsage state = static_cast<BandwidthUsage>(
|
||||
prng_.Rand(static_cast<uint32_t>(BandwidthUsage::kLast) - 1));
|
||||
return rtc::MakeUnique<RtcEventBweUpdateDelayBased>(bitrate_bps, state);
|
||||
return absl::make_unique<RtcEventBweUpdateDelayBased>(bitrate_bps, state);
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventBweUpdateLossBased>
|
||||
@ -105,8 +105,8 @@ EventGenerator::NewBweUpdateLossBased() {
|
||||
uint8_t fraction_lost = prng_.Rand<uint8_t>();
|
||||
int32_t total_packets = prng_.Rand(1, kMaxPackets);
|
||||
|
||||
return rtc::MakeUnique<RtcEventBweUpdateLossBased>(bitrate_bps, fraction_lost,
|
||||
total_packets);
|
||||
return absl::make_unique<RtcEventBweUpdateLossBased>(
|
||||
bitrate_bps, fraction_lost, total_packets);
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventProbeClusterCreated>
|
||||
@ -118,8 +118,8 @@ EventGenerator::NewProbeClusterCreated() {
|
||||
int min_probes = prng_.Rand(5, 50);
|
||||
int min_bytes = prng_.Rand(500, 50000);
|
||||
|
||||
return rtc::MakeUnique<RtcEventProbeClusterCreated>(id, bitrate_bps,
|
||||
min_probes, min_bytes);
|
||||
return absl::make_unique<RtcEventProbeClusterCreated>(id, bitrate_bps,
|
||||
min_probes, min_bytes);
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventProbeResultFailure>
|
||||
@ -129,7 +129,7 @@ EventGenerator::NewProbeResultFailure() {
|
||||
ProbeFailureReason reason = static_cast<ProbeFailureReason>(
|
||||
prng_.Rand(static_cast<uint32_t>(ProbeFailureReason::kLast) - 1));
|
||||
|
||||
return rtc::MakeUnique<RtcEventProbeResultFailure>(id, reason);
|
||||
return absl::make_unique<RtcEventProbeResultFailure>(id, reason);
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventProbeResultSuccess>
|
||||
@ -139,7 +139,7 @@ EventGenerator::NewProbeResultSuccess() {
|
||||
int id = prng_.Rand(1, kMaxNumProbes);
|
||||
int bitrate_bps = prng_.Rand(0, kMaxBweBps);
|
||||
|
||||
return rtc::MakeUnique<RtcEventProbeResultSuccess>(id, bitrate_bps);
|
||||
return absl::make_unique<RtcEventProbeResultSuccess>(id, bitrate_bps);
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventIceCandidatePairConfig>
|
||||
@ -176,7 +176,7 @@ EventGenerator::NewIceCandidatePairConfig() {
|
||||
static_cast<IceCandidatePairConfigType>(prng_.Rand(
|
||||
static_cast<uint32_t>(IceCandidatePairConfigType::kNumValues) - 1));
|
||||
uint32_t pair_id = prng_.Rand<uint32_t>();
|
||||
return rtc::MakeUnique<RtcEventIceCandidatePairConfig>(type, pair_id, desc);
|
||||
return absl::make_unique<RtcEventIceCandidatePairConfig>(type, pair_id, desc);
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventIceCandidatePair>
|
||||
@ -186,7 +186,7 @@ EventGenerator::NewIceCandidatePair() {
|
||||
static_cast<uint32_t>(IceCandidatePairEventType::kNumValues) - 1));
|
||||
uint32_t pair_id = prng_.Rand<uint32_t>();
|
||||
|
||||
return rtc::MakeUnique<RtcEventIceCandidatePair>(type, pair_id);
|
||||
return absl::make_unique<RtcEventIceCandidatePair>(type, pair_id);
|
||||
}
|
||||
|
||||
rtcp::ReportBlock EventGenerator::NewReportBlock() {
|
||||
@ -226,17 +226,17 @@ EventGenerator::NewRtcpPacketIncoming() {
|
||||
case 0: {
|
||||
rtcp::SenderReport sender_report = NewSenderReport();
|
||||
rtc::Buffer buffer = sender_report.Build();
|
||||
return rtc::MakeUnique<RtcEventRtcpPacketIncoming>(buffer);
|
||||
return absl::make_unique<RtcEventRtcpPacketIncoming>(buffer);
|
||||
}
|
||||
case 1: {
|
||||
rtcp::ReceiverReport receiver_report = NewReceiverReport();
|
||||
rtc::Buffer buffer = receiver_report.Build();
|
||||
return rtc::MakeUnique<RtcEventRtcpPacketIncoming>(buffer);
|
||||
return absl::make_unique<RtcEventRtcpPacketIncoming>(buffer);
|
||||
}
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
rtc::Buffer buffer;
|
||||
return rtc::MakeUnique<RtcEventRtcpPacketIncoming>(buffer);
|
||||
return absl::make_unique<RtcEventRtcpPacketIncoming>(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,17 +247,17 @@ EventGenerator::NewRtcpPacketOutgoing() {
|
||||
case 0: {
|
||||
rtcp::SenderReport sender_report = NewSenderReport();
|
||||
rtc::Buffer buffer = sender_report.Build();
|
||||
return rtc::MakeUnique<RtcEventRtcpPacketOutgoing>(buffer);
|
||||
return absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer);
|
||||
}
|
||||
case 1: {
|
||||
rtcp::ReceiverReport receiver_report = NewReceiverReport();
|
||||
rtc::Buffer buffer = receiver_report.Build();
|
||||
return rtc::MakeUnique<RtcEventRtcpPacketOutgoing>(buffer);
|
||||
return absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer);
|
||||
}
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
rtc::Buffer buffer;
|
||||
return rtc::MakeUnique<RtcEventRtcpPacketOutgoing>(buffer);
|
||||
return absl::make_unique<RtcEventRtcpPacketOutgoing>(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ std::unique_ptr<RtcEventRtpPacketIncoming> EventGenerator::NewRtpPacketIncoming(
|
||||
RtpPacketReceived rtp_packet(&extension_map);
|
||||
RandomizeRtpPacket(packet_size, ssrc, extension_map, &rtp_packet);
|
||||
|
||||
return rtc::MakeUnique<RtcEventRtpPacketIncoming>(rtp_packet);
|
||||
return absl::make_unique<RtcEventRtpPacketIncoming>(rtp_packet);
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventRtpPacketOutgoing> EventGenerator::NewRtpPacketOutgoing(
|
||||
@ -329,8 +329,8 @@ std::unique_ptr<RtcEventRtpPacketOutgoing> EventGenerator::NewRtpPacketOutgoing(
|
||||
RandomizeRtpPacket(packet_size, ssrc, extension_map, &rtp_packet);
|
||||
|
||||
int probe_cluster_id = prng_.Rand(0, 100000);
|
||||
return rtc::MakeUnique<RtcEventRtpPacketOutgoing>(rtp_packet,
|
||||
probe_cluster_id);
|
||||
return absl::make_unique<RtcEventRtpPacketOutgoing>(rtp_packet,
|
||||
probe_cluster_id);
|
||||
}
|
||||
|
||||
RtpHeaderExtensionMap EventGenerator::NewRtpHeaderExtensionMap() {
|
||||
@ -362,7 +362,7 @@ std::unique_ptr<RtcEventAudioReceiveStreamConfig>
|
||||
EventGenerator::NewAudioReceiveStreamConfig(
|
||||
uint32_t ssrc,
|
||||
const RtpHeaderExtensionMap& extensions) {
|
||||
auto config = rtc::MakeUnique<rtclog::StreamConfig>();
|
||||
auto config = absl::make_unique<rtclog::StreamConfig>();
|
||||
// Add SSRCs for the stream.
|
||||
config->remote_ssrc = ssrc;
|
||||
config->local_ssrc = prng_.Rand<uint32_t>();
|
||||
@ -374,14 +374,14 @@ EventGenerator::NewAudioReceiveStreamConfig(
|
||||
}
|
||||
}
|
||||
|
||||
return rtc::MakeUnique<RtcEventAudioReceiveStreamConfig>(std::move(config));
|
||||
return absl::make_unique<RtcEventAudioReceiveStreamConfig>(std::move(config));
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventAudioSendStreamConfig>
|
||||
EventGenerator::NewAudioSendStreamConfig(
|
||||
uint32_t ssrc,
|
||||
const RtpHeaderExtensionMap& extensions) {
|
||||
auto config = rtc::MakeUnique<rtclog::StreamConfig>();
|
||||
auto config = absl::make_unique<rtclog::StreamConfig>();
|
||||
// Add SSRC to the stream.
|
||||
config->local_ssrc = ssrc;
|
||||
// Add header extensions.
|
||||
@ -391,14 +391,14 @@ EventGenerator::NewAudioSendStreamConfig(
|
||||
config->rtp_extensions.emplace_back(kExtensions[i].name, id);
|
||||
}
|
||||
}
|
||||
return rtc::MakeUnique<RtcEventAudioSendStreamConfig>(std::move(config));
|
||||
return absl::make_unique<RtcEventAudioSendStreamConfig>(std::move(config));
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventVideoReceiveStreamConfig>
|
||||
EventGenerator::NewVideoReceiveStreamConfig(
|
||||
uint32_t ssrc,
|
||||
const RtpHeaderExtensionMap& extensions) {
|
||||
auto config = rtc::MakeUnique<rtclog::StreamConfig>();
|
||||
auto config = absl::make_unique<rtclog::StreamConfig>();
|
||||
|
||||
// Add SSRCs for the stream.
|
||||
config->remote_ssrc = ssrc;
|
||||
@ -417,14 +417,14 @@ EventGenerator::NewVideoReceiveStreamConfig(
|
||||
config->rtp_extensions.emplace_back(kExtensions[i].name, id);
|
||||
}
|
||||
}
|
||||
return rtc::MakeUnique<RtcEventVideoReceiveStreamConfig>(std::move(config));
|
||||
return absl::make_unique<RtcEventVideoReceiveStreamConfig>(std::move(config));
|
||||
}
|
||||
|
||||
std::unique_ptr<RtcEventVideoSendStreamConfig>
|
||||
EventGenerator::NewVideoSendStreamConfig(
|
||||
uint32_t ssrc,
|
||||
const RtpHeaderExtensionMap& extensions) {
|
||||
auto config = rtc::MakeUnique<rtclog::StreamConfig>();
|
||||
auto config = absl::make_unique<rtclog::StreamConfig>();
|
||||
|
||||
config->codecs.emplace_back(prng_.Rand<bool>() ? "VP8" : "H264",
|
||||
prng_.Rand(127), prng_.Rand(127));
|
||||
@ -437,7 +437,7 @@ EventGenerator::NewVideoSendStreamConfig(
|
||||
config->rtp_extensions.emplace_back(kExtensions[i].name, id);
|
||||
}
|
||||
}
|
||||
return rtc::MakeUnique<RtcEventVideoSendStreamConfig>(std::move(config));
|
||||
return absl::make_unique<RtcEventVideoSendStreamConfig>(std::move(config));
|
||||
}
|
||||
|
||||
bool VerifyLoggedAlrStateEvent(const RtcEventAlrState& original_event,
|
||||
|
||||
@ -166,6 +166,7 @@ rtc_static_library("rtc_internal_video_codecs") {
|
||||
deps = [
|
||||
":rtc_h264_profile_id",
|
||||
"../modules/video_coding:video_codec_interface",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
sources = [
|
||||
"engine/convert_legacy_video_factory.cc",
|
||||
@ -407,6 +408,7 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_task_queue",
|
||||
"../rtc_base:stringutils",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
sources = [
|
||||
"base/fakeframesource.cc",
|
||||
@ -498,6 +500,7 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:stringutils",
|
||||
"../test:field_trial",
|
||||
"../test:test_common",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
sources = [
|
||||
"base/codec_unittest.cc",
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/call/audio_sink.h"
|
||||
#include "media/base/audiosource.h"
|
||||
#include "media/base/mediaengine.h"
|
||||
@ -30,7 +31,6 @@
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/copyonwritebuffer.h"
|
||||
#include "rtc_base/networkroute.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/stringutils.h"
|
||||
|
||||
using webrtc::RtpExtension;
|
||||
@ -479,7 +479,7 @@ class FakeVoiceMediaChannel : public RtpHelper<VoiceMediaChannel> {
|
||||
RTC_CHECK(it->second->source() == source);
|
||||
} else {
|
||||
local_sinks_.insert(std::make_pair(
|
||||
ssrc, rtc::MakeUnique<VoiceChannelAudioSink>(source)));
|
||||
ssrc, absl::make_unique<VoiceChannelAudioSink>(source)));
|
||||
}
|
||||
} else {
|
||||
if (it != local_sinks_.end()) {
|
||||
|
||||
@ -93,7 +93,7 @@ cricket::CaptureState FakeVideoCapturer::Start(
|
||||
SetCaptureFormat(&format);
|
||||
running_ = true;
|
||||
SetCaptureState(cricket::CS_RUNNING);
|
||||
frame_source_ = rtc::MakeUnique<FakeFrameSource>(
|
||||
frame_source_ = absl::make_unique<FakeFrameSource>(
|
||||
format.width, format.height,
|
||||
format.interval / rtc::kNumNanosecsPerMicrosec);
|
||||
frame_source_->SetRotation(rotation_);
|
||||
|
||||
@ -15,13 +15,13 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "media/base/fakeframesource.h"
|
||||
#include "media/base/mediachannel.h"
|
||||
#include "media/base/testutils.h"
|
||||
#include "media/base/videoadapter.h"
|
||||
#include "rtc_base/gunit.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace cricket {
|
||||
namespace {
|
||||
@ -35,11 +35,11 @@ class VideoAdapterTest : public testing::Test {
|
||||
void SetUp() override {
|
||||
capture_format_ = {kWidth, kHeight, VideoFormat::FpsToInterval(kDefaultFps),
|
||||
cricket::FOURCC_I420};
|
||||
frame_source_ = rtc::MakeUnique<FakeFrameSource>(
|
||||
frame_source_ = absl::make_unique<FakeFrameSource>(
|
||||
kWidth, kHeight,
|
||||
VideoFormat::FpsToInterval(kDefaultFps) / rtc::kNumNanosecsPerMicrosec);
|
||||
|
||||
adapter_wrapper_ = rtc::MakeUnique<VideoAdapterWrapper>(&adapter_);
|
||||
adapter_wrapper_ = absl::make_unique<VideoAdapterWrapper>(&adapter_);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/video_codecs/video_decoder_factory.h"
|
||||
#include "api/video_codecs/video_decoder_software_fallback_wrapper.h"
|
||||
#include "api/video_codecs/video_encoder_factory.h"
|
||||
@ -27,7 +28,6 @@
|
||||
#include "media/engine/webrtcvideodecoderfactory.h"
|
||||
#include "media/engine/webrtcvideoencoderfactory.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace cricket {
|
||||
|
||||
@ -98,7 +98,7 @@ class EncoderAdapter : public webrtc::VideoEncoderFactory {
|
||||
std::unique_ptr<WebRtcVideoEncoderFactory> external_encoder_factory)
|
||||
: internal_encoder_factory_(new webrtc::InternalEncoderFactory()),
|
||||
external_encoder_factory_(
|
||||
rtc::MakeUnique<CricketToWebRtcEncoderFactory>(
|
||||
absl::make_unique<CricketToWebRtcEncoderFactory>(
|
||||
std::move(external_encoder_factory))) {}
|
||||
|
||||
webrtc::VideoEncoderFactory::CodecInfo QueryVideoEncoder(
|
||||
@ -125,7 +125,7 @@ class EncoderAdapter : public webrtc::VideoEncoderFactory {
|
||||
format)) {
|
||||
internal_encoder =
|
||||
CodecNamesEq(format.name.c_str(), kVp8CodecName)
|
||||
? rtc::MakeUnique<webrtc::VP8EncoderSimulcastProxy>(
|
||||
? absl::make_unique<webrtc::VP8EncoderSimulcastProxy>(
|
||||
internal_encoder_factory_.get(), format)
|
||||
: internal_encoder_factory_->CreateVideoEncoder(format);
|
||||
}
|
||||
@ -136,7 +136,7 @@ class EncoderAdapter : public webrtc::VideoEncoderFactory {
|
||||
format)) {
|
||||
external_encoder =
|
||||
CodecNamesEq(format.name.c_str(), kVp8CodecName)
|
||||
? rtc::MakeUnique<webrtc::SimulcastEncoderAdapter>(
|
||||
? absl::make_unique<webrtc::SimulcastEncoderAdapter>(
|
||||
external_encoder_factory_.get(), format)
|
||||
: external_encoder_factory_->CreateVideoEncoder(format);
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ FakeWebRtcVideoDecoderFactory::CreateVideoDecoder(
|
||||
if (IsFormatSupported(supported_codec_formats_, format)) {
|
||||
num_created_decoders_++;
|
||||
std::unique_ptr<FakeWebRtcVideoDecoder> decoder =
|
||||
rtc::MakeUnique<FakeWebRtcVideoDecoder>(this);
|
||||
absl::make_unique<FakeWebRtcVideoDecoder>(this);
|
||||
decoders_.push_back(decoder.get());
|
||||
return decoder;
|
||||
}
|
||||
@ -224,11 +224,12 @@ FakeWebRtcVideoEncoderFactory::CreateVideoEncoder(
|
||||
// encoders. Enter vp8_factory_mode so that we now create these encoders
|
||||
// instead of more adapters.
|
||||
vp8_factory_mode_ = true;
|
||||
encoder = rtc::MakeUnique<webrtc::SimulcastEncoderAdapter>(this, format);
|
||||
encoder =
|
||||
absl::make_unique<webrtc::SimulcastEncoderAdapter>(this, format);
|
||||
} else {
|
||||
num_created_encoders_++;
|
||||
created_video_encoder_event_.Set();
|
||||
encoder = rtc::MakeUnique<FakeWebRtcVideoEncoder>(this);
|
||||
encoder = absl::make_unique<FakeWebRtcVideoEncoder>(this);
|
||||
encoders_.push_back(static_cast<FakeWebRtcVideoEncoder*>(encoder.get()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,13 +15,13 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/video_codecs/video_decoder.h"
|
||||
#include "api/video_codecs/video_decoder_factory.h"
|
||||
#include "api/video_codecs/video_encoder.h"
|
||||
#include "api/video_codecs/video_encoder_factory.h"
|
||||
#include "rtc_base/criticalsection.h"
|
||||
#include "rtc_base/event.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
|
||||
namespace cricket {
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/test/create_simulcast_test_fixture.h"
|
||||
#include "api/test/simulcast_test_fixture.h"
|
||||
#include "api/video_codecs/sdp_video_format.h"
|
||||
@ -22,7 +23,6 @@
|
||||
#include "modules/video_coding/codecs/vp8/include/vp8.h"
|
||||
#include "modules/video_coding/include/video_codec_interface.h"
|
||||
#include "modules/video_coding/utility/simulcast_test_fixture_impl.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "test/function_video_decoder_factory.h"
|
||||
#include "test/function_video_encoder_factory.h"
|
||||
#include "test/gmock.h"
|
||||
@ -42,14 +42,14 @@ constexpr int kDefaultHeight = 720;
|
||||
std::unique_ptr<SimulcastTestFixture> CreateSpecificSimulcastTestFixture(
|
||||
VideoEncoderFactory* internal_encoder_factory) {
|
||||
std::unique_ptr<VideoEncoderFactory> encoder_factory =
|
||||
rtc::MakeUnique<FunctionVideoEncoderFactory>(
|
||||
absl::make_unique<FunctionVideoEncoderFactory>(
|
||||
[internal_encoder_factory]() {
|
||||
return rtc::MakeUnique<SimulcastEncoderAdapter>(
|
||||
return absl::make_unique<SimulcastEncoderAdapter>(
|
||||
internal_encoder_factory,
|
||||
SdpVideoFormat(cricket::kVp8CodecName));
|
||||
});
|
||||
std::unique_ptr<VideoDecoderFactory> decoder_factory =
|
||||
rtc::MakeUnique<FunctionVideoDecoderFactory>(
|
||||
absl::make_unique<FunctionVideoDecoderFactory>(
|
||||
[]() { return VP8Decoder::Create(); });
|
||||
return CreateSimulcastTestFixture(std::move(encoder_factory),
|
||||
std::move(decoder_factory),
|
||||
|
||||
@ -917,6 +917,7 @@ rtc_static_library("webrtc_opus") {
|
||||
"../../rtc_base:rtc_numerics",
|
||||
"../../rtc_base:safe_minmax",
|
||||
"../../system_wrappers:field_trial_api",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
public_deps = [
|
||||
@ -1034,6 +1035,7 @@ rtc_static_library("audio_network_adaptor") {
|
||||
"../../rtc_base/system:file_wrapper",
|
||||
"../../system_wrappers",
|
||||
"../../system_wrappers:field_trial_api",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
|
||||
@ -1775,6 +1777,7 @@ if (rtc_include_tests) {
|
||||
testonly = true
|
||||
|
||||
deps = audio_coding_deps + [
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"../..:typedefs",
|
||||
":audio_coding",
|
||||
":neteq_input_audio_tools",
|
||||
@ -2248,6 +2251,7 @@ if (rtc_include_tests) {
|
||||
"../../test:test_common",
|
||||
"../../test:test_support",
|
||||
"//testing/gtest",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
|
||||
defines = audio_coding_defines
|
||||
|
||||
@ -12,10 +12,10 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h"
|
||||
#include "logging/rtc_event_log/rtc_event_log.h"
|
||||
#include "modules/audio_coding/audio_network_adaptor/event_log_writer.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -63,9 +63,9 @@ void EventLogWriter::MaybeLogEncoderConfig(
|
||||
}
|
||||
|
||||
void EventLogWriter::LogEncoderConfig(const AudioEncoderRuntimeConfig& config) {
|
||||
auto config_copy = rtc::MakeUnique<AudioEncoderRuntimeConfig>(config);
|
||||
event_log_->Log(
|
||||
rtc::MakeUnique<RtcEventAudioNetworkAdaptation>(std::move(config_copy)));
|
||||
auto config_copy = absl::make_unique<AudioEncoderRuntimeConfig>(config);
|
||||
event_log_->Log(absl::make_unique<RtcEventAudioNetworkAdaptation>(
|
||||
std::move(config_copy)));
|
||||
last_logged_config_ = config;
|
||||
}
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h"
|
||||
#include "modules/audio_coding/audio_network_adaptor/controller_manager.h"
|
||||
@ -25,7 +26,6 @@
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/numerics/safe_minmax.h"
|
||||
#include "rtc_base/protobuf_utils.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/string_to_number.h"
|
||||
#include "rtc_base/timeutils.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
@ -239,7 +239,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderOpusImpl::MakeAudioEncoder(
|
||||
const AudioEncoderOpusConfig& config,
|
||||
int payload_type) {
|
||||
RTC_DCHECK(config.IsOk());
|
||||
return rtc::MakeUnique<AudioEncoderOpusImpl>(config, payload_type);
|
||||
return absl::make_unique<AudioEncoderOpusImpl>(config, payload_type);
|
||||
}
|
||||
|
||||
absl::optional<AudioCodecInfo> AudioEncoderOpusImpl::QueryAudioEncoder(
|
||||
@ -388,7 +388,7 @@ AudioEncoderOpusImpl::AudioEncoderOpusImpl(const AudioEncoderOpusConfig& config,
|
||||
return DefaultAudioNetworkAdaptorCreator(config_string, event_log);
|
||||
},
|
||||
// We choose 5sec as initial time constant due to empirical data.
|
||||
rtc::MakeUnique<SmoothingFilterImpl>(5000)) {}
|
||||
absl::make_unique<SmoothingFilterImpl>(5000)) {}
|
||||
|
||||
AudioEncoderOpusImpl::AudioEncoderOpusImpl(
|
||||
const AudioEncoderOpusConfig& config,
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/audio_codecs/opus/audio_encoder_opus.h"
|
||||
#include "common_audio/mocks/mock_smoothing_filter.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
@ -21,7 +22,6 @@
|
||||
#include "modules/audio_coding/neteq/tools/audio_loop.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/fakeclock.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
@ -64,7 +64,7 @@ struct AudioEncoderOpusStates {
|
||||
|
||||
std::unique_ptr<AudioEncoderOpusStates> CreateCodec(size_t num_channels) {
|
||||
std::unique_ptr<AudioEncoderOpusStates> states =
|
||||
rtc::MakeUnique<AudioEncoderOpusStates>();
|
||||
absl::make_unique<AudioEncoderOpusStates>();
|
||||
states->mock_audio_network_adaptor = nullptr;
|
||||
states->fake_clock.reset(new rtc::ScopedFakeClock());
|
||||
states->fake_clock->SetTimeMicros(kInitialTimeUs);
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/audio/audio_frame.h"
|
||||
#include "api/audio_codecs/L16/audio_encoder_L16.h"
|
||||
#include "api/audio_codecs/g711/audio_encoder_g711.h"
|
||||
@ -33,7 +34,6 @@
|
||||
#include "modules/audio_coding/neteq/tools/input_audio_file.h"
|
||||
#include "rtc_base/flags.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "typedefs.h" // NOLINT(build/include)
|
||||
|
||||
namespace webrtc {
|
||||
@ -313,7 +313,7 @@ int RunRtpEncode(int argc, char* argv[]) {
|
||||
AudioEncoderCng::Config cng_config = GetCngConfig(codec->SampleRateHz());
|
||||
RTC_DCHECK(codec);
|
||||
cng_config.speech_encoder = std::move(codec);
|
||||
codec = rtc::MakeUnique<AudioEncoderCng>(std::move(cng_config));
|
||||
codec = absl::make_unique<AudioEncoderCng>(std::move(cng_config));
|
||||
}
|
||||
RTC_DCHECK(codec);
|
||||
|
||||
|
||||
@ -206,6 +206,7 @@ rtc_source_set("audio_device_module_from_input_and_output") {
|
||||
":windows_core_audio_utility",
|
||||
"../../rtc_base:checks",
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
|
||||
@ -10,12 +10,12 @@
|
||||
|
||||
#include "modules/audio_device/android/aaudio_player.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/array_view.h"
|
||||
#include "modules/audio_device/android/audio_manager.h"
|
||||
#include "modules/audio_device/fine_audio_buffer.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -123,7 +123,7 @@ void AAudioPlayer::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) {
|
||||
// Create a modified audio buffer class which allows us to ask for any number
|
||||
// of samples (and not only multiple of 10ms) to match the optimal buffer
|
||||
// size per callback used by AAudio.
|
||||
fine_audio_buffer_ = rtc::MakeUnique<FineAudioBuffer>(audio_device_buffer_);
|
||||
fine_audio_buffer_ = absl::make_unique<FineAudioBuffer>(audio_device_buffer_);
|
||||
}
|
||||
|
||||
int AAudioPlayer::SpeakerVolumeIsAvailable(bool& available) {
|
||||
|
||||
@ -10,12 +10,12 @@
|
||||
|
||||
#include "modules/audio_device/android/aaudio_recorder.h"
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/array_view.h"
|
||||
#include "modules/audio_device/android/audio_manager.h"
|
||||
#include "modules/audio_device/fine_audio_buffer.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/timeutils.h"
|
||||
#include "system_wrappers/include/sleep.h"
|
||||
|
||||
@ -110,7 +110,7 @@ void AAudioRecorder::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) {
|
||||
// Create a modified audio buffer class which allows us to deliver any number
|
||||
// of samples (and not only multiples of 10ms which WebRTC uses) to match the
|
||||
// native AAudio buffer size.
|
||||
fine_audio_buffer_ = rtc::MakeUnique<FineAudioBuffer>(audio_device_buffer_);
|
||||
fine_audio_buffer_ = absl::make_unique<FineAudioBuffer>(audio_device_buffer_);
|
||||
}
|
||||
|
||||
int AAudioRecorder::EnableBuiltInAEC(bool enable) {
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/array_view.h"
|
||||
#include "modules/audio_device/android/audio_common.h"
|
||||
#include "modules/audio_device/android/audio_manager.h"
|
||||
@ -20,7 +21,6 @@
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/format_macros.h"
|
||||
#include "rtc_base/platform_thread.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/timeutils.h"
|
||||
|
||||
#define TAG "OpenSLESPlayer"
|
||||
@ -216,7 +216,7 @@ void OpenSLESPlayer::AllocateDataBuffers() {
|
||||
ALOGD("native buffer size: %" PRIuS, buffer_size_in_samples);
|
||||
ALOGD("native buffer size in ms: %.2f",
|
||||
audio_parameters_.GetBufferSizeInMilliseconds());
|
||||
fine_audio_buffer_ = rtc::MakeUnique<FineAudioBuffer>(audio_device_buffer_);
|
||||
fine_audio_buffer_ = absl::make_unique<FineAudioBuffer>(audio_device_buffer_);
|
||||
// Allocated memory for audio buffers.
|
||||
for (int i = 0; i < kNumOfOpenSLESBuffers; ++i) {
|
||||
audio_buffers_[i].reset(new SLint16[buffer_size_in_samples]);
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/array_view.h"
|
||||
#include "modules/audio_device/android/audio_common.h"
|
||||
#include "modules/audio_device/android/audio_manager.h"
|
||||
@ -20,7 +21,6 @@
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/format_macros.h"
|
||||
#include "rtc_base/platform_thread.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/timeutils.h"
|
||||
|
||||
#define TAG "OpenSLESRecorder"
|
||||
@ -341,7 +341,7 @@ void OpenSLESRecorder::AllocateDataBuffers() {
|
||||
audio_parameters_.GetBytesPerBuffer());
|
||||
ALOGD("native sample rate: %d", audio_parameters_.sample_rate());
|
||||
RTC_DCHECK(audio_device_buffer_);
|
||||
fine_audio_buffer_ = rtc::MakeUnique<FineAudioBuffer>(audio_device_buffer_);
|
||||
fine_audio_buffer_ = absl::make_unique<FineAudioBuffer>(audio_device_buffer_);
|
||||
// Allocate queue of audio buffers that stores recorded audio samples.
|
||||
const int buffer_size_samples =
|
||||
audio_parameters_.frames_per_buffer() * audio_parameters_.channels();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user