Removing call to deprecated SetExtraOptions method
Bug: webrtc:5298 Change-Id: If81d74727bb231f6e61b1647cc7b80ef13107b62 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182121 Commit-Queue: Per Åhgren <peah@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31972}
This commit is contained in:
@ -581,7 +581,6 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) {
|
|||||||
apm_config.voice_detection.enabled = *options.typing_detection;
|
apm_config.voice_detection.enabled = *options.typing_detection;
|
||||||
}
|
}
|
||||||
|
|
||||||
ap->SetExtraOptions(config);
|
|
||||||
ap->ApplyConfig(apm_config);
|
ap->ApplyConfig(apm_config);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,7 +155,6 @@ TEST(WebRtcVoiceEngineTestStubLibrary, StartupShutdown) {
|
|||||||
if (!use_null_apm) {
|
if (!use_null_apm) {
|
||||||
EXPECT_CALL(*apm, GetConfig()).WillRepeatedly(ReturnPointee(&apm_config));
|
EXPECT_CALL(*apm, GetConfig()).WillRepeatedly(ReturnPointee(&apm_config));
|
||||||
EXPECT_CALL(*apm, ApplyConfig(_)).WillRepeatedly(SaveArg<0>(&apm_config));
|
EXPECT_CALL(*apm, ApplyConfig(_)).WillRepeatedly(SaveArg<0>(&apm_config));
|
||||||
EXPECT_CALL(*apm, SetExtraOptions(::testing::_));
|
|
||||||
EXPECT_CALL(*apm, DetachAecDump());
|
EXPECT_CALL(*apm, DetachAecDump());
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -200,7 +199,6 @@ class WebRtcVoiceEngineTestFake : public ::testing::TestWithParam<bool> {
|
|||||||
.WillRepeatedly(ReturnPointee(&apm_config_));
|
.WillRepeatedly(ReturnPointee(&apm_config_));
|
||||||
EXPECT_CALL(*apm_, ApplyConfig(_))
|
EXPECT_CALL(*apm_, ApplyConfig(_))
|
||||||
.WillRepeatedly(SaveArg<0>(&apm_config_));
|
.WillRepeatedly(SaveArg<0>(&apm_config_));
|
||||||
EXPECT_CALL(*apm_, SetExtraOptions(::testing::_));
|
|
||||||
EXPECT_CALL(*apm_, DetachAecDump());
|
EXPECT_CALL(*apm_, DetachAecDump());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,9 +228,6 @@ class WebRtcVoiceEngineTestFake : public ::testing::TestWithParam<bool> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SetupChannel() {
|
bool SetupChannel() {
|
||||||
if (!use_null_apm_) {
|
|
||||||
EXPECT_CALL(*apm_, SetExtraOptions(::testing::_));
|
|
||||||
}
|
|
||||||
channel_ = engine_->CreateMediaChannel(&call_, cricket::MediaConfig(),
|
channel_ = engine_->CreateMediaChannel(&call_, cricket::MediaConfig(),
|
||||||
cricket::AudioOptions(),
|
cricket::AudioOptions(),
|
||||||
webrtc::CryptoOptions());
|
webrtc::CryptoOptions());
|
||||||
@ -310,17 +305,11 @@ class WebRtcVoiceEngineTestFake : public ::testing::TestWithParam<bool> {
|
|||||||
EXPECT_CALL(*adm_, RecordingIsInitialized()).WillOnce(Return(false));
|
EXPECT_CALL(*adm_, RecordingIsInitialized()).WillOnce(Return(false));
|
||||||
EXPECT_CALL(*adm_, Recording()).WillOnce(Return(false));
|
EXPECT_CALL(*adm_, Recording()).WillOnce(Return(false));
|
||||||
EXPECT_CALL(*adm_, InitRecording()).WillOnce(Return(0));
|
EXPECT_CALL(*adm_, InitRecording()).WillOnce(Return(0));
|
||||||
if (!use_null_apm_) {
|
|
||||||
EXPECT_CALL(*apm_, SetExtraOptions(::testing::_));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
channel_->SetSend(enable);
|
channel_->SetSend(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetSendParameters(const cricket::AudioSendParameters& params) {
|
void SetSendParameters(const cricket::AudioSendParameters& params) {
|
||||||
if (!use_null_apm_) {
|
|
||||||
EXPECT_CALL(*apm_, SetExtraOptions(::testing::_));
|
|
||||||
}
|
|
||||||
ASSERT_TRUE(channel_);
|
ASSERT_TRUE(channel_);
|
||||||
EXPECT_TRUE(channel_->SetSendParameters(params));
|
EXPECT_TRUE(channel_->SetSendParameters(params));
|
||||||
}
|
}
|
||||||
@ -332,9 +321,6 @@ class WebRtcVoiceEngineTestFake : public ::testing::TestWithParam<bool> {
|
|||||||
ASSERT_TRUE(channel_);
|
ASSERT_TRUE(channel_);
|
||||||
if (!use_null_apm_) {
|
if (!use_null_apm_) {
|
||||||
EXPECT_CALL(*apm_, set_output_will_be_muted(!enable));
|
EXPECT_CALL(*apm_, set_output_will_be_muted(!enable));
|
||||||
if (enable && options) {
|
|
||||||
EXPECT_CALL(*apm_, SetExtraOptions(::testing::_));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
EXPECT_TRUE(channel_->SetAudioSend(ssrc, enable, options, source));
|
EXPECT_TRUE(channel_->SetAudioSend(ssrc, enable, options, source));
|
||||||
}
|
}
|
||||||
@ -3071,9 +3057,6 @@ TEST_P(WebRtcVoiceEngineTestFake, SetOptionOverridesViaChannels) {
|
|||||||
|
|
||||||
EXPECT_CALL(*adm_, Recording()).Times(2).WillRepeatedly(Return(false));
|
EXPECT_CALL(*adm_, Recording()).Times(2).WillRepeatedly(Return(false));
|
||||||
EXPECT_CALL(*adm_, InitRecording()).Times(2).WillRepeatedly(Return(0));
|
EXPECT_CALL(*adm_, InitRecording()).Times(2).WillRepeatedly(Return(0));
|
||||||
if (!use_null_apm_) {
|
|
||||||
EXPECT_CALL(*apm_, SetExtraOptions(::testing::_)).Times(10);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::unique_ptr<cricket::WebRtcVoiceMediaChannel> channel1(
|
std::unique_ptr<cricket::WebRtcVoiceMediaChannel> channel1(
|
||||||
static_cast<cricket::WebRtcVoiceMediaChannel*>(
|
static_cast<cricket::WebRtcVoiceMediaChannel*>(
|
||||||
@ -3193,10 +3176,6 @@ TEST_P(WebRtcVoiceEngineTestFake, TestSetDscpOptions) {
|
|||||||
std::unique_ptr<cricket::WebRtcVoiceMediaChannel> channel;
|
std::unique_ptr<cricket::WebRtcVoiceMediaChannel> channel;
|
||||||
webrtc::RtpParameters parameters;
|
webrtc::RtpParameters parameters;
|
||||||
|
|
||||||
if (!use_null_apm_) {
|
|
||||||
EXPECT_CALL(*apm_, SetExtraOptions(::testing::_)).Times(3);
|
|
||||||
}
|
|
||||||
|
|
||||||
channel.reset(static_cast<cricket::WebRtcVoiceMediaChannel*>(
|
channel.reset(static_cast<cricket::WebRtcVoiceMediaChannel*>(
|
||||||
engine_->CreateMediaChannel(&call_, config, cricket::AudioOptions(),
|
engine_->CreateMediaChannel(&call_, config, cricket::AudioOptions(),
|
||||||
webrtc::CryptoOptions())));
|
webrtc::CryptoOptions())));
|
||||||
|
|||||||
@ -497,7 +497,6 @@ class CallSimulator : public ::testing::TestWithParam<SimulationConfig> {
|
|||||||
apm_.reset(AudioProcessingBuilderForTesting().Create(config));
|
apm_.reset(AudioProcessingBuilderForTesting().Create(config));
|
||||||
ASSERT_TRUE(!!apm_);
|
ASSERT_TRUE(!!apm_);
|
||||||
set_default_desktop_apm_runtime_settings(apm_.get());
|
set_default_desktop_apm_runtime_settings(apm_.get());
|
||||||
apm_->SetExtraOptions(config);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SettingsType::kAllSubmodulesTurnedOff: {
|
case SettingsType::kAllSubmodulesTurnedOff: {
|
||||||
@ -511,7 +510,6 @@ class CallSimulator : public ::testing::TestWithParam<SimulationConfig> {
|
|||||||
apm_.reset(AudioProcessingBuilderForTesting().Create(config));
|
apm_.reset(AudioProcessingBuilderForTesting().Create(config));
|
||||||
ASSERT_TRUE(!!apm_);
|
ASSERT_TRUE(!!apm_);
|
||||||
set_default_desktop_apm_runtime_settings(apm_.get());
|
set_default_desktop_apm_runtime_settings(apm_.get());
|
||||||
apm_->SetExtraOptions(config);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SettingsType::kDefaultApmDesktopWithoutExtendedFilter: {
|
case SettingsType::kDefaultApmDesktopWithoutExtendedFilter: {
|
||||||
@ -519,7 +517,6 @@ class CallSimulator : public ::testing::TestWithParam<SimulationConfig> {
|
|||||||
apm_.reset(AudioProcessingBuilderForTesting().Create(config));
|
apm_.reset(AudioProcessingBuilderForTesting().Create(config));
|
||||||
ASSERT_TRUE(!!apm_);
|
ASSERT_TRUE(!!apm_);
|
||||||
set_default_desktop_apm_runtime_settings(apm_.get());
|
set_default_desktop_apm_runtime_settings(apm_.get());
|
||||||
apm_->SetExtraOptions(config);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -287,7 +287,6 @@ void AecDumpBasedSimulator::HandleMessage(
|
|||||||
if (settings_.use_verbose_logging) {
|
if (settings_.use_verbose_logging) {
|
||||||
std::cout << "Setting used in config:" << std::endl;
|
std::cout << "Setting used in config:" << std::endl;
|
||||||
}
|
}
|
||||||
Config config;
|
|
||||||
AudioProcessing::Config apm_config = ap_->GetConfig();
|
AudioProcessing::Config apm_config = ap_->GetConfig();
|
||||||
|
|
||||||
if (msg.has_aec_enabled() || settings_.use_aec) {
|
if (msg.has_aec_enabled() || settings_.use_aec) {
|
||||||
@ -438,7 +437,6 @@ void AecDumpBasedSimulator::HandleMessage(
|
|||||||
}
|
}
|
||||||
|
|
||||||
ap_->ApplyConfig(apm_config);
|
ap_->ApplyConfig(apm_config);
|
||||||
ap_->SetExtraOptions(config);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user