Follow-up: Remove old DelayCorrection AEC config

This is a follow-up to r9401, where the configuration DelayCorrection
was replaced by ExtendedFilter.

This change also removes the media constraint
kExperimentalEchoCancellation which was replaced by
kExtendedFilterEchoCancellation in the same CL.

Both settings that are now being removed were kept in the code to avoid
API breakages. In https://codereview.chromium.org/1167343004,
depending code has been updated to avoid breakages.

BUG=webrtc:4696
R=bjornv@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1181413004.

Cr-Commit-Position: refs/heads/master@{#9444}
This commit is contained in:
Henrik Lundin 2015-06-16 09:53:23 +02:00
parent 76381d921f
commit b02af18c5c
6 changed files with 1 additions and 70 deletions

View File

@ -53,14 +53,6 @@ void FromConstraints(const MediaConstraintsInterface::Constraints& constraints,
} key_to_value[] = {
{MediaConstraintsInterface::kGoogEchoCancellation,
options->echo_cancellation},
// Both kExperimentalEchoCancellation (old) and
// kExtendedFilterEchoCancellation (new) translate to
// extended_filter_aec
// option being set. This is to manage the transition from the old to
// the
// new without breaking dependent code.
{MediaConstraintsInterface::kExperimentalEchoCancellation,
options->extended_filter_aec},
{MediaConstraintsInterface::kExtendedFilterEchoCancellation,
options->extended_filter_aec},
{MediaConstraintsInterface::kDAEchoCancellation,

View File

@ -78,51 +78,6 @@ TEST(LocalAudioSourceTest, SetValidOptions) {
EXPECT_TRUE(value);
}
// TODO(henrik.lundin) Remove SetExtendedFilterEchoCancellationOff test.
// https://code.google.com/p/webrtc/issues/detail?id=4696
TEST(LocalAudioSourceTest, SetExtendedFilterEchoCancellationOff) {
webrtc::FakeConstraints constraints;
constraints.AddOptional(
MediaConstraintsInterface::kExtendedFilterEchoCancellation, false);
rtc::scoped_refptr<LocalAudioSource> source = LocalAudioSource::Create(
PeerConnectionFactoryInterface::Options(), &constraints);
bool value;
EXPECT_TRUE(source->options().extended_filter_aec.Get(&value));
EXPECT_FALSE(value);
}
// TODO(henrik.lundin) Remove SetExperimentalEchoCancellationOn test.
// https://code.google.com/p/webrtc/issues/detail?id=4696
TEST(LocalAudioSourceTest, SetExperimentalEchoCancellationOn) {
webrtc::FakeConstraints constraints;
constraints.AddOptional(
MediaConstraintsInterface::kExperimentalEchoCancellation, true);
rtc::scoped_refptr<LocalAudioSource> source = LocalAudioSource::Create(
PeerConnectionFactoryInterface::Options(), &constraints);
bool value;
EXPECT_TRUE(source->options().extended_filter_aec.Get(&value));
EXPECT_TRUE(value);
}
// TODO(henrik.lundin) Remove SetExperimentalEchoCancellationOff test.
// https://code.google.com/p/webrtc/issues/detail?id=4696
TEST(LocalAudioSourceTest, SetExperimentalEchoCancellationOff) {
webrtc::FakeConstraints constraints;
constraints.AddOptional(
MediaConstraintsInterface::kExperimentalEchoCancellation, false);
rtc::scoped_refptr<LocalAudioSource> source = LocalAudioSource::Create(
PeerConnectionFactoryInterface::Options(), &constraints);
bool value;
EXPECT_TRUE(source->options().extended_filter_aec.Get(&value));
EXPECT_FALSE(value);
}
TEST(LocalAudioSourceTest, OptionNotSet) {
webrtc::FakeConstraints constraints;
rtc::scoped_refptr<LocalAudioSource> source =

View File

@ -50,8 +50,6 @@ const char MediaConstraintsInterface::kEchoCancellation[] =
"googEchoCancellation";
const char MediaConstraintsInterface::kGoogEchoCancellation[] =
"googEchoCancellation";
const char MediaConstraintsInterface::kExperimentalEchoCancellation[] =
"googEchoCancellation2";
const char MediaConstraintsInterface::kExtendedFilterEchoCancellation[] =
"googEchoCancellation2";
const char MediaConstraintsInterface::kDAEchoCancellation[] =

View File

@ -80,9 +80,6 @@ class MediaConstraintsInterface {
static const char kEchoCancellation[]; // googEchoCancellation
static const char kGoogEchoCancellation[]; // googEchoCancellation
// TODO(henrik.lundin) Remove kExperimentalEchoCancellation.
// https://code.google.com/p/webrtc/issues/detail?id=4696
static const char kExperimentalEchoCancellation[]; // googEchoCancellation2
static const char kExtendedFilterEchoCancellation[]; // googEchoCancellation2
static const char kDAEchoCancellation[]; // googDAEchoCancellation
static const char kAutoGainControl[]; // googAutoGainControl

View File

@ -328,10 +328,7 @@ int EchoCancellationImpl::Initialize() {
}
void EchoCancellationImpl::SetExtraOptions(const Config& config) {
// Both ExtendedFilter and DelayCorrection are diabled by default. If any one
// of them is true, then the extended filter mode is enabled.
extended_filter_enabled_ = config.Get<ExtendedFilter>().enabled ||
config.Get<DelayCorrection>().enabled;
extended_filter_enabled_ = config.Get<ExtendedFilter>().enabled;
reported_delay_enabled_ = config.Get<ReportedDelay>().enabled;
Configure();
}

View File

@ -54,14 +54,6 @@ class VoiceDetection;
// the delay difference more heavily, and back off from the difference more.
// Adjustments force a readaptation of the filter, so they should be avoided
// except when really necessary.
// TODO(henrik.lundin): Remove DelayCorrection once ExtendedFilter has
// propagated through to all channels
// (https://code.google.com/p/webrtc/issues/detail?id=4696).
struct DelayCorrection {
DelayCorrection() : enabled(false) {}
explicit DelayCorrection(bool enabled) : enabled(enabled) {}
bool enabled;
};
struct ExtendedFilter {
ExtendedFilter() : enabled(false) {}
explicit ExtendedFilter(bool enabled) : enabled(enabled) {}