Add kGoogEchoCancellation to MediaConstraintsInterface.
This constraint will be equal to kEchoCancellation until we've updated Chromium to use kGoogEchoCancellation where that constraint is needed. Once that's done, I'll change kEchoCancellation to be 'echoCancellation'. BUG=webrtc:4747 R=andrew@webrtc.org Review URL: https://codereview.webrtc.org/1179233003. Cr-Commit-Position: refs/heads/master@{#9433}
This commit is contained in:
@@ -51,7 +51,7 @@ void FromConstraints(const MediaConstraintsInterface::Constraints& constraints,
|
||||
const char* name;
|
||||
cricket::Settable<bool>& value;
|
||||
} key_to_value[] = {
|
||||
{MediaConstraintsInterface::kEchoCancellation,
|
||||
{MediaConstraintsInterface::kGoogEchoCancellation,
|
||||
options->echo_cancellation},
|
||||
// Both kExperimentalEchoCancellation (old) and
|
||||
// kExtendedFilterEchoCancellation (new) translate to
|
||||
|
||||
@@ -43,7 +43,8 @@ using webrtc::PeerConnectionFactoryInterface;
|
||||
|
||||
TEST(LocalAudioSourceTest, SetValidOptions) {
|
||||
webrtc::FakeConstraints constraints;
|
||||
constraints.AddMandatory(MediaConstraintsInterface::kEchoCancellation, false);
|
||||
constraints.AddMandatory(
|
||||
MediaConstraintsInterface::kGoogEchoCancellation, false);
|
||||
constraints.AddOptional(
|
||||
MediaConstraintsInterface::kExtendedFilterEchoCancellation, true);
|
||||
constraints.AddOptional(MediaConstraintsInterface::kDAEchoCancellation, true);
|
||||
@@ -133,8 +134,10 @@ TEST(LocalAudioSourceTest, OptionNotSet) {
|
||||
|
||||
TEST(LocalAudioSourceTest, MandatoryOverridesOptional) {
|
||||
webrtc::FakeConstraints constraints;
|
||||
constraints.AddMandatory(MediaConstraintsInterface::kEchoCancellation, false);
|
||||
constraints.AddOptional(MediaConstraintsInterface::kEchoCancellation, true);
|
||||
constraints.AddMandatory(
|
||||
MediaConstraintsInterface::kGoogEchoCancellation, false);
|
||||
constraints.AddOptional(
|
||||
MediaConstraintsInterface::kGoogEchoCancellation, true);
|
||||
|
||||
rtc::scoped_refptr<LocalAudioSource> source =
|
||||
LocalAudioSource::Create(PeerConnectionFactoryInterface::Options(),
|
||||
|
||||
@@ -48,6 +48,8 @@ const char MediaConstraintsInterface::kMinFrameRate[] = "minFrameRate";
|
||||
// Audio constraints.
|
||||
const char MediaConstraintsInterface::kEchoCancellation[] =
|
||||
"googEchoCancellation";
|
||||
const char MediaConstraintsInterface::kGoogEchoCancellation[] =
|
||||
"googEchoCancellation";
|
||||
const char MediaConstraintsInterface::kExperimentalEchoCancellation[] =
|
||||
"googEchoCancellation2";
|
||||
const char MediaConstraintsInterface::kExtendedFilterEchoCancellation[] =
|
||||
|
||||
@@ -73,7 +73,13 @@ class MediaConstraintsInterface {
|
||||
|
||||
// Constraint keys used by a local audio source.
|
||||
// These keys are google specific.
|
||||
// TODO(tommi): Change kEchoCancellation to be "echoCancellation" once
|
||||
// Chrome has been updated to use kGoogEchoCancellation where the 'goog'
|
||||
// variant is needed.
|
||||
// See https://code.google.com/p/webrtc/issues/detail?id=4747
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user