Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1562)

Unified Diff: content/renderer/media/webrtc_local_audio_track_unittest.cc

Issue 227743004: Added a kEchoCancellation constraint to turn off the audio processing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/webrtc_local_audio_source_provider_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc_local_audio_track_unittest.cc
diff --git a/content/renderer/media/webrtc_local_audio_track_unittest.cc b/content/renderer/media/webrtc_local_audio_track_unittest.cc
index 9bc9ff4cd5787b368b2c210a7a832ef6b2af0414..64f4ef3158d762babf676c25383e57d9710caf65 100644
--- a/content/renderer/media/webrtc_local_audio_track_unittest.cc
+++ b/content/renderer/media/webrtc_local_audio_track_unittest.cc
@@ -170,7 +170,7 @@ class WebRtcLocalAudioTrackTest : public ::testing::Test {
virtual void SetUp() OVERRIDE {
params_.Reset(media::AudioParameters::AUDIO_PCM_LOW_LATENCY,
media::CHANNEL_LAYOUT_STEREO, 2, 0, 48000, 16, 480);
- blink::WebMediaConstraints constraints;
+ MockMediaConstraintFactory constraint_factory;
blink_source_.initialize("dummy", blink::WebMediaStreamSource::TypeAudio,
"dummy");
MediaStreamAudioSource* audio_source = new MediaStreamAudioSource();
@@ -178,9 +178,9 @@ class WebRtcLocalAudioTrackTest : public ::testing::Test {
StreamDeviceInfo device(MEDIA_DEVICE_AUDIO_CAPTURE,
std::string(), std::string());
- capturer_ = WebRtcAudioCapturer::CreateCapturer(-1, device,
- constraints, NULL,
- audio_source);
+ capturer_ = WebRtcAudioCapturer::CreateCapturer(
+ -1, device, constraint_factory.CreateWebMediaConstraints(), NULL,
+ audio_source);
audio_source->SetAudioCapturer(capturer_);
capturer_source_ = new MockCapturerSource(capturer_.get());
EXPECT_CALL(*capturer_source_.get(), OnInitialize(_, capturer_.get(), -1))
@@ -446,11 +446,13 @@ TEST_F(WebRtcLocalAudioTrackTest, ConnectTracksToDifferentCapturers) {
track_1->AddSink(sink_1.get());
// Create a new capturer with new source with different audio format.
- blink::WebMediaConstraints constraints;
+ MockMediaConstraintFactory constraint_factory;
StreamDeviceInfo device(MEDIA_DEVICE_AUDIO_CAPTURE,
std::string(), std::string());
scoped_refptr<WebRtcAudioCapturer> new_capturer(
- WebRtcAudioCapturer::CreateCapturer(-1, device, constraints, NULL, NULL));
+ WebRtcAudioCapturer::CreateCapturer(
+ -1, device, constraint_factory.CreateWebMediaConstraints(), NULL,
+ NULL));
scoped_refptr<MockCapturerSource> new_source(
new MockCapturerSource(new_capturer.get()));
EXPECT_CALL(*new_source.get(), OnInitialize(_, new_capturer.get(), -1));
« no previous file with comments | « content/renderer/media/webrtc_local_audio_source_provider_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698