Update MediaEngine unittests to create Call using Environment

Bug: webrtc:15656
Change-Id: I8016f03fd0640d218344f5a6ab53c4b0663690c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329081
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41260}
This commit is contained in:
Danil Chapovalov 2023-11-28 17:30:07 +01:00 committed by WebRTC LUCI CQ
parent 4b196371ab
commit 75aa7e94dd
3 changed files with 50 additions and 91 deletions

View File

@ -825,6 +825,8 @@ if (rtc_include_tests) {
"../api:simulcast_test_fixture_api", "../api:simulcast_test_fixture_api",
"../api/audio_codecs:builtin_audio_decoder_factory", "../api/audio_codecs:builtin_audio_decoder_factory",
"../api/audio_codecs:builtin_audio_encoder_factory", "../api/audio_codecs:builtin_audio_encoder_factory",
"../api/environment",
"../api/environment:environment_factory",
"../api/rtc_event_log", "../api/rtc_event_log",
"../api/task_queue", "../api/task_queue",
"../api/task_queue:default_task_queue_factory", "../api/task_queue:default_task_queue_factory",

View File

@ -20,9 +20,9 @@
#include "absl/algorithm/container.h" #include "absl/algorithm/container.h"
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "api/rtc_event_log/rtc_event_log.h" #include "api/environment/environment.h"
#include "api/environment/environment_factory.h"
#include "api/rtp_parameters.h" #include "api/rtp_parameters.h"
#include "api/task_queue/default_task_queue_factory.h"
#include "api/test/mock_encoder_selector.h" #include "api/test/mock_encoder_selector.h"
#include "api/test/mock_video_bitrate_allocator.h" #include "api/test/mock_video_bitrate_allocator.h"
#include "api/test/mock_video_bitrate_allocator_factory.h" #include "api/test/mock_video_bitrate_allocator_factory.h"
@ -101,6 +101,8 @@ using ::testing::WithArg;
using ::webrtc::BitrateConstraints; using ::webrtc::BitrateConstraints;
using ::webrtc::Call; using ::webrtc::Call;
using ::webrtc::CallConfig; using ::webrtc::CallConfig;
using ::webrtc::CreateEnvironment;
using ::webrtc::Environment;
using ::webrtc::kDefaultScalabilityModeStr; using ::webrtc::kDefaultScalabilityModeStr;
using ::webrtc::RtpExtension; using ::webrtc::RtpExtension;
using ::webrtc::RtpPacket; using ::webrtc::RtpPacket;
@ -355,13 +357,10 @@ class WebRtcVideoEngineTest : public ::testing::Test {
explicit WebRtcVideoEngineTest(const std::string& field_trials) explicit WebRtcVideoEngineTest(const std::string& field_trials)
: field_trials_(field_trials), : field_trials_(field_trials),
time_controller_(webrtc::Timestamp::Millis(4711)), time_controller_(webrtc::Timestamp::Millis(4711)),
task_queue_factory_(time_controller_.CreateTaskQueueFactory()), env_(CreateEnvironment(&field_trials_,
call_(Call::Create([&] { time_controller_.CreateTaskQueueFactory(),
CallConfig call_config(&event_log_); time_controller_.GetClock())),
call_config.task_queue_factory = task_queue_factory_.get(); call_(Call::Create(CallConfig(env_))),
call_config.trials = &field_trials_;
return call_config;
}())),
encoder_factory_(new cricket::FakeWebRtcVideoEncoderFactory), encoder_factory_(new cricket::FakeWebRtcVideoEncoderFactory),
decoder_factory_(new cricket::FakeWebRtcVideoDecoderFactory), decoder_factory_(new cricket::FakeWebRtcVideoDecoderFactory),
video_bitrate_allocator_factory_( video_bitrate_allocator_factory_(
@ -398,8 +397,7 @@ class WebRtcVideoEngineTest : public ::testing::Test {
webrtc::test::ScopedKeyValueConfig field_trials_; webrtc::test::ScopedKeyValueConfig field_trials_;
webrtc::GlobalSimulatedTimeController time_controller_; webrtc::GlobalSimulatedTimeController time_controller_;
webrtc::RtcEventLogNull event_log_; Environment env_;
std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory_;
// Used in WebRtcVideoEngineVoiceTest, but defined here so it's properly // Used in WebRtcVideoEngineVoiceTest, but defined here so it's properly
// initialized when the constructor is called. // initialized when the constructor is called.
std::unique_ptr<Call> call_; std::unique_ptr<Call> call_;
@ -1479,14 +1477,10 @@ TEST(WebRtcVideoEngineNewVideoCodecFactoryTest, Vp8) {
EXPECT_CALL(*decoder_factory, CreateVideoDecoder(format)).Times(0); EXPECT_CALL(*decoder_factory, CreateVideoDecoder(format)).Times(0);
// Create a call. // Create a call.
webrtc::RtcEventLogNull event_log;
webrtc::GlobalSimulatedTimeController time_controller( webrtc::GlobalSimulatedTimeController time_controller(
webrtc::Timestamp::Millis(4711)); webrtc::Timestamp::Millis(4711));
auto task_queue_factory = time_controller.CreateTaskQueueFactory(); CallConfig call_config(CreateEnvironment(
CallConfig call_config(&event_log); time_controller.CreateTaskQueueFactory(), time_controller.GetClock()));
webrtc::FieldTrialBasedConfig field_trials;
call_config.trials = &field_trials;
call_config.task_queue_factory = task_queue_factory.get();
const std::unique_ptr<Call> call = Call::Create(call_config); const std::unique_ptr<Call> call = Call::Create(call_config);
// Create send channel. // Create send channel.
@ -1615,18 +1609,11 @@ TEST_F(WebRtcVideoEngineTest, SetVideoRtxEnabled) {
class WebRtcVideoChannelEncodedFrameCallbackTest : public ::testing::Test { class WebRtcVideoChannelEncodedFrameCallbackTest : public ::testing::Test {
protected: protected:
CallConfig GetCallConfig(webrtc::RtcEventLogNull* event_log,
webrtc::TaskQueueFactory* task_queue_factory) {
CallConfig call_config(event_log);
call_config.task_queue_factory = task_queue_factory;
call_config.trials = &field_trials_;
return call_config;
}
WebRtcVideoChannelEncodedFrameCallbackTest() WebRtcVideoChannelEncodedFrameCallbackTest()
: task_queue_factory_(time_controller_.CreateTaskQueueFactory()), : env_(CreateEnvironment(&field_trials_,
call_(Call::Create( time_controller_.CreateTaskQueueFactory(),
GetCallConfig(&event_log_, task_queue_factory_.get()))), time_controller_.GetClock())),
call_(Call::Create(CallConfig(env_))),
video_bitrate_allocator_factory_( video_bitrate_allocator_factory_(
webrtc::CreateBuiltinVideoBitrateAllocatorFactory()), webrtc::CreateBuiltinVideoBitrateAllocatorFactory()),
engine_( engine_(
@ -1676,8 +1663,7 @@ class WebRtcVideoChannelEncodedFrameCallbackTest : public ::testing::Test {
webrtc::GlobalSimulatedTimeController time_controller_{ webrtc::GlobalSimulatedTimeController time_controller_{
Timestamp::Seconds(1000)}; Timestamp::Seconds(1000)};
webrtc::test::ScopedKeyValueConfig field_trials_; webrtc::test::ScopedKeyValueConfig field_trials_;
webrtc::RtcEventLogNull event_log_; Environment env_;
std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory_;
std::unique_ptr<Call> call_; std::unique_ptr<Call> call_;
std::unique_ptr<webrtc::VideoBitrateAllocatorFactory> std::unique_ptr<webrtc::VideoBitrateAllocatorFactory>
video_bitrate_allocator_factory_; video_bitrate_allocator_factory_;
@ -1796,7 +1782,9 @@ TEST_F(WebRtcVideoChannelEncodedFrameCallbackTest, DoesNotDecodeWhenDisabled) {
class WebRtcVideoChannelBaseTest : public ::testing::Test { class WebRtcVideoChannelBaseTest : public ::testing::Test {
protected: protected:
WebRtcVideoChannelBaseTest() WebRtcVideoChannelBaseTest()
: task_queue_factory_(time_controller_.CreateTaskQueueFactory()), : env_(CreateEnvironment(&field_trials_,
time_controller_.CreateTaskQueueFactory(),
time_controller_.GetClock())),
video_bitrate_allocator_factory_( video_bitrate_allocator_factory_(
webrtc::CreateBuiltinVideoBitrateAllocatorFactory()), webrtc::CreateBuiltinVideoBitrateAllocatorFactory()),
engine_(std::make_unique<webrtc::VideoEncoderFactoryTemplate< engine_(std::make_unique<webrtc::VideoEncoderFactoryTemplate<
@ -1814,10 +1802,7 @@ class WebRtcVideoChannelBaseTest : public ::testing::Test {
void SetUp() override { void SetUp() override {
// One testcase calls SetUp in a loop, only create call_ once. // One testcase calls SetUp in a loop, only create call_ once.
if (!call_) { if (!call_) {
CallConfig call_config(&event_log_); call_ = Call::Create(CallConfig(env_));
call_config.task_queue_factory = task_queue_factory_.get();
call_config.trials = &field_trials_;
call_ = Call::Create(call_config);
} }
cricket::MediaConfig media_config; cricket::MediaConfig media_config;
@ -2016,10 +2001,9 @@ class WebRtcVideoChannelBaseTest : public ::testing::Test {
webrtc::GlobalSimulatedTimeController time_controller_{ webrtc::GlobalSimulatedTimeController time_controller_{
Timestamp::Seconds(1000)}; Timestamp::Seconds(1000)};
webrtc::RtcEventLogNull event_log_;
webrtc::test::ScopedKeyValueConfig field_trials_; webrtc::test::ScopedKeyValueConfig field_trials_;
std::unique_ptr<webrtc::test::ScopedKeyValueConfig> override_field_trials_; std::unique_ptr<webrtc::test::ScopedKeyValueConfig> override_field_trials_;
std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory_; Environment env_;
std::unique_ptr<Call> call_; std::unique_ptr<Call> call_;
std::unique_ptr<webrtc::VideoBitrateAllocatorFactory> std::unique_ptr<webrtc::VideoBitrateAllocatorFactory>
video_bitrate_allocator_factory_; video_bitrate_allocator_factory_;
@ -9863,7 +9847,6 @@ class WebRtcVideoChannelSimulcastTest : public ::testing::Test {
} }
webrtc::test::ScopedKeyValueConfig field_trials_; webrtc::test::ScopedKeyValueConfig field_trials_;
webrtc::RtcEventLogNull event_log_;
FakeCall fake_call_; FakeCall fake_call_;
cricket::FakeWebRtcVideoEncoderFactory* encoder_factory_; cricket::FakeWebRtcVideoEncoderFactory* encoder_factory_;
cricket::FakeWebRtcVideoDecoderFactory* decoder_factory_; cricket::FakeWebRtcVideoDecoderFactory* decoder_factory_;

View File

@ -18,8 +18,9 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/environment/environment.h"
#include "api/environment/environment_factory.h"
#include "api/media_types.h" #include "api/media_types.h"
#include "api/rtc_event_log/rtc_event_log.h"
#include "api/rtp_parameters.h" #include "api/rtp_parameters.h"
#include "api/scoped_refptr.h" #include "api/scoped_refptr.h"
#include "api/task_queue/default_task_queue_factory.h" #include "api/task_queue/default_task_queue_factory.h"
@ -45,6 +46,7 @@
#include "test/mock_audio_encoder_factory.h" #include "test/mock_audio_encoder_factory.h"
#include "test/scoped_key_value_config.h" #include "test/scoped_key_value_config.h"
namespace {
using ::testing::_; using ::testing::_;
using ::testing::ContainerEq; using ::testing::ContainerEq;
using ::testing::Contains; using ::testing::Contains;
@ -55,11 +57,11 @@ using ::testing::ReturnPointee;
using ::testing::SaveArg; using ::testing::SaveArg;
using ::testing::StrictMock; using ::testing::StrictMock;
using ::testing::UnorderedElementsAreArray; using ::testing::UnorderedElementsAreArray;
using ::webrtc::BitrateConstraints;
using ::webrtc::Call; using ::webrtc::Call;
using ::webrtc::CallConfig; using ::webrtc::CallConfig;
using ::webrtc::CreateEnvironment;
namespace { using ::webrtc::Environment;
using webrtc::BitrateConstraints;
constexpr uint32_t kMaxUnsignaledRecvStreams = 4; constexpr uint32_t kMaxUnsignaledRecvStreams = 4;
@ -3678,24 +3680,18 @@ TEST(WebRtcVoiceEngineTest, StartupShutdown) {
for (bool use_null_apm : {false, true}) { for (bool use_null_apm : {false, true}) {
// If the VoiceEngine wants to gather available codecs early, that's fine // If the VoiceEngine wants to gather available codecs early, that's fine
// but we never want it to create a decoder at this stage. // but we never want it to create a decoder at this stage.
std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory = Environment env = CreateEnvironment();
webrtc::CreateDefaultTaskQueueFactory();
rtc::scoped_refptr<webrtc::test::MockAudioDeviceModule> adm = rtc::scoped_refptr<webrtc::test::MockAudioDeviceModule> adm =
webrtc::test::MockAudioDeviceModule::CreateNice(); webrtc::test::MockAudioDeviceModule::CreateNice();
rtc::scoped_refptr<webrtc::AudioProcessing> apm = rtc::scoped_refptr<webrtc::AudioProcessing> apm =
use_null_apm ? nullptr : webrtc::AudioProcessingBuilder().Create(); use_null_apm ? nullptr : webrtc::AudioProcessingBuilder().Create();
webrtc::FieldTrialBasedConfig field_trials;
cricket::WebRtcVoiceEngine engine( cricket::WebRtcVoiceEngine engine(
task_queue_factory.get(), adm.get(), &env.task_queue_factory(), adm.get(),
webrtc::MockAudioEncoderFactory::CreateUnusedFactory(), webrtc::MockAudioEncoderFactory::CreateUnusedFactory(),
webrtc::MockAudioDecoderFactory::CreateUnusedFactory(), nullptr, apm, webrtc::MockAudioDecoderFactory::CreateUnusedFactory(), nullptr, apm,
nullptr, field_trials); nullptr, env.field_trials());
engine.Init(); engine.Init();
webrtc::RtcEventLogNull event_log; std::unique_ptr<Call> call = Call::Create(CallConfig(env));
CallConfig call_config(&event_log);
call_config.trials = &field_trials;
call_config.task_queue_factory = task_queue_factory.get();
std::unique_ptr<Call> call = Call::Create(call_config);
std::unique_ptr<cricket::VoiceMediaSendChannelInterface> send_channel = std::unique_ptr<cricket::VoiceMediaSendChannelInterface> send_channel =
engine.CreateSendChannel( engine.CreateSendChannel(
call.get(), cricket::MediaConfig(), cricket::AudioOptions(), call.get(), cricket::MediaConfig(), cricket::AudioOptions(),
@ -3713,25 +3709,19 @@ TEST(WebRtcVoiceEngineTest, StartupShutdown) {
TEST(WebRtcVoiceEngineTest, StartupShutdownWithExternalADM) { TEST(WebRtcVoiceEngineTest, StartupShutdownWithExternalADM) {
rtc::AutoThread main_thread; rtc::AutoThread main_thread;
for (bool use_null_apm : {false, true}) { for (bool use_null_apm : {false, true}) {
std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory = Environment env = CreateEnvironment();
webrtc::CreateDefaultTaskQueueFactory();
auto adm = rtc::make_ref_counted< auto adm = rtc::make_ref_counted<
::testing::NiceMock<webrtc::test::MockAudioDeviceModule>>(); ::testing::NiceMock<webrtc::test::MockAudioDeviceModule>>();
{ {
rtc::scoped_refptr<webrtc::AudioProcessing> apm = rtc::scoped_refptr<webrtc::AudioProcessing> apm =
use_null_apm ? nullptr : webrtc::AudioProcessingBuilder().Create(); use_null_apm ? nullptr : webrtc::AudioProcessingBuilder().Create();
webrtc::FieldTrialBasedConfig field_trials;
cricket::WebRtcVoiceEngine engine( cricket::WebRtcVoiceEngine engine(
task_queue_factory.get(), adm.get(), &env.task_queue_factory(), adm.get(),
webrtc::MockAudioEncoderFactory::CreateUnusedFactory(), webrtc::MockAudioEncoderFactory::CreateUnusedFactory(),
webrtc::MockAudioDecoderFactory::CreateUnusedFactory(), nullptr, apm, webrtc::MockAudioDecoderFactory::CreateUnusedFactory(), nullptr, apm,
nullptr, field_trials); nullptr, env.field_trials());
engine.Init(); engine.Init();
webrtc::RtcEventLogNull event_log; std::unique_ptr<Call> call = Call::Create(CallConfig(env));
CallConfig call_config(&event_log);
call_config.trials = &field_trials;
call_config.task_queue_factory = task_queue_factory.get();
std::unique_ptr<Call> call = Call::Create(call_config);
std::unique_ptr<cricket::VoiceMediaSendChannelInterface> send_channel = std::unique_ptr<cricket::VoiceMediaSendChannelInterface> send_channel =
engine.CreateSendChannel( engine.CreateSendChannel(
call.get(), cricket::MediaConfig(), cricket::AudioOptions(), call.get(), cricket::MediaConfig(), cricket::AudioOptions(),
@ -3804,24 +3794,18 @@ TEST(WebRtcVoiceEngineTest, HasCorrectPayloadTypeMapping) {
TEST(WebRtcVoiceEngineTest, Has32Channels) { TEST(WebRtcVoiceEngineTest, Has32Channels) {
rtc::AutoThread main_thread; rtc::AutoThread main_thread;
for (bool use_null_apm : {false, true}) { for (bool use_null_apm : {false, true}) {
std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory = Environment env = CreateEnvironment();
webrtc::CreateDefaultTaskQueueFactory();
rtc::scoped_refptr<webrtc::test::MockAudioDeviceModule> adm = rtc::scoped_refptr<webrtc::test::MockAudioDeviceModule> adm =
webrtc::test::MockAudioDeviceModule::CreateNice(); webrtc::test::MockAudioDeviceModule::CreateNice();
rtc::scoped_refptr<webrtc::AudioProcessing> apm = rtc::scoped_refptr<webrtc::AudioProcessing> apm =
use_null_apm ? nullptr : webrtc::AudioProcessingBuilder().Create(); use_null_apm ? nullptr : webrtc::AudioProcessingBuilder().Create();
webrtc::FieldTrialBasedConfig field_trials;
cricket::WebRtcVoiceEngine engine( cricket::WebRtcVoiceEngine engine(
task_queue_factory.get(), adm.get(), &env.task_queue_factory(), adm.get(),
webrtc::MockAudioEncoderFactory::CreateUnusedFactory(), webrtc::MockAudioEncoderFactory::CreateUnusedFactory(),
webrtc::MockAudioDecoderFactory::CreateUnusedFactory(), nullptr, apm, webrtc::MockAudioDecoderFactory::CreateUnusedFactory(), nullptr, apm,
nullptr, field_trials); nullptr, env.field_trials());
engine.Init(); engine.Init();
webrtc::RtcEventLogNull event_log; std::unique_ptr<Call> call = Call::Create(CallConfig(env));
CallConfig call_config(&event_log);
call_config.trials = &field_trials;
call_config.task_queue_factory = task_queue_factory.get();
std::unique_ptr<Call> call = Call::Create(call_config);
std::vector<std::unique_ptr<cricket::VoiceMediaSendChannelInterface>> std::vector<std::unique_ptr<cricket::VoiceMediaSendChannelInterface>>
channels; channels;
@ -3843,8 +3827,7 @@ TEST(WebRtcVoiceEngineTest, Has32Channels) {
TEST(WebRtcVoiceEngineTest, SetRecvCodecs) { TEST(WebRtcVoiceEngineTest, SetRecvCodecs) {
rtc::AutoThread main_thread; rtc::AutoThread main_thread;
for (bool use_null_apm : {false, true}) { for (bool use_null_apm : {false, true}) {
std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory = Environment env = CreateEnvironment();
webrtc::CreateDefaultTaskQueueFactory();
// TODO(ossu): I'm not sure of the intent of this test. It's either: // TODO(ossu): I'm not sure of the intent of this test. It's either:
// - Check that our builtin codecs are usable by Channel. // - Check that our builtin codecs are usable by Channel.
// - The codecs provided by the engine is usable by Channel. // - The codecs provided by the engine is usable by Channel.
@ -3856,18 +3839,13 @@ TEST(WebRtcVoiceEngineTest, SetRecvCodecs) {
webrtc::test::MockAudioDeviceModule::CreateNice(); webrtc::test::MockAudioDeviceModule::CreateNice();
rtc::scoped_refptr<webrtc::AudioProcessing> apm = rtc::scoped_refptr<webrtc::AudioProcessing> apm =
use_null_apm ? nullptr : webrtc::AudioProcessingBuilder().Create(); use_null_apm ? nullptr : webrtc::AudioProcessingBuilder().Create();
webrtc::FieldTrialBasedConfig field_trials;
cricket::WebRtcVoiceEngine engine( cricket::WebRtcVoiceEngine engine(
task_queue_factory.get(), adm.get(), &env.task_queue_factory(), adm.get(),
webrtc::MockAudioEncoderFactory::CreateUnusedFactory(), webrtc::MockAudioEncoderFactory::CreateUnusedFactory(),
webrtc::CreateBuiltinAudioDecoderFactory(), nullptr, apm, nullptr, webrtc::CreateBuiltinAudioDecoderFactory(), nullptr, apm, nullptr,
field_trials); env.field_trials());
engine.Init(); engine.Init();
webrtc::RtcEventLogNull event_log; std::unique_ptr<Call> call = Call::Create(CallConfig(env));
CallConfig call_config(&event_log);
call_config.trials = &field_trials;
call_config.task_queue_factory = task_queue_factory.get();
std::unique_ptr<Call> call = Call::Create(call_config);
cricket::WebRtcVoiceReceiveChannel channel( cricket::WebRtcVoiceReceiveChannel channel(
&engine, cricket::MediaConfig(), cricket::AudioOptions(), &engine, cricket::MediaConfig(), cricket::AudioOptions(),
webrtc::CryptoOptions(), call.get(), webrtc::CryptoOptions(), call.get(),
@ -3880,21 +3858,17 @@ TEST(WebRtcVoiceEngineTest, SetRecvCodecs) {
TEST(WebRtcVoiceEngineTest, SetRtpSendParametersMaxBitrate) { TEST(WebRtcVoiceEngineTest, SetRtpSendParametersMaxBitrate) {
rtc::AutoThread main_thread; rtc::AutoThread main_thread;
std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory = Environment env = CreateEnvironment();
webrtc::CreateDefaultTaskQueueFactory();
rtc::scoped_refptr<webrtc::test::MockAudioDeviceModule> adm = rtc::scoped_refptr<webrtc::test::MockAudioDeviceModule> adm =
webrtc::test::MockAudioDeviceModule::CreateNice(); webrtc::test::MockAudioDeviceModule::CreateNice();
webrtc::FieldTrialBasedConfig field_trials;
FakeAudioSource source; FakeAudioSource source;
cricket::WebRtcVoiceEngine engine(task_queue_factory.get(), adm.get(), cricket::WebRtcVoiceEngine engine(&env.task_queue_factory(), adm.get(),
webrtc::CreateBuiltinAudioEncoderFactory(), webrtc::CreateBuiltinAudioEncoderFactory(),
webrtc::CreateBuiltinAudioDecoderFactory(), webrtc::CreateBuiltinAudioDecoderFactory(),
nullptr, nullptr, nullptr, field_trials); nullptr, nullptr, nullptr,
env.field_trials());
engine.Init(); engine.Init();
webrtc::RtcEventLogNull event_log; CallConfig call_config(env);
CallConfig call_config(&event_log);
call_config.trials = &field_trials;
call_config.task_queue_factory = task_queue_factory.get();
{ {
webrtc::AudioState::Config config; webrtc::AudioState::Config config;
config.audio_mixer = webrtc::AudioMixerImpl::Create(); config.audio_mixer = webrtc::AudioMixerImpl::Create();